!function(o,t,e,n){function s(){i={},o(f).each(function(){var t=o(o(this).attr("href"));t.length&&(i[o(this).attr("href")]={top:t.offset().top-c,bottom:t.offset().top-c+t.outerHeight()})})}function a(){if(!h){var e=o(t).scrollTop();for(var n in i)if(i[n].top<=e&&i[n].bottom>e&&l!=n){o(f).removeClass("active"),o(f+'[href="'+n+'"]').addClass("active"),t.location.hash="#/"+n.substr(1),l=n;break}}}function r(e,n){h=1,o("html,body").stop().animate({scrollTop:i[e.attr("href")].top},n,function(){o(f).removeClass("active"),e.addClass("active"),o(t).width()<=992&&(o("nav").removeClass("slide-menu"),o(".nav-menu-icon a").removeClass("active")),o("body").css({"overflow-x":"hidden"}),t.location.hash="#/"+e.attr("href").substr(1);e.attr("href");h=0})}var i={},c=0,l=t.location.hash.replace("/",""),h=0,f=".anchor-scroll";o("html,body").bind("scroll mousedown DOMMouseScroll mousewheel keyup",function(t){(t.which>0||"mousedown"==t.type||"mousewheel"==t.type)&&h&&(o("html,body").stop(),h=0,a())}),o(f).on("click",function(){return s(),r(o(this),2e3),!1}),o(t).load(function(){s(),l&&r(o(f+'[href="'+l+'"]'),1)}),o(t).scroll(function(){a()}),o(t).resize(function(){s()})}(jQuery,window,document);