var $nav = jQuery.noConflict();
$nav(document).ready(function(){
	$nav("ul.sub-menu").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.sub-menu*)
	$nav("ul#menu li a, ul#menu li span").hover(function() { //When trigger is clicked...
		//Following events are applied to the sub-menu itself (moving sub-menu up and down)
		$nav(this).parent().find("ul.sub-menu").fadeIn('slow').show(); //Drop down the sub-menu on click
		$nav(this).parent().hover(function() {
		}, function(){
			$nav(this).parent().find("ul.sub-menu").fadeOut('slow'); //When the mouse hovers out of the sub-menu, move it back up
		});
		//Following events are applied to the trigger (Hover events for the trigger)
		}).hover(function() {
			$nav(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			$nav(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});
});
