//--------------------------------------------------------------------------------------
// トップの勤務地から探す内を
// 「エリア」と「都道府県」の２つで切り替える
// 文字コード : UTF-8
//--------------------------------------------------------------------------------------
$(function(){
	switchCurrent = 'switchA';
	document.getElementById('switchA').className = "current";
	document.getElementById('switchB').className = "link";
	$("#switchA").click( switchClicked );
	$("#switchB").click( switchClicked );
	$("#kinmuAreaB").css('display','none');
	$("#kinmuAreaSwitch").css('display','block');
});
function switchClicked(){
	clickedItem = $(this).attr('id');
	newKey = clickedItem.substr(6);
	currentKey = switchCurrent.substr(6);
	if(switchCurrent != clickedItem){
		if(clickedItem == 'switchA'){
			newCurrent = 'switchB';
		}else{
			newCurrent = 'switchA';
		}
		document.getElementById(clickedItem).className = "current";
		document.getElementById(switchCurrent).className = "link";
		$('#kinmuArea'+currentKey).fadeTo(300, 0);
		intID = setTimeout(fadeInListBlock,400);
	}
}
function fadeInListBlock(){
	$('#kinmuArea'+currentKey).css('display','none');
	$('#kinmuArea'+newKey).css('display','block');
	$('#kinmuArea'+newKey).fadeTo(300, 1.0);
	switchCurrent = clickedItem;
}
