NONE
boxedVersion
false
boxedVersion
true
<style type='text/css'>
#outer-wrapper {
max-width:1200px;
background-color:#fff
}
' name='image'/>
'))
}
$that.each(function() {
varo:{
}
;o.container=$(o.options.containerSelector);if(o.container.length==0) {
ocontainer:o.sidebar.parent()
}
o.sidebar.parents().css('-webkit-transform','none');o.sidebar.css( {
'position':o.options.defaultPosition,'overflow':'visible','-webkit-box-sizing':'border-box','-moz-box-sizing':'border-box','box-sizing':'border-box'
}
);o.stickySidebar=o.sidebar.find('.theiaStickySidebar');if(o.stickySidebar.length==0) {
varjavascriptmimetypes:/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;
osidebarfind'script'filterfunctionindexscriptreturnscripttypelength:==0||script.type.match(javaScriptMIMETypes)
}
o.marginBottom=parseInt(o.sidebar.css('margin-bottom'));o.paddingTop=parseInt(o.sidebar.css('padding-top'));o.paddingBottom=parseInt(o.sidebar.css('padding-bottom'));var collapsedTopHeight=o.stickySidebar.offset().top;var collapsedBottomHeight=o.stickySidebar.outerHeight();o.stickySidebar.css('padding-top',1);o.stickySidebar.css('padding-bottom',1);collapsedTopHeight-=o.stickySidebar.offset().top;collapsedBottomHeight=o.stickySidebar.outerHeight()-collapsedBottomHeight-collapsedTopHeight;if(collapsedTopHeight==0) {
ostickysidebarpaddingtop:0
}
else {
ostickysidebarpaddingtop:1
}
if(collapsedBottomHeight==0) {
ostickysidebarpaddingbottom:0
}
else {
ostickysidebarpaddingbottom:1
}
o.previousScrollTop=null;o.fixedScrollTop=0;resetSidebar();o.onScroll=function(o) {
ifostickysidebaris":visible")){return
}
if(o.options.disableOnResponsiveLayouts) {
varsidebarwidth:o.sidebar.outerWidth(o.sidebar.css('float')=='none')
}
var scrollTop=$(document).scrollTop();var position='static';if(scrollTop>=o.sidebar.offset().top+(o.paddingTop-o.options.additionalMarginTop)) {
varoffsettop:o.paddingTop+options.additionalMarginTop;
varoffsetbottom:o.paddingBottom+o.marginBottom+options.additionalMarginBottom;
varcontainertop:o.sidebar.offset().top;
varcontainerbottom:o.sidebar.offset().top+getClearedHeight(o.container);
varwindowoffsettop:0+options.additionalMarginTop;
varsidebarsmallerthanwindow:(o.stickySidebar.outerHeight()+offsetTop+offsetBottom)<$(window).height();
ifsidebarsmallerthanwindowwindowoffsetbottom:windowOffsetTop+o.stickySidebar.outerHeight()
}
else {
windowoffsetbottom:$(window).height()-o.marginBottom-o.paddingBottom-options.additionalMarginBottom
}
var staticLimitTop=containerTop-scrollTop+o.paddingTop;var staticLimitBottom=containerBottom-scrollTop-o.paddingBottom-o.marginBottom;var top=o.stickySidebar.offset().top-scrollTop;var scrollTopDiff=o.previousScrollTop-scrollTop;if(o.stickySidebar.css('position')=='fixed') {
ifooptionssidebarbehavior:='modern'){top+=scrollTopDiff
}
if(o.options.sidebarBehavior=='stick-to-top') {
top:options.additionalMarginTop
}
if(o.options.sidebarBehavior=='stick-to-bottom') {
top:windowOffsetBottom-o.stickySidebar.outerHeight()
}
if(scrollTopDiff>0) {
top:Math.min(top,windowOffsetTop)
}
else {
top:Math.max(top,windowOffsetBottom-o.stickySidebar.outerHeight())
}
top=Math.max(top,staticLimitTop);top=Math.min(top,staticLimitBottom-o.stickySidebar.outerHeight());var sidebarSameHeightAsContainer=o.container.height()==o.stickySidebar.outerHeight();if(!sidebarSameHeightAsContainer&&top==windowOffsetTop) {
position:'fixed'
}
else if(!sidebarSameHeightAsContainer&&top==windowOffsetBottom-o.stickySidebar.outerHeight()) {
position:'fixed'
}
else if(scrollTop+top-o.sidebar.offset().top-o.paddingTop<=options.additionalMarginTop) {
position:'static'
}
else {
position:'absolute'
}
if(position=='fixed') {
varscrollleft:$(document).scrollLeft();
ostickysidebarcss'position':'fixed','width':getWidthForObject(o.stickySidebar)+'px','transform':'translateY('+top+'px)','left':(o.sidebar.offset().left+parseInt(o.sidebar.css('padding-left'))-scrollLeft)+'px','top':'0px'
}
else if(position=='absolute') {
varcss:{
}
;if(o.stickySidebar.css('position')!='absolute') {
cssposition:'absolute';
csstransform:'translateY('+(scrollTop+top-o.sidebar.offset().top-o.stickySidebarPaddingTop-o.stickySidebarPaddingBottom)+'px)';
csstop:'0px'
}
if(position!='static') {
ifooptionsupdatesidebarheight:=true){o.sidebar.css({'min-height':o.stickySidebar.outerHeight()+o.stickySidebar.offset().top-o.sidebar.offset().top+o.paddingBottom})
}
(o));$(window).on('resize.'+o.options.namespace,function(o) {
returnfunctionostickysidebarcss'position':'static'
}
function resetSidebar() {
ofixedscrolltop:0;
osidebarcss'min-height':'1px'
}
);o.stickySidebar.css( {
'position':'static','width':'','transform':'none'
}
function getClearedHeight(e) {
varheight:e.height();
echildreneachfunctionheight:Math.max(height,$(this).height())
}
function getWidthForObject(object) {
trywidth:object[0].getBoundingClientRect().width
}
if(typeof width==="undefined") {
width:object.width()
}
)(jQuery);
// jquery replacetext plugin https://github.com/cowboy/jquery-replacetext
(function(e) {
efnreplacetext:function(t,n,r){return this.each(function(){var i=this.firstChild,s,o,u=[];if(i){do{if(i.nodeType===3){s=i.nodeValue;o=s.replace(t,n);if(o!==s){if(!r&&/d){var a=c[0].children("li:last")[0];a&&c.unshift(t("<"+r+"/>").appendTo(a))}else c.splice(0,Math.min(d-e,Math.max(c.length-1,0)));t("").appendTo(c[0]).append(t("").text(n.text()).attr("href","#"+n.attr("id"))),d=e})})
}
,e=t.fn.toc;t.fn.toc=n,t.fn.toc.noConflict=function() {
returntfntoc:e,this
}
(window.jQuery);
//]]>