(function($){var defaults={topSpacing:0,bottomSpacing:0,className:"is-sticky",wrapperClassName:"sticky-wrapper",center:false,getWidthFrom:"",offset:0},$window=$(window),$document=$(document),sticked=[],windowHeight=$window.height(),scroller=function(){var scrollTop=$window.scrollTop(),documentHeight=$document.height(),dwh=documentHeight-windowHeight,extra=scrollTop>dwh?dwh-scrollTop:0;for(var i=0;i",{class:o.wrapperClassName});stickyElement.wrapAll(wrapper);if(o.center){stickyElement.parent().css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"})}if(stickyElement.css("float")=="right"){stickyElement.css({float:"none"}).parent().css({float:"right"})}var stickyWrapper=stickyElement.parent();stickyWrapper.css("height",stickyElement.outerHeight(true));sticked.push({topSpacing:o.topSpacing,bottomSpacing:o.bottomSpacing,stickyElement:stickyElement,currentTop:null,stickyWrapper:stickyWrapper,className:o.className,getWidthFrom:o.getWidthFrom,offset:o.offset})})},update:scroller,unstick:function(options){return this.each(function(){var unstickyElement=$(this);removeIdx=-1;for(var i=0;i