// JavaScript Document
function SwapOut(name){
	document[name].src = "images/nav/" + name + "_sel.gif";
	return true;
}

function SwapBack(name){
	document[name].src = "images/nav/" + name + ".gif"; 
	return true;
}
function SwapOutLeft(name){
	document[name].src = "images/leftbar/" + name + "_sel.gif";
	return true;
}

function SwapBackLeft(name){
	document[name].src = "images/leftbar/" + name + ".gif"; 
	return true;
}

$(document).ready(function() {
	
	// any images with the class 'hover' will add _ovr to the filename on hover,  also preloads images to be hovered
	$("img.hover").hover(function(e) {this.h = this.src;var tmp = this.h.split('/');var tmp2 = tmp[tmp.length-1].split('.');tmp2[0] += '_ovr';tmp2 = tmp2.join('.');tmp[tmp.length-1] = tmp2;var href = tmp.join('/');this.src = href;},function(){this.src = this.h;});i=$("img.hover");num=i.length;for(x=0;x<num;x++){$('<img src="'+i.eq(x).src+'" />');}

	$("#prod_submenu").hover(function() { $("#prod_btn").trigger("mouseover"); }, function() { $("#prod_btn").trigger("mouseout"); } );	
	
});
