/**
 * jQuery functions for all asia sites.
 *
 */
try {
	document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}


$(document).ready(Init);

function Init()
{
	//Right Nav Bold
	SwitchClass();
}

/**
 * SwitchClass - Right Nav Bold
 *
 * Method to bold right navigation link - any link containg the current channel guid need to make bold
 *
 *
 */
function  SwitchClass()
{
	var page_url = location.search;	
	var loc = page_url.indexOf('vgnextoid');
	var channelGUID =page_url.substring(loc+10,loc+50);
	$('div.response div.item a').each(function()
	{
			if($(this).attr('href').indexOf(channelGUID) > -1 && location.search.length > 0) 
			{
				$(this).find('span').removeClass('clearbold');
			}
	});

}
/**
 * IE6 Fix - Dropdowns appearing on top of Explore SLF worldwide overlay

**/
/*
Choose your country
*/
function ChooseYourCountry()
{
	$("#choose-country").hover(
		function(){
			if($("#choose-country-content:visible").size() < 1)
			{
				$("#choose-country-content").show();
				/*
				Hide the <select> menu (if applicable) in the first feature box on the
				right-hand column to fix the annoying IE6 bug where the dropdown is
				visible.
				*/
				$('#content-body div.col-right div.feature div.box select').css('visibility', 'hidden');
				$('#content-sidebar div.feature:first select').css('visibility', 'hidden');
			}
		},
		function() {
			$("#choose-country-content").hide();
			$('#content-body div.clearfix div.col-right div.feature div.box select').css('visibility', 'visible');
			$('#content-sidebar div.feature:first select').css('visibility', 'visible');
		}
	);

	$("#choose-country-content").hover(
		function() {
			$("#choose-country-content").show();
			$('#content-body div.clearfix div.col-right div.feature div.box select').css('visibility', 'hidden');
			$('#content-sidebar div.feature:first select').css('visibility', 'hidden');
		},
		function(){
			$("#choose-country-content").hide();
			$('#content-body div.clearfix div.col-right div.feature div.box select').css('visibility', 'visible');
			$('#content-sidebar div.feature:first select').css('visibility', 'visible');
		}
	);
}

