$.event.add(window, "load", function() {

	$("#whiteout").css({ "display":"none", "opacity": "1.0" });
	$("#mirrorimg_animate").css({"top":"-140px"});
	$("#realimg_animate").css({"top":"140px"});


	setTimeout(function() {
		$("#realimg_animate").animate({"top":"0px"}, 1000);
		$("#mirrorimg_animate").animate({"top":"0px"}, 1000);
	}, 300);
	
	$("#btn1").mouseover(function() {
		$("#btn1 img").attr("src", "images/btn01_on.jpg");
		$("#btn1m").attr("src", "images/btn01m_on.jpg");
	});
	$("#btn1").mouseout( function() {
		$("#btn1 img").attr("src", "images/btn01_off.jpg");
		$("#btn1m").attr("src", "images/btn01m_off.jpg");
	});
	
	$("#btn2").mouseover(function() {
		$("#btn2 img").attr("src", "images/btn02_on.jpg");
		$("#btn2m").attr("src", "images/btn02m_on.jpg");
	});
	$("#btn2").mouseout(function() {
		$("#btn2 img").attr("src", "images/btn02_off.jpg");
		$("#btn2m").attr("src", "images/btn02m_off.jpg");
	});
});

function onClickBtn(id) {
	var href = $("#"+id).attr("href");
	
	$("#whiteout").css({ "display":"block", "opacity": "0.0" });
	$("#realimg_animate").animate({"top":"140px"}, 1000, 
		function() {
			setTimeout(
				function() {
					location.href=href;
				}, 300);
		}
	);
	
	$("#mirrorimg_animate").animate({"top":"-140px"}, 1000);
	$("#whiteout").animate({"opacity":"1.0"}, 1000);
}

