
// ------------------------------------------------------------------------------------
// ボタン部分のマウスオーバー
// ------------------------------------------------------------------------------------
// aタグのid名と、ボタンごとにつけてるid番号を受け取る
function mainAction( name, num ) 
{
	var atug = name.getElementsByTagName("a").item(0);
	// ぶらさがりのマウスオーバーでもボタンが反応するように。
	
	if(atug){
		atug.style.background = "url(/img/common/bg_l1_on.jpg) no-repeat center left";
		atug.style.color = "#006697";
		//atug.style.color = "#FF0000";
	}
	
	var menu = name.getElementsByTagName("div").item(0);
	// ぶら下がりを表示します。
	if(menu){
		menu.style.display = "block";	
	}
	
}

// ------------------------------------------------------------------------------------
// ボタン部分のマウスアウト
// ------------------------------------------------------------------------------------
function serviceout( name2, num )
{
	
	var atug = name2.getElementsByTagName("a").item(0);
	// ボタンを通常画像に戻します。
	if(atug){
		atug.style.background = "url(/img/common/bg_l1.jpg) no-repeat center left";
		atug.style.color = "#717171";
	}
	
	var menu = name2.getElementsByTagName("div").item(0);
	// ぶら下がりを消します。
	if(menu){
		menu.style.display = "none";	
	}
	
}

// ------------------------------------------------------------------------------------
// 読み込み時実行
// ------------------------------------------------------------------------------------
jQuery(function(){
	
//	if (typeof document.documentElement.style.maxHeight != "undefined") {
//	// IE 7.0 以上 または Gecko などモダンブラウザー
//	}
//	else {
//		alert("IE6");
//	}
	
	//===================================================================================
	//読み込み時に全て消す=====================================================
	//===================================================================================
	jQuery( ".popUpArrow div" ).each( function() {
		jQuery(this).css( "display","none" );
	} );
	
	
	//===================================================================================
	//ナビの反応==================================================================
	//===================================================================================
	//ボタン、およびぶら下がり部分のマウスオーバー／マウスアウトで実行する関数設定
	//jQuery( ".popUpArrow" ).hover( function(){ mainAction( this, 0 ) }, function(){ serviceout( this, 0 ) }  );
	jQuery( ".popUpArrow" ).each( function() {
		jQuery( this ).hover( function(){ mainAction( this, 0 ) }, function(){ serviceout( this, 0 ) }  );
	} );
	
	
});