// JavaScript Document

/*
var temp=function(){ return 1;};
if( window.onload )
{
      //override "placeholder" with whatever already exists in onload
     temp = window.onload;
}
window.onload=function(){ hidePrice(); temp();};

function hidePrice() {
	//This hides the $0 - $1 line in the Price Range field.
	var lis = $('div.attributeBox > ul > li > a[href*=maxprice]').length;
	$('div.attributeBox > ul > li > a[href$=1.99]').hide();  
	var theli = $('div.attributeBox > ul > li > a[href$=1.99]').length;
	
	var divs = $('div#inactiveAttributes > div.attributeBox').length;
	if ((lis > 1)&&(theli == 1)) //If $0 - $1 is not the only item in the "Shop By..." div
	{
		
		//Do nothing.
	}
	else if (theli == 0)
	{
	}
	else
	{
		//This will remove the "Price range" div if it is empty.  And remove the whole "Shop by" div if it is empty
		var h4s = $("h4").length;
		var arrayOfDivs = document.getElementsByTagName('h4');

		for (var i=0; i < arrayOfDivs.length; i++) {
			var thisDiv = arrayOfDivs[i];
			if (thisDiv.innerHTML == "Price Range")  //Finds the "Price Range" div and hides it.
			{
				thisDiv.style.display = 'none';
				$('div.attributeBox > ul > li > a[href$=1.99]').hide(); 
				
				if ($('div#inactiveAttributes > div.attributeBox > h4').length <= 1)
				{
					//This will remove the "Show By..." div if there is nothing inside of it.
					$('div#leftWrap > div.navHeader:last').hide();
					$('div#leftWrap > div.leftNavTop:last').hide();
					$('div#leftWrap > div.leftNav:last').hide();
					$('div#leftWrap > div.leftNavBottom:last').hide();
				}
				else
				{
					// There are other items in the Shop By... Category, so we will leave the "shop by" elements there.
				}
			}
		}
	}
	
	
}
*/
