function initPage()
{
	var nav = document.getElementById("navigation");
	if (nav)
	{
		var nodes = nav.getElementsByTagName("li");
		for (var i = 0; i < nodes.length; i++)
		{
			nodes[i].onmouseover = function () 
			{
				if (this.className.indexOf("hover") == -1)
				{
					this.className += " hover";
				}
			}
			nodes[i].onmouseout = function ()
			{
				this.className = this.className.replace(" hover", "");
			}
		}
	}
}

function initBoxes()
{
	var box = document.getElementById("home-boxes");
	if (box)
	{
		var nodes = box.getElementsByTagName("a");
		for (var i = 0; i < nodes.length; i++)
		{
			nodes[i].onmouseover = function () 
			{
				if (this.parentNode.className.indexOf("hover") == -1)
				{
					this.parentNode.className += " hover";
				}
			}
			nodes[i].onmouseout = function ()
			{
				this.parentNode.className = this.parentNode.className.replace("hover", "");
			}
		}
	}
}


if (window.addEventListener){
	window.addEventListener("load", initBoxes, false);
}
else if (window.attachEvent){
	window.attachEvent("onload", initPage);
	window.attachEvent("onload", initBoxes);
}

