/*
====================================================
	
	DEPOC JavaScript Function Version:3.00
	
		depoc SmoothLink.js
		include jquery
		
		Copyright (c) 2010 DEPOC Inc.
		http://depoc.jp
		
		Update:10/02/16
	
====================================================*/
jQuery.easing['jswing'] = jQuery.easing['swing'];
jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	}
});
$(function () {
	if (! $.browser.safari) {
		$('.pagetopBtn').click(function () {
			$(this).blur();
			$('html').animate({ scrollTop: 0 }, 1000,'easeOutExpo');
			$('body').animate({ scrollTop: 0 }, 1000,'easeOutExpo');
			return false;
		});
	}
});

$(document).ready(function(){
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
		&& location.hostname == this.hostname) {
		var $target = $(this.hash);
		$target = $target.length && $target||$('[name=' + this.hash.slice(1) +']');
		if ($target.length) {
			var targetOffset = $target.offset().top-68;//+header.height
			$('html').animate({scrollTop: targetOffset}, 1000,'easeOutExpo');
			$('body').animate({scrollTop: targetOffset}, 1000,'easeOutExpo');
			return false;
			}
		}
	});
});

