// JavaScript Document
$(function(){
	//フェードアウト式画像切り替え
	$("img.imgover").each(function(){
			$(this).parent().css({ //自分の親要素に背景とdisplay:blockを追加
					display: 'block',
					backgroundImage :'url(' +$(this).attr('src').replace(/^(.+)(\.[a-z]+)$/, '$1_o$2') +')'});
	});
	$("img.imgover").hover(function(){
			$(this).stop().fadeTo(1000,0);									
		}
		 ,function(){  
    		$(this).stop().fadeTo(1000,1); 
		 });	
	
	//通常画像切り替え
    $("img.imgoverN").mouseover(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_o$2"));
    }).mouseout(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)_o(\.[a-z]+)$/, "$1$2"));
    }).each(function(){
        $("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_o$2"));
    });

	//画像透明度
    $("img.imgoverNF").mouseover(function(){
        $(this).stop().fadeTo(800,0.6);	
    }).mouseout(function(){
        $(this).stop().fadeTo(800,1);	
    });

});
		
	
