(function(e,t,n,r){var i=[],s=[],o=[],u=0,a=t.location.hash,f=false,l,c=e(t).scrolltop(),h=false,p={section:"section",sectionname:"section-name",easing:"easeoutexpo",scrollspeed:1100,offset:0,scrollbars:true,before:function(){},after:function(){}};e.scrollify=function(r){function d(n){if(s[n]){p.before(n,o);if(p.sectionname){t.location.hash=s[n]}e("html,body").stop().animate({scrolltop:i[n]},p.scrollspeed,p.easing);e("html,body").promise().done(function(){p.after(n,o)})}}var v={handlemousedown:function(){h=false},handlemouseup:function(){h=true},handlescroll:function(){if(l){cleartimeout(l)}l=settimeout(function(){c=e(t).scrolltop();if(h==false){return false}h=false;var n=1,r=i.length,s=0,o=math.abs(i[0]-c),a;for(;n0){if(u>0){u--}}if(u>=0){d(u)}else{u=0}},25)},keyhandler:function(e){e.preventdefault();if(e.keycode==38){if(u>0){u--}d(u)}else if(e.keycode==40){if(u-1){if(math.abs(m.touches.touchmove.y-m.touches.touchstart.y)>m.options.distance){if(m.touches.touchstart.y0){u--}d(u)}else{if(u-1){if(math.abs(m.touches.touchmove.y-m.touches.touchstart.y)>m.options.distance){if(m.touches.touchstart.y0){u--}d(u)}else{if(u=0;g--){if(typeof arguments[1]==="string"){if(s[g]==arguments[1]){u=g;d(g)}}else{if(g==arguments[1]){u=g;d(g)}}}}else{p=e.extend(p,r);e(p.section).each(function(t){if(t>0){i[t]=e(this).offset().top+p.offset}else{i[t]=e(this).offset().top}if(p.sectionname&&e(this).data(p.sectionname).length>0){s[t]="#"+e(this).data(p.sectionname).replace(/ /g,"-")}else{s[t]="#"+(t+1)}o[t]=e(this);if(a==s[t]){u=t;f=true}});if(f==false&&p.sectionname){t.location.hash=s[0]}else{d(u)}v.init();m.init()}}})(jquery,this,document)