
$(function(){

(jQuery.support.opacity) ? noIE = 1 : noIE = 0;

	$("#mapArea").css("opacity",0);

	$("#picMenu li").each(function(i){
		var mgn = 200 + (i*25) + "px";
			$(this).css({marginTop:mgn});
		if (noIE) {
			$(this).css({opacity:0});
			}
		});

	preload([
		"detail/image/honten/bg_chapter1.jpg",
		"detail/image/salablanca/bg_chapter1.jpg",
		"detail/image/ashiya/bg_chapter1.jpg",
		"detail/image/sogokobe/bg_chapter1.jpg",
		"detail/image/hankyuumeda/bg_chapter1.jpg",
		"detail/image/nishinomiyahankyu/bg_chapter1.jpg"
	   ]);

});

window.onload = function(){

(jQuery.support.opacity) ? noIE = 1 : noIE = 0;

$("#mapArea").css("visibility","visible").animate({"opacity":1}, {queue:false, duration:2000});

jQuery.easing.def = "easeOutQuint";

$('#picMenu li img')
	.each(function(i){
        this.preloaded = new Image;
        this.preloaded.src = this.src.replace(/^(.+)(\.[a-z]+)$/, "$1_on$2");
		})
	.hover(function(){
		this.src = this.src.replace(/^(.+)(\.[a-z]+)$/, "$1_on$2");
		this_class = $(this).parent().parent().attr("class");
		circle_on = "#" + this_class + "C";
		$(circle_on).css("display","block");
	},function(){
		this.src = this.src.replace(/^(.+)_on(\.[a-z]+)$/, "$1$2");
		this_class = $(this).parent().parent().attr("class");
		circle_on = "#" + this_class + "C";
		$(circle_on).css("display","none");
	})
;

	$("#picMenu li").each(function(i){
			$(this).animate({marginTop:"70px"}, {queue:false, duration:4000});
		if (noIE) {
			$(this).animate({opacity:1}, {queue:false, duration:4000});
		}
	});

}
