$(function() {
	//scroll animation
	$('a[href^=#]').click(function() {
		var speed = 400;
		var href= $(this).attr("href");
		var target = $(href == "#" || href == "" ? 'html' : href);
		var position = target.offset().top;
		$($.browser.safari ? 'body' : 'html').animate({scrollTop:position}, speed, 'swing');
		return false;
	});
	
	//simple tooltip
	$(".tooltip a").hover(function() {
		$(this).next("span").animate({opacity: "show", top: "-75"}, "slow");}, function() {
		$(this).next("span").animate({opacity: "hide", top: "-85"}, "fast");
	});
	

	
	//rollover
	$("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 totaltopFlash(){
				if (AC_FL_RunContent == 0) {
					document.write("<img src='imgs/main_1.jpg' alt='' />");
				} else {
					if (FlashPlayerVer() == 0){
						document.write("<img src='imgs/main_1.jpg' alt='' />");
					}else{
						AC_FL_RunContent(
						'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
						'width', '910',
						'height', '310',
						'src', 'totaltop',
						'quality', 'high',
						'pluginspage', 'https://www.macromedia.com/go/getflashplayer',
						'align', 'middle',
						'play', 'true',
						'loop', 'false',
						'scale', 'showall',
						'wmode', 'transparent',
						'devicefont', 'false',
						'id', 'totaltop',
						'bgcolor', '#ffffff',
						'name', 'totaltop',
						'menu', 'true',
						'allowFullScreen', 'false',
						'allowScriptAccess','sameDomain',
						'movie', 'totaltop',
						'salign', ''
						); //end AC code
					}
				}
}

function kobeFlash(){
				if (AC_FL_RunContent == 0) {
					document.write("<img src='kobe/imgs/top/main_1.jpg' alt='' />");
				} else {
					if (FlashPlayerVer() == 0){
						document.write("<img src='kobe/imgs/top/main_1.jpg' alt='' />");
					}else{
						AC_FL_RunContent(
						'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
						'width', '904',
						'height', '274',
						'src', 'kobe',
						'quality', 'high',
						'pluginspage', 'https://www.macromedia.com/go/getflashplayer',
						'align', 'middle',
						'play', 'true',
						'loop', 'false',
						'scale', 'showall',
						'wmode', 'transparent',
						'devicefont', 'false',
						'id', 'kobe',
						'bgcolor', '#ffffff',
						'name', 'kobe',
						'menu', 'true',
						'allowFullScreen', 'false',
						'allowScriptAccess','sameDomain',
						'movie', 'kobe',
						'salign', ''
						); //end AC code
					}
				}
}

function osakaFlash(){
				if (AC_FL_RunContent == 0) {
					document.write("<img src='osaka/imgs/top/main_1.jpg' alt='' />");
				} else {
					if (FlashPlayerVer() == 0){
						document.write("<img src='osaka/imgs/top/main_1.jpg' alt='' />");
					}else{
						AC_FL_RunContent(
						'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
						'width', '904',
						'height', '274',
						'src', 'osaka',
						'quality', 'high',
						'pluginspage', 'https://www.macromedia.com/go/getflashplayer',
						'align', 'middle',
						'play', 'true',
						'loop', 'false',
						'scale', 'showall',
						'wmode', 'transparent',
						'devicefont', 'false',
						'id', 'osaka',
						'bgcolor', '#ffffff',
						'name', 'osaka',
						'menu', 'true',
						'allowFullScreen', 'false',
						'allowScriptAccess','sameDomain',
						'movie', 'osaka',
						'salign', ''
						); //end AC code
					}
				}
}
