
/* rollover submenu monodukuri */
var smenu_monodukuri_img = new Array();

for( i = 0 ; i < 8 ; i++ ){
	smenu_monodukuri_img[i] = new Image();
}

smenu_monodukuri_img[0].src= directory + "monodukuri/images/smenu_01_off.gif";
smenu_monodukuri_img[1].src= directory + "monodukuri/images/smenu_01_on.gif";
smenu_monodukuri_img[2].src= directory + "monodukuri/images/smenu_02_off.gif";
smenu_monodukuri_img[3].src= directory + "monodukuri/images/smenu_02_on.gif";
smenu_monodukuri_img[4].src= directory + "monodukuri/images/smenu_03_off.gif";
smenu_monodukuri_img[5].src= directory + "monodukuri/images/smenu_03_on.gif";
smenu_monodukuri_img[6].src= directory + "monodukuri/images/smenu_04_off.gif";
smenu_monodukuri_img[7].src= directory + "monodukuri/images/smenu_04_on.gif";

function smenu_monodukuri(dim,cnt){
	document.images[dim].src = smenu_monodukuri_img[cnt].src;
}

/* globalmap open */
var NewWin = null;

function globalmap_open(src, winName, wid, hi){
	NewWin = window.open(src,winName,'toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=845,height=670');

}



/*
 + 2010.12 switchHat.js 0.10 Customize Ver.
 + Original
 + Copyright (c) 2010 CSS HappyLife (http://css-happylife.com/)
 + Licensed under the MIT License:
 + http://www.opensource.org/licenses/mit-license.php
 */
(function($) {

	$(function(){
		$.uHat.switchHat();
		$.uHat.close();

		/* 追加：ボタンロールオーバー */
		$(".ro").each(function() {
		var postfix = "_on";
		var img = $(this);
		var src = img.attr("src");
		var src_on = src.substr(0, src.lastIndexOf(".")) + postfix + src.substring(src.lastIndexOf("."));
		$("<img>").attr("src", src_on);
		img.hover(
		function() {img.attr("src", src_on);},
		function() {img.attr("src", src);}
		);
		});

	});

	$.uHat = {

		// 折りたたみ
		switchHat: function(settings) {
			uHatConA = $.extend({
				switchBtn: '.switchHat',
				switchContents: '.switchDetail',
				switchClickAddClass: 'nowOpen',
				/*追加：ボタン*/
				apDetailBtn: '<span><img src="images/btn_detail.gif" width="72" height="15" alt="More detail" class="switchHat ro"></span>'
			}, settings);
			
			/* 追加：コンテンツ高さ取得 */
			$(uHatConA.switchContents).each(function(){
			var conHeight=$(this).height()+35;
			$(this).css({"height":conHeight+"px"});
			});

			$(uHatConA.switchContents).hide().before('<p class="mono_detailbtn">'+uHatConA.apDetailBtn+'</p>');
			$(uHatConA.switchBtn).addClass("switchOn").click(function(){
				$(this).toggleClass(uHatConA.switchClickAddClass).fadeOut("slow");
				var index = $(uHatConA.switchBtn).index(this);
				$(uHatConA.switchContents).eq(index).slideDown("slow");
			}).css("cursor","pointer");
		},

		// 閉じるボタン表示
		close: function(settings) {
			uHatConB = $.extend({
				closeBtnSet: uHatConA.switchContents,
				apCloseBtn: '<span><img src="images/btn_close.gif" width="41" height="15" alt="Close" class="ro"></span>'
			}, settings);
			$(uHatConB.closeBtnSet).append('<p class="mono_closebtn">'+uHatConB.apCloseBtn+'</p>');
			$(".mono_closebtn").children().click(function(){
				$(this).parents(uHatConA.switchContents).slideUp("slow");
				$(this).closest(".pkg").find(uHatConA.switchClickAddClass).removeClass(uHatConA.switchClickAddClass);
				$(this).closest(".pkg").find(uHatConA.switchBtn).fadeIn("slow");
			}).css("cursor","pointer");

		}


		
	};

})(jQuery);




