$(document).ready(function(){



if($("#homerightside").length){

	$('#homepagebanners div:not(:first)').css('display','none');


	$('ul#homerightside a').click(function(){
var temp = new Array();
temp = $(this).attr('href').split('#');

		$('#homepagebanners div:visible').css('display','none');
		$('#homepagebanners div[id$=' + temp[1] + ']').show();

		return false;
			});

$('body').addClass('homepage');


$("#newsAndEventsTab a").mouseover(function () {

	$("#getSupportBox").hide();
	$("#getSupportTab").removeClass('onTab');
	$("#ourAffiliatesTab").removeClass('onTab');
	$("#ourAffiliatesBox").hide();
	$("#newsAndEventsTab").addClass('onTab');
	$("#newsAndEventsBox").show();
});

$("#getSupportTab a").mouseover(function () {
	$("#newsAndEventsBox").hide();
	$("#newsAndEventsTab").removeClass('onTab');
	$("#ourAffiliatesBox").hide();
	$("#ourAffiliatesTab").removeClass('onTab');
	$("#getSupportTab").addClass('onTab');
	$("#getSupportBox").show();
});



$("#ourAffiliatesTab a").mouseover (function () {
	$("#newsAndEventsBox").hide();
	$("#newsAndEventsTab").removeClass('onTab');
	$("#getSupportBox").hide();
	$("#getSupportTab").removeClass('onTab');
	$("#ourAffiliatesBox").show();
	$("#ourAffiliatesTab").addClass('onTab');
});


}
/*


$('ul#homerightside a').click(function()
{
	
switch($(this).children('img').attr('alt'))
{
	case "the dude":
		$('#banner').css('background-image', 'url("CSS/images/homepage/chooseWiselySleepSecurely.jpg")');
		break;	
	case "light":
		$('#banner').css('background-image', 'url("CSS/images/homepage/a-generation-of-tech.jpg")');
		break;	
	case "building":
		$('#banner').css('background-image', 'url("CSS/images/homepage/a-fortified-structure.jpg")');
		break;
}
return false;
	
});
*/

});
