/*
	Global Navigation Popup
	Author : KOKUBO,Mugi
*/

$(document).ready(function(){ $('div:not([id="map"])').css('zoom','1') });
$(document).ready(function(){ $('p#breadCrumb a:first-child').css('color','#39A255') });

/* p#breadCrumb a:first-child { color:#39A255; } */

$(function(){
	$("#navi01").hide();
	$("#navi02").hide();
	$("#navi03").hide();
	$("#navi04").hide();
	$("#navi05").hide();
	$("#navi06").hide();

	$("#naviCompany a"   ).mouseover ( function() { $("#navi01").show(); return false; } );
	$("#naviCompany a"   ).mouseout  ( function() { $("#navi01").hide(); return false; } );
	$("#navi01"          ).mouseover ( function() { $("#navi01").show(); return false; } );
	$("#navi01"          ).mouseout  ( function() { $("#navi01").hide(); return false; } );

	$("#naviTemple a"    ).mouseover ( function() { $("#navi02").show(); return false; } );
	$("#naviTemple a"    ).mouseout  ( function() { $("#navi02").hide(); return false; } );
	$("#navi02"          ).mouseover ( function() { $("#navi02").show(); return false; } );
	$("#navi02"          ).mouseout  ( function() { $("#navi02").hide(); return false; } );

	$("#naviPortfolio a" ).mouseover ( function() { $("#navi03").show(); return false; } );
	$("#naviPortfolio a" ).mouseout  ( function() { $("#navi03").hide(); return false; } );
	$("#navi03"          ).mouseover ( function() { $("#navi03").show(); return false; } );
	$("#navi03"          ).mouseout  ( function() { $("#navi03").hide(); return false; } );

	$("#naviTechnology a").mouseover ( function() { $("#navi04").show(); return false; } );
	$("#naviTechnology a").mouseout  ( function() { $("#navi04").hide(); return false; } );
	$("#navi04"          ).mouseover ( function() { $("#navi04").show(); return false; } );
	$("#navi04"          ).mouseout  ( function() { $("#navi04").hide(); return false; } );

	$("#naviInvestor a"  ).mouseover ( function() { $("#navi05").show(); return false; } );
	$("#naviInvestor a"  ).mouseout  ( function() { $("#navi05").hide(); return false; } );
	$("#navi05"          ).mouseover ( function() { $("#navi05").show(); return false; } );
	$("#navi05"          ).mouseout  ( function() { $("#navi05").hide(); return false; } );

	$("#naviRecruit a"   ).mouseover ( function() { $("#navi06").show(); return false; } );
	$("#naviRecruit a"   ).mouseout  ( function() { $("#navi06").hide(); return false; } );
	$("#navi06"          ).mouseover ( function() { $("#navi06").show(); return false; } );
	$("#navi06"          ).mouseout  ( function() { $("#navi06").hide(); return false; } );
});

/*
	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 == 'btn') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, 'r'+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('r'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}

window.onload = initRollovers;
