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