(function($){var version='2.0.1';var optionOverrides={};var defaults={exclude:[],excludeWithin:[],offset:0,direction:'top',delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:'swing',speed:400,autoCoefficient:2,preventDefault:true};var getScrollable=function(opts){var scrollable=[];var scrolled=false;var dir=opts.dir&&opts.dir==='left'?'scrollLeft':'scrollTop';this.each(function(){var el=$(this);if(this===document||this===window){return;} if(document.scrollingElement&&(this===document.documentElement||this===document.body)){scrollable.push(document.scrollingElement);return false;} if(el[dir]()>0){scrollable.push(this);}else{el[dir](1);scrolled=el[dir]()>0;if(scrolled){scrollable.push(this);} el[dir](0);}});if(!scrollable.length){this.each(function(){if(this===document.documentElement&&$(this).css('scrollBehavior')==='smooth'){scrollable=[this];} if(!scrollable.length&&this.nodeName==='BODY'){scrollable=[this];}});} if(opts.el==='first'&&scrollable.length>1){scrollable=[scrollable[0]];} return scrollable;};$.fn.extend({scrollable:function(dir){var scrl=getScrollable.call(this,{dir:dir});return this.pushStack(scrl);},firstScrollable:function(dir){var scrl=getScrollable.call(this,{el:'first',dir:dir});return this.pushStack(scrl);},smoothScroll:function(options,extra){options=options||{};if(options==='options'){if(!extra){return this.first().data('ssOpts');} return this.each(function(){var $this=$(this);var opts=$.extend($this.data('ssOpts')||{},extra);$(this).data('ssOpts',opts);});} var opts=$.extend({},$.fn.smoothScroll.defaults,options);var clickHandler=function(event){var escapeSelector=function(str){return str.replace(/(:|\.|\/)/g,'\\$1');};var link=this;var $link=$(this);var thisOpts=$.extend({},opts,$link.data('ssOpts')||{});var exclude=opts.exclude;var excludeWithin=thisOpts.excludeWithin;var elCounter=0;var ewlCounter=0;var include=true;var clickOpts={};var locationPath=$.smoothScroll.filterPath(location.pathname);var linkPath=$.smoothScroll.filterPath(link.pathname);var hostMatch=location.hostname===link.hostname||!link.hostname;var pathMatch=thisOpts.scrollTarget||(linkPath===locationPath);var thisHash=escapeSelector(link.hash);if(thisHash&&!$(thisHash).length){include=false;} if(!thisOpts.scrollTarget&&(!hostMatch||!pathMatch||!thisHash)){include=false;}else{while(include&&elCounter