// 画像設定 -------------------------------------------------------------------------------

// プルダウンメニュー

var menu = {

	"top" : 

	{

		"on" : "/images/headmenu_on_top_21.png", 

		"off": "/images/headmenu_off_top_21.png"

	},

	"service" :

	{

		"on" : "/images/headmenu_on_service_23.png", 

		"off": "/images/headmenu_off_service_23.png"

	},

	"feature" :

	{

		"on" : "/images/headmenu_on_strength_25.png", 

		"off": "/images/headmenu_off_strength_25.png"

	},

	"faq" :

	{

		"on" : "/images/headmenu_on_faq_27.png", 

		"off": "/images/headmenu_off_faq_27.png"

	},

	"fare" :

	{

		"on" : "/images/headmenu_on_fare_29.png", 

		"off": "/images/headmenu_off_fare_29.png"

	},

	"actual_case" :

	{

		"on" : "/images/headmenu_on_case_31.png", 

		"off": "/images/headmenu_off_case_31.png"

	},

	"know_how" :

	{

		"on" : "/images/headmenu_on_knowhow_33.png", 

		"off": "/images/headmenuoff_knowhow_33.png"

	},

	"company" :

	{

		"on" : "/images/headmenu_on_company_35.png", 

		"off": "/images/headmenu_off_company_35.png"

	},

	"contact" :

	{

		"on" : "/images/headmenu_on_contact_37.png", 

		"off": "/images/headmenu_off_contact_37.png"

	}



};




// 先読み画像格納先

var preloads = [];





// ページ初期化処理 -------------------------------------------------------------------------

//$(document).ready(function(){

jQuery(document).ready(function(){

	

	// マウスオーバー時アニメーション設定の初期化

	jQuery(".nav")

	.superfish({

		animation : { opacity:"show",height:"show", delay:0, speed:"fast"}

	})

	.find(">li:has(ul)")

		.mouseover(function(){

//			jQuery("ul",this).bgIframe({opacity:false});

	

		})

		.find("a")

			.focus(function(){



//		jQuery("ul",jQuery(".nav>li:has(ul)")).jQuery({opacity:false});

		jQuery("ul",jQuery(".nav>li:has(ul)")).bgIframe({opacity:false});

			});

	

	// プルダウンメニュー画像の初期化

	for(var id in menu)

	{

		var selector  = "#" + id;

		jQuery(selector + "> img").attr({ src: eval("menu."+id+".off") });

		

		jQuery(selector)

		.hover(

			function() {

				jQuery("img", this).attr({ src: eval("menu."+this.id+".on") });

			},

			function() {

				jQuery("img", this).attr({ src: eval("menu."+this.id+".off") });

			}

		);

		

		var image = new Image();

		image.src = eval("menu."+id+".on");

		preloads.push(image);

	};

	

	jQuery(".pngfix").pngFix();


});

	
