$(document).ready(function(){

// apply code only to Li items in the #nav ul
// on mouseenter show child element of of that li (the contained ul...)
//on mouseout hide the child ul.

$("ul#nav li").mouseenter(
	function(){
		$(this).css("background-color","#ffcc33");
		$(this).children("ul").css("display","block");
	})
	.mouseleave(
	function(){
		$(this).css("background","none");
		$(this).children("ul").css("display","none");
	});

//hides everything when the user leaves the page. Helps prevent menus from sticking
// around when the back button is clicked.
$(window).unload(
	function(){
		$("ul#nav li").css("background","none");
		$("ul#nav li ul").css("display","none");
});

});  //end document ready function
