// 
var img01 = '/jp/products/ir-thermo/images/index-keyvisual-th.jpg';
var img02 = '/jp/products/ir-thermo/images/index-keyvisual-tvs.jpg';

$(function(){
	$("li#productNew").click(function(){
			$("p#product01").fadeIn(600);						  
			$("p#product02").hide(0);						  
			$("p#product03").hide(0);						  
			$("p#product04").hide(0);						  
	});
	$("li#productA").click(function(){
			$("p#product01").hide(0);	  
			$("p#product02").fadeIn(600);						  
			$("p#product03").hide(0);						  
			$("p#product04").hide(0);						  
	});
	$("li#productB").click(function(){
	});
	$("li#productC").click(function(){
	});
	
	
		//トップページ新着のタブ切り替え
	$('ul.tab').each(function(){//ul.tab毎に処理
		var sheets = new Array();
		$(this).find('li a').each(function(index){//初期化
			var sheetId = $(this).attr('href').replace('#','');//切り替え対象エリアのIDを取得
			sheets.push(sheetId);
			if(index==0){
				$(this).parent().addClass('current');
			}else{
				$('#'+sheetId).hide();
			}
		}).click(function(){//クリック時の処理
			$(this).parents('ul').find('li').removeClass('current');//いったんcurrentクラスを全部削除
			$(this).parent().addClass('current');
			for(i=0;i<sheets.length;i++){//切り替え対象エリアの表示非表示処理
				if($(this).attr('href').replace('#','')==sheets[i]){
					$('#'+sheets[i]).show();
				}else{
					$('#'+sheets[i]).hide();
				}
			}
			return false;
		});
	});
               
		//新着情報一覧のタブ切り替え
		var tabContainers = $('#whatsNew > div');

			$('#localNav ul a').click(function () {
			// すべてのタブコンテンツを非表示にし、
			// クリックされたハッシュをIDとするタブコンテンツだけ表示
			tabContainers.hide().filter(this.hash).show();
                    
			// 選択中のタブをハイライト表示
			$('#localNav ul a').parent().removeClass('current');
			$(this).parent().addClass('current');
                    
			return false;
		}).filter(':first').click(); // 最初のタブコンテンツだけ表示

});  

