function navigation(){	if( $("body").attr("id")=="about-hd" || $("body").attr("id")=="company-advocacy" ){		$("ul.subnav").fadeIn("slow");		//$("ul.subnav li a").css({"color":"blue !important"});		if($("body").attr("id")=="about-hd")		{			$("ul.subnav li.subnav-about a").css({"border-bottom":"1px solid #FF2917"});		}		else 		{			$("ul.subnav li.subnav-advocacy a").css({"border-bottom":"1px solid #FF2917"});		}	}	else	{		$('ul.nav li').hover(function () {			if($(this).find("ul.subnav").html()!=null) 			{				$(this).find("ul.subnav").stop(true, true).fadeIn();				$("a", this).addClass("nav-highlight");			};		 }, function () {			$(this).find("ul.subnav").stop(true, true).fadeOut();			$("a", this).removeClass("nav-highlight");		 });	}}function banner(){	$("#slides").slides({		effect: 'fade',				crossfade: true,		fadeSpeed: 350,		fadeEasing: 'easeOutQuad',		//randomize: true,		play: 5000,		pause: 2500,		hoverPause: true,		paginationClass: 'pagination'	});}// Overlay script used on Careers pagefunction loadOverlay(){		$(".careers-overlay").click(function(){		$("#careers-overlay").overlay({			// some mask tweaks suitable for modal dialogs			mask: {				color: '#ebecff',				loadSpeed: 200,				opacity: 0.9				},			closeOnClick: true,			load: true		});			});}// Validate the Contact Us form	function validateForm(){	var frm = document.getElementById('form-contact-us');	var error = false;	var f = null;	function focusCheck(focusTo){		if(f==null) {			f=focusTo;		}	}	function displayError(inputName,errorField)	{		document.getElementById(errorField).style.display = "block";		document.getElementById(inputName).style.background = "#ffc";		document.getElementById(inputName).style.border = "1px red solid";		error = true;		focusCheck(inputName);			}		var field = new Array("validate_top","validate_contact_name","validate_contact_email");	for(i=0;i<field.length;i++) {		document.getElementById(field[i]).style.display = "none";	}	var inputs = new Array("contact_name","contact_email");			for(j=0;j<inputs.length;j++) {			document.getElementById(inputs[j]).style.background = "#E1FFDC";			document.getElementById(inputs[j]).style.border = "1px #3c3 solid";		}				if(!validField(frm.contact_name.value)) {			displayError("contact_name","validate_contact_name");			}									if(!validEmail(frm.contact_email.value)) {			displayError("contact_email","validate_contact_email");			}						if(error){		document.getElementById("validate_top").style.display = "block";		document.getElementById(f).focus();		return false;	} else {		return true;	}}// Attach Events$("#submit-form").click(function(){	//alert("lets submit the form!");	$("#form-contact-us").submit();	});$("#form-contact-us").submit(function(){	//alert("we need to test stuff first!");	return validateForm();	});		if( $("body").attr("id")=="contact-us" ){	$("#contact_name").focus();		// Catch ENTER keypress on form fields	$("#contact_name").keypress(function(event){		if (event.keyCode=="13") 		{			return validateForm();		}	});	$("#contact_email").keypress(function(event){		if (event.keyCode=="13") 		{			return validateForm();		}	});	$("#contact_phone").keypress(function(event){		if (event.keyCode=="13") 		{			return validateForm();		}	});	}	
