// JavaScript Document

$(function() {
/*  */
	for(i=1; i<=9; i++ ) {
		if (i == 2) {
			$('#sam_favorite' + i ).bind("mouseover",{x:i},function(e){
				$(this).css("background","url(./img/top/samlink/top_station_banner" + e.data.x + "_on_2.gif) no-repeat");
			});
			$('#sam_favorite' + i ).bind("mouseout",{x:i},function(e){
				$(this).css("background","url(./img/top/samlink/top_station_banner" + e.data.x + "_2.gif) no-repeat");
			});
		}
		else if (i == 7) {
			$('#sam_favorite' + i ).bind("mouseover",{x:i},function(e){
				$(this).css("background","url(./img/top/samlink/top_station_banner" + e.data.x + "_on_1.gif) no-repeat");
			});
			$('#sam_favorite' + i ).bind("mouseout",{x:i},function(e){
				$(this).css("background","url(./img/top/samlink/top_station_banner" + e.data.x + "_1.gif) no-repeat");
			});
		}
		else if (i == 9) {
			$('#sam_favorite' + i ).bind("mouseover",{x:i},function(e){
				$(this).css("background","url(./img/top/samlink/top_station_banner" + e.data.x + "_on_3.gif) no-repeat");
			});
			$('#sam_favorite' + i ).bind("mouseout",{x:i},function(e){
				$(this).css("background","url(./img/top/samlink/top_station_banner" + e.data.x + "_3.gif) no-repeat");
			});
		}
		else {
			$('#sam_favorite' + i ).bind("mouseover",{x:i},function(e){
				$(this).css("background","url(./img/top/samlink/top_station_banner" + e.data.x + "_on_def.gif) no-repeat");
			});
			$('#sam_favorite' + i ).bind("mouseout",{x:i},function(e){
				$(this).css("background","url(./img/top/samlink/top_station_banner" + e.data.x + "_def.gif) no-repeat");
			});
		}
	}

	$('#sam_link_1').hover(
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink1_on.gif) no-repeat");
		},
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink1.gif) no-repeat");
		}
	);
	$('#sam_link_2').hover(
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink2_on.gif) no-repeat");
		},
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink2.gif) no-repeat");
		}
	);
	$('#sam_link_3').hover(
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink3_on.gif) no-repeat");
		},
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink3.gif) no-repeat");
		}
	);
	$('#sam_link_4').hover(
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink4_on.gif) no-repeat");
		},
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink4.gif) no-repeat");
		}
	);
	$('#sam_link_5').hover(
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink5_on.gif) no-repeat");
		},
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink5.gif) no-repeat");
		}
	);
	$('#sam_link_6').hover(
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink6_on.gif) no-repeat");
		},
		function(){
			$(this).css("background","url(./img/top/samlink/top_samlink6.gif) no-repeat");
		}
	);
	$('.tenpo_detail_btn img').hover(
		function(){
			$(this).attr("src","./img/top/btn/tenpo_btn_on.gif");
		},
		function () {
	    	$(this).attr('src','./img/top/btn/tenpo_btn.gif');
	  	}
	);
	$('#estate_detail_box li a img').hover(
		function(){
			$(this).attr("src","/img/top/btn/tenpo_btn_on.gif");
		},
		function () {
	    	$(this).attr('src','/img/top/btn/tenpo_btn.gif');
	  	}
	);
	$('#chinpato_kouban_box li a img').hover(
		function(){
			$(this).attr("src","./img/top/policestation_img_on.gif");
		},
		function () {
	    	$(this).attr('src','./img/top/policestation_img.gif');
	  	}
	);

	$('#chinpato_fortune_box li a img').hover(
		function(){
			$(this).attr("src","./img/top/fortune_img_on.gif");
		},
		function () {
	    	$(this).attr('src','./img/top/fortune_img.gif');
	  	}
	);
}); 

