$(function() {

    if (! $.browser.safari) {
        $('.toplink').click(function () {
            $(this).blur();

            $('html,body').animate({ scrollTop: 0 }, 'normal');

            return false;
        });
    }
	
	$("img.onbanner").mouseover(function(){
	        $(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_r$2"))
    }).mouseout(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)_r(\.[a-z]+)$/, "$1$2"));
    }).each(function(){
        $("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_r$2"))
	});

})

function endayori(file){
	window.open(file,"endayori","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=no,Width=840,Height=720");
}

	
function getPath(val){
	var res = "";
	if (val.indexOf("../../../") > -1){
		res = "../../../";
	}else if(val.indexOf("../../") > -1){
		res = "../../";
	}else if(val.indexOf("../") > -1){
		res = "../";
	}else{
		res = "";	
	}
	return res;
}


function topFlash(){
				if (AC_FL_RunContent == 0) {
					document.write("<img src='imgs/top/main.jpg' alt='' /><ul class='hidemenu clearfix'><li><a href='hi/index.htm'><img src='imgs/top/main_menu_1.jpg' alt='–öŠw‰€‚“™ŠwZ' /></a></li><li class='naka'><a href='jr/index.htm'><img src='imgs/top/main_menu_2.jpg' alt='–öŠw‰€’†ŠwE‚“™ŠwZ' /></a></li><li class='last'><a href='http://www.yanagi-yochien.com/' target='_blank'><img src='imgs/top/main_menu_3.jpg' alt='–ö—c’t‰€' /></a></li></ul>");
				} else {
					if (FlashPlayerVer() == 0){
						document.write("<img src='imgs/top/main.jpg' alt='' /><ul class='hidemenu clearfix'><li><a href='hi/index.htm'><img src='imgs/top/main_menu_1.jpg' alt='–öŠw‰€‚“™ŠwZ' /></a></li><li class='naka'><a href='jr/index.htm'><img src='imgs/top/main_menu_2.jpg' alt='–öŠw‰€’†ŠwE‚“™ŠwZ' /></a></li><li class='last'><a href='http://www.yanagi-yochien.com/' target='_blank'><img src='imgs/top/main_menu_3.jpg' alt='–ö—c’t‰€' /></a></li></ul>");
					}else{
						AC_FL_RunContent(
						'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
						'width', '860',
						'height', '375',
						'src', 'top',
						'quality', 'high',
						'pluginspage', 'https://www.macromedia.com/go/getflashplayer',
						'align', 'middle',
						'play', 'true',
						'loop', 'false',
						'scale', 'showall',
						'wmode', 'window',
						'devicefont', 'false',
						'id', 'top',
						'bgcolor', '#ffffff',
						'name', 'top',
						'menu', 'true',
						'allowFullScreen', 'false',
						'allowScriptAccess','sameDomain',
						'movie', 'top',
						'salign', ''
						); //end AC code
					}
				}
}


function honkoFlash(){
				if (AC_FL_RunContent == 0) {
					document.write('<img src="imgs/top/main.jpg" alt="" />');
				} else {
					if (FlashPlayerVer() == 0){
						document.write('<img src="imgs/top/main.jpg" alt="" />');
					}else{
						AC_FL_RunContent(
						'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
						'width', '860',
						'height', '280',
						'src', 'honko',
						'quality', 'high',
						'pluginspage', 'https://www.macromedia.com/go/getflashplayer',
						'align', 'middle',
						'play', 'true',
						'loop', 'false',
						'scale', 'showall',
						'wmode', 'transparent',
						'devicefont', 'false',
						'id', 'honko',
						'bgcolor', '#ffffff',
						'name', 'honko',
						'menu', 'true',
						'allowFullScreen', 'false',
						'allowScriptAccess','sameDomain',
						'movie', 'honko',
						'salign', ''
						); //end AC code
					}
				}
}
function singakuFlash(){
				if (AC_FL_RunContent == 0) {
					document.write('<img src="imgs/top/main.jpg" alt="" />');
				} else {
					if (FlashPlayerVer() == 0){
						document.write('<img src="imgs/top/main.jpg" alt="" />');
					}else{
						AC_FL_RunContent(
						'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
						'width', '860',
						'height', '280',
						'src', 'singaku',
						'quality', 'high',
						'pluginspage', 'https://www.macromedia.com/go/getflashplayer',
						'align', 'middle',
						'play', 'true',
						'loop', 'false',
						'scale', 'showall',
						'wmode', 'transparent',
						'devicefont', 'false',
						'id', 'singaku',
						'bgcolor', '#ffffff',
						'name', 'singaku',
						'menu', 'true',
						'allowFullScreen', 'false',
						'allowScriptAccess','sameDomain',
						'movie', 'singaku',
						'salign', ''
						); //end AC code
					}
				}
}

