// crazy menu action.. don't be jealous of this mad jquery skill
$(document).ready(function(){

	//Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)
	$("ul.subnav").parent().append("<span></span>");
	
	//When trigger is hovered...
	$("ul.topnav li").hover(function() 
		{ 	
			
			// Following events are applied to the subnav itself (moving subnav up and down)
			$(this).find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click
			
			// Add a class for a rollover image
			$(this).find("span").addClass("subhover");
		
		}, 
		function()
		{
			// When the mouse hovers out of the subnav, move it back up
			$(this).parent().find("ul.subnav").slideUp('slow');
			
			// Remove the rollover image class
			$(this).find("span.subhover").removeClass("subhover");
		});
});
