jq14(document).ready(function(){

	jq14("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)

	jq14("#topnav li span").click(function() { //When trigger is clicked...

		//Following events are applied to the subnav itself (moving subnav up and down)
		jq14(this).parent().find("ul.subnav").slideDown(200).show(); //Drop down the subnav on click

		jq14(this).parent().hover(function() {
		}, function(){
			if (document.compatMode == 'BackCompat' && navigator.userAgent.toLowerCase().indexOf("msie") != -1) {
				// Querks bug where IE flashes the component who's height reaches 0px after animation.  Just hide it instead.
				jq14(this).parent().find("ul.subnav").css({'display':'none'});																
			} else {
				jq14(this).parent().find("ul.subnav").slideUp(400); //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() {
			jq14(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			jq14(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});

});

