/*
sfHover = function() {
	var sfEls = document.getElementById("header_menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
//--><!]]>
*/

window.addEvent('domready', function() {

	// HERE IS WHAT YOU READ IN JS CODE
	///**********
	//Core.js	
	//----------
	//window.ie	will be set to true if the current browser is internet explorer (any).
	//window.ie6	will be set to true if the current browser is internet explorer 6.
	//window.ie7	will be set to true if the current browser is internet explorer 7.
	//window.gecko	will be set to true if the current browser is Mozilla/Gecko.
	//window.webkit	will be set to true if the current browser is Safari/Konqueror.
	//window.webkit419	will be set to true if the current browser is Safari2 / webkit till version 419.
	//window.webkit420	will be set to true if the current browser is Safari3 (Webkit SVN Build) / webkit over version 419.
	//window.opera	is set to true by opera itself.
	//*************/	 	

	if(window.ie){// pour ie
		$$('#header_menu li').each(function(el,i){
			el.onmouseover=function() { 
				this.addClass("sfhover"); // pour ie
			}
			el.onmouseout=function() { 
				this.removeClass("sfhover"); // pour ie
			}
		});
	}
	$$('#header_menu li ul').each(function(el,i){

		//alert(el.getParent());
		el.onmouseover=function() {
			this.getParent().getElement("a").addClass("chover");   
		}
		el.onmouseout=function() { 
		//alert(this.getParent());
			this.getParent().getElement("a").removeClass("chover");  
		} 
	});
	$$('#header_menu li li a').each(function(el,i){ 
		el.onmouseover=function() {
			this.getParent().getParent().getParent().getElement("a").addClass("chover");  
		}
		el.onmouseout=function() { 
			this.getParent().getParent().getParent().getElement("a").removeClass("chover");  
		}
	});
}); 
