/* IE PNG transparency fix */
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	
	function fixPNG(myImage) 
	{
	    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
	    {
	       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
		   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
		   var imgTitle = (myImage.title) ? 
			             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
		   var imgStyle = "display:inline-block;" + myImage.style.cssText
		   var strNewHTML = "<span " + imgID + imgClass + imgTitle
	                  + " style=\"" + "width:" + myImage.width 
	                  + "px; height:" + myImage.height 
	                  + "px;" + imgStyle + ";"
	                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
	                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
		   myImage.outerHTML = strNewHTML	  
	    }
	}

/*usage: onload="fixPNG(this);"*/ 

//Changes the values in select box to correct url
$(document).ready( function() {
	$('#shop-by option').each( function(index) {
		if($(this).val() != 'novalue') {
			var opt = $(this).val();
			opt = opt.replace(/:/g,"-cln-");
			opt = opt.replace(/\s/g,"-");
			$(this).val("/servlet/the-" + opt + "/Categories");
		}
	});
	
	$('#checkout-form').submit( function() {
			if ($('#policyChk').is(':checked')) {
				return true;
			} else {
				alert("Please check the checkbox to agree to our sales policy");
				return false;
			}
	});
});