text: /*
  jQWidgets v4.5.2 (2017-May)
  Copyright (c) 2011-2017 jQWidgets.
  License: http://jqwidgets.com/license/
  */
  !function(a){"use strict";a.jqx.jqxWidget("jqxTabs","",{}),a.extend(a.jqx._jqxTabs.prototype,{defineInstance:function(){var b={scrollAnimationDuration:200,enabledHover:!0,disabled:!1,collapsible:!1,animationType:"none",enableScrollAnimation:!0,contentTransitionDuration:450,toggleMode:"click",selectedItem:0,height:"auto",width:"auto",position:"top",selectionTracker:!1,scrollable:!0,scrollPosition:"right",scrollStep:70,autoHeight:!0,headerHeight:null,showCloseButtons:!1,canCloseAllTabs:!0,closeButtonSize:16,arrowButtonSize:16,keyboardNavigation:!0,reorder:!1,selectionTrackerAnimationDuration:300,_isTouchDevice:!1,roundedCorners:!0,_headerExpandingBalance:0,_dragStarted:!1,_tabCaptured:!1,_lastUnorderedListPosition:0,_selectedItem:0,_titleList:[],_contentList:[],_contentWrapper:null,_unorderedList:null,_scrollTimeout:null,isCollapsed:!1,touchMode:!1,initTabContent:null,enableDropAnimation:!1,_currentEvent:null,_needScroll:!0,_isAnimated:{},_events:["created","selected","add","removed","enabled","disabled","selecting","unselecting","unselected","dragStart","dragEnd","locked","unlocked","collapsed","expanded","tabclick"],_initTabContentList:[],_invalidArgumentExceptions:{invalidScrollAnimationDuration:"The scroll animation duration is not valid!",invalidWidth:"Width you've entered is invalid!",invalidHeight:"Height you've entered is invalid!",invalidAnimationType:"You've entered invalid animation type!",invalidcontentTransitionDuration:"You've entered invalid value for contentTransitionDuration!",invalidToggleMode:"You've entered invalid value for toggleMode!",invalidPosition:"You've entered invalid position!",invalidScrollPosition:"You've entered invalid scroll position!",invalidScrollStep:"You've entered invalid scroll step!",invalidStructure:"Invalid structure!",invalidArrowSize:"Invalid scroll button size!",invalidCloseSize:"Invalid close button size!"},aria:{"aria-disabled":{name:"disabled",type:"boolean"}},rtl:!1};return this===a.jqx._jqxTabs.prototype?b:(a.extend(!0,this,b),b)},createInstance:function(){this._IE8=a.jqx.browser.msie&&a.jqx.browser.version<9,a.jqx.aria(this),this.element.className+=" "+this.toThemeProperty("jqx-tabs jqx-widget jqx-widget-content"),this.element.setAttribute("role","tablist");for(var b=this.host.children(),c=0;c<b.length;c++){var d=b[c];"ul"===d.nodeName.toLowerCase()?this._unorderedList=d:"div"===d.nodeName.toLowerCase()&&this._contentList.push(d)}this._unorderedListHelper=a(this._unorderedList),this._unorderedListHelper.initAnimate&&this._unorderedListHelper.initAnimate(),this._closeButtonList=[],this._selectedItem=this.selectedItem,this._isTouchDevice=a.jqx.mobile.isTouchDevice(),this._needScroll=this.scrollable,this.selectionTracker&&(this.selectionTracker=this._seletionTrackerBrowserCheck()),this._isTouchDevice&&(this.reorder=!1,this.keyboardNavigation=!1),this._titleList=this._unorderedListHelper.children();for(var e=this._titleList.length;e;)e--,this._titleList[e].setAttribute("role","tab"),this._titleList[e].getAttribute("id")||this._titleList[e].setAttribute("id",this.element.id+"Tab"+e),this._contentList[e].setAttribute("role","tabpanel");this._validateProperties(),this._refresh(),this._moveSelectionTrack(this._selectedItem,0),this.disabled&&this.disable(),this.element.tabIndex=0,this._raiseEvent(0),this._enableWindowResize()},_hiddenParent:function(){var b=this;if("none"===b.host.css("display"))return!0;var c=!1;return a.each(b.host.parents(),function(){if("none"===a(this).css("display"))return c=!0,!1}),c},_enableWindowResize:function(){var b=this,c=a.jqx.isHidden(b.host);a.jqx.utilities.resize(this.host,function(){c?(b._uiRefresh(!0),c=!1):b.refresh()})},resize:function(b,c){this.width=b,this.height=c;var d=a.jqx.isHidden(this.host);d?(this._uiRefresh(!0),d=!1):this.refresh()},refresh:function(a){!0===a&&void 0!==a||this._setSize()},_seletionTrackerBrowserCheck:function(){var b="Browser CodeName: "+navigator.appCodeName;return b+="Browser Name: "+navigator.appName,b+="Browser Version: "+navigator.appVersion,b+="Platform: "+navigator.platform,b+="User-agent header: "+navigator.userAgent,b.indexOf("IEMobile")===-1&&(b.indexOf("Windows Phone OS")===-1&&!(a.jqx.browser.msie&&a.jqx.browser.version<=7))},render:function(){this._refresh()},_uiRefresh:function(b){if(this._unorderedListLeftBackup=this._unorderedListHelper.css("left"),b&&this._render(),this._addStyles(),this._performLayout(),this._prepareTabs(),this._removeEventHandlers(),this._addEventHandlers(),"auto"===this._unorderedListLeftBackup&&(this._unorderedListLeftBackup=this._getArrowsDisplacement()),this._unorderedList.style.left=this._toPx(this._unorderedListLeftBackup),this.rtl&&this.scrollable&&this._rightArrow&&"hidden"!==a(this._rightArrow).css("visibility")){var c=2*this.arrowButtonSize,d=this._width(this.element)-parseInt(this._width(this._unorderedList)+c+parseInt(this._unorderedListHelper.css("margin-left"),10),10);this._unorderedList.style.left=d+"px"}},_refresh:function(){a.jqx.isHidden(this.host)||this._uiRefresh(!0)},_addStyles:function(){this._unorderedList.className+=" "+this.toThemeProperty("jqx-tabs-title-container"),this._unorderedList.style.outline="none",this._unorderedList.style.whiteSpace="nowrap",this._unorderedList.style.marginTop="0px",this._unorderedList.style.marginBottom="0px",this._unorderedList.style.padding="0px",this._unorderedList.style.background="transparent",this._unorderedList.style.border="none",this._unorderedList.style.borderStyle="none",this._unorderedList.style.textIndent="0px";for(var a=this.length();a;){a--;var b=this._titleList[a],c="jqx-tabs-title jqx-item";switch(b.style.padding="","bottom"===this.position&&(c+=" jqx-tabs-title-bottom"),b.disabled&&(c+=" jqx-tabs-title-disable jqx-fill-state-disabled"),this.position){case"top":c+=" jqx-rc-t",this._removeClass(this._contentList[a],this.toThemeProperty("jqx-rc-t")),this._contentList[a].className+=" "+this.toThemeProperty("jqx-rc-b");break;case"bottom":c+=" jqx-rc-b",this._removeClass(this._contentList[a],this.toThemeProperty("jqx-rc-b")),this._contentList[a].className+=" "+this.toThemeProperty("jqx-rc-t")}b.className="jqx-reset jqx-disableselect "+this.toThemeProperty(c)}if(this.selectionTracker)switch(this.position){case"top":this._removeClass(this._selectionTracker,this.toThemeProperty("jqx-rc-b")),this._selectionTracker.className+=" "+this.toThemeProperty("jqx-rc-t");break;case"bottom":this._removeClass(this._selectionTracker,this.toThemeProperty("jqx-rc-t")),this._selectionTracker.className+=" "+this.toThemeProperty("jqx-rc-b")}},_raiseEvent:function(b,c){var d=new a.Event(this._events[b]);d.owner=this,d.args=c,6!==b&&7!==b||(d.cancel=!1,this._currentEvent=d);var e="";try{if(e=this.host.trigger(d),1===b){var f=this;if(this.selectionTracker||"none"!==this.animationType)setTimeout(function(){f._initTabContentList[f.selectedItem]||f.initTabContent&&(f.initTabContent(f.selectedItem),f._initTabContentList[f.selectedItem]=!0);var b=new a.Event("loadContent");b.owner=this,f._contentList.length>0&&f._contentList[f.selectedItem]&&a(f._contentList[f.selectedItem]).trigger(b)},50+f.selectionTrackerAnimationDuration);else{var g=new a.Event("loadContent");f._initTabContentList[f.selectedItem]||f.initTabContent&&(f.initTabContent(f.selectedItem),f._initTabContentList[f.selectedItem]=!0),g.owner=this;var h=new a.Event("resize");this.host.trigger(h)}}}catch(a){a&&console&&console.log(a)}return e},_getArrowsDisplacement:function(){if(!this._needScroll)return 0;var a,b=this.arrowButtonSize,c=this.arrowButtonSize;return a="left"===this.scrollPosition?b+c:"both"===this.scrollPosition?b:0},_scrollRight:function(b){this._stop(this._unorderedListHelper),this._unlockAnimation("unorderedList");var c,d,e,f=parseInt(this._width(this._unorderedList)+parseInt(this._unorderedListHelper.css("margin-left"),10),10),g=this._width(this.element),h=parseInt(this._unorderedListHelper.css("left"),10),i=this._getArrowsDisplacement(),j=0;this.scrollable?(c=this._leftArrow.offsetWidth,d=this._rightArrow.offsetWidth):(c=0,d=0),b=this.enableScrollAnimation?b:0,this._width(this._headerWrapper)>parseInt(this._unorderedListHelper.css("margin-left"),10)+this._width(this._unorderedList)?j=i:Math.abs(h)+this.scrollStep<Math.abs(g-f)+c+d+i?(j=h-this.scrollStep,e=h-this.scrollStep+parseInt(a(this._titleList[this._selectedItem]).position().left,10)):(j=g-f-(2*this.arrowButtonSize-i),j<parseInt(this._unorderedListHelper.css("left"),10)-4&&j>parseInt(this._unorderedListHelper.css("left"),10)+4&&(e=g-f-c-d+parseInt(a(this._titleList[this._selectedItem]).position().left,10))),this._performScrollAnimation(j,e,b)},_scrollLeft:function(b){this._stop(this._unorderedListHelper),this._unlockAnimation("unorderedList");var c,d=parseInt(this._unorderedListHelper.css("left"),10),e=this._getArrowsDisplacement(),f=0;b=this.enableScrollAnimation?b:0,this._width(this._headerWrapper)>=this._width(this._unorderedList)?f=e:d+this.scrollStep<e?(f=d+this.scrollStep,c=d+this.scrollStep+parseInt(a(this._titleList[this._selectedItem]).position().left,10)):(f=e,f<parseInt(this._unorderedListHelper.css("left"),10)-4&&f>parseInt(this._unorderedListHelper.css("left"),10)+4&&(c=parseInt(a(this._titleList[this._selectedItem]).position().left,10))),this._performScrollAnimation(f,c,b)},_performScrollAnimation:function(a,b,c){var d=this;void 0!==b&&this._moveSelectionTrack(this._selectedItem,0,b),this._lockAnimation("unorderedList"),this._unorderedListHelper.animate({left:a},c,function(){d._moveSelectionTrack(d.selectedItem,0),d._unlockAnimation("unorderedList")})},_addKeyboardHandlers:function(){var b=this;this.keyboardNavigation&&this.addHandler(this.host,"keydown",function(c){if(!b._activeAnimation()){var d=b._selectedItem,e=b.selectionTracker,f=b.getContentAt(d);if(a(c.target).ischildof(f))return!0;switch(c.keyCode){case 37:return b.rtl?b.next():b.previous(),!1;case 39:return b.rtl?b.previous():b.next(),!1;case 36:return b.first(),!1;case 35:return b.last(),!1;case 27:b._tabCaptured&&(b._cancelClick=!0,b._uncapture(null,b.selectedItem),b._tabCaptured=!1)}b.selectionTracker=e}return!0})},_addScrollHandlers:function(){var b=this;this.addHandler(this._leftArrow,"mousedown",function(){b._startScrollRepeat(!0,b.scrollAnimationDuration)}),this.addHandler(this._rightArrow,"mousedown",function(){b._startScrollRepeat(!1,b.scrollAnimationDuration)}),this.addHandler(this._rightArrow,"mouseleave",function(){clearTimeout(b._scrollTimeout)}),this.addHandler(this._leftArrow,"mouseleave",function(){clearTimeout(b._scrollTimeout)}),this.addHandler(a(document),"mouseup.tab"+this.element.id,this._mouseUpScrollDocumentHandler,this),this.addHandler(a(document),"mouseleave.tab"+this.element.id,this._mouseLeaveScrollDocumentHandler,this)},_mouseLeaveScrollDocumentHandler:function(a){var b=a.data;b._scrollTimeout&&clearTimeout(b._scrollTimeout)},_mouseUpScrollDocumentHandler:function(a){var b=a.data;clearTimeout(b._scrollTimeout)},_mouseUpDragDocumentHandler:function(a){var b=a.data;b._tabCaptured&&b._dragStarted&&b._uncapture(a),b._tabCaptured=!1},_addReorderHandlers:function(){var b=this;b.addHandler(a(document),"mousemove.tab"+b.element.id,b._moveElement,b),b.addHandler(a(document),"mouseup.tab"+b.element.id,b._mouseUpDragDocumentHandler,b)},_addEventHandlers:function(){for(var b=this.length();b;)b--,this._addEventListenerAt(b);this.keyboardNavigation&&this._addKeyboardHandlers(),this.scrollable&&this._addScrollHandlers(),this.reorder&&!this._isTouchDevice&&this._addReorderHandlers();var c=this;try{if((""!==document.referrer||window.frameElement)&&null!==window.top&&window.top!==window.self){var d=function(){c._tabCaptured&&(c._cancelClick=!0,c._uncapture(null,c.selectedItem),c._tabCaptured=!1)},e=null;window.parent&&document.referrer&&(e=document.referrer),e&&e.indexOf(document.location.host)!==-1&&window.top.document&&this.addHandler(a(window.top.document),"mouseup",d)}}catch(a){}},focus:function(){try{this.host.focus();var a=this;setTimeout(function(){a.host.focus()},25)}catch(a){}},_getFocusedItem:function(b){for(var c=this.length();c;){c--;var d=this._titleList[c],e=this._outerWidth(d,!0),f=parseInt(a(d).offset().left,10),g=f;if(g<=b&&g+e>=b&&d!==this._capturedElement&&!this._titleList[c].locked&&this._titleList[c].disabled!==!0)return c}return-1},_uncapture:function(a){var b=this.selectionTracker;this._unorderedListLeftBackup=this._unorderedListHelper.css("left"),this._dragStarted=!1,this._tabCaptured=!1;var c=this._indexOf(this._capturedElement);if(this._capturedElement){switch(this.position){case"top":this._capturedElement.style.bottom="0px";break;case"bottom":this._capturedElement.style.top="0px"}var d;a&&(d=this._getFocusedItem(a.clientX)),d!==-1&&a?(this._raiseEvent(10,{item:c,dropIndex:d}),this._reorderItems(d,c)):this._capturedElement.style.left="0px";for(var e=0;e<this._titleList.length;e++)this._titleList[e].style.position="static";this._reorderHeaderElements(),this._unorderedList.style.position="relative",this._unorderedList.style.top="0px",this._prepareTabs(),d!==-1&&a?(this._moveSelectionTrack(this._selectedItem,0),this._addSelectStyle(this._selectedItem,!0)):(this._selectedItem=c,this._moveSelectionTrack(c,0),this._addSelectStyle(this._selectedItem,!0)),document.selection&&document.selection.clear(),this._unorderedList.style.left=this._toPx(this._unorderedListLeftBackup),this.selectionTracker=b}},_reorderItems:function(b,c){var d=this._titleList[this.selectedItem],e=this._titleList[c];"undefined"==typeof this._capturedElement&&(this._capturedElement=e),a(e).remove(),c<b?this._titleList[b+1]?this._unorderedList.insertBefore(e,this._titleList[b+1]):this._unorderedList.appendChild(e):this._unorderedList.insertBefore(e,this._titleList[b]),this._reorderElementArrays(b,c),this._getSelectedItem(d),this._removeEventHandlers(),this._addEventHandlers()},_reorderElementArrays:function(a,b){var c=this._contentList[b];if(b<a){for(var d=b;d<=a;d++)this._titleList[d]=this._titleList[d+1],this._contentList[d]=this._contentList[d+1];this._contentList[a]=c,this._titleList[a]=this._capturedElement}else{for(var e=b;e>=a;e--)this._titleList[e]=this._titleList[e-1],this._contentList[e]=this._contentList[e-1];this._contentList[a]=c,this._titleList[a]=this._capturedElement}},getSelectedItem:function(){return this.selectedItem},_getSelectedItem:function(a){for(var b=this.length();b;)if(b--,this._titleList[b]===a){this._selectedItem=this.selectedItem=b;break}},_moveElement:function(a){var b=a.data;if(b._tabCaptured)if(document.selection&&document.selection.clear(),b._dragStarted)b._performDrag(a),clearTimeout(b._scrollTimeout);else{var c=-parseInt(b._unorderedListHelper.css("left"),10);(a.clientX+c>b._startX+3||a.clientX+c<b._startX-3)&&(b._prepareTabForDragging(),b._dragStarted=!0)}},_performDrag:function(a){var b=this.getZoomFactor(),c=-parseInt(this._unorderedListHelper.css("left"),10);this._capturedElement.style.left=this._toPx(c+a.clientX/b-this._startX/b),this._lastX=a.clientX/b,this._moveSelectionTrack(this.selectedItem,0)},getZoomFactor:function(){var a=1;if(document.body.getBoundingClientRect){var b=document.body.getBoundingClientRect(),c=b.right-b.left,d=document.body.offsetWidth;a=Math.round(c/d*100)/100}return a},_prepareTabForDragging:function(){switch(this._capturedElement.style.position="relative",this._capturedElement.style.left="0px",this._capturedElement.style.top="0px",this._capturedElement.style.zIndex=300,this.selectedItem=this._indexOf(this._capturedElement),this.position){case"top":this._capturedElement.style.bottom=this._toPx(a(this._capturedElement).css("top"));break;case"bottom":this._capturedElement.style.top=this._toPx(a(this._capturedElement).css("top"))}this._raiseEvent(9,{item:this._indexOf(this._capturedElement)})},_dragScroll:function(b){var c=parseInt(this._unorderedListHelper.css("left"),10),d=this,e=a(d._headerWrapper);b.clientX<=e.offset().left?(this._scrollLeft(this.scrollAnimationDuration),this._capturedElement.style.left=parseInt(a(this._capturedElement).css("left"),10)+this._lastUnorderedListPosition-c):b.clientX>e.offset().left+d._width(this._headerWrapper)?(this._scrollRight(this.scrollAnimationDuration),this._capturedElement.style.left=parseInt(a(this._capturedElement).css("left"),10)+this._lastUnorderedListPosition-c):(d._stop(d._unorderedListHelper),this._unlockAnimation("unorderedList"),clearTimeout(this._scrollTimeout)),this._scrollTimeout=setTimeout(function(){d._dragScroll(b)},this.scrollAnimationDuration),this._lastUnorderedListPosition=c},_captureElement:function(a,b){if(!this._tabCaptured&&!this._titleList[b].locked&&this._titleList[b].disabled!==!0&&!this._activeAnimation()){var c=-parseInt(this._unorderedListHelper.css("left"),10);this._startX=c+a.clientX,this._startY=a.clientY,this._lastX=a.clientX,this._lastY=a.clientY,this._tabCaptured=!0,this._capturedElement=this._titleList[b]}},_titleInteractionTrigger:function(a){this._headerExpandingBalance>0&&this._removeOppositeBorder(),this._selectedItem!==a?(this.select(this._titleList[a],"toggle"),this._titleList[a].collapsed=!1,this.collapsible||("auto"!==this.height?this._contentWrapper.style.visibility="visible":this._contentWrapper.style.display="block")):this.collapsible&&(this.isCollapsed?this.expand():this.collapse())},collapse:function(){var a=this._selectedItem,b=this;this.isCollapsed=!0,"auto"!==b.height?b._contentWrapper.style.visibility="hidden":b._contentWrapper.style.display="none",b._raiseEvent(13,{item:a}),"top"===this.position?(b._headerWrapper.className+=" "+this.toThemeProperty("jqx-tabs-header-collapsed"),b.element.className+=" "+this.toThemeProperty("jqx-tabs-collapsed")):(b._headerWrapper.className+=" "+this.toThemeProperty("jqx-tabs-header-collapsed-bottom"),b.element.className+=" "+this.toThemeProperty("jqx-tabs-collapsed-bottom"))},expand:function(){var a=this._selectedItem,b=this;this.isCollapsed=!1,this._select(a,b.contentTransitionDuration,null,!1,!0),"auto"!==b.height?b._contentWrapper.style.visibility="visible":b._contentWrapper.style.display="block",b._raiseEvent(14,{item:a}),"top"===this.position?(b._removeClass(b._headerWrapper,b.toThemeProperty("jqx-tabs-header-collapsed")),b._removeClass(b.element,b.toThemeProperty("jqx-tabs-collapsed"))):(b._removeClass(b._headerWrapper,b.toThemeProperty("jqx-tabs-header-collapsed-bottom")),b._removeClass(b.element,b.toThemeProperty("jqx-tabs-collapsed-bottom")))},_addSelectHandler:function(a){var b=this;this.addHandler(this._titleList[a],"selectstart",function(){return!1}),this.addHandler(this._titleList[a],this.toggleMode,function(a){return function(){return b._raiseEvent("15",{item:a}),b._tabCaptured||b._cancelClick||b._titleInteractionTrigger(a),!0}}(a))},_addDragDropHandlers:function(a){var b=this;this.addHandler(this._titleList[a],"mousedown",function(c){return b._captureElement(c,a),!1}),this.addHandler(this._titleList[a],"mouseup",function(c){return b._tabCaptured&&b._dragStarted?(b._cancelClick=!0,b._uncapture(c,a)):b._cancelClick=!1,b._tabCaptured=!1,!1})},_removeHoverStates:function(){var b=this;a.each(this._titleList,function(){b._removeClass(this,b.toThemeProperty("jqx-tabs-title-hover-top jqx-tabs-title-hover-bottom"))})},_addHoverHandlers:function(a){var b=this,c=this._titleList[a];this.addHandler(c,"mouseenter mouseleave",function(d){if(a!==b._selectedItem){var e="jqx-fill-state-hover";if(e+="top"===b.position?" jqx-tabs-title-hover-top":" jqx-tabs-title-hover-bottom","mouseenter"===d.type?c.className+=" "+b.toThemeProperty(e):b._removeClass(c,b.toThemeProperty(e)),b.showCloseButtons){var f=b._closeButtonList[a];"mouseenter"===d.type?f.className+=" "+b.toThemeProperty("jqx-tabs-close-button-hover",!0):b._removeClass(f,b.toThemeProperty("jqx-tabs-close-button-hover",!0))}}})},_addEventListenerAt:function(a){var b=this;if(!this._titleList[a].disabled){this.reorder&&!this._isTouchDevice&&this._addDragDropHandlers(a),this._addSelectHandler(a),this.enabledHover&&this._addHoverHandlers(a);var c=b._closeButtonList[a];this.removeHandler(c,"click"),this.addHandler(c,"click",function(){return b.removeAt(a),!1})}},_removeEventHandlers:function(){for(var b=this,c=b.length();c;)c--,b._removeEventListenerAt(c);b.scrollable&&(b.removeHandler(b._leftArrow,"mousedown"),b.removeHandler(b._rightArrow,"mousedown")),b.removeHandler(a(document),"mousemove.tab"+b.element.id,b._moveElement),b.removeHandler(a(document),"mouseup.tab"+b.element.id,b._mouseUpScrollDocumentHandler),b.removeHandler(a(document),"mouseup.tab"+b.element.id,b._mouseUpDragDocumentHandler),b.removeHandler(b.host,"keydown")},_removeEventListenerAt:function(a){var b=this;b.removeHandler(b._titleList[a],b.toggleMode),b.removeHandler(b._titleList[a],"mouseenter"),b.removeHandler(b._titleList[a],"mouseleave"),b.removeHandler(b._titleList[a],"mousedown"),b.removeHandler(b._titleList[a],"mouseup"),b.removeHandler(b._closeButtonList[a],"click")},_moveSelectionTrack:function(b,c,d){var e=this;if(b!==-1&&0!==this._titleList.length&&!(b>=this._titleList.length)){var f=this._titleList[b],g=a(f);if(this.selectionTracker&&this._selectionTracker){var h;e._stop(e._selectionTrackerHelper),this._unlockAnimation("selectionTracker"),void 0===d?(h=parseInt(g.position().left,10),isNaN(parseInt(this._unorderedListHelper.css("left"),10))||(h+=parseInt(this._unorderedListHelper.css("left"),10)),isNaN(parseInt(this._unorderedListHelper.css("margin-left"),10))||(h+=parseInt(this._unorderedListHelper.css("margin-left"),10)),isNaN(parseInt(g.css("margin-left"),10))||(h+=parseInt(g.css("margin-left"),10)),!isNaN(parseInt(g.css("margin-right"),10))):h=d;var i=0,j=0;"top"===this.position&&(i=this._height(e._headerWrapper)-f.offsetHeight,this.autoHeight||(j+=parseInt(g.css("margin-top"),10))),this._lockAnimation("selectionTracker");var k=parseInt(g.css("padding-left"),10)+parseInt(g.css("padding-right"),10),l="top"===this.position?0:1,m=parseInt(a(this._headerWrapper).css("padding-top"),10),n=parseInt(g.css("padding-top"),10)+parseInt(g.css("padding-bottom"),10);this._selectionTracker.style.visibility="visible",this._moveSelectionTrackerContainer.style.visibility="visible";var o=parseInt(g.css("margin-top"),10);isNaN(o)&&(o=0),e._selectionTrackerHelper.animate({top:m+o-l,left:h+"px",height:parseInt(this._height(f)+n,10),width:e._width(f)+k},c,function(){e._unlockAnimation("selectionTracker"),e._selectionTracker.style.visibility="hidden",e._addSelectStyle(b,!0),e._moveSelectionTrackerContainer.style.visibility="hidden"})}}},destroy:function(){a.jqx.utilities.resize(this.host,null,!0),this.host.remove()},_switchTabs:function(a,b){if(a!==b&&!this._activeAnimation()&&!this._tabCaptured){var c=this;return this._raiseEvent(7,{item:b}),this._raiseEvent(6,{item:a}),this._currentEvent&&this._currentEvent.cancel?void(this._currentEvent=null):(this._unselect(b,null,!0),this._select(a,c.contentTransitionDuration,null,!0),!0)}return!1},_activeAnimation:function(){for(var a in this._isAnimated)if(this._isAnimated.hasOwnProperty(a)&&this._isAnimated[a])return!0;return!1},_indexOf:function(a){for(var b=this.length();b;)if(b--,this._titleList[b]===a||this._contentList[b]===a)return b;return-1},_validateProperties:function(){try{if(this.scrollAnimationDuration<0||isNaN(this.scrollAnimationDuration))throw new Error(this._invalidArgumentExceptions.invalidScrollAnimationDuration);if(parseInt(this.width,10)<0&&"auto"!==this.width)throw new Error(this._invalidArgumentExceptions.invalidWidth);if(parseInt(this.height,10)<0&&"auto"!==this.height)throw new Error(this._invalidArgumentExceptions.invalidHeight);if("none"!==this.animationType&&"fade"!==this.animationType)throw new Error(this._invalidArgumentExceptions.invalidAnimationType);if(this.contentTransitionDuration<0||isNaN(this.contentTransitionDuration))throw new Error(this._invalidArgumentExceptions.invalidcontentTransitionDuration);if("click"!==this.toggleMode&&"dblclick"!==this.toggleMode&&"mouseenter"!==this.toggleMode&&"none"!==this.toggleMode)throw new Error(this._invalidArgumentExceptions.invalidToggleMode);if("top"!==this.position&&"bottom"!==this.position)throw new Error(this._invalidArgumentExceptions.invalidPosition);if("left"!==this.scrollPosition&&"right"!==this.scrollPosition&&"both"!==this.scrollPosition)throw new Error(this._invalidArgumentExceptions.invalidScrollPosition);if(this.scrollStep<0||isNaN(this.scrollStep))throw new Error(this._invalidArgumentExceptions.invalidScrollStep);if(this._titleList.length!==this._contentList.length||0===this._titleList.length)throw new Error(this._invalidArgumentExceptions.invalidStructure);if(this.arrowButtonSize<0||isNaN(this.arrowButtonSize))throw new Error(this._invalidArgumentExceptions.invalidArrowSize);if(this.closeButtonSize<0||isNaN(this.closeButtonSize))throw new Error(this._invalidArgumentExceptions.invalidCloseSize)}catch(a){try{console.log(a)}catch(a){}}},_startScrollRepeat:function(a,b){var c=this;a?this._scrollLeft(b):this._scrollRight(b),this._scrollTimeout&&clearTimeout(this._scrollTimeout),this._scrollTimeout=setTimeout(function(){c._startScrollRepeat(a,c.scrollAnimationDuration)},b)},_performLayout:function(){for(var a=this.length();a;)a--,"top"!==this.position&&"bottom"!==this.position||(this.rtl?this._titleList[a].style.float="right":this._titleList[a].style.float="left");this._fitToSize(),this._performHeaderLayout(),this._fitToSize()},updatetabsheader:function(){this._performHeaderLayout()},_setSize:function(){var a=this;a._fitToSize(),a._positionArrows(a._totalItemsWidth),a._totalItemsWidth>a.element.offsetWidth?a._unorderedList.style.width=a._toPx(a._totalItemsWidth):a._unorderedList.style.width=a.element.offsetWidth-2+"px",a._fitToSize()},_addArrows:function(){this._leftArrow&&this._rightArrow&&(a(this._leftArrow).remove(),a(this._rightArrow).remove()),this._leftArrow=document.createElement("div"),this._leftArrow.innerHTML='<span style="display: block; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-tabs-arrow-left")+'"></span>',this._leftArrow.className=this.toThemeProperty("jqx-tabs-arrow-background jqx-widget-header"),this._leftArrow.style.zIndex=30,this._leftArrow.style.display="none",this._leftArrow.style.width=this._toPx(this.arrowButtonSize),this._leftArrow.style.height="100%",this._rightArrow=document.createElement("div"),this._rightArrow.innerHTML='<span style="display: block; width: 16px; height: 16px;" class="'+this.toThemeProperty("jqx-tabs-arrow-right")+'"></span>',this._rightArrow.className=this.toThemeProperty("jqx-tabs-arrow-background jqx-widget-header"),this._rightArrow.style.zIndex=30,this._rightArrow.style.display="none",this._rightArrow.style.width=this._toPx(this.arrowButtonSize),this._rightArrow.style.height="100%",this._headerWrapper.appendChild(this._leftArrow),this._headerWrapper.appendChild(this._rightArrow)},_tabsWithVisibleCloseButtons:function(){if(!this.showCloseButtons)return 0;var b=this.length();return a.each(this._titleList,function(){var a=this.attr("hasclosebutton");void 0!==a&&null!==a&&("false"!==a&&a!==!1||b--)}),b},_calculateTitlesSize:function(){function b(a,b){a&&(b?a.style.display="block":a.style.display="none")}var c=this,d=0,e=0,f=this.length();for(this.rtl&&a.jqx.browser.msie&&a.jqx.browser.version<8&&(this._measureItem=document.createElement("span"),this._measureItem.style.position="relative",this._measureItem.style.visibility="hidden",document.body.appendChild(this._measureItem));f;){f--;var g=this._titleList[f],h=c._closeButtonList[f];this._measureItem&&(this._measureItem.innerHTML=g.innerHTML,this._measureItem.html(this._titleList[f].html()),g.style.width=c._toPx(c._width(this._measureItem))),g.style.position="static",b(h,!1),e+=c._outerWidth(g,!0);var i=c._outerHeight(g,!0);if(d<i&&(d=i),0===c._height(g)){var j=g.cloneNode(!0);document.body.appendChild(j),d=c._outerHeight(j,!0),document.body.removeChild(j)}var k,l=g.getAttribute("hasCloseButton");void 0!==l&&null!==l?(k=!1,this.hiddenCloseButtons&&1===this.hiddenCloseButtons[f]&&(b(h,!1),k=!0),k||("true"===l||l===!0?(e+=this.closeButtonSize,b(h,!0)):"false"!==l&&l!==!1||b(h,!1))):this.showCloseButtons&&(this.canCloseAllTabs||this._tabsWithVisibleCloseButtons()>1)&&(k=!1,this.hiddenCloseButtons&&1===this.hiddenCloseButtons[f]&&(b(h,!1),k=!0),k||(e+=this.closeButtonSize,b(h,!0))),g.style.height=this._toPx(c._height(g))}return this._measureItem&&a(this._measureItem).remove(),{height:d,width:10+e}},_reorderHeaderElements:function(){if(this.selectionTracker&&(this._moveSelectionTrackerContainer.style.position="absolute",this._moveSelectionTrackerContainer.style.height="100%",this._moveSelectionTrackerContainer.style.top="0px",this._moveSelectionTrackerContainer.style.left="0px",this._moveSelectionTrackerContainer.style.width="100%"),this._headerWrapper.style.position="relative",this._headerWrapper.style.left="0px",this._headerWrapper.style.top="0px",this.scrollable){this._rightArrow.style.width=this._toPx(this.arrowButtonSize),this._rightArrow.style.position="absolute",this._rightArrow.style.top="0px",this._leftArrow.style.width=this._toPx(this.arrowButtonSize),this._leftArrow.style.position="absolute",this._leftArrow.style.top="0px";var a=this.theme&&this.theme.indexOf("ui-")!==-1?3:0;a>0&&(this._rightArrow.className+=" "+this.toThemeProperty("jqx-rc-r"),this._leftArrow.className+=" "+this.toThemeProperty("jqx-rc-l"));var b=this.scrollPosition;switch(this.rtl&&("left"===b&&(b="right"),"right"===b&&(b="left")),b){case"both":this._rightArrow.style.right="0px",this._leftArrow.style.left="0px";break;case"left":this._rightArrow.style.left=this._toPx(this.arrowButtonSize),this._leftArrow.style.left="0px";break;case"right":this._rightArrow.style.right=this._toPx(-a),this._leftArrow.style.right=this._toPx(parseInt(this.arrowButtonSize,10)-a)}}},_positionArrows:function(a){a>=this._headerWrapper.offsetWidth&&this.scrollable?(this._needScroll=!0,0===this._unorderedListHelper.position().left&&(this._unorderedListLeftBackup=this._getArrowsDisplacement()+"px"),this._leftArrow.style.display="block",this._rightArrow.style.display="block"):(this._needScroll=!1,this._leftArrow.style.display="none",this._rightArrow.style.display="none",this._unorderedList.style.left="0px")},_performHeaderLayout:function(){this._removeSelectStyle();var b=this._calculateTitlesSize(),c=b.height,d=b.width;this._headerWrapper.style.height=this._toPx(c),this._unorderedList.style.height=this._toPx(c),null!==this.headerHeight&&"auto"!==this.headerHeight&&(this._headerWrapper.style.height=this._toPx(this.headerHeight),this._unorderedList.style.height=this._toPx(this.headerHeight));var e=this._width(this.element);d>e?this._unorderedList.style.width=this._toPx(d):this._unorderedList.style.width=this._toPx(e),a.jqx.browser.msie&&a.jqx.browser.version<8&&(this._unorderedList.style.position="relative",this._unorderedList.style.overflow="hidden"),this._reorderHeaderElements(),d+=parseInt(this._unorderedListHelper.css("margin-left"),10),this._totalItemsWidth=d,this._positionArrows(d),this._unorderedList.style.position="relative",this._unorderedList.style.top="0px",this._verticalAlignElements(),this._moveSelectionTrack(this._selectedItem,0),this._addSelectStyle(this.selectedItem)},_verticalAlignElements:function(){for(var b=this.length();b;){b--;var c=this._titleList[b],d=a(c),e=d.children()[0],f=this._closeButtonList[b],g=parseInt(d.css("padding-top"),10);if(g||(g=0),this.autoHeight){var h=parseInt(d.css("padding-top"),10),i=parseInt(d.css("padding-bottom"),10),j=d.css("border-top-width"),k=d.css("border-bottom-width");j=j.indexOf("px")===-1?1:parseInt(j,10),k=k.indexOf("px")===-1?1:parseInt(k,10),c.style.height=this._toPx(this._outerHeight(this._unorderedList,!0)-(h+i+j+k))}else if("top"===this.position){var l=this._height(this._unorderedList)-parseInt(this._outerHeight(c,!0),10);parseInt(d.css("margin-top"),10)!==l&&0!==l&&(c.style.marginTop=this._toPx(l))}else c.style.height=this._toPx(this._height(c));e.style.height="100%";var m=this._height(c);if(f){var n=m/2-this._height(f)/2;f.style.marginTop=this._toPx(1+n)}var o=m/2-this._height(e)/2;
  e.style.marginTop=this._toPx(o)}if(this.scrollable){var p=(parseInt(this._headerWrapper.offsetHeight,10)-this.arrowButtonSize)/2;a(this._rightArrow).children()[0].style.marginTop=this._toPx(p),this._rightArrow.style.height="100%",a(this._leftArrow).children()[0].style.marginTop=this._toPx(p),this._leftArrow.style.height="100%"}},_getImageUrl:function(a){var b=a.css("background-image");return b=b.replace('url("',""),b=b.replace('")',""),b=b.replace("url(",""),b=b.replace(")","")},_fitToSize:function(){var a=!1,b=!1,c=this;null!==c.width&&c.width.toString().indexOf("%")!==-1&&(a=!0),null!==c.height&&c.height.toString().indexOf("%")!==-1&&(b=!0),a?(this.element.style.width=this.width,this._contentWrapper.style.width="100%"):(c.element.style.width=c._toPx(c.width),"auto"!==this.width&&(this._contentWrapper.style.width="100%"));var d;b?(this.element.style.height=this.height,this._contentWrapper.style.width="100%",this._contentWrapper.style.height="auto",d=this.element.offsetHeight-this._headerWrapper.offsetHeight,this._contentWrapper.style.height=d+"px"):"auto"!==this.height?(c.element.style.height=c._toPx(c.height),d=this._height(c.element)-this._headerWrapper.offsetHeight,this._contentWrapper.style.height=c._toPx(d)):this._contentWrapper.style.height="auto"},_maxHeightTab:function(){for(var a=this.length(),b=-1,c=-1;a;)a--,b<this._outerHeight(this._titleList[a],!0)&&(c=a);return c},_addSelectionTracker:function(){this._moveSelectionTrackerContainer&&a(this._moveSelectionTrackerContainer).remove(),this._moveSelectionTrackerContainer=document.createElement("div"),this._moveSelectionTrackerContainer.className=this.toThemeProperty("jqx-tabs-selection-tracker-container"),this._selectionTracker=document.createElement("div"),this._selectionTracker.className=this.toThemeProperty("jqx-tabs-selection-tracker-"+this.position),this._selectionTracker.style.color="inherit",this._selectionTracker.style.position="absolute",this._selectionTracker.style.zIndex=10,this._selectionTracker.style.left="0px",this._selectionTracker.style.top="0px",this._selectionTracker.style.display="inline-block",this._moveSelectionTrackerContainer.appendChild(this._selectionTracker),this._headerWrapper.appendChild(this._moveSelectionTrackerContainer),this._selectionTrackerHelper=a(this._selectionTracker),this._selectionTrackerHelper.initAnimate&&this._selectionTrackerHelper.initAnimate()},_addContentWrapper:function(){var a="none",b=null===this._contentWrapper;b&&(this._contentWrapper=document.createElement("div"),this._contentWrapper.className=this.toThemeProperty("jqx-tabs-content jqx-widget-content"),this._contentWrapper.style.float=a);for(var c=this.length();c;)c--,this._contentList[c].className+=" "+this.toThemeProperty("jqx-tabs-content-element");if(b){"top"===this.position?this.element.appendChild(this._contentWrapper):this.element.insertBefore(this._contentWrapper,this.element.firstChild);for(var d=0;d<this._contentList.length;d++)this._contentWrapper.appendChild(this._contentList[d])}this.roundedCorners&&("top"===this.position?this._contentWrapper.className+=" "+this.toThemeProperty("jqx-rc-b"):this._contentWrapper.className+=" "+this.toThemeProperty("jqx-rc-t"),this.element.className+=" "+this.toThemeProperty("jqx-rc-all"))},_addHeaderWrappers:function(){var b=this.length();void 0!==this._headerWrapper&&a(this._headerWrapper).remove(),this._headerWrapper=document.createElement("div"),this._headerWrapper.style.outline="none","top"===this.position?this.element.insertBefore(this._headerWrapper,this.element.firstChild):this.element.appendChild(this._headerWrapper),this._headerWrapper.appendChild(this._unorderedList);var c="jqx-tabs-headerWrapper jqx-tabs-header jqx-widget-header";for("bottom"===this.position&&(c+=" jqx-tabs-header-bottom"),this.roundedCorners&&(c+="top"===this.position?" jqx-rc-t":" jqx-rc-b"),this._headerWrapper.className=this.toThemeProperty(c);b;){b--;var d=this._titleList[b];if(null===d.querySelector(".jqx-tabs-titleWrapper")){var e=document.createElement("div");e.className="jqx-tabs-titleWrapper",e.style.outline="none",e.style.position="relative",e.style.zIndex=15;var f=a(d).children();e.appendChild(f[0]),e.appendChild(f[1]),d.appendChild(e)}}},_render:function(){this._addCloseButtons(),this._addHeaderWrappers(),this._addContentWrapper(),this.selectionTracker&&this._addSelectionTracker(),this._addArrows()},_addCloseButton:function(b,c){var d=document.createElement("div"),e=this._titleList[b];d.className="jqx-tabs-titleContentWrapper jqx-disableselect";var f="left";this.rtl&&(f="right"),a(e).find(".jqx-tabs-close-button").length>0&&a(e).find(".jqx-tabs-close-button").remove(),d.style.float=f,d.innerHTML=e.innerHTML,e.innerHTML="";var g=document.createElement("div");g.className=this.toThemeProperty("jqx-tabs-close-button"),g.style.height=this._toPx(this.closeButtonSize),g.style.width=this._toPx(this.closeButtonSize),g.style.float=f,g.style.fontSize="1px",e.appendChild(d),e.appendChild(g),c===!0?this._closeButtonList[b]=g:this._closeButtonList.splice(b,0,g),this.showCloseButtons?this.hiddenCloseButtons&&1===this.hiddenCloseButtons[b]&&(g.style.display="none"):g.style.display="none"},_addCloseButtons:function(){for(var a=this.length();a;)a--,this._addCloseButton(a,!0)},_prepareTabs:function(){var a=this.length(),b=this.selectionTracker;for(this.selectionTracker=!1;a;)a--,this._selectedItem!==a&&this._unselect(a,null,!1);this._select(this._selectedItem,0,null,!1),this.selectionTracker=b,this.initTabContent&&(this._initTabContentList[this.selectedItem]||this._hiddenParent()||(this.initTabContent(this.selectedItem),this._initTabContentList[this.selectedItem]=!0))},_isValidIndex:function(a){return a>=0&&a<this.length()},_removeSelectStyle:function(){for(var a=this.length();a;){a--;var b=this._titleList[a];if(this.showCloseButtons){var c=this._closeButtonList[a];this._removeClass(c,this.toThemeProperty("jqx-tabs-close-button-selected"))}var d="jqx-fill-state-pressed";d+="top"===this.position?" jqx-tabs-title-selected-top":" jqx-tabs-title-selected-bottom",this._removeClass(b,this.toThemeProperty(d))}},_addSelectStyle:function(a,b){if(this._removeSelectStyle(),!this.selectionTracker||void 0!==b&&b){var c=this._titleList[a];if(a>=0&&void 0!==c){var d=null;this.showCloseButtons&&(d=this._closeButtonList[a],this.hiddenCloseButtons&&1===this.hiddenCloseButtons[a]&&(d=null));var e="jqx-fill-state-hover",f=" jqx-fill-state-pressed";"top"===this.position?(e+=" jqx-tabs-title-hover-top",f+=" jqx-tabs-title-selected-top"):(e+=" jqx-tabs-title-hover-bottom",f+=" jqx-tabs-title-selected-bottom"),this._removeClass(c,this.toThemeProperty(e)),c.className+=this.toThemeProperty(f),null!==d&&(d.className+=" "+this.toThemeProperty("jqx-tabs-close-button-selected"))}}},_addItemTo:function(a,b,c){if(b<a.length){for(var d,e,f=b;f+1<a.length;f++)void 0===d?(d=a[f+1],a[f+1]=a[f]):(e=a[f+1],a[f+1]=d,d=e);void 0===d&&(d=a[b]),a[b]=c,a.push(d)}else a.push(c)},_select:function(b,c,d,e,f){if(!this._tabCaptured){this.host.attr("hideFocus","true");var g=this;void 0===f?this._addSelectStyle(b):this._addSelectStyle(b,f);var h=a(g._titleList[b]),i=g._titleList[b].getAttribute("id"),j=a(g._contentList[b]);if(this.isCollapsed&&this.collapsible)return j[0].style.display="none",void this._selectCallback(b,d,e);switch(this.animationType){case"none":if(g.selectionTracker)setTimeout(function(){j[0].style.display="block",a.jqx.aria(h,"aria-selected",!0),a.jqx.aria(j,"aria-hidden",!1),a.jqx.aria(g,"aria-activedescendant",i)},this.selectionTrackerAnimationDuration);else{for(var k=0;k<this._contentList.length;k++)b!==k&&"block"===a(g._contentList[k]).css("display")&&(g._contentList[k].style.display="none",a.jqx.aria(a(g._titleList[k]),"aria-selected",!1),a.jqx.aria(a(g._contentList[k]),"aria-hidden",!0));j[0].style.display="block",a.jqx.aria(h,"aria-selected",!0),a.jqx.aria(j,"aria-hidden",!1),a.jqx.aria(this,"aria-activedescendant",i)}this._selectCallback(b,d,e);break;case"fade":this._lockAnimation("contentListSelect"),g._selectCallback(b,d,e),j.initAnimate&&void 0===j.fadeIn&&j.initAnimate(),j.fadeIn({duration:1e3,complete:function(){g._unlockAnimation("contentListSelect"),a.jqx.aria(h,"aria-selected",!0),a.jqx.aria(j,"aria-hidden",!1),a.jqx.aria(g,"aria-activedescendant",i)}})}}},_selectCallback:function(a,b,c){this._selectedItem=a,this.selectedItem=this._selectedItem,b&&b(),c&&this._raiseEvent(1,{item:a})},_unselect:function(b,c,d){if(b>=0&&!this._tabCaptured){var e=this,f=e._contentList[b],g=a(f),h=e._titleList[b],i=a(h);g.initAnimate&&void 0===g.animate&&g.initAnimate(),e._stop(g),"fade"===this.animationType?(f.style.display="none",a.jqx.aria(i,"aria-selected",!1),a.jqx.aria(g,"aria-hidden",!0)):this.selectionTracker?setTimeout(function(){f.style.display="none",a.jqx.aria(i,"aria-selected",!1),a.jqx.aria(g,"aria-hidden",!0)},this.selectionTrackerAnimationDuration):(f.style.display="none",a.jqx.aria(i,"aria-selected",!1),a.jqx.aria(g,"aria-hidden",!0)),this._unselectCallback(b,c,d),this.selectionTracker||e._removeClass(h,e.toThemeProperty("jqx-tabs-title-selected jqx-fill-state-pressed"))}},_unselectCallback:function(a,b,c){c&&this._raiseEvent(8,{item:a}),b&&b()},disable:function(){for(var a=this.length();a;)a--,this.disableAt(a)},enable:function(){for(var a=this.length();a;)a--,this.enableAt(a)},getEnabledTabsCount:function(){var b=0;return a.each(this._titleList,function(){this.disabled||b++}),b},getDisabledTabsCount:function(){var b=0;return a.each(this._titleList,function(){this.disabled&&b++}),b},removeAt:function(b){if(this._isValidIndex(b)&&(this.canCloseAllTabs||this.length()>1)){this._removeHoverStates();var c=this,d=c._outerWidth(this._titleList[b],!0),e=this.getTitleAt(b);this._unorderedList.style.width=c._toPx(c._width(this._unorderedList)-d),a(this._titleList[b]).remove(),a(this._contentList[b]).remove(),this._titleList.splice(b,1),this._contentList.splice(b,1),c._closeButtonList.splice(b,1),this._addStyles(),this._performHeaderLayout(),this._removeEventHandlers(),this._addEventHandlers(),this._raiseEvent(3,{item:b,title:e}),this._isAnimated={};var f;if(this.selectedItem>0?(this._selectedItem=-1,this.selectedItem>=b?(f=this._getPreviousIndex(this.selectedItem),this.select(f)):this.select(c.selectedItem)):(this._selectedItem=-1,f=this._getNextIndex(this.selectedItem),this.select(f)),parseInt(this._unorderedListHelper.css("left"),10)>this._getArrowsDisplacement()&&(this._unorderedList.style.left=c._toPx(this._getArrowsDisplacement())),c._width(this._unorderedList)<=c._width(this._headerWrapper)){var g=this.enableScrollAnimation?this.scrollAnimationDuration:0;this._lockAnimation("unorderedList"),this._unorderedListHelper.animate({left:0},g,function(){c._unlockAnimation("unorderedList")})}}},removeFirst:function(){this.removeAt(0)},removeLast:function(){this.removeAt(this.length()-1)},disableAt:function(b){var c=this._titleList[b];if(!c.disabled||void 0===c.disabled){if(this.selectedItem===b){var d=this.next();d||(d=this.previous())}c.disabled=!0,this.removeHandler(c,this.toggleMode),this.enabledHover&&a(c).off("mouseenter").off("mouseleave"),this._removeEventListenerAt(b),c.className+=" "+this.toThemeProperty("jqx-tabs-title-disable jqx-fill-state-disabled"),this._raiseEvent(5,{item:b})}},enableAt:function(a){var b=this._titleList[a];b.disabled&&(b.disabled=!1,this._addEventListenerAt(a),this._removeClass(b,this.toThemeProperty("jqx-tabs-title-disable jqx-fill-state-disabled")),this._raiseEvent(4,{item:a}))},addAt:function(a,b,c){if(a>=0&&a<=this.length()){this._removeHoverStates();var d=document.createElement("li");d.innerHTML=b,d.className=this.toThemeProperty("jqx-tabs-title jqx-item");var e=document.createElement("div");e.innerHTML=c,e.className=this.toThemeProperty("jqx-tabs-content-element"),"bottom"===this.position&&(d.className+=" "+this.toThemeProperty("jqx-tabs-title-bottom"));var f=!1;0===this._titleList.length?this._unorderedList.appendChild(d):a<this.length()&&a>=0?this._unorderedList.insertBefore(d,this._titleList[a]):this._unorderedList.appendChild(d),this._contentWrapper.appendChild(e),this._addItemTo(this._titleList,a,d),this._addItemTo(this._contentList,a,e),this._addCloseButton(a),this._selectedItem>a&&this._selectedItem++,this._switchTabs(a,this._selectedItem),this._selectedItem=a,this._uiRefresh(f),this._raiseEvent(2,{item:a}),this._moveSelectionTrack(this._selectedItem,0)}},addFirst:function(a,b){this.addAt(0,a,b)},addLast:function(a,b){this.addAt(this.length(),a,b)},val:function(a){return 0===arguments.length||"object"==typeof a?this._selectedItem:(this.select(a),this._selectedItem)},select:function(a){"object"==typeof a&&(a=this._indexOf(a));var b=!(a>=0&&a<this._titleList.length)||this._titleList[a].getAttribute("canselect");if((void 0===b||null===b||"true"===b||b===!0)&&a!==this._selectedItem&&this._isValidIndex(a)&&!this._activeAnimation()&&!this._titleList[a].disabled){var c=this._switchTabs(a,this._selectedItem);c&&this.ensureVisible(a)}},previous:function(a){var b=this._selectedItem;for(void 0===a||isNaN(a)||(b=a);b>0&&b<this._titleList.length;)if(b--,!this._titleList[b].disabled)return this.select(b),!0;return!1},_getPreviousIndex:function(a){if(void 0===a||isNaN(a))return 0;for(var b=a;a>0&&a<=this._titleList.length;)if(a--,!this._titleList[a].disabled)return a;return b},_getNextIndex:function(a){if(void 0===a||isNaN(a))return 0;for(var b=a;a>=0&&a<this._titleList.length;){if(!this._titleList[a].disabled)return a;a++}return b},next:function(a){var b=this._selectedItem;for(void 0===a||isNaN(a)||(b=a);b>=0&&b<this._titleList.length-1;)if(b++,!this._titleList[b].disabled)return this.select(b),!0;return!1},first:function(){var a=0;this._titleList[a].disabled?this.next(a):this.select(a)},last:function(){var a=this._titleList.length-1;this._titleList[a].disabled?this.previous(a):this.select(a)},length:function(){return this._titleList.length},lockAt:function(a){!this._isValidIndex(a)||this._titleList[a].locked&&void 0!==this._titleList[a].locked||(this._titleList[a].locked=!0,this._raiseEvent(11,{item:a}))},unlockAt:function(a){this._isValidIndex(a)&&this._titleList[a].locked&&(this._titleList[a].locked=!1,this._raiseEvent(12,{item:a}))},lockAll:function(){for(var a=this.length();a;)a--,this.lockAt(a)},unlockAll:function(){for(var a=this.length();a;)a--,this.unlockAt(a)},showCloseButtonAt:function(a){this._isValidIndex(a)&&(this.showCloseButtons||(this.showCloseButtons=!0,this.updatetabsheader()),this._closeButtonList[a].style.display="block",this.hiddenCloseButtons||(this.hiddenCloseButtons=[]),this.hiddenCloseButtons[a]=0)},hideCloseButtonAt:function(a){this._isValidIndex(a)&&(this._closeButtonList[a].style.display="none",this.hiddenCloseButtons||(this.hiddenCloseButtons=[]),this.hiddenCloseButtons[a]=1)},hideAllCloseButtons:function(){for(var a=this.length();a;)a--,this.hideCloseButtonAt(a)},showAllCloseButtons:function(){for(var a=this.length();a;)a--,this.showCloseButtonAt(a)},getTitleAt:function(b){return this._titleList[b]?a(this._titleList[b]).text():null},getContentAt:function(a){return this._contentList[a]?this._contentList[a]:null},setTitleAt:function(b,c){this._titleList[b]&&(a(this._titleList[b]).text(c),this.showCloseButtons&&(this._addCloseButton(b),this._removeEventHandlers(),this._addEventHandlers()),this.render(),this.refresh())},setContentAt:function(b,c){this._contentList[b]&&a(this._contentList[b]).html(c)},ensureVisible:function(b){var c=this;if(void 0!==b&&b!==-1&&null!==b||(b=this.selectedItem),!this._isValidIndex(b))return!1;var d,e,f=this._titleList[b],g=parseInt(a(f).position().left,10)+parseInt(this._unorderedListHelper.css("margin-left"),10),h=parseInt(this._unorderedListHelper.css("left"),10),i=this._outerWidth(this._headerWrapper,!0),j=this._outerWidth(f,!0),k=h-this._getArrowsDisplacement(),l=i-this._getArrowsDisplacement()-k;if(g<-k)d=-g+this._getArrowsDisplacement(),e=this._getArrowsDisplacement();else{if(!(g+j>l-this._getArrowsDisplacement()))return this._moveSelectionTrack(b,this.selectionTrackerAnimationDuration),!0;d=-g+i-j-(this.scrollable?2*this.arrowButtonSize-this._getArrowsDisplacement():0),e=i-j-this._getArrowsDisplacement()}return this._lockAnimation("unorderedList"),this._unorderedListHelper.animate({left:d},this.scrollAnimationDuration,function(){return c._unlockAnimation("unorderedList"),c._moveSelectionTrack(c._selectedItem,0),!0}),this._moveSelectionTrack(b,this.selectionTrackerAnimationDuration,e),!0},isVisibleAt:function(b){var c=this;if(void 0!==b&&b!==-1&&null!==b||(b=c.selectedItem),!c._isValidIndex(b))return!1;var d=c._titleList[b],e=parseInt(a(d).position().left,10)+parseInt(c._unorderedListHelper.css("margin-left"),10),f=parseInt(c._unorderedListHelper.css("left"),10),g=c._outerWidth(c._headerWrapper,!0),h=c._outerWidth(d,!0),i=f-c._getArrowsDisplacement(),j=g-c._getArrowsDisplacement()-i;return!(e<-i)&&!(e+h>j)},isDisabled:function(a){return this._titleList[a].disabled},_lockAnimation:function(a){this._isAnimated&&(this._isAnimated[a]=!0)},_unlockAnimation:function(a){this._isAnimated&&(this._isAnimated[a]=!1)},propertiesChangedHandler:function(a,b,c){c&&c.width&&c.height&&2===Object.keys(c).length&&a._setSize()},propertyChangedHandler:function(b,c,d,e){if(!(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&2===Object.keys(b.batchUpdate).length)){switch(this._validateProperties(),c){case"touchMode":e&&(b.enabledHover=!1,b.keyboardNavigation=!1);break;case"width":case"height":return void b._setSize();case"disabled":return void(e?this.disable():this.enable());case"showCloseButtons":return e?this.showAllCloseButtons():this.hideAllCloseButtons(),void this._performHeaderLayout();case"selectedItem":return void(this._isValidIndex(e)&&this.select(e));case"scrollStep":case"contentTransitionDuration":case"scrollAnimationDuration":case"enableScrollAnimation":return;case"selectionTracker":return void(e?(this._refresh(),this.select(this._selectedItem)):this._selectionTracker&&this._selectionTrackerHelper.remove());case"scrollable":return void(e?(this._refresh(),this.select(this._selectedItem)):(a(this._leftArrow).remove(),a(this._rightArrow).remove(),this._performHeaderLayout()));case"autoHeight":return void this._performHeaderLayout();case"theme":return void a.jqx.utilities.setTheme(d,e,this.host)}this._unorderedList.style.left="0px",this._refresh(),this.select(this._selectedItem),this._addSelectStyle(this._selectedItem,!0)}},_toPx:function(a){return"number"==typeof a?a+"px":a},_removeClass:function(b,c){a(b).removeClass(c)},_width:function(b){var c=a(b),d=c.css("border-left-width"),e=c.css("border-right-width"),f=parseInt(c.css("padding-left"),10),g=parseInt(c.css("padding-right"),10);d=d.indexOf("px")===-1?1:parseInt(d,10),e=e.indexOf("px")===-1?1:parseInt(e,10);var h=b.offsetWidth-(d+e+f+g);return h},_outerWidth:function(b,c){var d=b.offsetWidth;if(c){var e=a(b),f=parseInt(e.css("margin-left"),10),g=parseInt(e.css("margin-right"),10);d+=f+g}return d},_height:function(b){var c=a(b),d=c.css("border-top-width"),e=c.css("border-bottom-width"),f=parseInt(c.css("padding-top"),10),g=parseInt(c.css("padding-bottom"),10);d=d.indexOf("px")===-1?1:parseInt(d,10),e=e.indexOf("px")===-1?1:parseInt(e,10);var h=b.offsetHeight-(d+e+f+g);return h},_outerHeight:function(b,c){var d=b.offsetHeight;if(c){var e=a(b),f=parseInt(e.css("margin-top"),10),g=parseInt(e.css("margin-bottom"),10);d+=f+g}return d},_stop:function(a){a.stop?a.stop():a.animate("stop",!0)}})}(jqxBaseFramework);
  
  