/* Copyright (c) 2007 Matt Heleniak @ Inticco Solutions, www.inticco.com */

/* => addEvent(), by Dean Edwards, 2005 */

function addEvent(obj, type, fn){
	if(obj.addEventListener){
		obj.addEventListener(type, fn, false);
	}	else if (obj.attachEvent){
		obj["e"+type+fn] = fn;
		obj[type+fn] = function(){obj["e"+type+fn](window.event);}
		obj.attachEvent("on"+type, obj[type+fn]);
	}
}

/* => Navs */

addEvent(window, 'load', function(x,i)
{
	if(!document.getElementById){
		return false;
	}
	for(i in x = document.getElementById('header').getElementsByTagName('ul')[1].childNodes){
		if(x[i] && x[i].tagName && x[i].tagName.toLowerCase() == 'li'){
			x[i].onmouseover = function()
			{
				this.className = this.className ? this.className + ' active' : 'active';
			}
			x[i].onmouseout = function()
			{
				this.className = this.className.replace(/ ?active/, '');
			}
		}
	}
});