/*!
* WPOS Tab Slider Slider - v1.0
* Homepage: https://www.wponlinesupport.com
* Author: WP Online Support
* Author URL: https://www.wponlinesupport.com
*/
!function(a,b){"use strict";b.WpostabSlider={modules:{},addModule:function(a,c,f){"undefined"==typeof this.modules[f]&&(this.modules[f]=[]),this.modules[f].push(a),"accordion"===f?b.extend(d.prototype,c):"panel"===f&&b.extend(e.prototype,c)}};var c=b.WpostabSlider.namespace="WpostabSlider",d=function(a,c){this.$accordion=b(a),this.$panelsContainer=null,this.$maskContainer=null,this.options=c,this.settings={},this.originalSettings={},this.currentIndex=-1,this.currentPage=0,this.totalSize=0,this.totalPanelsSize=0,this.computedOpenedPanelSize=0,this.maxComputedOpenedPanelSize=0,this.collapsedPanelSize=0,this.closedPanelSize=0,this.computedPanelDistance=0,this.panels=[],this.mouseDelayTimer=0,this.openPanelAnimation={},this.closePanelsAnimation={},this.uniqueId=(new Date).valueOf(),this.breakpoints=[],this.currentBreakpoint=-1,this.previousVisiblePanels=-1,this.isPageScrolling=!1,this.positionProperty="left",this.sizeProperty="width",this.autoResponsiveRatio=1,this.isOverlapping=!1,this._init()};d.prototype={_init:function(){var d=this;this.$accordion.removeClass("as-no-js"),this.$maskContainer=b('').appendTo(this.$accordion),this.$panelsContainer=this.$accordion.find(".as-wposslides").appendTo(this.$maskContainer),0===this.$panelsContainer.length&&(this.$panelsContainer=b('').appendTo(this.$maskContainer));var e=b.WpostabSlider.modules.accordion;if("undefined"!=typeof e)
for(var f=0;f=b.size?1:-1})}
if(this._prepareRAF(),this.update(),-1!==this.currentIndex){this.$accordion.find(".as-wposslide").eq(this.currentIndex).addClass("as-opened");var k={type:"panelOpen",index:this.currentIndex,previousIndex:-1};this.trigger(k),b.isFunction(this.settings.panelOpen)&&this.settings.panelOpen.call(this,k)}
this.on("mouseenter."+c,function(){var a={type:"accordionMouseOver"};d.trigger(a),b.isFunction(d.settings.accordionMouseOver)&&d.settings.accordionMouseOver.call(d,a)}),b(a).on("resize."+this.uniqueId+"."+c,function(){d.resize()}),this.trigger({type:"init"}),b.isFunction(this.settings.init)&&this.settings.init.call(this,{type:"init"})},update:function(){var a=this;if("horizontal"===this.settings.orientation?(this.$accordion.removeClass("as-vertical").addClass("as-horizontal"),this.positionProperty="left",this.sizeProperty="width"):"vertical"===this.settings.orientation&&(this.$accordion.removeClass("as-horizontal").addClass("as-vertical"),this.positionProperty="top",this.sizeProperty="height"),-1===this.settings.visiblePanels)this.currentPage=0;else if(-1!==this.currentIndex)this.currentPage=Math.floor(this.currentIndex/this.settings.visiblePanels);else if(this.settings.visiblePanels!==this.previousVisiblePanels&&-1!==this.previousVisiblePanels){var c=Math.round(this.currentPage*this.previousVisiblePanels/this.settings.visiblePanels);this.currentPage!==c&&(this.currentPage=c)}
this.settings.panelDistance>0||this.settings.panelOverlap===!1?(this.isOverlapping=!1,this.$accordion.removeClass("as-overlap")):this.settings.panelOverlap===!0&&(this.isOverlapping=!0,this.$accordion.addClass("as-overlap")),this.$accordion.find("img.as-wposbg, img.as-wposbg-opened").css({width:"",height:""}),this._updatePanels(),this._updatePaginationButtons(),this.settings.shadow===!0?this.$accordion.find(".as-wposslide").addClass("as-shadow"):this.settings.shadow===!1&&this.$accordion.find(".as-shadow").removeClass("as-shadow"),this.$panelsContainer.attr("style",""),this.resize();var d={type:"update"};a.trigger(d),b.isFunction(a.settings.update)&&a.settings.update.call(a,d)},_updatePanels:function(){for(var a=this,d=this.panels.length-1;d>=0;d--)
if(0===this.$accordion.find('.as-wposslide[data-index="'+d+'"]').length){var e=this.panels[d];e.off("panelMouseOver."+c),e.off("panelMouseOut."+c),e.off("panelClick."+c),e.off("imagesComplete."+c),e.destroy(),this.panels.splice(d,1)}
this.$accordion.find(".as-wposslide").each(function(c,d){var e=b(d);"undefined"==typeof e.attr("data-init")?a._createPanel(c,e):(a.panels[c].setIndex(c),a.panels[c].update())})},_createPanel:function(a,d){var f=this,g=b(d),h=new e(g,this,a);this.panels.splice(a,0,h),h.on("panelMouseOver."+c,function(c){if(f.isPageScrolling!==!0){"hover"===f.settings.openPanelOn&&(clearTimeout(f.mouseDelayTimer),f.mouseDelayTimer=setTimeout(function(){f.openPanel(c.index)},f.settings.mouseDelay));var d={type:"panelMouseOver",index:a};f.trigger(d),b.isFunction(f.settings.panelMouseOver)&&f.settings.panelMouseOver.call(f,d)}}),h.on("panelMouseOut."+c,function(){if(f.isPageScrolling!==!0){var c={type:"panelMouseOut",index:a};f.trigger(c),b.isFunction(f.settings.panelMouseOut)&&f.settings.panelMouseOut.call(f,c)}}),h.on("panelClick."+c,function(c){if(!f.$accordion.hasClass("as-swiping")){"click"===f.settings.openPanelOn&&(a!==f.currentIndex?f.openPanel(c.index):f.closePanels());var d={type:"panelClick",index:a};f.trigger(d),b.isFunction(f.settings.panelClick)&&f.settings.panelClick.call(f,d)}}),h.on("panelMouseDown."+c,function(){b(this).find("a").off("click.disablePanelLink"),a!==f.currentIndex&&"click"===f.settings.openPanelOn&&b(this).find("a").one("click.disablePanelLink",function(a){a.preventDefault()})}),h.on("imagesComplete."+c,function(a){a.index===f.currentIndex&&a.contentSize!==f.computedOpenedPanelSize&&f.openPanel(a.index,!0)})},removePanels:function(){b.each(this.panels,function(a,b){b.off("panelMouseOver."+c),b.off("panelMouseOut."+c),b.off("panelClick."+c),b.off("imagesComplete."+c),b.destroy()}),this.panels.length=0},resize:function(){var c=this;if(this.$maskContainer.attr("style",""),this.settings.responsive===!0?(this.$accordion.css({width:"100%",height:this.settings.height,maxWidth:this.settings.width,maxHeight:this.settings.height}),-1===this.settings.aspectRatio&&(this.settings.aspectRatio=this.settings.width/this.settings.height),this.$accordion.css("height",this.$accordion.innerWidth()/this.settings.aspectRatio),"auto"===this.settings.responsiveMode?(this.autoResponsiveRatio=this.$accordion.innerWidth()/this.settings.width,this.$maskContainer.css({width:this.settings.width,height:this.settings.height}),this.autoResponsiveRatio<1?this.$maskContainer.css({"-webkit-transform":"scaleX("+this.autoResponsiveRatio+") scaleY("+this.autoResponsiveRatio+")","-ms-transform":"scaleX("+this.autoResponsiveRatio+") scaleY("+this.autoResponsiveRatio+")",transform:"scaleX("+this.autoResponsiveRatio+") scaleY("+this.autoResponsiveRatio+")","-webkit-transform-origin":"top left","-ms-transform-origin":"top left","transform-origin":"top left"}):this.$maskContainer.css({"-webkit-transform":"","-ms-transform":"",transform:"","-webkit-transform-origin":"","-ms-transform-origin":"","transform-origin":""}),this.totalSize="horizontal"===this.settings.orientation?this.$maskContainer.innerWidth():this.$maskContainer.innerHeight()):this.totalSize="horizontal"===this.settings.orientation?this.$accordion.innerWidth():this.$accordion.innerHeight()):(this.$accordion.css({width:this.settings.width,height:this.settings.height,maxWidth:"",maxHeight:""}),this.totalSize="horizontal"===this.settings.orientation?this.$accordion.innerWidth():this.$accordion.innerHeight()),"horizontal"===this.settings.orientation?this.$accordion.find("img.as-wposbg, img.as-wposbg-opened").css("height",this.$panelsContainer.innerHeight()):this.$accordion.find("img.as-wposbg, img.as-wposbg-opened").css("width",this.$panelsContainer.innerWidth()),this.computedPanelDistance=this.settings.panelDistance,"string"==typeof this.computedPanelDistance&&(-1!==this.computedPanelDistance.indexOf("%")?this.computedPanelDistance=this.totalSize*(parseInt(this.computedPanelDistance,10)/100):-1!==this.computedPanelDistance.indexOf("px")&&(this.computedPanelDistance=parseInt(this.computedPanelDistance,10))),this.closedPanelSize=(this.totalSize-(this.getVisiblePanels()-1)*this.computedPanelDistance)/this.getVisiblePanels(),this.closedPanelSize=Math.floor(this.closedPanelSize),this.computedOpenedPanelSize=this.settings.openedPanelSize,"max"===this.settings.openedPanelSize&&(this.maxComputedOpenedPanelSize=this.settings.maxOpenedPanelSize,"string"==typeof this.maxComputedOpenedPanelSize&&(-1!==this.maxComputedOpenedPanelSize.indexOf("%")?this.maxComputedOpenedPanelSize=this.totalSize*(parseInt(this.maxComputedOpenedPanelSize,10)/100):-1!==this.maxComputedOpenedPanelSize.indexOf("px")&&(this.maxComputedOpenedPanelSize=parseInt(this.maxComputedOpenedPanelSize,10)))),"string"==typeof this.computedOpenedPanelSize)
if(-1!==this.computedOpenedPanelSize.indexOf("%"))this.computedOpenedPanelSize=this.totalSize*(parseInt(this.computedOpenedPanelSize,10)/100);else if(-1!==this.computedOpenedPanelSize.indexOf("px"))this.computedOpenedPanelSize=parseInt(this.computedOpenedPanelSize,10);else if("max"===this.computedOpenedPanelSize&&-1!==this.currentIndex){var d=this.getPanelAt(this.currentIndex).getContentSize();this.computedOpenedPanelSize="loading"===d?this.closedPanelSize:Math.min(d,this.maxComputedOpenedPanelSize)}
if(this.collapsedPanelSize=(this.totalSize-this.computedOpenedPanelSize-(this.getVisiblePanels()-1)*this.computedPanelDistance)/(this.getVisiblePanels()-1),this.computedOpenedPanelSize=Math.floor(this.computedOpenedPanelSize),this.collapsedPanelSize=Math.floor(this.collapsedPanelSize),this.totalPanelsSize=this.closedPanelSize*this.getTotalPanels()+this.computedPanelDistance*(this.getTotalPanels()-1),this.$panelsContainer.css(this.sizeProperty,this.totalPanelsSize),this.totalSize=this.closedPanelSize*this.getVisiblePanels()+this.computedPanelDistance*(this.getVisiblePanels()-1),"custom"===this.settings.responsiveMode||this.settings.responsive===!1?this.$accordion.css(this.sizeProperty,this.totalSize):(this.$accordion.css(this.sizeProperty,this.totalSize*this.autoResponsiveRatio),this.$maskContainer.css(this.sizeProperty,this.totalSize)),-1!==this.settings.visiblePanels){var e={},f=-(this.totalSize+this.computedPanelDistance)*this.currentPage;this.currentPage===this.getTotalPages()-1&&(f=-(this.closedPanelSize*this.getTotalPanels()+this.computedPanelDistance*(this.getTotalPanels()-1)-this.totalSize)),e[this.positionProperty]=f,this.$panelsContainer.css(e)}
var g=this.currentPage===this.getTotalPages()-1&&0!==this.getTotalPanels()%this.settings.visiblePanels?this.settings.visiblePanels-this.getTotalPanels()%this.settings.visiblePanels:0;if(b.each(this.panels,function(a,b){var d;if(-1===c.currentIndex?d=a*(c.closedPanelSize+c.computedPanelDistance):-1===c.settings.visiblePanels?d=a*(c.collapsedPanelSize+c.computedPanelDistance)+(a>c.currentIndex?c.computedOpenedPanelSize-c.collapsedPanelSize:0):c._getPageOfPanel(a)===c.currentPage?(d=c.currentPage*(c.totalSize+c.computedPanelDistance)+(a+g-c.currentPage*c.settings.visiblePanels)*(c.collapsedPanelSize+c.computedPanelDistance)+(a>c.currentIndex?c.computedOpenedPanelSize-c.collapsedPanelSize:0),c.currentPage===c.getTotalPages()-1&&0!==g&&(d-=(c.getTotalPages()-c.getTotalPanels()/c.settings.visiblePanels)*(c.totalSize+c.computedPanelDistance))):d=a*(c.closedPanelSize+c.computedPanelDistance),b.setPosition(d),c.isOverlapping===!1){var e=-1===c.currentIndex||-1!==c.settings.visiblePanels&&c._getPageOfPanel(a)!==c.currentPage?c.closedPanelSize:a===c.currentIndex?c.computedOpenedPanelSize:c.collapsedPanelSize;b.setSize(e)}}),null!==this.settings.breakpoints&&this.breakpoints.length>0)
if(b(a).width()>this.breakpoints[this.breakpoints.length-1].size&&-1!==this.currentBreakpoint)this.currentBreakpoint=-1,this._setProperties(this.originalSettings,!1);else
for(var h=0,i=this.breakpoints.length;i>h;h++)
if(b(a).width()<=this.breakpoints[h].size){if(this.currentBreakpoint!==this.breakpoints[h].size){var j={type:"breakpointReach",size:this.breakpoints[h].size,settings:this.breakpoints[h].properties};c.trigger(j),b.isFunction(c.settings.breakpointReach)&&c.settings.breakpointReach.call(c,j),this.currentBreakpoint=this.breakpoints[h].size;var k=b.extend({},this.originalSettings,this.breakpoints[h].properties);this._setProperties(k,!1)}
break}},_setProperties:function(a,b){for(var c in a)"visiblePanels"===c&&-1!==this.settings.visiblePanels&&(this.previousVisiblePanels=this.settings.visiblePanels),this.settings[c]=a[c],b!==!1&&(this.originalSettings[c]=a[c]);this.update()},destroy:function(){this.$accordion.removeData("wpostabSlider"),this.$accordion.attr("style",""),this.$panelsContainer.attr("style",""),this.off("mouseenter."+c),this.off("mouseleave."+c),b(a).off("resize."+this.uniqueId+"."+c),this._stopPanelsAnimation(this.openPanelAnimation),this._stopPanelsAnimation(this.closePanelsAnimation);var d=b.WpostabSlider.modules.accordion;if("undefined"!=typeof d)
for(var e=0;e=this.getTotalPanels()-1?0:this.currentIndex+1;this.openPanel(a)},previousPanel:function(){var a=this.currentIndex<=0?this.getTotalPanels()-1:this.currentIndex-1;this.openPanel(a)},_animatePanels:function(b,c){function d(){1>f?(f=((new Date).valueOf()-e)/c.duration,f>1&&(f=1),f=.5-Math.cos(f*Math.PI)/2,c.step(f),b.timer=a.requestAnimationFrame(d)):(c.complete(),b.isRunning=!1,a.cancelAnimationFrame(b.timer))}
var e=(new Date).valueOf(),f=0;b.isRunning=!0,b.timer=a.requestAnimationFrame(d)},_stopPanelsAnimation:function(b){"undefined"!=typeof b.isRunning&&b.isRunning===!0&&(b.isRunning=!1,a.cancelAnimationFrame(b.timer))},_prepareRAF:function(){if("undefined"==typeof a.requestAnimationFrame)
for(var b=["webkit","moz"],c=0;c=this.getTotalPanels()-this.settings.visiblePanels)){var e=Math.floor(this.currentIndex/this.settings.visiblePanels);e!==this.currentPage&&this.gotoPage(e),this.currentIndex=a}
var f=this,g=[],h=[],i=[],j=[],k=[],l=this._getFirstPanelFromPage(),m=this._getLastPanelFromPage(),n=0;if(this.$accordion.find(".as-wposslide.as-opened").removeClass("as-opened"),this.$accordion.find(".as-wposslide").eq(this.currentIndex).addClass("as-opened"),"max"===this.settings.openedPanelSize){var o=this.getPanelAt(this.currentIndex).getContentSize();this.computedOpenedPanelSize="loading"===o?this.closedPanelSize:Math.min(o,this.maxComputedOpenedPanelSize),this.collapsedPanelSize=(this.totalSize-this.computedOpenedPanelSize-(this.getVisiblePanels()-1)*this.computedPanelDistance)/(this.getVisiblePanels()-1)}
for(var p=l;m>=p;p++){var q=this.getPanelAt(p);j[p]=q.getPosition(),h[p]=this.currentPage*(this.totalSize+this.computedPanelDistance)+n*(this.collapsedPanelSize+this.computedPanelDistance)+(p>this.currentIndex?this.computedOpenedPanelSize-this.collapsedPanelSize:0),-1!==this.settings.visiblePanels&&this.currentPage===this.getTotalPages()-1&&(h[p]-=(this.getTotalPages()-this.getTotalPanels()/this.settings.visiblePanels)*(this.totalSize+this.computedPanelDistance)),h[p]!==j[p]&&k.push(p),this.isOverlapping===!1&&(i[p]=q.getSize(),g[p]=p===this.currentIndex?this.computedOpenedPanelSize:this.collapsedPanelSize,g[p]!==i[p]&&-1===b.inArray(p,k)&&k.push(p)),n++}
var r=k.length;this.closePanelsAnimation.page===this.currentPage&&this._stopPanelsAnimation(this.closePanelsAnimation),this._stopPanelsAnimation(this.openPanelAnimation),this.openPanelAnimation.page=this.currentPage,this._animatePanels(this.openPanelAnimation,{duration:this.settings.openPanelDuration,step:function(a){for(var b=0;r>b;b++){var c=k[b],d=f.getPanelAt(c);d.setPosition(a*(h[c]-j[c])+j[c]),f.isOverlapping===!1&&d.setSize(a*(g[c]-i[c])+i[c])}},complete:function(){var a={type:"panelOpenComplete",index:f.currentIndex};f.trigger(a),b.isFunction(f.settings.panelOpenComplete)&&f.settings.panelOpenComplete.call(f,a)}});var s={type:"panelOpen",index:a,previousIndex:d};this.trigger(s),b.isFunction(this.settings.panelOpen)&&this.settings.panelOpen.call(this,s)}
this.PanelcurrentIndex=a;},closePanels:function(){var a=this.currentIndex;this.currentIndex=-1,this.$accordion.hasClass("as-closed")===!1&&(this.$accordion.removeClass("as-opened"),this.$accordion.addClass("as-closed")),this.$accordion.find(".as-wposslide.as-opened").removeClass("as-opened"),clearTimeout(this.mouseDelayTimer);for(var c=this,d=[],e=[],f=[],g=[],h=this._getFirstPanelFromPage(),i=this._getLastPanelFromPage(),j=0,k=h;i>=k;k++){var l=this.getPanelAt(k);g[k]=l.getPosition(),e[k]=this.currentPage*(this.totalSize+this.computedPanelDistance)+j*(this.closedPanelSize+this.computedPanelDistance),-1!==this.settings.visiblePanels&&this.currentPage===this.getTotalPages()-1&&(e[k]-=(this.getTotalPages()-this.getTotalPanels()/this.settings.visiblePanels)*(this.totalSize+this.computedPanelDistance)),this.isOverlapping===!1&&(f[k]=l.getSize(),d[k]=this.closedPanelSize),j++}
this.openPanelAnimation.page===this.currentPage&&this._stopPanelsAnimation(this.openPanelAnimation),this._stopPanelsAnimation(this.closePanelsAnimation),this.closePanelsAnimation.page=this.currentPage,this._animatePanels(this.closePanelsAnimation,{duration:this.settings.closePanelDuration,step:function(a){for(var b=h;i>=b;b++){var j=c.getPanelAt(b);j.setPosition(a*(e[b]-g[b])+g[b]),c.isOverlapping===!1&&j.setSize(a*(d[b]-f[b])+f[b])}},complete:function(){var d={type:"panelsCloseComplete",previousIndex:a};c.trigger(d),b.isFunction(c.settings.panelsCloseComplete)&&c.settings.panelsCloseComplete.call(c,d)}});var m={type:"panelsClose",previousIndex:a};this.trigger(m),b.isFunction(this.settings.panelsClose)&&this.settings.panelsClose.call(this,m)},getVisiblePanels:function(){return-1===this.settings.visiblePanels?this.getTotalPanels():this.settings.visiblePanels},getTotalPages:function(){return-1===this.settings.visiblePanels?1:Math.ceil(this.getTotalPanels()/this.settings.visiblePanels)},getCurrentPage:function(){return-1===this.settings.visiblePanels?0:this.currentPage},gotoPage:function(a){-1!==this.currentIndex&&this.closePanels(),this.currentPage=a,this.isPageScrolling=!0;var c=this,d={},e=-(a*this.totalSize+this.currentPage*this.computedPanelDistance);this.currentPage===this.getTotalPages()-1&&(e=-(this.totalPanelsSize-this.totalSize)),d[this.positionProperty]=e;var f={type:"pageScroll",index:this.currentPage};this.trigger(f),b.isFunction(this.settings.pageScroll)&&this.settings.pageScroll.call(this,f),this.$panelsContainer.stop().animate(d,this.settings.pageScrollDuration,this.settings.pageScrollEasing,function(){c.isPageScrolling=!1;var a={type:"pageScrollComplete",index:c.currentPage};c.trigger(a),b.isFunction(c.settings.pageScrollComplete)&&c.settings.pageScrollComplete.call(c,a)})},nextPage:function(){var a=this.currentPage>=this.getTotalPages()-1?0:this.currentPage+1;this.gotoPage(a)},previousPage:function(){var a=this.currentPage<=0?this.getTotalPages()-1:this.currentPage-1;this.gotoPage(a)},_getFirstPanelFromPage:function(){return-1===this.settings.visiblePanels?0:this.currentPage===this.getTotalPages()-1&&0!==this.currentPage?this.getTotalPanels()-this.settings.visiblePanels:this.currentPage*this.settings.visiblePanels},_getLastPanelFromPage:function(){return-1===this.settings.visiblePanels?this.getTotalPanels()-1:this.currentPage===this.getTotalPages()-1?this.getTotalPanels()-1:(this.currentPage+1)*this.settings.visiblePanels-1},_getPageOfPanel:function(a){return this.currentPage===this.getTotalPages()-1&&a>=this.getTotalPanels()-this.settings.visiblePanels?this.getTotalPages()-1:Math.floor(a/this.settings.visiblePanels)},_updatePaginationButtons:function(){var a=this.$accordion.find(".as-pagination-buttons"),d=this,e=this.getTotalPages();if(1>=e&&0!==a.length)a.remove(),a.off("click."+c,".as-pagination-button"),this.off("pageScroll."+c),this.$accordion.removeClass("as-has-buttons");else if(e>1&&0===a.length){a=b('').appendTo(this.$accordion);for(var f=0;f