var $topMenu = jQuery.noConflict();
$topMenu(document).ready(function(){
	$topMenu("ul.topnav li a").hover(function() { //When trigger is clicked...
		//Following events are applied to the subnav itself (moving subnav up and down)
		$topMenu(this).parent().find("div.subnav").stop().slideDown('fast').show('slow', function(){
			$topMenu(this).height("auto");
		}); //Drop down the subnav on click
		$topMenu(this).parent().hover(function() {
		}, function(){	
			$topMenu(this).parent().find("div.subnav").stop().slideUp('fast'); //When the mouse hovers out of the subnav, move it back up
		});
		//Following events are applied to the trigger (Hover events for the trigger)
		}).hover(function() { 
			$topMenu(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			$topMenu(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});

});
