/*================================================
Sisley Navigation by delie. delie.bu@gmail.com
------------------------------------------------*/
dom.nav = function() {
	// Element Set
	if(!$("global-navigation")) return;
	this.container = $("global-navigation");
	this.li = dom.$$(this.container, "li");
	for(var i = 0; i < this.li.length; i++) {
		evt.add(this.li[i], "mouseover", function() { Navigation.rollOver(this) });
		evt.add(this.li[i], "mouseout", function() { Navigation.rollOut(this) });
	}
};
dom.nav.prototype = {
	rollOver : function(element) {
		//change the colour
		element.style.backgroundPosition = "0 -20px";
		//change display of child
		for( var x = 0; element.childNodes[x]; x++ ){
			if( element.childNodes[x].tagName == 'UL' ) { element.childNodes[x].style.display = "block" }
		}
	},
	rollOut : function(element) {
		//change the colour
		element.style.backgroundPosition = "0 0px";
		//change display of child
		for( var x = 0; element.childNodes[x]; x++ ){
			if( element.childNodes[x].tagName == 'UL' ) { element.childNodes[x].style.display = "none" }
		}
	}
};


