﻿if(typeof LOC == 'undefined') {
	var LOC = {};
}
//init secondaryNav
LOC.initnavdroite = function(){
	if(document.getElementById("secondaryNav")){
		var navDroite = document.getElementById("secondaryNav").getElementsByTagName("li");
		for (var i=0; i<navDroite.length; i++) {
		/*
			navDroite[i].onmouseover = function() {
				if(this.firstChild.className == "menu"){
					this.firstChild.className = "menuover";
				}
				else if(this.firstChild.className == "ssmenu"){
					this.firstChild.className = "ssmenuover";
				}		
			}	
			navDroite[i].onmouseout = function() {	
				if(this.firstChild.className == "menuover"){
					this.firstChild.className = "menu";
				}
				else if(this.firstChild.className == "ssmenuover"){
					this.firstChild.className = "ssmenu";
				}
			}
		*/
			//focus et blur pour navigation par touche tab
			navDroite[i].getElementsByTagName("a")[0].onfocus = function(){
				if(this.className == "menu"){
					this.className = "menuover";
				}
				else if(this.className == "ssmenu"){
					this.className = "ssmenuover";
				}
			}
			navDroite[i].getElementsByTagName("a")[0].onblur = function(){
				if(this.className == "menuover"){
					this.className = "menu";
				}
				else if(this.className == "ssmenuover"){
					this.className = "ssmenu";
				}
			}
		}
	}
}

//onload event
addEvent(window, "load", LOC.initnavdroite);
//OnDOMLoad(LOC.initnavdroite, window);
//addDOMLoadEvent(LOC.initnavdroite);
