// JavaScript Document
function querySt(ji) {
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");
if (ft[0] == ji) {
return ft[1];
}
}
}


$(document).ready( function(e)
{
if($.cookie("Session_ID") !="" && $.cookie("Session_ID") != null){
	if(querySt("Session_ID")==""){//if there is not a session id var in the query string
		document.location+="?&Session_ID=" + $.cookie("Session_ID");
	}
//alert($.cookie("Session_ID"));
}
else{ //if we don't have a session cookie
	if(querySt("Session_ID")!=""){ //if there is a session id var in the query string
		$.cookie("Session_ID", querySt("Session_ID"), { expires: 365}); //set it
	}

}
  PEPS.rollover.init();
  	$.validationEngineLanguage.newLang();
	$("#contactForm").validationEngine() ;
	checkFieldsFilled();
try {

//getQuote stuff for off-store page "get a quote" 
if(querySt("getQuote")==1){
showBubble('popup');
hideBuy();
}
for(i=0; i< $(".productAttSelect").length; i++){
	changeSelectBG($(".productAttSelect")[i]); //setting up select images onload
}

} catch(e) {
//alert(e.message + "hello world");
}



});

	
