// fade button JavaScript Document

$(function() {
	var num = 1;
	$('#globalNavi li.gn01')
	// gloval navi
	.each(function(){
		$(this).css('background', 'url(http://www.dotimg.co.jp/wp-content/themes/dotimg/share/common/navi_btn0'+num+'_on.png) no-repeat')
		num++;
	})
	.find('img').hover(
		function(){  
			$(this).stop().animate({'opacity' : '0'}, 500);  
		},
		function(){
			$(this).stop().animate({'opacity' : '1'}, 1000);
		}
	);
	$('p#headBtn')
	// header btn
	.each(function(){
		$(this).css('background', 'url(http://www.dotimg.co.jp/wp-content/themes/dotimg/share/common/head_btn_on.png) no-repeat')
	})
	.find('img').hover(
		function(){  
			$(this).stop().animate({'opacity' : '0'}, 300);  
		},
		function(){
			$(this).stop().animate({'opacity' : '1'}, 1000);
		}
	);
	$('p#sideContact')
	// side contact btn
	.each(function(){
		$(this).css('background', 'url(http://www.dotimg.co.jp/wp-content/themes/dotimg/share/common/side_btn_on.png) no-repeat')
	})
	.find('img').hover(
		function(){  
			$(this).stop().animate({'opacity' : '0'}, 300);  
		},
		function(){
			$(this).stop().animate({'opacity' : '1'}, 1000);
		}
	); 
	$('p#bcBtn')
	// subpage bottom contact btn
	.each(function(){
		$(this).css('background', 'url(http://www.dotimg.co.jp/wp-content/themes/dotimg/share/common/sub_btm_cont_btn_on.png) no-repeat')
	})
	.find('img').hover(
		function(){  
			$(this).stop().animate({'opacity' : '0'}, 300);  
		},
		function(){
			$(this).stop().animate({'opacity' : '1'}, 1000);
		}
	);
	$('p.worksBtn')
	// works button
	.each(function(){
		$(this).css('background', 'url(http://www.dotimg.co.jp/wp-content/themes/dotimg/share/common/works_btn_on.png) no-repeat')
	})
	.find('img').hover(
		function(){  
			$(this).stop().animate({'opacity' : '0'}, 300);  
		},
		function(){
			$(this).stop().animate({'opacity' : '1'}, 1000);
		}
	);
});


