/*
       copyright 2008 Campmor, Inc. All Rights Reserved
       Client: Campmor, Inc. 
       Author: Maya Lindenmuth - Brulant, Inc. 
       Date: 3/31/2008
	   Description: Provides functionality for suckerfish navigation in the secondary nav
*/ 

sfHover = function() {	
	var sfEls = document.getElementById("sf").getElementsByTagName("dd");
	for (var i=0; i<sfEls.length; i++) {
			sfEls[i].getElementsByTagName("A")[0].stateCaller = sfEls[i];
	
			// get the element inner html
			var tmpStr = new String(sfEls[i].innerHTML);
				
			tmpStr = tmpStr.toLowerCase();
			// check that a list exists
	
			if (tmpStr.indexOf("<ul>") != -1){
				// there is a ul so change the tag to expand the menu
				//sfEls[i].getElementsByTagName("A")[0].href = "#";
				//sfEls[i].getElementsByTagName("A")[0].href;
				sfEls[i].getElementsByTagName("A")[0].onclick = "javascript:void(0);";
			}
			sfEls[i].getElementsByTagName("A")[0].onmousedown = function(){
				// get the element
				state = this.stateCaller;
				
				if(state.className != "over"){
					state.className="over";
				} else {
					state.className="under";
				}
			}
		}
}
