/*
 * jquery.scroll.js
 * Copyright (c) 2011 KEYTON.CO,Ltd.
 * Dual licensed under MIT and GPL.
 * Date: 2011-12-27
 * @author Hayashi Naoki
 * @version 1.0.1
 * http://www.keyton-co.jp/
 */
jQuery(function(a){a.fn.scroll=function(d){var c=window.opera?document.compatMode=="BackCompat"?"body":"html":"html,body";var d=d||{};d.duration=d.duration||800;d.easing=d.easing||"swing";d.replace=d.replace||true;var b=document.URL.split("#")[0];return this.each(function(){if(this.hash===""){return}a(this).bind("click",function(g){var h=g.currentTarget.hash;var f=a(h).offset()!=null?a(h).offset():{left:0,top:0};a(c).animate({scrollTop:f.top,scrollLeft:f.left},{duration:d.duration,easing:d.easing,step:function(){a(this).bind("mousedown mousewheel DOMMouseScroll",function(){a(this).queue([]).stop()})},complete:function(){a(this).queue([]).stop();if(d.replace){window.location.href=b+h}}});return false})})};
a("a[href^='#']").scroll()});
