var tdTabbedContent={};jQuery().ready(function(){tdTabbedContent.init()});
(function(){tdTabbedContent={items:[],item:function(){this.urlParam=this.blockObj=this.uid="";this._is_initialized=this._remember_active_tab=!1},init:function(){tdTabbedContent.items=[];this._is_running=!1},_initialize_item:function(a){!0!==a._is_initialized&&(a.blockObj.find(".td-tc-tab").on("click",function(){var b=jQuery(this);if(!b.hasClass("td-tc-tab-active")&&(b=b.data("page-id"),tdTabbedContent.displayPageContent(a,b),a._remember_active_tab&&""!==a.urlParam)){var c=window.location.href,d=new RegExp("\\b("+
a.urlParam+"=).*?(&|#|$)");0<=c.search(d)?c=c.replace(d,"$1"+b+"$2"):(c=c.replace(/[?#]$/,""),c=c+(0<c.indexOf("?")?"&":"?")+a.urlParam+"="+b);history.replaceState(null,null,c)}}),a._is_initialized=!0)},displayPageContent:function(a,b){if(null!==b){var c=a.blockObj.find(".td-tc-tab"),d=a.blockObj.find('.td-tc-tab[data-page-id="'+b+'"]'),e=a.blockObj.find(".td-tc-page-content");a=a.blockObj.find('.td-tc-page-content[data-page-id="'+b+'"]');c.removeClass("td-tc-tab-active");d.addClass("td-tc-tab-active");
e.removeClass("td-tc-page-content-visible");a.addClass("td-tc-page-content-visible")}},addItem:function(a){if("undefined"===typeof a.uid)throw"item.uid is not defined";tdTabbedContent.items.push(a);tdTabbedContent._initialize_item(a)},deleteItem:function(a){for(var b=0;b<tdTabbedContent.items.length;b++)if(tdTabbedContent.items[b].uid===a)return tdTabbedContent.items.splice(b,1),!0;return!1},resetItems:function(){tdTabbedContent.items=[]}}})();
