// !Easingの追加
jQuery.easing.quart = function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

// !年号取得
function echoYear(){
	var d = new Date();
	document.write(d.getFullYear());
}








jQuery(function(){






	/* !Anchor Scroll -------------------------------------- */
	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 }, 300, 'quart');
							return false;
					}
			}
	});

	/* !Mouse Over Image Change ----------------------------- */
	var image_cache = new Object();
	jQuery("img.swap").each(function(i) {
	var imgsrc = this.src;
	var dot = this.src.lastIndexOf('.');
	var imgsrc_on = this.src.substr(0, dot) + '_o' + this.src.substr(dot, 4);
	image_cache[this.src] = new Image();
	image_cache[this.src].src = imgsrc_on;
	jQuery(this).hover(
			function() { this.src = imgsrc_on; },
			function() { this.src = imgsrc; });
	});


	/* !外部リンクは自動で_blankに -------------------------------- */
	var domain = location.href.match(/^https?(:\/\/[a-zA-Z0-9.]+)\//i);
	jQuery('a[href^=http]').not('[href*="'+domain+'"]').attr('target','_blank');



}); /* !End of jQuery(function(){}); ===================== */

