// JavaScript Document For Drop Down Main Navigation

// DF1.1 :: domFunction 
// *****************************************************
// DOM scripting by brothercake -- http://www.brothercake.com/
// GNU Lesser General Public License -- http://www.gnu.org/licenses/lgpl.html
//******************************************************

function domFunction(faaaa, aaaaa) {
	
	var naaaa = 0;
	var taaaa = setInterval(function() {
		
		var caaaa = true;
		naaaa++;
	
		if(typeof document.getElementsByTagName != 'undefined' && (document.getElementsByTagName('body')[0] != null || document.body != null)) {
			
			caaaa = false;
			
			if(typeof aaaaa == 'object') {
				for(var i in aaaaa) {
					if 
					(
						(aaaaa[i] == 'id' && document.getElementById(i) == null)
						||
						(aaaaa[i] == 'tag' && document.getElementsByTagName(i).length < 1)
					) 
					{ 
						caaaa = true;
						break; 
					}
				}
			}

			if(!caaaa) { faaaa(); clearInterval(taaaa); }
		}
		
		if(naaaa >= 60) {
			clearInterval(taaaa);
		}
		
	}, 250);
};

// IE NAV TWEAK
function IEHoverPseudo() {
	var navItems = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<navItems.length; i++) {
		if(navItems[i].className == "parent") {
			navItems[i].onmouseover=function() { this.className += " over"; }
			navItems[i].onmouseout=function() { this.className = "parent"; }
		}
	}
}

var loadIEHoverPseudo = new domFunction(IEHoverPseudo, { 'nav' : 'id' });

