
$(document).ready(function(){
 

//tab switch////////////////////////////////////////

$('#tab00').addClass('current');
$('#tab00 img').attr('src','/blog/image/sankyu/portal/tab_synthesis_current.gif');

$('#tab00 img').mouseover(function(){
$tab00SRC = $(this).attr('src');
if($tab00SRC == '/blog/image/sankyu/portal/tab_synthesis_default.gif'){
	$(this).attr('src','/blog/image/sankyu/portal/tab_synthesis_over.gif');
	}
});
$('#tab00 img').mouseout(function(){
$tab00SRC2 = $(this).attr('src');
if($tab00SRC2 == '/blog/image/sankyu/portal/tab_synthesis_over.gif'){
	$(this).attr('src','/blog/image/sankyu/portal/tab_synthesis_default.gif');
	}
});

$exID = 'tab00';
$('.tabList li').each(function(){

$(this).children('a').click(function(){
		$(this).blur();
		$currentID = $(this).parent('li').attr('id');
		$currentSrc = $(this).children('img').attr('src').replace("_over.", "_current.");
		$currentSrc = $currentSrc.replace("_default.", "_current.");
		
//		if($exID != $currentID){
			$('.'+$currentID).show();
			$('.'+$exID).hide();
			
			$('#'+$exID).removeClass('current');
			$(this).parent('li').addClass('current');
			
			$(this).children('img').attr('src',$currentSrc);	
			$exSrc = $('#'+$exID).children().children('img').attr('src').replace("_current.","_default.");
			$('#'+$exID).children().children('img').attr('src',$exSrc);
//		}
		$exID = $currentID;
	});
});

//End of doccument ready ////////////////////////////////////////
});


