/* =========================================================



	shop_index_tab.js



========================================================= */



$(function(){



	var roi = new RolloverImage("rollover-tab", "on", "on");

	var mysearch = window.location.hash;

	var target_area = $('.shop-box');



	/* ページ読み込み時アンカー設定 */

	$('#area-navi a').each(function(){



		$(this).attr('href' , function(){

									   

			return this.hash + '-tabs';

									   

		});



	});



	/* アンカー別表示設定 */

	if (mysearch == '') {

		

		$(target_area).hide();

		$('#hokkaido').show();

		roi.activate( roi.buttons[0] );	 	

		

	}

	else if(mysearch == '#hokkaido-tabs') {

		

		$(target_area).hide();

		$('#hokkaido').show();

		roi.activate( roi.buttons[0] );

		

	}

	else if(mysearch == '#kanto-tabs'){

		

		$(target_area).hide();

		$('#kanto').show();

		roi.activate( roi.buttons[1] );

		

	}

	else if(mysearch == '#chubu-tabs'){

		

		$(target_area).hide();

		$('#chubu').show();

		roi.activate( roi.buttons[2] );

		

	}

	else if(mysearch == '#kinki-tabs'){

		

		$(target_area).hide();

		$('#kinki').show();

		roi.activate( roi.buttons[3] );

		

	}

	else if(mysearch == '#chugoku-tabs') {

		

		$(target_area).hide();

		$('#chugoku').show();

		roi.activate( roi.buttons[4] );

		

	}

	else if (mysearch == '#kyusyu-tabs'){

		

		$(target_area).hide();

		$('#kyusyu').show();

		roi.activate( roi.buttons[5] );

		

	}

	else if (mysearch == '#okinawa-tabs'){

		

		$(target_area).hide();

		$('#okinawa').show();

		roi.activate( roi.buttons[6] );

		

	}

	else {

		

		$(target_area).hide();

		$('#hokkaido').show();

		roi.activate( roi.buttons[0] );	 	

		

	}

	

	/* コンテンツ切り替え設定 */

	$("#area-navi a").click(function(){



		$(target_area).hide();

		

		var pref_id = $(this).attr('href').slice(0 , -5);

		

		$(pref_id).show();



	});



});



/*  */

var styleText = ''

+'<style type="text/css">'

+'.shop-box { display: none; }'

+'.shop-box h2 { position:absolute; top:-1000px; left:0px; overflow:hidden; width:0px; height:0px; }'

+'</style>';

document.write(styleText);


