isIE = (/MSIE (\d+\.\d+);/.test(navigator.userAgent));

function navRolloversProto() { 
	parents = $('nav').select('li.parentNavItem');
	//console.log(parents);
	setRollovers(parents);
}

function setRollovers(el) {

	for (i=0; i< el.length; i++ )
	{	
		
		if (!isIE) {
			
			originalClass=el[i].className;
			
			
			el[i].onmouseover = function() {
				AddClass(this,"over");
			};
			
			el[i].onmouseout = function() {
				this.className=originalClass;
				//RemoveClass(this,"over");
			};
		}
		
		else {
			
			
			el[i].onmouseenter = function() {
								
				//this.className += " over";
				AddClass(this,"over");
			};
			
			el[i].onmouseleave = function() {
				
				RemoveClass(this,"over");
			};
		}
	}

// 
}

function init() {
	// quit if this function has already been called
	if (arguments.callee.done) return;

	// flag this function so we don't do the same thing twice
	arguments.callee.done = true;

	navRolloversProto();
};

// $addHandler(window,"load",init);
/* for Mozilla 
if (document.addEventListener) {
	document.addEventListener("DOMContentLoaded", init, false);
	//console.log("hey");
}

if (/WebKit/i.test(navigator.userAgent)) { // sniff
  var _timer = setInterval(function() {
    if (/loaded|complete/.test(document.readyState)) {
      clearInterval(_timer);
      init(); // call the onload handler
    }
  }, 10);
   
}


else {
	//window.onload = function() { navRolloversProto(); };
	new MultiOnLoad(function() {navRolloversProto(); });
}
*/