var tdStickyRow={};
(function(){tdStickyRow={items:[],item:function(){this.rowUid="";this.jQueryObj=void 0;this.position="top";this._is_initialized=!1},init:function(){tdStickyRow.items=[];this._is_running=!1},_initialize_item:function(a){!0!==a._is_initialized&&(a._is_initialized=!0)},addItem:function(a){if("undefined"===typeof a.rowUid)throw"item.rowUid is not defined";tdStickyRow.items.push(a);tdStickyRow._initialize_item(a)},resetItems:function(){jQuery(window).unbind("resize.stickyRowTopResize").unbind("resize.stickyRowBottomResize").unbind("scroll.stickyRowTopScroll");tdStickyRow.items.forEach(function(a){var e=
a.jQueryObj;e.removeClass("tdc-rist-absolute");e.removeAttr("style");jQuery("#"+a.rowUid+"-p").remove()});tdStickyRow.items=[]},manageStickies:function(){var a=[],e=[];tdStickyRow.items.forEach(function(d){"top"===d.position?a.push(d):"bottom"===d.position&&e.push(d)});tdStickyRow.manageStickyTop(a);tdStickyRow.manageStickyBottom(e)},manageStickyTop:function(a){var e=jQuery(window);a.length&&(e.bind("resize.stickyRowTopResize",function(){function d(){a.forEach(function(b){var d=b.rowUid,c=jQuery("#"+
d);if(c.length){var f=jQuery("#"+d+"-p"),g=c.outerHeight();if(0===g){var h=c.clone().css({position:"absolute",top:-1E6,left:-1E6}).appendTo("body");g=h.outerHeight();h.remove()}(f.length?f.offset().top:c.offset().top)<=e.scrollTop()+k?(c.addClass("tdc-rist-top-active"),f.length?f.attr("style","height:"+g+"px"):c.after('<div id="'+d+'-p" class="tdc-row-placeholder" style="height:'+g+'px"></div>'),b=a[jQuery.inArray(b,a)+1],"undefined"!==typeof b&&((c.closest(".td-header-mobile-wrap").length||c.closest(".td-header-mobile-sticky-wrap").length)&&
(b.jQueryObj.closest(".td-header-desktop-wrap").length||b.jQueryObj.closest(".td-header-desktop-sticky-wrap").length)&&(b=a[jQuery.inArray(b,a)+1]),"undefined"!==typeof b&&(f=b.jQueryObj,b=jQuery("#"+b.rowUid+"-p"),f=b.length?b.offset().top:f.offset().top,f-=g,c.offset().top>=f&&(c.addClass("tdc-rist-absolute"),c.css({top:f-jQuery(".tdc-content-wrap").offset().top}))))):(g=a[jQuery.inArray(b,a)-1],c.removeClass("tdc-rist-top-active"),f.remove(),"undefined"!==typeof g&&(c=g.jQueryObj,e.scrollTop()<=
c.offset().top&&(c.removeClass("tdc-rist-absolute"),c.removeAttr("style"))))}})}var k=0;jQuery("body").hasClass("admin-bar")&&782<=jQuery(window).width()&&(k=jQuery("#wpadminbar").height());d();e.bind("scroll.stickyRowTopScroll",d)}),e.resize())},manageStickyBottom:function(a){var e=jQuery(window),d=0;a.reverse();a.length&&(e.bind("resize.stickyRowBottomResize",function(){d=0;a.forEach(function(a){a=a.jQueryObj;var b=a.outerHeight();a.addClass("tdc-rist-bottom-active");a.css("bottom",d);d+=b})}),
e.resize())}}})();
