// JavaScript Document

$(function(){
	$("#nav ul li.submenu").hoverIntent(
		function () {
			$(this).addClass("nav_selected");
			$("#nav ul li.nav_selected ul").show('normal');
		}, 
		function () {
			$("#nav ul li.nav_selected ul").hide('normal');
			$(this).removeClass("nav_selected");
		}
	);

	var num_div = $("#rotation div").length;
	
	if(num_div <= 1) { 
		$("#slideshow #prev").hide(); 
		$("#slideshow #next").hide(); 
	}
	
	$('#cycle_rotation').cycle({ 
			fx:     'fade', //how the slides change. Can also use
			speed:   1500, //how quickly the slides change. In milliseconds
			timeout: 6000, //how long slide is displayed before change. In milliseconds
			next:   '#next', //id for the next button
			prev:   '#prev', //id for the previous button
			pager:  '#cycle_nav', //id for the rotation navigation
			pause:   1 //slides pause when moused over.  change to 0 for no pause
	});


});

