
function switchy(div)
{
	var option=['a0', 'a1','a2','a3','a4','a5','a6','a7','a8','a9','a10','a11','a12','a13'];

	for(var i=0; i<option.length; i++)
	{
		obj=document.getElementById(option[i]);
		obj.style.display=(option[i]==div)? "block" : "none";
		//document.getElementById('theuk').style.display='block';
	}
}

$(function()
{


	$('li#bc_city a').toggle(function()
	{
		$(this).parent().addClass("bc_city_active");

		$('div#cityswitch').slideDown();

		return false;

	},function()
	{
		$(this).parent().removeClass("bc_city_active");

		$('div#cityswitch').slideUp();
		
		return false;

	});




	$('body.vouchercategorypage div.voucherbox').hover(function()
	{
		$(this).addClass("voucherhover");

	}, function()
	{
		$(this).removeClass("voucherhover");

	});



	
	//$("a#bookmarkme").click(function(e)
	
	// add a "rel" attrib if Opera 7+
	if(window.opera) 
	{
		if ($("a#bookmarkme").attr("rel") != "")
		{
			$("a#bookmarkme").attr("rel","sidebar");
		} 
	}

	$("a#bookmarkme").click(function(event)
	{
		event.preventDefault();
		var url = this.href;
		var title = this.title;

		if($.browser.msie) 
		{
			window.external.AddFavorite(url, title);
		}
		if (window.sidebar) // Mozilla Firefox Bookmark
		{ 
			window.sidebar.addPanel(title, url,"");
		} 
		else if(window.external || document.all) // IE Favorite
		{ 
			window.external.AddFavorite(url, title);
		} 
		else if(window.opera) // Opera 7+
		{ 
			$("a.jQueryBookmark").attr("href",bookmarkUrl);
			$("a.jQueryBookmark").attr("title",bookmarkTitle);
			$("a.jQueryBookmark").attr("rel","sidebar");
		} 
		else 
		{ 
			alert('Unfortunately, this browser does not support the requested action, please bookmark this page manually.');
			return false;
		}
	
	});



	//my_smothscroll();


	$('input.hintme').hint();


	
	// normal meganav behaviour

		$('div#nav_secondary ul li').hover(function()
		{
			$(this).addClass("hover");
			$(this).children("div.meganav").css("display", "block");

		}, function()
		{
			$(this).removeClass("hover");
			$(this).children("div.meganav").css("display", "none");
		});



	// sister switch
	/*
		$('div#sisterswitch').hover(function()
		{
			$(this).children("span").addClass("hover");
			$(this).children("div").css({'display':'block'});
			//$("div#sisters").slideToggle('fast');
			//return false;

		}, function()
		{
			$(this).children("span").removeClass("hover");
			$(this).children("div").css({'display':'none'});
			//$("div#sisters").slideToggle('fast');
			//return false;
		});
	*/

	// $("#infoboxes h3").pir();


	$('.hslides').cycle({
		fx: 'fade',
		timeout: 8000,
		cleartype: !$.support.opacity,
		cleartypeNoBg: true
	});





	$('a.additional').toggle(function()
	{
		var theanchor = $(this).attr('href');
		$(theanchor).slideDown(500);
		return false;
	},
	function()
	{
		var theanchor = $(this).attr('href');
		$(theanchor).slideUp(500);
		return false;
	});

	


	$('div#tweetbox ul').cycle({
		//fx: 'fade',
		fx: 'scrollLeft',
		timeout: 5000,
		cleartype: !$.support.opacity,
		cleartypeNoBg: true
	});


	$("#sidebartabs").idTabs(); 

	$("li#thegmapload a").click(function()
	{
		var theaddy = $('input[name=hiddenaddress]').val();

		loadmap();
		codeaddress(theaddy);

		return true
	});



	$('span#foot_gigllbadge').toggle(
		function(){
			
			//$("div#thegigllbadge").animate({"width": "850px"}, "slow");

			//$("div#thegigllbadge").slideDown();
			$("div#thegigllbadge").css({'display':'block'});
		},
		function(){
			
			//$("div#thegigllbadge").animate({"width": "0px"}, "slow");

			//$("div#thegigllbadge").slideUp();
			$("div#thegigllbadge").css({'display':'none'});
		}
	);

	
	$("textarea#badgecode").click(function()
	{
		$(this).focus();
		$(this).select();
	});
	


});

