$(function(){
	var u = location.pathname;
	u = u.slice(1, 5);
	var i = 0;
	switch (u) {
		case "prof":
			$("div#gNavi li:nth-child(1) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_01_c.gif")
			$("div#gNavi li:nth-child(1) img").removeClass("imgover");
			break;
		case "asse":
			$("div#gNavi li:nth-child(2) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_02_c.gif")
			$("div#gNavi li:nth-child(2) img").removeClass("imgover");
			break;
		case "mess":
			$("div#gNavi li:nth-child(3) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_03_c.gif")
			$("div#gNavi li:nth-child(3) img").removeClass("imgover");
			break;
		case "repl":
			$("div#gNavi li:nth-child(4) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_04_c.gif")
			$("div#gNavi li:nth-child(4) img").removeClass("imgover");
			break;
		case "menu":
			$("div#gNavi li:nth-child(5) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_05_c.gif")
			$("div#gNavi li:nth-child(5) img").removeClass("imgover");
			break;
		case "bill":
			$("div#gNavi li:nth-child(6) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_06_c.gif")
			$("div#gNavi li:nth-child(6) img").removeClass("imgover");
			break;
		case "pens":
			$("div#gNavi li:nth-child(7) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_07_c.gif")
			$("div#gNavi li:nth-child(7) img").removeClass("imgover");
			break;
		case "area":
			$("div#gNavi li:nth-child(8) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_08_c.gif")
			$("div#gNavi li:nth-child(8) img").removeClass("imgover");
			break;
		case "chec":
			$("div#gNavi li:nth-child(9) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_09_c.gif")
			$("div#gNavi li:nth-child(9) img").removeClass("imgover");
			break;
		case "repo":
			$("div#gNavi li:nth-child(10) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_10_c.gif")
			$("div#gNavi li:nth-child(10) img").removeClass("imgover");
			break;
		case "volu":
			$("div#gNavi li:nth-child(11) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_11_c.gif")
			$("div#gNavi li:nth-child(11) img").removeClass("imgover");
			break;
			
		case "cate":
			var u2 = location.pathname;
			u2 = u2.slice(17, 21);
			if (u2 == "bill") {
				$("div#gNavi li:nth-child(6) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_06_c.gif")
				$("div#gNavi li:nth-child(6) img").removeClass("imgover");
			} else if (u2 == "repo") {
				$("div#gNavi li:nth-child(10) img").attr("src","/cgi/wp/wp-content/themes/noainteractive/common/img/bt_10_c.gif")
				$("div#gNavi li:nth-child(10) img").removeClass("imgover");
			}
		break;
	}
	
});


/*
	Standards Compliant Rollover Script
	Author : Daniel Nolan
	http://www.bleedingego.co.uk/webdev.php
*/

function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'imgover') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_o'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}

window.onload = initRollovers;
