


function loadCategoryFunctionality(){


	var allCategories = document.getElementsByClassName("category");

	for (var i = 0; i <  allCategories.length  ; i++)  {
		var thisCategory = allCategories[i];
		
		//alert(thisCategory.tagName.toLowerCase());
		
		if (thisCategory.tagName.toLowerCase() != "body"){
		
			thisCategory.onmouseover = function(){
				this.className = this.className.replace("category", "categoryHover");		
				//alert("mouseover");
			}
			
			thisCategory.onmouseout = function(){
				//alert("mouseout");
				this.className = this.className.replace("categoryHover", "category");		
			}
			
			thisCategory.onclick = function(){
				var theAnchor = this.getElementsByTagName("a")[0];
				var theHref = theAnchor.getAttribute("href");
				location.href = theHref;
			}	
		
		}
	
	}



}

addToLoader("loadCategoryFunctionality()");