/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'E\']=h.i[\'y\'];h.F(h.i,{z:\'A\',y:9(x,t,b,c,d){6 h.i[h.i.z](x,t,b,c,d)},G:9(x,t,b,c,d){6 c*(t/=d)*t+b},A:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},H:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},I:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},K:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},L:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},N:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},O:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},P:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},R:9(x,t,b,c,d){6-c*8.B(t/d*(8.g/2))+c+b},S:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},T:9(x,t,b,c,d){6-c/2*(8.B(8.g*t/d)-1)+b},U:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},V:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j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/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.17/2.k))*t+.18)+b}m{6 c*(7.q*(t-=(2.19/2.k))*t+.1a)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.D(x,t*2,0,c,d)*.5+b;6 h.i.w(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|abs|||asin|undefined|easeOutBounce||swing|def|easeOutQuad|cos|525|easeInBounce|jswing|extend|easeInQuad|easeInOutQuad|easeInCubic|easeOutCubic|easeInOutCubic|easeInQuart|easeOutQuart|easeInOutQuart|easeInQuint|easeOutQuint|easeInOutQuint|easeInSine|easeOutSine|easeInOutSine|easeInExpo|easeOutExpo|easeInOutExpo|easeInCirc|easeOutCirc|easeInOutCirc||easeInElastic|easeOutElastic|easeInOutElastic|easeInBack|easeOutBack|easeInOutBack|25|9375|625|984375|easeInOutBounce'.split('|'),0,{}))
/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */
 
/**
 * 確認メッセージ表示
 */
function doConfirm(message)
{
	if (confirm(message)) {
		return true;
	}
	return false;
}

/**
 * 多重送信防止
 */
var submited = false;
function doSubmit(){
	if(submited == false){
		submited = true;
		return true;
	}
	else{
		alert("只今、データ送信中です。\nしばらくお待ちください。");
		return false;
	}
}


/**
 * POPUP Window
 */
function openPopup(url, winname, option)
{
	newWindow = window.open(url,winname,option);
	newWindow.focus();
}



/**
 * add:OS判別 → CSS分岐
 */
var App = navigator.appName;
var Agent = navigator.userAgent;

//ここからブラウザとOS分岐(MAC)
if(Agent.indexOf('Mac') != -1) {
		document.open();
		document.write('<link rel="stylesheet" type="text/css" href="/css/common/style_mac.css" title="Mac_style" />');
		document.close();
}


$(function(){	// START ready
	$("#sportsNav a").hover(
		function(){$(this).fadeTo(50,0);},
		function(){$(this).fadeTo(50,1);}
	);
	
	//form:input Focus
	focusObj = 'input[type=text], input[type=password], textarea';
	defColor = '#f5f2eb';
	$(focusObj).css('backgroundColor','#f5f2eb');
	$(focusObj).focus( function () { $(this).css('backgroundColor','#fff'); } );
	$(focusObj).blur( function () { $(this).css('backgroundColor','#f5f2eb'); } );
});	// END ready

	


/* == smooth scroll == */
/*
HTML 内のタグ記述例
<a href="target_label" onclick="return SmoothScroll('header');">Page Top</a>
*/

function SmoothScroll(targetID){
	if( !document.getElementById ) {return true;}
	var step=1;
	var max=200;
	var accel=5;
	var interval=30;
	var current_y = document.body.scrollTop	|| document.documentElement.scrollTop;
	var element=document.getElementById(targetID);
	if (!element){return true;}
	var target_y = 0;
	for (i = element;i.offsetParent;i=i.offsetParent ){
		target_y += i.offsetTop;
	}
	var count=0;
	if ( current_y > target_y ){ step = -(step); accel = -(accel);}
	var timerid = setInterval( function(){
		if (step<max) step += (count*accel);
		if ( Math.abs(current_y-target_y) < Math.abs(step) ){
			window.scrollTo((document.body.scrollTop || document.documentElement.scrollTop),target_y);
			clearInterval(timerid);
			return false;
		}else{
			window.scrollBy(0,step);
			current_y += step;
			count++;
		}
	},interval);
	return false;
}



