jQuery=jQuery.noConflict();

jQuery(document).ready(function($){
	jQuery("#topnav>li>ul.subnav").parent("li").addClass("has-menu"); //Only shows drop down trigger when js is enabled - Adds class has-menu to list item

	jQuery("#topnav>li.has-menu").hover(
		 function() { //When item is hovered over...

			 //Following events are applied to the subnav itself (moving subnav up and down)
			 jQuery(this).find("ul.subnav").css({opacity: 1.0}).stop().slideDown('fast').show('slow', function(){
				jQuery(this).height("auto");
			 });
	 
			 jQuery(this).hover(function() {
			 }, function(){
				jQuery(this).find("ul.subnav").css({opacity: 0.33}).stop().slideUp('slow'); //When the mouse hovers out of subnav, move back up
			 });
		}
	);	

});
