SidebarFollow=function(){this.config={element:null,distanceToTop:0};this.cache={originalToTop:0,prevElement:null,parentToTop:0,placeholder:jQuery("<div>")}};SidebarFollow.prototype={init:function(c){this.config=c||this.config;var a=this;var e=jQuery(a.config.element);if(e.length<=0){return}var b=e.prev();while(b.is(":hidden")){b=b.prev();if(b.length<=0){break}}a.cache.prevElement=b;var g=e.parent();var d=g.offset().top;var f=g.css("border-top");var h=g.css("padding-top");a.cache.parentToTop=d+f+h;jQuery(window).scroll(function(){a._scrollScreen({element:e,_self:a})});jQuery(window).resize(function(){a._scrollScreen({element:e,_self:a})})},_scrollScreen:function(e){var f=e._self;var c=e.element;var i=f.cache.prevElement;var g=f.config.distanceToTop;var a=parseInt(jQuery("body").css("top"),10);if(!isNaN(a)){g+=a}var b=c.offset().top-g;var h=0;if(i&&i.length===1){h=i.offset().top+i.outerHeight()}else{h=f.cache.parentToTop-g}if(jQuery(document).scrollTop()>b){var d=c.outerHeight();f.cache.placeholder.css("height",d).insertBefore(c);f.cache.originalToTop=b;c.css({top:g+"px",position:"fixed"})}else{if(f.cache.originalToTop>b||h>b){f.cache.placeholder.remove();c.css({position:"static"})}}}};