// RollOver
function initRollOverImages() {
  var image_cache = new Object();
  $("img.swap").each(function(i) {
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_on = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
    image_cache[this.src] = new Image();
    image_cache[this.src].src = imgsrc_on;
    $(this).hover(
      function() { this.src = imgsrc_on; },
      function() { this.src = imgsrc; });
  });
}
$(document).ready(initRollOverImages);


$(function() {
	// GlobalMenu フェードインアウト
	var listArray = ['#menu1','#menu2','#menu3','#menu4','#menu5','#menu6','#menu7','#menu8'];
	var timeoutID;
	$.each(listArray,function(i) { 
		$(listArray[i]).hover(
			function() {
				clearTimeout(timeoutID);
				timeoutID = setTimeout( function() { 
				$(listArray[i] + '-normal').fadeOut(250) }, 100 );
			},
			function() {
				clearTimeout(timeoutID);
				$(listArray[i] + '-normal').fadeIn (250);
			}
		);
	});
});


// .matchSchedule1 行おきに背景色を変える
$(document).ready(function(){
	$("table.matchSchedule tr:odd").addClass("odd");
});