// JavaScript Document
//UTF-8保存用
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_out."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_out.", "_over."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_over.", "_out."));
				}
			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}


// tub_action
jQuery.preimg = function()
{for(var i = 0; i<arguments.length; i++)
	{jQuery("<img>").attr("src", arguments[i]);
	}
};
jQuery.preimg("img/other/facail_out.jpg",
		"img/other/facail_over.jpg",
		"img/other/placenta_over.jpg",
		"img/other/placenta_out.jpg"
);
$(function(){
	$(".faical_act").click(function(){
		if($(".faical").css("display")=="none"){
		$(".faical").fadeIn("normal");
		$(".placenta").css("display","none");
		$(".faical_act").css("background-image","url(img/other/facail_over.jpg)");
		$(".placenta_act").css("background-image","url(img/other/placenta_out.jpg)");
		}});
		$(".placenta_act").click(function(){
		if($(".placenta").css("display")=="none"){
		$(".placenta").fadeIn("normal");
		$(".faical").css("display","none");
		$(".placenta_act").css("background-image","url(img/other/placenta_over.jpg)");
		$(".faical_act").css("background-image","url(img/other/facail_out.jpg)");
		}});

});


