	function fixUglyIE()
	{for (a in document.links) document.links[a].onfocus = document.links[a].blur;}
	if (document.all)
	{document.onmousedown = fixUglyIE;}
	
	/*
	FixIE, v0.5b (080218)
	Copyright (c) 2008, Gonzalo Perez de la Ossa (http://dense13.com/)
	License: http://www.opensource.org/licenses/mit-license.php
*/

document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {
	if (this.readyState == "complete") {
		FixIE.activateMenu(['nav']);
		FixIE.addFirstChild(['ul', 'ol']);
		FixIE.addInputType();
	}
};


var FixIE = {

activateMenu: function(navIds) {
	for (var i=0, l=navIds.length ; i<l ; i++) {
		var navroot = document.getElementById(navIds[i]);
		if (!navroot) continue;
		var lis = document.getElementById(navIds[i]).getElementsByTagName("LI");
		for (var i=0, l=lis.length ; i<l ; i++) {
			lis[i].onmouseover = function() {
				this.className += " hover ";
			};
			lis[i].onmouseout=function() {
				this.className = this.className.replace(" hover ", "");
			};
		}
	}
},

addFirstChild: function(containers) {
	for (var i=0, l=containers.length, arr=null ; i<l ; i++) {
		arr = document.getElementsByTagName(containers[i]);
		for (var j=0, l2=arr.length ; j<l2 ; j++) {
			if (arr[j].firstChild && arr[j].firstChild.innerHTML) arr[j].firstChild.className += " first-child";
		}
	}
},

addInputType: function() {
	var inputs = document.getElementsByTagName("INPUT");
	for (var i=0, l=inputs.length ; i<l ; i++) {
		inputs[i].className += " " + inputs[i].type;
	}
}

};
