var uri="/common/js/";
function jsfile(n) {
	this.length = n;
		for (i = 0; i < n; i++) {
	this[i] = null
	}
}
var n = 3;
var file = new jsfile(n)
file[0] = "jquery-1.5.1.min.js";
file[1] = "jquery.popupwindow.js";
file[2] = "heightLine.js";
for (i = 0; i <n; i++) {
	document.write('<script type="text/javascript" src="',uri,file[i],'"></script>');
}

/* Mousover */
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}


/* Globalnavi */
$(document).ready(function(){
	$("ul.globalnavi li").globalnavi();
});
$.fn.globalnavi = function() {
	$(this).hover(function(){
		$(this).addClass("hover");
		$('ul:first',this).css('visibility', 'visible');
	},function(){
		$(this).removeClass("hover");
		$('.open',this).removeClass("open");
		$('ul:first',this).css('visibility', 'hidden');
	});
}


/* table */
$(document).ready(function(){
  $("table").each(function(){jQuery(this).find("tr:even").addClass("even");});
});

