/*外部リンクをブランク表示*/
jQuery(function() {   
  jQuery(".window a").attr("target","_blank");  
});

jQuery(function() {   
  jQuery("a.window").attr("target","_blank");  
});

/*--------------------

FAQアコーディオンスクリプト

--------------------*/
jQuery(function () {
	
	//初期化 読み込み時は非表示
	jQuery(".faq_area dd").css({"display":"none"});		
	
	//マウスオーバー時　カーソール表示
	jQuery(".faq_area dt").mouseover(function () {
		jQuery(this).css({"cursor":"pointer"});	
		this.style.backgroundColor = "#434142";
	});
	
	
	jQuery(".faq_area dt").mouseout(function () {
		this.style.backgroundColor = "#3c3a3b";
	});


	//dtクリック時次のdd表示
	jQuery(".faq_area dt").click(function () {
		//jQuery("dd:not(:first)").hide();
		jQuery(this).next().slideToggle(10);				 
	});
	
});



/*---------------------------------

テーブルストライプ化

---------------------------------*/
/*---------------------------------
jQuery(function(){
	jQuery(".table_schedule td:nth-child(odd)").addClass("odd");
});
---------------------------------*/




/*---------------------------------

タブ化スクリプト

---------------------------------*/
//ホバー
$(function() {

	$("#tab_menu li img").hover(
		function() {	
				onSrc = $(this).attr("src");							//イメージのSRCパス格納
				onSrc = onSrc.replace("_df.", "_ov.");
				$(this).attr("src",onSrc);
				$(this).parent().attr("id");
		},
		function() {
				offSrc = $(this).attr("src");							//イメージのSRCパス格納
				offSrc = offSrc.replace("_ov.", "_df.");
				$(this).attr("src",offSrc);
		});
});



$(function(){
			
	//フェードインスピード
	var speed = 300;
					 
	//初期化
	$("#tab_contents").children().css({"display":"none"})
	$("#tab_contents").children().eq(0).css({"display":"block"})

$("#tab_menu li").click(function() {
																	 
		//クリックしたliの子IMG　取得
		nowImg = $(this).children();
		
		//画像切り替え
		imgSrc = $(nowImg).attr("src");
		imgSrc = imgSrc.replace("_ov.", "_hit.");
		$(nowImg).attr("src",imgSrc);
		
		//IDから最後の数字取得
		imgNum = nowImg.attr("id").slice(5);
		imgNum = imgNum-1;
		$("#tab_contents").children().css({"display":"none"})
		$("#tab_contents").children().eq(imgNum).fadeIn(speed);
		
		//押したliの兄弟li取得
		$(this).siblings().each(function() {
			
			rstImg = $(this).children();
			rstSrc = $(rstImg).attr("src");
			
			//画像切り替え
			rstSrc = rstSrc.replace("_hit.", "_df.");
			$(rstImg).attr("src",rstSrc);	
			
		});
		
	 });

});




/*---------------------------------

カーソール表示

---------------------------------*/
$(function() {
		   
	$("#tab_menu li").mouseover(function () {
		$(this).css({"cursor":"pointer"});	
	});
});







