// JavaScript Document
$(function(){
	//div.eventBox 内のimgをフェードさせるスクリプト
	var rollOutImgs = $("div.eventBox div.eventBoxL a img").get();
	var rollOverSrcs = [];
	for(var h=0; h<rollOutImgs.length; h++) {
		var splitSrcs = rollOutImgs[h].src.split('_eventBoxRollout.');
		rollOverSrcs.push("url(" + splitSrcs[0] + "_eventBoxRollover." + splitSrcs[1] + ")");
		$("div.eventBox div.eventBoxL p").eq(h).css("display","block").css("width","68px").css("height","68px").css("background-image",rollOverSrcs[h]).css("background-repeat","no-repeat");
	}
	
	$("div.eventBox").hover(
	function(){
		$(this).addClass("eventBox_hover");
		$(this).find("div.eventBoxL a img").fadeOut("slow");
	},
	function(){
		$(this).removeClass("eventBox_hover");
		$(this).find("div.eventBoxL a img").fadeIn("slow");
	});
	
	$("div.eventBox").click(
	function(){
		var anchorTags = this.getElementsByTagName("a");
		window.open(anchorTags[0].href);
	});
	
});