                                 $(function() {
$(".emailSignUpTextBox").val("write in your email to join our list");
try{
$(".emailSignUpTextBox").focus(function(){
$(this).val("");
});
}catch(err){}

try{
var hiddenId = $(".hiddenLoc").attr("id");

$(".locationLink").each(function(){
if($(this).attr("id") == hiddenId){
$(this).addClass("locationLink_selected");
}
});

}catch(err){}

try{
$(".skuQty").val("1");

}catch(err){
}

});


                function bbopenpopup(popurl){
    var winpops=window.open(popurl,"","width=566,height=370")
}

function openCloseSection(which){
	var selectedDiv = document.getElementById(which);
	
	if(selectedDiv.style.display != 'block'){
		selectedDiv.style.display = 'block';
	} else {
		selectedDiv.style.display = 'none';
	}
}

function maintainRetailer(which,theXMLPath,theName){
	
	var theDivToChange = document.getElementById(which);

	//this only happens the first time a button is clicked----->
	try{eval(thePrevDivThatChanged);}
	catch(e) {
		thePrevDivThatChanged = document.getElementById(which);
		thePrevToWhat = which;
		thePrevThePath = theXMLPath;
		thePrevTheName = theName;
	}
	//------------------------>
	
	theDivToChange.innerHTML = "<div class=\"tertiaryLink_selected\"><a href=\"javascript:;\" onclick=\"chooseRetailer('"+theXMLPath+"');maintainRetailer('"+which+"','"+theXMLPath+"','"+theName+"');\">"+theName+"</a></div>";
	if (theDivToChange != thePrevDivThatChanged) {
		thePrevDivThatChanged.innerHTML = "<div class=\"tertiaryLink\"><a href=\"javascript:;\" onclick=\"chooseRetailer('"+thePrevThePath+"');maintainRetailer('"+thePrevToWhat+"','"+thePrevThePath+"','"+thePrevTheName+"');\">"+thePrevTheName+"</a></div>";
		thePrevDivThatChanged = document.getElementById(which);
		thePrevToWhat = which;
		thePrevThePath = theXMLPath;
		thePrevTheName = theName;
	}else {
	}
}

function clearTextField( original ) {
    original.value = ""
}

function displayhomeinfo(which){
    var theDivToChange = document.getElementById(which);
    
    try{eval(thePrevDivThatChanged);}
    catch(e) {
		thePrevDivThatChanged = document.getElementById(which);
		thePrevToWhat = which;
	}
	
	theDivToChange.style.display = 'block';
	if(theDivToChange != thePrevDivThatChanged){
	    thePrevDivThatChanged.style.display = 'none';
	    thePrevDivThatChanged = document.getElementById(which);
	} else {
	
	}
}

    

    

    

    

    