// JavaScript Document

jQuery(document).ready(function(){
	
	// show nested ul's (already hidden in the style sheet), get parent li's, and then hide them again
	jQuery('#nav li ul').show();
	var toplevel = jQuery('#nav li:has(ul)');	
	jQuery('#nav li ul').hide();

	//loop through each applicable parent li
	toplevel.each(function(){
		
		// set variable for each toplevel li
		var parentli = jQuery(this);
		
		// enable dropdown for child ul of each parent li - filter stops annoying, repeating animations!
		parentli.hover(function(){
			parentli.children('ul').filter(':not(:animated)').slideDown('slow');
		},
		function(){
			parentli.children('ul').filter(':not(:animated)').slideUp('slow');
		}); //close "hover" function

	}); // close "each" function

}); // close "ready" function