//** jQuery Scroll to Top Control script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com.
//** Available/ usage terms at http://www.dynamicdrive.com (March 30th, 09')
//** v1.1 (April 7th, 09'):
var scrolltotop={
	setting: {startline:100, scrollto: 0, scrollduration:600, fadeduration:[400, 100], easing:'easeOutQuint'},
	controlHTML: '<div id="endNavFloat"><span class="UIicon toTop"></span>ページの先頭</div>',
	controlattrs: {offsetx:20, offsety:80},
	anchorkeyword: '#header',
	state: {isvisible:false, shouldvisible:false},
	//END settings;
	scrollup:function(){eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6(!2.9){2.$a.b({c:0})}d 3=e(2.4.5)?2.4.5:f(2.4.5);6(g 3=="h"&&7(\'#\'+3).i==1){3=7(\'#\'+3).j().k}l{3=0}2.$m.n({o:3},{p:2.4.q,8:2.4.8});',27,27,'||this|dest|setting|scrollto|if|jQuery|easing|cssfixedsupport|control|css|opacity|var|isNaN|parseInt|typeof|string|length|offset|top|else|body|animate|scrollTop|diration|scrollduration'.split('|'),0,{}))},keepfixed:function(){eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2 $0=a(0);2 4=$0.b()+$0.5()-1.$3.5()-1.6.c;2 7=$0.d()+$0.8()-1.$3.8()-1.6.e;1.$3.f({g:4+\'9\',h:7+\'9\'});',18,18,'window|this|var|control|controlx|width|controlattrs|controly|height|px|jQuery|scrollLeft|offsetx|scrollTop|offsety|css|left|top'.split('|'),0,{}))},togglecontrol:function(){eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('g 9=h(i).j();5(!2.k){2.l()}2.3.6=(9>=2.7.m)?a:8;5(2.3.6&&!2.3.4){2.$b.c().d({e:1},2.7.f[0]);2.3.4=a}n 5(2.3.6==8&&2.3.4){2.$b.c().d({e:0},2.7.f[1]);2.3.4=8}',24,24,'||this|state|isvisible|if|shouldvisible|setting|false|scrolltop|true|control|stop|animate|opacity|fadeduration|var|jQuery|window|scrollTop|cssfixedsupport|keepfixed|startline|else'.split('|'),0,{}))},init:function(){eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('p(1).q(2($){6 a=r;6 b=1.7;a.8=!b||b&&1.9=="c"&&3.d;a.$4=(3.s)?(1.9=="c"?$(\'f\'):$(\'4\')):$(\'f,4\');a.$5=$(\'<g t="u">\'+a.v+\'</g>\').h({w:a.8?\'x\':\'y\',z:a.i.A,B:a.i.C,D:0,E:\'F\'}).G({H:\'I J K L\'}).j(2(){a.k();l m}).M(\'4\');N(1.7&&!3.d&&a.$5.O()!=\'\'){a.$5.h({n:a.$5.n()})};a.o();$(\'a[P="\'+a.Q+\'"]\').j(2(){a.k();l m});$(3).R(\'S T\',2(e){a.o()})});',56,56,'|document|function|window|body|control|var|all|cssfixedsupport|compatMode|||CSS1Compat|XMLHttpRequest||html|div|css|controlattrs|click|scrollup|return|false|width|togglecontrol|jQuery|ready|scrolltotop|opera|id|topcontrol|controlHTML|position|fixed|absolute|bottom|offsety|right|offsetx|opacity|cursor|pointer|attr|title|Scroll|Back|to|Top|appendTo|if|text|href|anchorkeyword|bind|scroll|resize'.split('|'),0,{}))}};scrolltotop.init();
