$(document).ready(function(){
	$('area#plumbingThumb').mouseover(function(){
		$('div#headerGraphic').css('backgroundPosition', '0 -295px');
	}).mouseout(function(){
		$('div#headerGraphic').css('backgroundPosition', '0 0');
	});
	$('area#heatingThumb').mouseover(function(){
		$('div#headerGraphic').css('backgroundPosition', '0 -590px');
	}).mouseout(function(){
		$('div#headerGraphic').css('backgroundPosition', '0 0');
	});
	$('area#acThumb').mouseover(function(){
		$('div#headerGraphic').css('backgroundPosition', '0 -887px');
	}).mouseout(function(){
		$('div#headerGraphic').css('backgroundPosition', '0 0');
	});
	
	function externalLinks() {
		$('a.external').attr('target', '_blank');
	}
	window.onload = externalLinks;
	
	sfHover = function() {
	var sfEls = document.getElementById("topNavUl").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);

});
