XylotrechusZ
!function(w){"use strict";function i(t,o){function n(t,o,s){var e={},i=t[0].style;s.forEach(function(t){e[t]="left"===t?"":void 0!==i[t]?i[t]:""}),t.data("css-backup-"+o,e)}function a(t,o){return t.data("css-backup-"+o)}function s(){n(p,"unsticky",["position","width","margin-top","margin-bottom","top","bottom"]);var t={position:"fixed",width:k(p,"width"),marginTop:0,marginBottom:0};t[l.to]=l.offset,t["top"===l.to?"bottom":"top"]="";var o=p.offset().left;t.left=o,p.css(t).addClass(l.classes.stickyActive)}function e(){p.css(a(p,"unsticky")).css("left","").removeClass(l.classes.stickyActive)}function c(t){var o=y.$window.scrollTop(),s=k(t,"height"),e=innerHeight,i=t.offset().top-o,r=i-e;return{top:{fromTop:i,fromBottom:r},bottom:{fromTop:i+s,fromBottom:r+s}}}function i(){y.$spacer=p.clone().addClass(l.classes.spacer).css({visibility:"hidden",transition:"none",animation:"none"}),p.after(y.$spacer),s(),m=!0,p.trigger("sticky:stick")}function r(){e(),y.$spacer.remove(),m=!1,p.trigger("sticky:unstick")}function f(){var t=c(p),o="top"===l.to;if(d){(o?t.top.fromTop>l.offset:t.bottom.fromBottom<-l.offset)&&(y.$parent.css(a(y.$parent,"childNotFollowing")),p.css(a(p,"notFollowing")).css("left",""),d=!1)}else{var s=c(y.$parent),e=getComputedStyle(y.$parent[0]),i=parseFloat(e[o?"borderBottomWidth":"borderTopWidth"]),r=o?s.bottom.fromTop-i:s.top.fromBottom+i;(o?r<=t.bottom.fromTop:r>=t.top.fromBottom)&&function(){n(y.$parent,"childNotFollowing",["position"]),y.$parent.css("position","relative"),n(p,"notFollowing",["position","top","bottom"]);var t={position:"absolute"};t[l.to]="",t["top"===l.to?"bottom":"top"]=0,p.css(t).css("left",""),d=!0}()}}var p,l,m=!1,d=!1,u=!1,y={},h=(w("body").hasClass("rtl"),{to:"top",offset:0,effectsOffset:0,parent:!1,classes:{sticky:"sticky",stickyActive:"sticky-active",stickyEffects:"sticky-effects",spacer:"sticky-spacer"}}),k=function(t,o,s){var e=getComputedStyle(t[0]),i=parseFloat(e[o]),r="height"===o?["top","bottom"]:["left","right"],n=[];return"border-box"!==e.boxSizing&&n.push("border","padding"),s&&n.push("margin"),n.forEach(function(o){r.forEach(function(t){i+=parseFloat(e[o+"-"+t])})}),i},v=function(){var t,o=l.offset;if(m){var s=c(y.$spacer);t="top"===l.to?s.top.fromTop-o:-s.bottom.fromBottom-o,l.parent&&f(),0<t&&r()}else{var e=c(p);(t="top"===l.to?e.top.fromTop-o:-e.bottom.fromBottom-o)<=0&&(i(),l.parent&&f())}!function(t){u&&-t<l.effectsOffset?(p.removeClass(l.classes.stickyEffects),u=!1):!u&&-t>=l.effectsOffset&&(p.addClass(l.classes.stickyEffects),u=!0)}(t)},g=function(){v()},b=function(){m&&(e(),s())};this.destroy=function(){m&&r(),y.$window.off("scroll",g).off("resize",b),p.removeClass(l.classes.sticky)},l=jQuery.extend(!0,h,o),p=w(t).addClass(l.classes.sticky),y.$window=w(window),l.parent&&("parent"===l.parent?y.$parent=p.parent():p.closest(l.parent).length?y.$parent=p.closest(l.parent):y.$parent=w(l.parent)),y.$window.on({scroll:g,resize:b}),v()}w.fn.lasfsticky=function(s){var e="string"==typeof s;return this.each(function(){var t=w(this);if(e){var o=t.data("sticky");if(!o)throw Error("Trying to perform the `"+s+"` method prior to initialization");if(!o[s])throw ReferenceError("Method `"+s+"` not found in sticky instance");o[s].apply(o,Array.prototype.slice.call(arguments,1)),"destroy"===s&&t.removeData("sticky")}else t.data("sticky",new i(this,s))}),this},window.LASFSticky=i}(jQuery);