!function(j,O,k,I){"use strict";j.isWindow=j.isWindow||function(e){returnnull!=e&&e===e.window},j.isFunction=j.isFunction||function(e){return"function"==typeofe&&"number"!=typeofe.nodeType},O=void0!==O&&O.Math==Math?O:"undefined"!=typeofself&&self.Math==Math?self:Function("return this")(),j.fn.tab=function(l){vard,u=j.isFunction(this)?j(O):j(this),b=u.selector||"",P=(newDate).getTime(),C=[],F=l,w="string"==typeofF,E=[].slice.call(arguments,1),S=!1;returnu.each(function(){varg,i,f,h,p,v=j.isPlainObject(l)?j.extend(!0,{},j.fn.tab.settings,l):j.extend({},j.fn.tab.settings),m=v.className,y=v.metadata,t=v.selector,A=v.error,a=v.regExp,e="."+v.namespace,n="module-"+v.namespace,T=j(this),o={},x=!0,r=0,s=this,c=T.data(n),L={initialize:function(){L.debug("Initializing tab menu item",T),L.fix.callbacks(),L.determineTabs(),L.debug("Determining tabs",v.context,i),v.auto&&L.set.auto(),L.bind.events(),v.history&&!S&&(L.initializeHistory(),S=!0),v.autoTabActivation&&c===I&&null==L.determine.activeTab()&&(L.debug("No active tab detected, setting first tab active",L.get.initialPath()),L.changeTab(!0===v.autoTabActivation?L.get.initialPath():v.autoTabActivation)),L.instantiate()},instantiate:function(){L.verbose("Storing instance of module",L),c=L,T.data(n,L)},destroy:function(){L.debug("Destroying tabs",T),T.removeData(n).off(e)},bind:{events:function(){j.isWindow(s)||(L.debug("Attaching tab activation events to element",T),T.on("click"+e,L.event.click))}},determineTabs:function(){vare;"parent"===v.context?(0<T.closest(t.ui).length?(e=T.closest(t.ui),L.verbose("Using closest UI element as parent",e)):e=T,g=e.parent(),L.verbose("Determined parent element for creating context",g)):v.context?(g=j(v.context),L.verbose("Using selector for tab context",v.context,g)):g=j("body"),v.childrenOnly?(i=g.children(t.tabs),L.debug("Searching tab context children for tabs",g,i)):(i=g.find(t.tabs),L.debug("Searching tab context for tabs",g,i))},fix:{callbacks:function(){j.isPlainObject(l)&&(l.onTabLoad||l.onTabInit)&&(l.onTabLoad&&(l.onLoad=l.onTabLoad,deletel.onTabLoad,L.error(A.legacyLoad,l.onLoad)),l.onTabInit&&(l.onFirstLoad=l.onTabInit,deletel.onTabInit,L.error(A.legacyInit,l.onFirstLoad)),v=j.extend(!0,{},j.fn.tab.settings,l))}},initializeHistory:function(){if(L.debug("Initializing page state"),j.address===I)returnL.error(A.state),!1;if("state"==v.historyType){if(L.debug("Using HTML5 to manage state"),!1===v.path)returnL.error(A.path),!1;j.address.history(!0).state(v.path)}j.address.bind("change",L.event.history.change)},event:{click:function(e){vart=j(this).data(y.tab);t!==I?(v.history?(L.verbose("Updating page state",e),j.address.value(t)):(L.verbose("Changing tab",e),L.changeTab(t)),e.preventDefault()):L.debug("No tab specified")},history:{change:function(e){vart=e.pathNames.join("/")||L.get.initialPath(),a=v.templates.determineTitle(t)||!1;L.performance.display(),L.debug("History change event",t,e),p=e,t!==I&&L.changeTab(t),a&&j.address.title(a)}}},refresh:function(){f&&(L.debug("Refreshing tab",f),L.changeTab(f))},cache:{read:function(e){returne!==I&&o[e]},add:function(e,t){e=e||f,L.debug("Adding cached content for",e),o[e]=t},remove:function(e){e=e||f,L.debug("Removing cached content for",e),deleteo[e]}},escape:{string:function(e){return(e=String(e)).replace(a.escape,"\\$&")}},set:{auto:function(){vare="string"==typeofv.path?v.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";L.verbose("Setting up automatic tab retrieval from server",e),j.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){vart=L.get.tabElement(e);t.hasClass(m.loading)||(L.verbose("Setting loading state for",t),t.addClass(m.loading).siblings(i).removeClass(m.active+" "+m.loading),0<t.length&&v.onRequest.call(t[0],e))},state:function(e){j.address.value(e)}},changeTab:function(l){vard=O.history&&O.history.pushState&&v.ignoreFirstLoad&&x,u=v.auto||j.isPlainObject(v.apiSettings),b=u&&!d?L.utilities.pathToArray(l):L.get.defaultPathArray(l);l=L.utilities.arrayToPath(b),j.each(b,function(e,t){vara,n,i=b.slice(0,e+1),o=L.utili