                                                                // JavaScript Document


// SLIDE SWITCH FUNCTION

function slideSwitch() {
    try{
		var $active = $('#slideshow .active');

		if ( $active.length == 0 ) $active = $('#slideshow .slideShowContent:last');
	
		var $next =  $active.next().length ? $active.next()
			: $('#slideshow .slideShowContent:first');
	
	
		$active.animate({opacity: 0.0}, 2000, function(){
			$(this).removeClass('active').addClass('last-active');
		});
	
		$next.css({opacity: 0.0})
			.addClass('active').removeClass('last-active')
			.animate({opacity: 1.0}, 2000, function() {
				$active.animate({opacity: 0.0}, 2000).removeClass('active').addClass('last-active');
			});
	}catch(err){}
}





$(function(){

// run list of functions
$('#slideshow .slideShowContent:first').addClass("active");
setInterval( "slideSwitch()", 6000 );

// Selected State for Main Navigation

try{
	var hiddenNav = $(".hiddenNav").attr("id");
	$("#nav li a[title="+hiddenNav+"]").addClass("selected");	
}
catch(err){} 

try{
$(".the-best h2:first").addClass("selected").siblings("div").show();
$(".the-best h2").unbind().click(function(){															 
		if($(this).siblings("div").css("display") == "none"){	
			$(".the-best div").hide("fast");
			$(".the-best h2").removeClass("selected");
			$(this).siblings("div").show("fast");
			$(this).addClass("selected");
		
		}else{
			$(".the-best div").hide("slow");	
			$(".the-best h2").removeClass("selected");
		
		}		
	});
}
catch(err){} 

/*
// If you wish to have the notification to be clickable

try{
$(".presentation").click(function(){
$(".presentation span").hide();
$(this).children("span").show();
});
}
catch(err){}
*/

// Hover state for the notification

try{
$(".presentation").mouseover(function(){
$(this).children("span").show();
});
$(".presentation").mouseout(function(){
$(this).children("span").hide();
});
}
catch(err){}


});

    

    

    

    

    

    

    

    
