function initMenu()
{
	var nodes = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<nodes.length; i++)
	{
		nodes[i].onmouseover = function()
		{
			this.className += " hover";
		}
		nodes[i].onmouseout = function()
		{
			this.className = this.className.replace(" hover", "");
		}
	}
}
if (document.all && !window.opera) attachEvent("onload", initMenu);

function lastElInNav()
{

	var nodes = document.getElementById("nav").getElementsByTagName("li");
	var mainNodes = [];
	for(i=0; i< nodes.length; i++) {
		if(nodes[i].parentNode.id == 'nav'){
			mainNodes.push(nodes[i]);
		}
	}
	mainNodes[mainNodes.length-1].className += ' last-item';
}

if (window.addEventListener) window.addEventListener("load", lastElInNav, false);
else if (window.attachEvent) window.attachEvent("onload", lastElInNav);