$(document).ready(function(){

// Utility Links
	//Border
	$("#utility-links :last-child").css("border", "none");

// Tabbed Nav
	// Backgrounds
	$("ul#tabbed-links li a").append("<span>&nbsp;</span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)
	$("ul#tabbed-links :first-child a").css({'background-position':'0px -35px','padding-left':'12px'});
	$("ul#tabbed-links li:last a span").css({'background-position':'-625px -35px','width':'15px'});

	//IE6 & 7 Fixes for margin. (I really hate doing this...)
	 var badBrowser = (/MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
   if (badBrowser) {
     $("#tabbed-links").css("margin-top","11px");
   }

	// Drop downs
	
	
	$("#tabbed-links li").hover(function() { //When trigger is clicked...
	
		//Following events are applied to the subnav itself (moving subnav up and down)
		$(this).find("ul").slideDown('fast').show(); //Drop down the subnav on click
		
		$(this).hover(function() {
			}, function(){
			$(this).find("ul").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() {
		$(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
		$(this).removeClass("subhover"); //On hover out, remove class "subhover"
	*/
	});
	
	// Last button's drop down
	$("ul.topnav :last-child ul.subnav").css("left","-107px");


// Featured Content Divs
$(".main-featured :last-child").css("margin-right","0px");
$(".secondary-featured :last-child").css("margin-right","0px");


	
	
	
	
	
// Promotional images & H1
	$("h1 + img").prev().css("margin-bottom", "-2px").css("z-index", "2").css("position", "relative");
	
	
	
	
// Main Nav

	$("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)
	
	$("#mast-nav li").hover(function() { //When trigger is clicked...
	
		//Following events are applied to the subnav itself (moving subnav up and down)
		$(this).find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click
	
		$(this).hover(function() {
		}, function(){
			$(this).find("ul.subnav").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() {
			$(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			$(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});
	
	
	
//Contact Forms

	$("form p.required label").append("<span class='req-ast'>*</span>");
	
});





