jQuery(function($) {
	/*
	// Force scrollbars to prevent jittering for pages with short content when menu expands
	var windowHeight = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
	var contentHeight = $("#mainContent").height() + $("#footer").height() + 231;
	
	if (contentHeight < windowHeight) {
		$("html").css("overflow", "scroll");
	}
	
	// Menu animation
	$("#nav ul ul").hide();
	
	var menuState = 1;
	
	function setMenuState() {
		if (menuState == 0) {
			menuState = 1;
		}
		else {
			menuState = 0;
		}
	}
	
	$("#nav li").hover(function() {
		if (menuState == 1) {
			$("ul", this).slideDown(300, "linear");
			//$("#nav ul ul").animate({height: "show"}, 750, "linear");
			setTimeout(setMenuState, 100);
			clearTimeout();
		}
	}, function() {
		if (menuState == 0) {
			$("ul", this).slideUp(300, "linear");
			//$("#nav ul ul").animate({height: "hide"}, 750, "linear");
			setTimeout(setMenuState, 100);
			clearTimeout();
		}
	});
	
	*/
	
	// Menu rollover animation
	$("#nav ul ul").hide();
	
	$("#nav li").hover(function() {
		$("ul", this).slideDown(450, "linear");
	},	function() {
		$("ul", this).slideUp(450, "linear");
	});
});