// jquery-extension


// <a href="#***">のときスクロール  
jQuery.easing.quart = function (x, t, b, c, d) {  
    return -c * ((t=t/d-1)*t*t*t - 1) + b;  
};  
  
jQuery(document).ready(function(){
	jQuery('a[href*=#]').click(function() {
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
		var $target = jQuery(this.hash);
		$target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
			if ($target.length) {  
				var targetOffset = $target.offset().top;
				jQuery('html,body').animate({ scrollTop: targetOffset }, 1200, 'quart');
				return false;  
            }
        }
	});
});

function addOnload(func){
	if ( typeof window.addEventListener != "undefined" ){
		window.addEventListener( "load", func, false );
	}else if ( typeof window.attachEvent != "undefined" ) {
		window.attachEvent( "onload", func );
	}else{
		if ( window.onload != null ){
			var oldOnload = window.onload;
			window.onload = function ( e ) {
			oldOnload( e );
			window[func]();
		};
	}else
		window.onload = func;
	}
}


//マウスオーバー
$(function(){
	/* mouseover */
	$(".fadeIn a img").mouseover(function(){
		$(".fadeIn a img:eq("+$(".fadeIn a img").index(this)+")").css("opacity", "0.5");
		$(".fadeIn a img:eq("+$(".fadeIn a img").index(this)+")").css("filter", "alpha(opacity=50)");
		$(".fadeIn a img:eq("+$(".fadeIn a img").index(this)+")").fadeTo("high", 2.0);
	});
	/* mouseout */
	$(".fadeIn a img").mouseout(function(){
		$(".fadeIn a img:eq("+$(".fadeIn a img").index(this)+")").css("opacity", "0.3");
		$(".fadeIn a img:eq("+$(".fadeIn a img").index(this)+")").css("filter", "alpha(opacity=30)");
		$(".fadeIn a img:eq("+$(".fadeIn a img").index(this)+")").fadeTo("high", 1.0);
	});
	
});

$(function(){
	/* mouseover */
	$(".fadeIn input").mouseover(function(){
		$(".fadeIn input:eq("+$(".fadeIn input").index(this)+")").css("opacity", "0.5");
		$(".fadeIn input:eq("+$(".fadeIn input").index(this)+")").css("filter", "alpha(opacity=50)");
		$(".fadeIn input:eq("+$(".fadeIn input").index(this)+")").fadeTo("high", 1.0);
	});
	/* mouseout */
	$(".fadeIn input").mouseout(function(){
		$(".fadeIn input:eq("+$(".fadeIn input").index(this)+")").css("opacity", "0.3");
		$(".fadeIn input:eq("+$(".fadeIn input").index(this)+")").css("filter", "alpha(opacity=30)");
		$(".fadeIn input:eq("+$(".fadeIn input").index(this)+")").fadeTo("high", 1.0);
	});
	
});


//マウスオーバー02
$(function(){
	/* mouseover */
	$(".fadeIn02 a img").mouseover(function(){
		$(".fadeIn02 a img:eq("+$(".fadeIn02 a img").index(this)+")").css("opacity", "0.6");
		$(".fadeIn02 a img:eq("+$(".fadeIn02 a img").index(this)+")").css("filter", "alpha(opacity=60)");
		$(".fadeIn02 a img:eq("+$(".fadeIn02 a img").index(this)+")").fadeTo("high", 0.8);
	});
	/* mouseout */
	$(".fadeIn02 a img").mouseout(function(){
		$(".fadeIn02 a img:eq("+$(".fadeIn02 a img").index(this)+")").css("opacity", "0.6");
		$(".fadeIn02 a img:eq("+$(".fadeIn02 a img").index(this)+")").css("filter", "alpha(opacity=60)");
		$(".fadeIn02 a img:eq("+$(".fadeIn02 a img").index(this)+")").fadeTo("high", 1.0);
	});
	
});












