function isiCalc(){var n=$(this).scrollTop(),t=$(window).height(),i=$(".isi").offset().top;t-i>110?$("body.body-container").removeClass("isi-fixed"):($("body.body-container").addClass("isi-fixed"),(n+t<i+100||n==0)&&!$("body.body-container").hasClass("isi-fixed")?$("body.body-container").addClass("isi-fixed"):n+t>=i+100&&$("body.body-container").hasClass("isi-fixed")&&$("body.body-container").removeClass("isi-fixed"))}(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof module=="object"&&module.exports?n(require("jquery")):n(jQuery)})(function(n){function r(n){return n.replace(/(:|\.|\/)/g,"\\$1")}var t={},u={exclude:[],excludeWithin:[],offset:0,direction:"top",scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},i=function(t){var i=[],u=!1,r=t.dir&&t.dir==="left"?"scrollLeft":"scrollTop";return this.each(function(){var t=n(this);if(this!==document&&this!==window){if(document.scrollingElement&&(this===document.documentElement||this===document.body))return i.push(document.scrollingElement),!1;t[r]()>0?i.push(this):(t[r](1),u=t[r]()>0,u&&i.push(this),t[r](0))}}),i.length||this.each(function(){this.nodeName==="BODY"&&(i=[this])}),t.el==="first"&&i.length>1&&(i=[i[0]]),i};n.fn.extend({scrollable:function(n){var t=i.call(this,{dir:n});return this.pushStack(t)},firstScrollable:function(n){var t=i.call(this,{el:"first",dir:n});return this.pushStack(t)},smoothScroll:function(t,i){if(t=t||{},t==="options")return i?this.each(function(){var t=n(this),r=n.extend(t.data("ssOpts")||{},i);n(this).data("ssOpts",r)}):this.first().data("ssOpts");var u=n.extend({},n.fn.smoothScroll.defaults,t),f=n.smoothScroll.filterPath(location.pathname);return this.unbind("click.smoothscroll").bind("click.smoothscroll",function(t){var o=this,s=n(this),i=n.extend({},u,s.data("ssOpts")||{}),h=u.exclude,c=i.excludeWithin,l=0,a=0,e=!0,v={},p=location.hostname===o.hostname||!o.hostname,w=i.scrollTarget||n.smoothScroll.filterPath(o.pathname)===f,y=r(o.hash);if(i.scrollTarget||p&&w&&y){while(e&&l<h.length)s.is(r(h[l++]))&&(e=!1);while(e&&a<c.length)s.closest(c[a++]).length&&(e=!1)}else e=!1;e&&(i.preventDefault&&t.preventDefault(),n.extend(v,i,{scrollTarget:i.scrollTarget||y,link:o}),n.smoothScroll(v))}),this}});n.smoothScroll=function(i,r){if(i==="options"&&typeof r=="object")return n.extend(t,r);var u,f,h,o,s,v=0,c="offset",e="scrollTop",l={},a={};typeof i=="number"?(u=n.extend({link:null},n.fn.smoothScroll.defaults,t),h=i):(u=n.extend({link:null},n.fn.smoothScroll.defaults,i||{},t),u.scrollElement&&(c="position",u.scrollElement.css("position")==="static"&&u.scrollElement.css("position","relative")));e=u.direction==="left"?"scrollLeft":e;u.scrollElement?(f=u.scrollElement,/^(?:HTML|BODY)$/.test(f[0].nodeName)||(v=f[e]())):f=n("html, body").firstScrollable(u.direction);u.beforeScroll.call(f,u);h=typeof i=="number"?i:r||n(u.scrollTarget)[c]()&&n(u.scrollTarget)[c]()[u.direction]||0;l[e]=h+v+u.offset;o=u.speed;o==="auto"&&(s=l[e]-f.scrollTop(),s<0&&(s*=-1),o=s/u.autoCoefficient);a={duration:o,easing:u.easing,complete:function(){u.afterScroll.call(u.link,u)}};u.step&&(a.step=u.step);f.length?f.stop().animate(l,a):u.afterScroll.call(u.link,u)};n.smoothScroll.version="1.5.6";n.smoothScroll.filterPath=function(n){return n=n||"",n.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")};n.fn.smoothScroll.defaults=u});$(document).ready(function(){isiCalc();$("a[href='#isi'] ").smoothScroll()});var didScroll;$(window).scroll(function(){didScroll=!0});setInterval(function(){didScroll&&(isiCalc(),didScroll=!1)},250)