/*! http://mths.be/smoothscroll v1.5.2 by @mathias */ (function(a,c){var b=(function(){var d=c(a.documentelement),f=c(a.body),e;if(d.scrolltop()){return d}else{e=f.scrolltop();if(f.scrolltop(e+1).scrolltop()==e){return d}else{return f.scrolltop(e)}}}());c.fn.smoothscroll=function(d){d=~~d||400;return this.find('a[href*="#"]').click(function(f){var g=this.hash,e=c(g);if(location.pathname.replace(/^\//,'')===this.pathname.replace(/^\//,'')&&location.hostname===this.hostname){if(e.length){f.preventdefault();b.stop().animate({scrolltop:e.offset().top},d,function(){location.hash=g})}}}).end()}}(document,jquery));