/** * @package WordPress * @subpackage Schule * @version 1.0.0 */ /** * Smooth Sticky * v1.0.3 **/ !function(E){var c=Object.assign?Object.assign:function(t){for(var e=1;e=E.innerWidth?(h.remove("scroll",i,!0),h.remove("resize",s,!0)):(h.add("scroll",i,!1,!0),h.add("resize",s,!1,!0))},doScrollEnd:function(){this.scrollEnd(this.stickyRunMove.bind(this))},doMove:function(){for(var t,e,o,n,i,s,r=this.data.scroll,l=r+this.options.offsetTop,a=E.innerHeight,c=r+a,h=this.session.page_y_offset>r,f=0;f=_.parent.height)M(u,0);else{if(h&&_.current.top>l&&_.current.top>_.parent.top){var b=d-g+this.options.indent_top;y=0a-this.options.offsetTop-this.options.indent_bottom?c<_.parent.bottom?Math.max(k,0):_.last_bottom:document.documentElement.scrollHeight<=c?_.last_bottom:Math.min(k-(a-this.options.offsetTop-_.current.height)+(this.options.indent_top+this.options.indent_bottom),_.last_bottom)}y!=_.top_rel?M(u,y):_.current.bottom>_.parent.bottom&&M(u,_.last_bottom)}}}this.session.page_y_offset=r},stickyRunMove:function(){this.data.scroll=E.pageYOffset,this.options.onScroll.bind(this)(),this.doMove()},scrollEnd:function(t){this.options.scroll_timeout_fn&&clearTimeout(this.options.scroll_timeout_fn),this.options.scroll_timeout_fn=setTimeout(t,this.options.scroll_delay)}},M=function(t){switch(t){case"transform":case"translate":return a;case"margin":case"margin-top":return r;case"top":return l;default:return a}}(n.options.method_sticky);function i(){n.doScrollEnd()}function s(){setTimeout(function(){n.session.page_y_offset+=2,n.doScrollEnd(),setTimeout(function(){n.session.page_y_offset-=3,n.doScrollEnd()},200)},200)}function r(t,e){t.style.marginTop=e+"px"}function l(t,e){t.style.top=e+"px"}function a(t,e){t.style[f]="translate(0px, "+e+"px)"}return r.__proto__.setNull=function(t){t.style.marginTop=""},l.__proto__.setNull=function(t){t.style.top=""},a.__proto__.setNull=function(t){t.style[f]=""},n.init(),n},E.jQuery&&(E.jQuery.fn.smoothSticky=function(t){return E.smoothSticky(this.toArray(),t)})}(window);