$(document).ready(function(){
	$("li.nav_top").hover(function(e) { //When trigger is clicked...

		var thisMenuHasChildren = $(this).find("ul.subnav").children().html();
			if(thisMenuHasChildren != null){
				//Following events are applied to the subnav itself (moving subnav up and down)
				$(this).children().show(); //Drop down the subnav on click
				$(this).addClass("subhover"); //On hover over, add class "subhover"
			}

		//Following events are applied to the trigger (Hover events for the trigger)
		}, function(){
			$(this).parent().find("ul.subnav").hide(); //When the mouse hovers out of the subnav, move it back up
			$(this).removeClass("subhover"); //On hover out, remove class "subhover"
		});

});

