/*

	jQuery

======================================================================================================*/
// RollOver
$(function() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		var images_pre = new Array();
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off.")) {
				images_pre[i] = new Image();
				images_pre[i].src = images[i].getAttribute("src").replace("_off.", "_on.")

				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."));
				}
			}
		}
	}
});


//Page TOP
$(function () {
    $('.pagetop').click(function () {
        //$(this).blur();
        $('html,body').animate({ scrollTop: 0 }, '_default');	
        return false;
    });
});

//_blank [external]
$(function () {
	$("a.blank").click(function(){
	  this.target = '_blank';
	});
});

// ストライプテーブル
$(function() {
	var tableList = document.getElementsByTagName("table");
	for(var i=0; i < tableList.length; i++) {
		if(tableList[i].className.match("sheet")){
			var trList = tableList[i].getElementsByTagName("tr")
			for(var j=0; j<trList.length; j++){
				if(j%2==1) {
					trList[j].className = trList[j].className + " odd";
				}else {
					trList[j].className = trList[j].className + " even";
				}
			}
		}
	}
});

