$(document).ready(function() {
	$.preloadCssImages();
});

// Nav image rollovers
function navOver(WebRoot, imgName, currentState){
	if (currentState == 'True') {
		return;
	} else {
		document.images[imgName].src = WebRoot + "images/nav/" + imgName + "_on.gif";
	}
}
function navOut(WebRoot, imgName, currentState){
	if (currentState == 'True') {
		return;
	} else {
		document.images[imgName].src = WebRoot + "images/nav/" + imgName + "_off.gif";
	}
}

// Customer storefront popup
function storefrontPopup(customerFile){
		window.open('screenshots/' + customerFile, 'win1', 'scrollbars=1,resizable=1,toolbar=0,titlebar=0,height=400,width=550');
}

function imageOn(imageId, jscriptImageId, triggerCheckId) {
	var img = document.getElementById(imageId);
	var triggerCheck = eval(triggerCheckId);
	
	if (img && triggerCheck == "yes") {
		img.src = eval(jscriptImageId + '_on.src');
	}
}

function imageOff(imageId, jscriptImageId, triggerCheckId) {
	var img = document.getElementById(imageId);
	var triggerCheck = eval(triggerCheckId);
	
	if (img && triggerCheck == "yes") {
		img.src = eval(jscriptImageId + '_off.src');
	}
}

/**
* Tracks an event with Google Analytics
*
* @param string Category
* @param string Action
* @param string Label
*/
function TrackGAEvent(category, action, label) {
    try {
        pageTracker._trackEvent(category, action, label);
    } catch (e) {
    }
};

