$(document).ready(function(){
//Open External Links in New Window
	$('a[href^="http://"].target')	.attr({ target: "_blank" });
	
//Subnav Drop Down
	$("#header ul li a.sub").hover(function() {
		$(this).parent().next().stop().slideDown('fast').show('slow', function(){
			$(this).height("auto");
		});
	});
	
	$("#header ul li").hover(function() {
		if ( $(this).find('ul.subnav').length > 0 ) { 
			$(this).addClass("subhover");
		}
		} , function () {
		$(this).removeClass("subhover");
		$(this).find('ul.subnav').slideUp('fast');
	});
	
	$("#contact input.contact_btn").attr({ value: "" })
	
});



//Nav sfHover
sfHover = function() {
	var sfEls = document.getElementById("topnav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
