/* Author: 

*/
jQuery(document).ready(function() {
	jQuery('#slideshow').cycle({ 
		delay: 500,
		speed: 600,
		timeout: 5000,
		pause: 1
	});	
});	


/*homepage features rollovers*/
jQuery(document).ready(function(){						
	
	jQuery(".feature_story_desc").css({ opacity: 0.01 });
	jQuery("div.feature_story").css('cursor','pointer');	
	jQuery("div.feature_story").click(function(){
   		window.location = $(this).find("a").attr("href"); 
		return false;
	});
	
	jQuery(".feature_story_desc").hover(
		  function(){
			  jQuery(this).fadeTo("normal", 0.8);
			}, 
		  function(){
			  jQuery(this).fadeTo("normal", 0.01);
			}
	);
}); 



/*courses menu*/
function smoothClose(){
	if(!$('#item_courses').hasClass('hover') && !$('#courses_menu').hasClass('hover')){ 
		$('#courses_menu').fadeOut('fast');
		$('#banner_inner').fadeIn();
		//$("#banner").animate({"height": "165px"},"fast");
	}
}
if($('#banner_inner').length > 0){		
	
	$(document).ready(function(){
	
			//initial config
			$('#courses_menu').hide();
			$('#courses_menu').removeClass('jq_hide');
			$("#banner").css("height","185px");
			 
			$('#item_courses').hoverIntent(
				function(){
					$(this).addClass("hover");
					$('#banner_inner').fadeOut('fast')
					$('#courses_menu').fadeIn();
					//$("#banner").animate({"height": "190px"},"fast");
				},		
				function(){                   
					$(this).removeClass("hover");
					setTimeout("smoothClose()",500);
				}
			);
					
			$('#courses_menu').hover(
				function(){
					$(this).addClass("hover");
				},
				function(){
					$(this).removeClass("hover");
					setTimeout("smoothClose()",500);
				}
			);
	});

}






















