/*! * master slider – responsive touch swipe slider [lite version] * copyright © 2016 all rights reserved. * * @author averta [www.averta.net] * @version 2.50.0 * @date aug 2016 */ window.averta={},function($){function getvendorprefix(){if("result"in arguments.callee)return arguments.callee.result;var regex=/^(moz|webkit|khtml|o|ms|icab)(?=[a-z])/,somescript=document.getelementsbytagname("script")[0];for(var prop in somescript.style)if(regex.test(prop))return arguments.callee.result=prop.match(regex)[0];return arguments.callee.result="webkitopacity"in somescript.style?"webkit":"khtmlopacity"in somescript.style?"khtml":""}function checkstylevalue(prop){var b=document.body||document.documentelement,s=b.style,p=prop;if("string"==typeof s[p])return!0;v=["moz","webkit","khtml","o","ms"],p=p.charat(0).touppercase()+p.substr(1);for(var i=0;i0&&"none"!==has3d}window["package"]=function(name){window[name]||(window[name]={})};var extend=function(target,object){for(var key in object)target[key]=object[key]};function.prototype.extend=function(superclass){"function"==typeof superclass.prototype.constructor?(extend(this.prototype,superclass.prototype),this.prototype.constructor=this):(this.prototype.extend(superclass),this.prototype.constructor=this)};var trans={moz:"-moz-",webkit:"-webkit-",khtml:"-khtml-",o:"-o-",ms:"-ms-",icab:"-icab-"};window._mobile=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.useragent),window._touch="ontouchstart"in document,$(document).ready(function(){window._jcsspfx=getvendorprefix(),window._csspfx=trans[window._jcsspfx],window._cssanim=supportstransitions(),window._css3d=supports3dtransforms(),window._css2d=supportstransforms()}),window.parsequerystring=function(url){var querystring={};return url.replace(new regexp("([^?=&]+)(=([^&]*))?","g"),function($0,$1,$2,$3){querystring[$1]=$3}),querystring};var fps60=50/3;if(window.requestanimationframe||(window.requestanimationframe=function(){return window.webkitrequestanimationframe||window.mozrequestanimationframe||window.orequestanimationframe||window.msrequestanimationframe||function(callback){window.settimeout(callback,fps60)}}()),window.getcomputedstyle||(window.getcomputedstyle=function(el){return this.el=el,this.getpropertyvalue=function(prop){var re=/(\-([a-z]){1})/g;return"float"==prop&&(prop="stylefloat"),re.test(prop)&&(prop=prop.replace(re,function(){return arguments[2].touppercase()})),el.currentstyle[prop]?el.currentstyle[prop]:null},el.currentstyle}),array.prototype.indexof||(array.prototype.indexof=function(elt){var len=this.length>>>0,from=number(arguments[1])||0;for(from=0>from?math.ceil(from):math.floor(from),0>from&&(from+=len);len>from;from++)if(from in this&&this[from]===elt)return from;return-1}),window.ismsie=function(version){if(!$.browser.msie)return!1;if(!version)return!0;var iever=$.browser.version.slice(0,$.browser.version.indexof("."));return"string"==typeof version?eval(-1!==version.indexof("<")||-1!==version.indexof(">")?iever+version:version+"=="+iever):version==iever},$.removedataattrs=function($target,exclude){var i,attrname,dataattrstodelete=[],dataattrs=$target[0].attributes,dataattrslen=dataattrs.length;for(exclude=exclude||[],i=0;dataattrslen>i;i++)attrname=dataattrs[i].name,"data-"===attrname.substring(0,5)&&-1===exclude.indexof(attrname)&&dataattrstodelete.push(dataattrs[i].name);$.each(dataattrstodelete,function(index,attrname){$target.removeattr(attrname)})},jquery){$.jqloadfix=function(){if(this.complete){var that=this;settimeout(function(){$(that).load()},1)}},jquery.uamatch=jquery.uamatch||function(ua){ua=ua.tolowercase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexof("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}},matched=jquery.uamatch(navigator.useragent),browser={},matched.browser&&(browser[matched.browser]=!0,browser.version=matched.version),browser.chrome?browser.webkit=!0:browser.webkit&&(browser.safari=!0);var isie11=!!navigator.useragent.match(/trident\/7\./);isie11&&(browser.msie="true",delete browser.mozilla),jquery.browser=browser,$.fn.preloadimg=function(src,_event){return this.each(function(){var $this=$(this),self=this,img=new image;img.onload=function(event){null==event&&(event={}),$this.attr("src",src),event.width=img.width,event.height=img.height,$this.data("width",img.width),$this.data("height",img.height),settimeout(function(){_event.call(self,event)},50),img=null},img.src=src}),this}}}(jquery),function(){"use strict";averta.eventdispatcher=function(){this.listeners={}},averta.eventdispatcher.extend=function(_proto){var instance=new averta.eventdispatcher;for(var key in instance)"constructor"!=key&&(_proto[key]=averta.eventdispatcher.prototype[key])},averta.eventdispatcher.prototype={constructor:averta.eventdispatcher,addeventlistener:function(event,listener,ref){this.listeners[event]||(this.listeners[event]=[]),this.listeners[event].push({listener:listener,ref:ref})},removeeventlistener:function(event,listener,ref){if(this.listeners[event]){for(var i=0;ii;++i)this.listeners[event.type][i].listener.call(this.listeners[event.type][i].ref,event)}}}(),function($){"use strict";var istouch="ontouchstart"in document,ispointer=window.navigator.pointerenabled,ismspoiner=!ispointer&&window.navigator.mspointerenabled,usepointer=ispointer||ismspoiner,ev_start=(ispointer?"pointerdown ":"")+(ismspoiner?"mspointerdown ":"")+(istouch?"touchstart ":"")+"mousedown",ev_move=(ispointer?"pointermove ":"")+(ismspoiner?"mspointermove ":"")+(istouch?"touchmove ":"")+"mousemove",ev_end=(ispointer?"pointerup ":"")+(ismspoiner?"mspointerup ":"")+(istouch?"touchend ":"")+"mouseup",ev_cancel=(ispointer?"pointercancel ":"")+(ismspoiner?"mspointercancel ":"")+"touchcancel";averta.touchswipe=function($element){this.$element=$element,this.enabled=!0,$element.bind(ev_start,{target:this},this.__touchstart),$element[0].swipe=this,this.onswipe=null,this.swipetype="horizontal",this.noswipeselector="input, textarea, button, .no-swipe, .ms-no-swipe",this.laststatus={}};var p=averta.touchswipe.prototype;p.getdirection=function(new_x,new_y){switch(this.swipetype){case"horizontal":return new_x<=this.start_x?"left":"right";case"vertical":return new_y<=this.start_y?"up":"down";case"all":return math.abs(new_x-this.start_x)>math.abs(new_y-this.start_y)?new_x<=this.start_x?"left":"right":new_y<=this.start_y?"up":"down"}},p.priventdefultevent=function(new_x,new_y){var dx=math.abs(new_x-this.start_x),dy=math.abs(new_y-this.start_y),horiz=dx>dy;return"horizontal"===this.swipetype&&horiz||"vertical"===this.swipetype&&!horiz},p.createstatusobject=function(evt){var temp_x,temp_y,status_data={};return temp_x=this.laststatus.distancex||0,temp_y=this.laststatus.distancey||0,status_data.distancex=evt.pagex-this.start_x,status_data.distancey=evt.pagey-this.start_y,status_data.movex=status_data.distancex-temp_x,status_data.movey=status_data.distancey-temp_y,status_data.distance=parseint(math.sqrt(math.pow(status_data.distancex,2)+math.pow(status_data.distancey,2))),status_data.duration=(new date).gettime()-this.start_time,status_data.direction=this.getdirection(evt.pagex,evt.pagey),status_data},p.__reset=function(event,jqevt){this.reset=!1,this.laststatus={},this.start_time=(new date).gettime();var point=this.__getpoint(event,jqevt);this.start_x=point.pagex,this.start_y=point.pagey},p.__touchstart=function(event){var swipe=event.data.target,jqevt=event;if(swipe.enabled&&!($(event.target).closest(swipe.noswipeselector,swipe.$element).length>0)){if(event=event.originalevent,usepointer&&$(this).css("-ms-touch-action","horizontal"===swipe.swipetype?"pan-y":"pan-x"),!swipe.onswipe)return void $.error("swipe listener is undefined");if(!(swipe.touchstarted||istouch&&swipe.start_time&&"mousedown"===event.type&&(new date).gettime()-swipe.start_time<600)){var point=swipe.__getpoint(event,jqevt);swipe.start_x=point.pagex,swipe.start_y=point.pagey,swipe.start_time=(new date).gettime(),$(document).bind(ev_end,{target:swipe},swipe.__touchend).bind(ev_move,{target:swipe},swipe.__touchmove).bind(ev_cancel,{target:swipe},swipe.__touchcancel);var status=swipe.createstatusobject(point);status.phase="start",swipe.onswipe.call(null,status),istouch||jqevt.preventdefault(),swipe.laststatus=status,swipe.touchstarted=!0}}},p.__touchmove=function(event){var swipe=event.data.target,jqevt=event;if(event=event.originalevent,swipe.touchstarted){cleartimeout(swipe.timo),swipe.timo=settimeout(function(){swipe.__reset(event,jqevt)},60);var point=swipe.__getpoint(event,jqevt),status=swipe.createstatusobject(point);swipe.priventdefultevent(point.pagex,point.pagey)&&jqevt.preventdefault(),status.phase="move",swipe.laststatus=status,swipe.onswipe.call(null,status)}},p.__touchend=function(event){var swipe=event.data.target,jqevt=event;event=event.originalevent,cleartimeout(swipe.timo);var status=swipe.laststatus;istouch||jqevt.preventdefault(),status.phase="end",swipe.touchstarted=!1,swipe.priventevt=null,$(document).unbind(ev_end,swipe.__touchend).unbind(ev_move,swipe.__touchmove).unbind(ev_cancel,swipe.__touchcancel),status.speed=status.distance/status.duration,swipe.onswipe.call(null,status)},p.__touchcancel=function(event){var swipe=event.data.target;swipe.__touchend(event)},p.__getpoint=function(event,jqevent){return istouch&&-1===event.type.indexof("mouse")?event.touches[0]:usepointer?event:jqevent},p.enable=function(){this.enabled||(this.enabled=!0)},p.disable=function(){this.enabled&&(this.enabled=!1)}}(jquery),function(){"use strict";averta.ticker=function(){};var st=averta.ticker,list=[],len=0,__stopped=!0;st.add=function(listener,ref){return list.push([listener,ref]),1===list.length&&st.start(),len=list.length},st.remove=function(listener,ref){for(var i=0,l=list.length;l>i;++i)list[i]&&list[i][0]===listener&&list[i][1]===ref&&list.splice(i,1);len=list.length,0===len&&st.stop()},st.start=function(){__stopped&&(__stopped=!1,__tick())},st.stop=function(){__stopped=!0};var __tick=function(){if(!st.__stopped){for(var item,i=0;i!==len;i++)item=list[i],item[0].call(item[1]);requestanimationframe(__tick)}}}(),function(){"use strict";date.now||(date.now=function(){return(new date).gettime()}),averta.timer=function(delay,autostart){this.delay=delay,this.currentcount=0,this.paused=!1,this.ontimer=null,this.refrence=null,autostart&&this.start()},averta.timer.prototype={constructor:averta.timer,start:function(){this.paused=!1,this.lasttime=date.now(),averta.ticker.add(this.update,this)},stop:function(){this.paused=!0,averta.ticker.remove(this.update,this)},reset:function(){this.currentcount=0,this.paused=!0,this.lasttime=date.now()},update:function(){this.paused||date.now()-this.lasttime0?that.delay+"ms":"",element.style[window._jcsspfx+"transitiontimingfunction"]=that.ease,that.to_cb&&that.to_cb.call(that.to_cb_target),that.end_to=settimeout(function(){that.ontranscomplete()},that.duration+(that.delay||0)))},1),this}}(),function(){"use strict";function transpos(element,properties){if(void 0!==properties.x||void 0!==properties.y)if(_cssanim){var trans=window._jcsspfx+"transform";void 0!==properties.x&&(properties[trans]=(properties[trans]||"")+" translatex("+properties.x+"px)",delete properties.x),void 0!==properties.y&&(properties[trans]=(properties[trans]||"")+" translatey("+properties.y+"px)",delete properties.y)}else{if(void 0!==properties.x){var posx="auto"!==element.css("right")?"right":"left";properties[posx]=properties.x+"px",delete properties.x}if(void 0!==properties.y){var posy="auto"!==element.css("bottom")?"bottom":"top";properties[posy]=properties.y+"px",delete properties.y}}return properties}var _cssanim=null;window.ctween={},ctween.setpos=function(element,pos){element.css(transpos(element,pos))},ctween.animate=function(element,duration,properties,options){if(null==_cssanim&&(_cssanim=window._cssanim),options=options||{},transpos(element,properties),_cssanim){var tween=new csstween(element,duration,options.delay,easedic[options.ease]);return options.transproperty&&(tween.transproperty=options.transproperty),tween.to(function(){element.css(properties)}),options.complete&&tween.oncomplete(options.complete,options.target),tween.start(),tween.stop=tween.reset,tween}var oncl;return options.delay&&element.delay(options.delay),options.complete&&(oncl=function(){options.complete.call(options.target)}),element.stop(!0).animate(properties,duration,options.ease||"linear",oncl),element},ctween.fadeout=function(target,duration,remove){var options={};remove===!0?options.complete=function(){target.remove()}:2===remove&&(options.complete=function(){target.css("display","none")}),ctween.animate(target,duration||1e3,{opacity:0},options)},ctween.fadein=function(target,duration,reset){reset!==!1&&target.css("opacity",0).css("display",""),ctween.animate(target,duration||1e3,{opacity:1})}}(),function(){window.easedic={linear:"linear",ease:"ease",easein:"ease-in",easeout:"ease-out",easeinout:"ease-in-out",easeincubic:"cubic-bezier(.55,.055,.675,.19)",easeoutcubic:"cubic-bezier(.215,.61,.355,1)",easeinoutcubic:"cubic-bezier(.645,.045,.355,1)",easeincirc:"cubic-bezier(.6,.04,.98,.335)",easeoutcirc:"cubic-bezier(.075,.82,.165,1)",easeinoutcirc:"cubic-bezier(.785,.135,.15,.86)",easeinexpo:"cubic-bezier(.95,.05,.795,.035)",easeoutexpo:"cubic-bezier(.19,1,.22,1)",easeinoutexpo:"cubic-bezier(1,0,0,1)",easeinquad:"cubic-bezier(.55,.085,.68,.53)",easeoutquad:"cubic-bezier(.25,.46,.45,.94)",easeinoutquad:"cubic-bezier(.455,.03,.515,.955)",easeinquart:"cubic-bezier(.895,.03,.685,.22)",easeoutquart:"cubic-bezier(.165,.84,.44,1)",easeinoutquart:"cubic-bezier(.77,0,.175,1)",easeinquint:"cubic-bezier(.755,.05,.855,.06)",easeoutquint:"cubic-bezier(.23,1,.32,1)",easeinoutquint:"cubic-bezier(.86,0,.07,1)",easeinsine:"cubic-bezier(.47,0,.745,.715)",easeoutsine:"cubic-bezier(.39,.575,.565,1)",easeinoutsine:"cubic-bezier(.445,.05,.55,.95)",easeinback:"cubic-bezier(.6,-.28,.735,.045)",easeoutback:"cubic-bezier(.175, .885,.32,1.275)",easeinoutback:"cubic-bezier(.68,-.55,.265,1.55)"}}(),function(){"use strict";window.msaligner=function(type,$container,$img){this.$container=$container,this.$img=$img,this.type=type||"stretch",this.widthonly=!1,this.heightonly=!1};var p=msaligner.prototype;p.init=function(w,h){switch(this.basewidth=w,this.baseheight=h,this.imgratio=w/h,this.imgratio2=h/w,this.type){case"tile":this.$container.css("background-image","url("+this.$img.attr("src")+")"),this.$img.remove();break;case"center":this.$container.css("background-image","url("+this.$img.attr("src")+")"),this.$container.css({backgroundposition:"center center",backgroundrepeat:"no-repeat"}),this.$img.remove();break;case"stretch":this.$img.css({width:"100%",height:"100%"});break;case"fill":case"fit":this.needalign=!0,this.align()}},p.align=function(){if(this.needalign){var cont_w=this.$container.width(),cont_h=this.$container.height(),contratio=cont_w/cont_h;"fill"==this.type?this.imgratioself.options.minvaliddist&&self.animating))return self.animating&&(self.value=value,self._callrenderer()),self.animating=!1,active_id!==self.__animid&&(self.__animid=-1),void self._calloncomplete("anim");window.requestanimationframe(tick),self.value=targetposition-amplitude*math.exp(-++timestep*timeconst),self._callrenderer()}};return void tick()}this.value=value,this._callrenderer()},p.drag=function(move){this.start_drag&&(this.drag_start_loc=this.value,this.start_drag=!1),this.animating=!1,this._deceleration=!1,this.value-=move,!this.options.endless&&(this.value>this._max_value||this.value<0)?this.options.bouncing?(this.__isout=!0,this.value+=.6*move):this.value=this.value>this._max_value?this._max_value:0:!this.options.endless&&this.options.bouncing&&(this.__isout=!1),this._callrenderer()},p.push=function(speed){if(this.stopped=!1,this.options.snapping&&math.abs(speed)<=this.options.snappingminspeed)return void this.cancel();if(this.__speed=speed,this.__startspeed=speed,this.end_loc=this._calculateend(),this.options.snapping){var snap_loc=this.getsnapnum(this.value),end_snap=this.getsnapnum(this.end_loc);if(this.options.paging)return snap_loc=this.getsnapnum(this.drag_start_loc),this.__isout=!1,void(speed>0?this.gotosnap(snap_loc+1,!0,speed):this.gotosnap(snap_loc-1,!0,speed));if(snap_loc===end_snap)return void this.cancel();this._callsnapchange(end_snap),this.current_snap=end_snap}this.animating=!1,this.__needssnap=this.options.endless||this.end_loc>this._min_value&&this.end_locthis._max_value?(this.__speed=8,this.__needssnap=!1,this._startdecelaration()):this.gotosnap(curr_snap+1,!0)},p.prevsnap=function(){this._internalstop();var curr_snap=this.getsnapnum(this.value);!this.options.endless&&(curr_snap-1)*this.options.snapsizethis.options.minvaliddist;)temp_value+=temp_speed,temp_speed*=this.options.friction,i++;return step?i:temp_value},p._checklimits=function(value){return this.options.endless?value:valuethis._max_value?this._max_value:value},p._callrenderer=function(){this.__renderhook&&this.__renderhook.fun.call(this.__renderhook.ref,this,this.value)},p._callsnapchange=function(targetsnap){this.__snaphook&&targetsnap!==this.current_snap&&this.__snaphook.fun.call(this.__snaphook.ref,this,targetsnap,targetsnap-this.current_snap)},p._calloncomplete=function(type){this.__comphook&&!this.stopped&&this.__comphook.fun.call(this.__comphook.ref,this,this.current_snap,type)},p._computedeceleration=function(){if(this.options.snapping&&this.__needssnap){var xtr_move=(this.__startspeed-this.__speed)/this.__startspeed*this.__extramove;this.value+=this.__speed+xtr_move-this.__extrstep,this.__extrstep=xtr_move}else this.value+=this.__speed;if(this.__speed*=this.options.friction,this.options.endless||this.options.bouncing||(this.value<=this._min_value?(this.value=this._min_value,this.__speed=0):this.value>=this._max_value&&(this.value=this._max_value,this.__speed=0)),this._callrenderer(),!this.options.endless&&this.options.bouncing){var out_value=0;this.valuethis._max_value&&(out_value=this._max_value-this.value),this.__isout=math.abs(out_value)>=this.options.minvaliddist,this.__isout&&(this.__speed*out_value<=0?this.__speed+=out_value*this.options.outfriction:this.__speed=out_value*this.options.outacceleration)}},p._startdecelaration=function(){if(!this._deceleration){this._deceleration=!0;var self=this,tick=function(){self._deceleration&&(self._computedeceleration(),math.abs(self.__speed)>self.options.minvaliddist||self.__isout?window.requestanimationframe(tick):(self._deceleration=!1,self.__isout=!1,self.value=self.__needssnap&&self.options.snapping&&!self.options.paging?self._checklimits(self.end_loc+self.__extramove):math.round(self.value),self._callrenderer(),self._calloncomplete("decel")))};tick()}},window.controller=controller}(),window.mssliderevent=function(type){this.type=type},mssliderevent.change_start="ms_changestart",mssliderevent.change_end="ms_changeend",mssliderevent.waiting="ms_waiting",mssliderevent.autoplay_change="ms_autoplaychange",mssliderevent.video_play="ms_videoplay",mssliderevent.video_close="ms_videoclose",mssliderevent.init="ms_init",mssliderevent.hard_update="ms_hard_update",mssliderevent.resize="ms_resize",mssliderevent.reserved_space_change="ms_rsc",mssliderevent.destroy="ms_destroy",function(window,document,$){"use strict";window.msslide=function(){this.$element=null,this.$loading=$("
").addclass("ms-slide-loading"),this.view=null,this.index=-1,this.__width=0,this.__height=0,this.fillmode="fill",this.selected=!1,this.pselected=!1,this.autoappend=!0,this.issleeping=!0,this.moz=$.browser.mozilla};var p=msslide.prototype;p.onswipestart=function(){this.link&&(this.linkdis=!0),this.video&&(this.videodis=!0)},p.onswipemove=function(e){var move=math.max(math.abs(e.data.distancex),math.abs(e.data.distancey));this.swipemoved=move>4},p.onswipecancel=function(){return this.swipemoved?void(this.swipemoved=!1):(this.link&&(this.linkdis=!1),void(this.video&&(this.videodis=!1)))},p.assetsloaded=function(){this.ready=!0,this.slider.api._starttimer(),this.issleeping||this.setupbg(),ctween.fadeout(this.$loading,300,!0),(0===this.slider.options.preload||"all"===this.slider.options.preload)&&this.index").addclass("ms-slide-bgcont"),this.$element.append(this.$loading).append(this.$imgcont),this.$bg_img=$(img).css("visibility","hidden"),this.$imgcont.append(this.$bg_img),this.bgaligner=new msaligner(that.fillmode,that.$imgcont,that.$bg_img),this.bgaligner.widthonly=this.slider.options.autoheight,that.slider.options.autoheight&&(that.pselected||that.selected)&&that.slider.setheight(that.slider.options.height),void 0!==this.$bg_img.data("src")?(this.bg_src=this.$bg_img.data("src"),this.$bg_img.removeattr("data-src")):this.$bg_img.one("load",function(event){that._onbgload(event)}).each($.jqloadfix)},p.setupbg=function(){!this.initbg&&this.bgloaded&&(this.initbg=!0,this.$bg_img.css("visibility",""),this.bgwidth=this.bgnatrualwidth||this.$bg_img.width(),this.bgheight=this.bgnatrualheight||this.$bg_img.height(),ctween.fadein(this.$imgcont,300),this.slider.options.autoheight&&this.$imgcont.height(this.bgheight*this.ratio),this.bgaligner.init(this.bgwidth,this.bgheight),this.setsize(this.__width,this.__height),this.slider.options.autoheight&&(this.pselected||this.selected)&&this.slider.setheight(this.getheight()))},p.loadimages=function(){if(!this.ls){if(this.ls=!0,this.hasbg&&this.bg_src){var that=this;this.$bg_img.preloadimg(this.bg_src,function(event){that._onbgload(event)})}this.hasbg||this.haslayers||this.assetsloaded()}},p._onbgload=function(event){this.bgnatrualwidth=event.width,this.bgnatrualheight=event.height,this.bgloaded=!0,$.browser.msie&&this.$bg_img.on("dragstart",function(event){event.preventdefault()}),(!this.haslayers||this.layercontroller.ready)&&this.assetsloaded()},p.setsize=function(width,height){this.__width=width,this.slider.options.autoheight&&(this.bgloaded?(this.ratio=this.__width/this.bgwidth,height=math.floor(this.ratio*this.bgheight),this.$imgcont.height(height)):(this.ratio=width/this.slider.options.width,height=this.slider.options.height*this.ratio)),this.__height=height,this.$element.width(width).height(height),this.hasbg&&this.bgloaded&&this.bgaligner.align()},p.getheight=function(){return this.hasbg&&this.bgloaded?this.bgheight*this.ratio:math.max(this.$element[0].clientheight,this.slider.options.height*this.ratio)},p.__playvideo=function(){this.vplayed||this.videodis||(this.vplayed=!0,this.slider.api.paused||(this.slider.api.pause(),this.roc=!0),this.vcbtn.css("display",""),ctween.fadeout(this.vpbtn,500,!1),ctween.fadein(this.vcbtn,500),ctween.fadein(this.vframe,500),this.vframe.css("display","block").attr("src",this.video+"&autoplay=1"),this.view.$element.addclass("ms-def-cursor"),this.moz&&this.view.$element.css("perspective","none"),this.view.swipecontrol&&this.view.swipecontrol.disable(),this.slider.slidecontroller.dispatchevent(new mssliderevent(mssliderevent.video_play)))},p.__closevideo=function(){if(this.vplayed){this.vplayed=!1,this.roc&&this.slider.api.resume();var that=this;ctween.fadein(this.vpbtn,500),ctween.animate(this.vcbtn,500,{opacity:0},{complete:function(){that.vcbtn.css("display","none")}}),ctween.animate(this.vframe,500,{opacity:0},{complete:function(){that.vframe.attr("src","about:blank").css("display","none")}}),this.moz&&this.view.$element.css("perspective",""),this.view.swipecontrol&&this.view.swipecontrol.enable(),this.view.$element.removeclass("ms-def-cursor"),this.slider.slidecontroller.dispatchevent(new mssliderevent(mssliderevent.video_close))}},p.create=function(){var that=this;this.link&&this.link.addclass("ms-slide-link").html("").click(function(e){that.linkdis&&e.preventdefault()}),this.video&&(-1===this.video.indexof("?")&&(this.video+="?"),this.vframe=$("").addclass("ms-slide-video").css({width:"100%",height:"100%",display:"none"}).attr("src","about:blank").attr("allowfullscreen","true").appendto(this.$element),this.vpbtn=$("
").addclass("ms-slide-vpbtn").click(function(){that.__playvideo()}).appendto(this.$element),this.vcbtn=$("
").addclass("ms-slide-vcbtn").click(function(){that.__closevideo()}).appendto(this.$element).css("display","none"),window._touch&&this.vcbtn.removeclass("ms-slide-vcbtn").addclass("ms-slide-vcbtn-mobile").append('
close video
').appendto(this.view.$element.parent())),!this.slider.options.autoheight&&this.hasbg&&(this.$imgcont.css("height","100%"),("center"===this.fillmode||"stretch"===this.fillmode)&&(this.fillmode="fill")),this.slider.options.autoheight&&this.$element.addclass("ms-slide-auto-height"),this.sleep(!0)},p.destroy=function(){this.$element.remove(),this.$element=null},p.preparetoselect=function(){this.pselected||this.selected||(this.pselected=!0,(this.link||this.video)&&(this.view.addeventlistener(msviewevents.swipe_start,this.onswipestart,this),this.view.addeventlistener(msviewevents.swipe_move,this.onswipemove,this),this.view.addeventlistener(msviewevents.swipe_cancel,this.onswipecancel,this),this.linkdis=!1,this.swipemoved=!1),this.loadimages(),this.moz&&this.$element.css("margin-top",""))},p.select=function(){this.selected||(this.selected=!0,this.pselected=!1,this.$element.addclass("ms-sl-selected"),this.videoautoplay&&(this.videodis=!1,this.vpbtn.trigger("click")))},p.unselect=function(){this.pselected=!1,this.moz&&this.$element.css("margin-top","0.1px"),(this.link||this.video)&&(this.view.removeeventlistener(msviewevents.swipe_start,this.onswipestart,this),this.view.removeeventlistener(msviewevents.swipe_move,this.onswipemove,this),this.view.removeeventlistener(msviewevents.swipe_cancel,this.onswipecancel,this)),this.selected&&(this.selected=!1,this.$element.removeclass("ms-sl-selected"),this.video&&this.vplayed&&(this.__closevideo(),this.roc=!1)) },p.sleep=function(force){(!this.issleeping||force)&&(this.issleeping=!0,this.autoappend&&this.$element.detach(),this.haslayers&&this.layercontroller.onslidesleep())},p.wakeup=function(){this.issleeping&&(this.issleeping=!1,this.autoappend&&this.view.$slidecont.append(this.$element),this.moz&&this.$element.css("margin-top","0.1px"),this.setupbg(),this.hasbg&&this.bgaligner.align(),this.haslayers&&this.layercontroller.onslidewakeup())}}(window,document,jquery),function($){"use strict";var sliderviewlist={};window.msslidecontroller=function(slider){this._delayprogress=0,this._timer=new averta.timer(100),this._timer.ontimer=this.ontimer,this._timer.refrence=this,this.currentslide=null,this.slider=slider,this.so=slider.options,averta.eventdispatcher.call(this)},msslidecontroller.registerview=function(name,_class){if(name in sliderviewlist)throw new error(name+", is already registered.");sliderviewlist[name]=_class},msslidecontroller.slidercontrollist={},msslidecontroller.registercontrol=function(name,_class){if(name in msslidecontroller.slidercontrollist)throw new error(name+", is already registered.");msslidecontroller.slidercontrollist[name]=_class};var p=msslidecontroller.prototype;p.setupview=function(){var that=this;this.resize_listener=function(){that.__resize()};var viewoptions={spacing:this.so.space,mouseswipe:this.so.mouse,loop:this.so.loop,autoheight:this.so.autoheight,swipe:this.so.swipe,speed:this.so.speed,dir:this.so.dir,viewnum:this.so.inview,critmargin:this.so.critmargin};this.so.viewoptions&&$.extend(viewoptions,this.so.viewoptions),this.so.autoheight&&(this.so.heightlimit=!1);var viewclass=sliderviewlist[this.slider.options.view]||msbasicview;if(!viewclass._3dreq||window._css3d&&!$.browser.msie||(viewclass=viewclass._fallback||msbasicview),this.view=new viewclass(viewoptions),this.so.overpause){var that=this;this.slider.$element.mouseenter(function(){that.is_over=!0,that._stoptimer()}).mouseleave(function(){that.is_over=!1,that._starttimer()})}},p.onchangestart=function(){this.change_started=!0,this.currentslide&&this.currentslide.unselect(),this.currentslide=this.view.currentslide,this.currentslide.preparetoselect(),this.so.endpause&&this.currentslide.index===this.slider.slides.length-1&&(this.pause(),this.skiptimer()),this.so.autoheight&&this.slider.setheight(this.currentslide.getheight()),this.so.deeplink&&this.__updatewindowhash(),this.dispatchevent(new mssliderevent(mssliderevent.change_start))},p.onchangeend=function(){if(this.change_started=!1,this._starttimer(),this.currentslide.select(),this.so.preload>1){var loc,i,slide,l=this.so.preload-1;for(i=1;l>=i;++i){if(loc=this.view.index+i,loc>=this.view.slidelist.length){if(!this.so.loop){i=l;continue}loc-=this.view.slidelist.length}slide=this.view.slidelist[loc],slide&&slide.loadimages()}for(l>this.view.slidelist.length/2&&(l=math.floor(this.view.slidelist.length/2)),i=1;l>=i;++i){if(loc=this.view.index-i,0>loc){if(!this.so.loop){i=l;continue}loc=this.view.slidelist.length+loc}slide=this.view.slidelist[loc],slide&&slide.loadimages()}}this.dispatchevent(new mssliderevent(mssliderevent.change_end))},p.onswipestart=function(){this.skiptimer()},p.skiptimer=function(){this._timer.reset(),this._delayprogress=0,this.dispatchevent(new mssliderevent(mssliderevent.waiting))},p.ontimer=function(){if(this._timer.gettime()>=1e3*this.view.currentslide.delay&&(this.skiptimer(),this.view.next(),this.hidecalled=!1),this._delayprogress=this._timer.gettime()/(10*this.view.currentslide.delay),this.so.hidelayers&&!this.hidecalled&&1e3*this.view.currentslide.delay-this._timer.gettime()<=300){var currentslide=this.view.currentslide;currentslide.haslayers&¤tslide.layercontroller.animhidelayers(),this.hidecalled=!0}this.dispatchevent(new mssliderevent(mssliderevent.waiting))},p._stoptimer=function(){this._timer&&this._timer.stop()},p._starttimer=function(){this.paused||this.is_over||!this.currentslide||!this.currentslide.ready||this.change_started||this._timer.start()},p.__appendslides=function(){var slide,loc,i=0,l=this.view.slidelist.length-1;for(i;l>i;++i)slide=this.view.slidelist[i],slide.detached||(slide.$element.detach(),slide.detached=!0);for(this.view.appendslide(this.view.slidelist[this.view.index]),l=3,i=1;l>=i;++i){if(loc=this.view.index+i,loc>=this.view.slidelist.length){if(!this.so.loop){i=l;continue}loc-=this.view.slidelist.length}slide=this.view.slidelist[loc],slide.detached=!1,this.view.appendslide(slide)}for(l>this.view.slidelist.length/2&&(l=math.floor(this.view.slidelist.length/2)),i=1;l>=i;++i){if(loc=this.view.index-i,0>loc){if(!this.so.loop){i=l;continue}loc=this.view.slidelist.length+loc}slide=this.view.slidelist[loc],slide.detached=!1,this.view.appendslide(slide)}},p.__resize=function(hard){this.created&&(this.width=this.slider.$element[0].clientwidth||this.so.width,this.so.fullwidth||(this.width=math.min(this.width,this.so.width)),this.height=this.width/this.slider.aspect,this.so.autoheight?(this.currentslide.setsize(this.width,null,hard),this.view.setsize(this.width,this.currentslide.getheight(),hard)):this.view.setsize(this.width,math.max(this.so.minheight,this.so.heightlimit?math.min(this.height,this.so.height):this.height),hard),this.slider.$controlscont&&this.so.centercontrols&&this.so.fullwidth&&this.view.$element.css("left",math.min(0,-(this.slider.$element[0].clientwidth-this.so.width)/2)+"px"),this.dispatchevent(new mssliderevent(mssliderevent.resize)))},p.__dispatchinit=function(){this.dispatchevent(new mssliderevent(mssliderevent.init))},p.setup=function(){this.created=!0,this.paused=!this.so.autoplay,this.view.addeventlistener(msviewevents.change_start,this.onchangestart,this),this.view.addeventlistener(msviewevents.change_end,this.onchangeend,this),this.view.addeventlistener(msviewevents.swipe_start,this.onswipestart,this),this.currentslide=this.view.slidelist[this.so.start-1],this.__resize();var startslide=this.so.start-1;if(this.view.create(startslide),0===this.so.preload&&this.view.slidelist[0].loadimages(),this.scroller=this.view.controller,this.so.wheel){var that=this,last_time=(new date).gettime();this.wheellistener=function(event){var e=window.event||event.orginalevent||event;e.preventdefault();var current_time=(new date).gettime();if(!(400>current_time-last_time)){last_time=current_time;var delta=math.abs(e.detail||e.wheeldelta);$.browser.mozilla&&(delta*=100);var scrollthreshold=15;return e.detail<0||e.wheeldelta>0?delta>=scrollthreshold&&that.previous(!0):delta>=scrollthreshold&&that.next(!0),!1}},$.browser.mozilla?this.slider.$element[0].addeventlistener("dommousescroll",this.wheellistener):this.slider.$element.bind("mousewheel",this.wheellistener)}0===this.slider.$element[0].clientwidth&&(this.slider.init_safemode=!0),this.__resize()},p.index=function(){return this.view.index},p.count=function(){return this.view.slidescount},p.next=function(checkloop){this.skiptimer(),this.view.next(checkloop)},p.previous=function(checkloop){this.skiptimer(),this.view.previous(checkloop)},p.gotoslide=function(index){index=math.min(index,this.count()-1),this.skiptimer(),this.view.gotoslide(index)},p.destroy=function(reset){this.dispatchevent(new mssliderevent(mssliderevent.destroy)),this.slider.destroy(reset)},p._destroy=function(){this._timer.reset(),this._timer=null,$(window).unbind("resize",this.resize_listener),this.view.destroy(),this.view=null,this.so.wheel&&($.browser.mozilla?this.slider.$element[0].removeeventlistener("dommousescroll",this.wheellistener):this.slider.$element.unbind("mousewheel",this.wheellistener),this.wheellistener=null),this.so=null},p.runaction=function(action){var actionparams=[];if(-1!==action.indexof("(")){var temp=action.slice(0,action.indexof("("));actionparams=action.slice(action.indexof("(")+1,-1).replace(/\"|\'|\s/g,"").split(","),action=temp}action in this?this[action].apply(this,actionparams):console},p.update=function(hard){this.slider.init_safemode&&hard&&(this.slider.init_safemode=!1),this.__resize(hard),hard&&this.dispatchevent(new mssliderevent(mssliderevent.hard_update))},p.locate=function(){this.__resize()},p.resume=function(){this.paused&&(this.paused=!1,this._starttimer())},p.pause=function(){this.paused||(this.paused=!0,this._stoptimer())},p.currenttime=function(){return this._delayprogress},averta.eventdispatcher.extend(p)}(jquery),function($){"use strict";window.masterslider=function(){this.options={forceinit:!0,autoplay:!1,loop:!1,mouse:!0,swipe:!0,grabcursor:!0,space:0,fillmode:"fill",start:1,view:"basic",width:300,height:150,inview:15,critmargin:1,mobilebgvideo:!1,heightlimit:!0,smoothheight:!0,autoheight:!1,minheight:-1,fullwidth:!1,fullheight:!1,autofill:!1,layersmode:"center",hidelayers:!1,endpause:!1,centercontrols:!0,overpause:!0,shuffle:!1,speed:17,dir:"h",preload:0,wheel:!1,layout:"boxed",autofilltarget:null,fullscreenmargin:0,instantstartlayers:!1,parallaxmode:"mouse",rtl:!1,deeplink:null,deeplinktype:"path",disableplugins:[]},this.slides=[],this.activeplugins=[],this.$element=null,this.lastmargin=0,this.leftspace=0,this.topspace=0,this.rightspace=0,this.bottomspace=0,this._holdon=0;var that=this;this.resize_listener=function(){that._resize()},$(window).bind("resize",this.resize_listener)},masterslider.author="averta ltd. (www.averta.net)",masterslider.version="2.50.0",masterslider.releasedate="aug 2016",masterslider._plugins=[];var ms=masterslider;ms.registerplugin=function(plugin){-1===ms._plugins.indexof(plugin)&&ms._plugins.push(plugin)};var p=masterslider.prototype;p.__setupslides=function(){var new_slide,that=this,ind=0;this.$element.children(".ms-slide").each(function(){var $slide_ele=$(this);new_slide=new msslide,new_slide.$element=$slide_ele,new_slide.slider=that,new_slide.delay=void 0!==$slide_ele.data("delay")?$slide_ele.data("delay"):3,new_slide.fillmode=void 0!==$slide_ele.data("fill-mode")?$slide_ele.data("fill-mode"):that.options.fillmode,new_slide.index=ind++,new_slide.id=$slide_ele.data("id");var slide_img=$slide_ele.children("img:not(.ms-layer)");if(slide_img.length>0&&new_slide.setbg(slide_img[0]),that.controls)for(var i=0,l=that.controls.length;l>i;++i)that.controls[i].slideaction(new_slide);$slide_ele.children("a").each(function(){var $this=$(this);"video"===this.getattribute("data-type")?(new_slide.video=this.getattribute("href"),new_slide.videoautoplay=$this.data("autoplay"),$this.remove()):$this.hasclass("ms-layer")||(new_slide.link=$(this))});that.slides.push(new_slide),that.slidecontroller.view.addslide(new_slide)})},p._setupoverlaylayers=function(){var self=this,$ollayers=this.$element.children(".ms-overlay-layers").eq(0);if($ollayers.length){var overlaylayers=new msoverlaylayers(this);overlaylayers.$element=$ollayers,self.__createslidelayers(overlaylayers,$ollayers.find(".ms-layer")),this.view.$element.prepend($ollayers),this.overlaylayers=overlaylayers,overlaylayers.create()}},p._removeloading=function(){$(window).unbind("resize",this.resize_listener),this.$element.removeclass("before-init").css("visibility","visible").css("height","").css("opacity",0),ctween.fadein(this.$element),this.$loading.remove(),this.slidecontroller&&this.slidecontroller.__resize()},p._resize=function(){if(this.$loading){var h=this.$loading[0].clientwidth/this.aspect;h=this.options.heightlimit?math.min(h,this.options.height):h,this.$loading.height(h),this.$element.height(h)}},p._shuffleslides=function(){for(var r,slides=this.$element.children(".ms-slide"),i=0,l=slides.length;l>i;++i)r=math.floor(math.random()*(l-1)),i!=r&&(this.$element[0].insertbefore(slides[i],slides[r]),slides=this.$element.children(".ms-slide"))},p._setupsliderlayout=function(){this._updatesidemargins(),this.lastmargin=this.leftspace;var lo=this.options.layout;"boxed"!==lo&&"partialview"!==lo&&(this.options.fullwidth=!0),("fullscreen"===lo||"fullwidth"===lo||"autofill"===lo)&&($(window).bind("resize",{that:this},this._updatelayout),this._updatelayout()),$(window).bind("resize",this.slidecontroller.resize_listener)},p._updatelayout=function(event){var that=event?event.data.that:this,$element=(that.options.layout,that.$element),$win=$(window);$element.width($win.width()-that.leftspace-that.rightspace);var margin=-$element.offset().left+that.leftspace+that.lastmargin;$element.css("margin-left",margin),that.lastmargin=margin},p._init=function(){if(!(this._holdon>0)&&this._docready){if(this.initialized=!0,"all"!==this.options.preload&&this._removeloading(),this.options.shuffle&&this._shuffleslides(),this.slidecontroller.setupview(),this.view=this.slidecontroller.view,this.$controlscont=$("
").addclass("ms-inner-controls-cont"),this.options.centercontrols&&this.$controlscont.css("max-width",this.options.width+"px"),this.$controlscont.prepend(this.view.$element),this.$mscontainer=$("
").addclass("ms-container").prependto(this.$element).append(this.$controlscont),this.controls)for(var i=0,l=this.controls.length;l>i;++i)this.controls[i].setup();if(this._setupsliderlayout(),this.__setupslides(),this.slidecontroller.setup(),this._setupoverlaylayers(),this.controls)for(i=0,l=this.controls.length;l>i;++i)this.controls[i].create();if(this.options.autoheight&&this.slidecontroller.view.$element.height(this.slidecontroller.currentslide.getheight()),this.options.swipe&&!window._touch&&this.options.grabcursor&&this.options.mouse){var $view=this.view.$element;$view.mousedown(function(){$view.removeclass("ms-grab-cursor"),$view.addclass("ms-grabbing-cursor"),$.browser.msie&&window.ms_grabbing_curosr&&($view[0].style.cursor="url("+window.ms_grabbing_curosr+"), move")}).addclass("ms-grab-cursor"),$(document).mouseup(function(){$view.removeclass("ms-grabbing-cursor"),$view.addclass("ms-grab-cursor"),$.browser.msie&&window.ms_grab_curosr&&($view[0].style.cursor="url("+window.ms_grab_curosr+"), move")})}this.slidecontroller.__dispatchinit()}},p.setheight=function(value){this.options.smoothheight?(this.htween&&(this.htween.reset?this.htween.reset():this.htween.stop(!0)),this.htween=ctween.animate(this.slidecontroller.view.$element,500,{height:value},{ease:"easeoutquart"})):this.slidecontroller.view.$element.height(value)},p.reservespace=function(side,space){var sidespace=side+"space",pos=this[sidespace];return this[sidespace]+=space,this._updatesidemargins(),pos},p._updatesidemargins=function(){this.$element.css("margin",this.topspace+"px "+this.rightspace+"px "+this.bottomspace+"px "+this.leftspace+"px")},p._realigncontrols=function(){this.rightspace=this.leftspace=this.topspace=this.bottomspace=0,this._updatesidemargins(),this.api.dispatchevent(new mssliderevent(mssliderevent.reserved_space_change))},p.control=function(control,options){if(control in msslidecontroller.slidercontrollist){this.controls||(this.controls=[]);var ins=new msslidecontroller.slidercontrollist[control](options);return ins.slider=this,this.controls.push(ins),this}},p.holdon=function(){this._holdon++},p.release=function(){this._holdon--,this._init()},p.setup=function(target,options){if(this.$element="string"==typeof target?$("#"+target):target.eq(0),this.setupmarkup=this.$element.html(),0!==this.$element.length){this.$element.addclass("master-slider").addclass("before-init"),$.browser.msie?this.$element.addclass("ms-ie").addclass("ms-ie"+$.browser.version.slice(0,$.browser.version.indexof("."))):$.browser.webkit?this.$element.addclass("ms-wk"):$.browser.mozilla&&this.$element.addclass("ms-moz");var ua=navigator.useragent.tolowercase(),isandroid=ua.indexof("android")>-1;isandroid&&this.$element.addclass("ms-android");var that=this;$.extend(this.options,options),this.aspect=this.options.width/this.options.height,this.$loading=$("
").addclass("ms-loading-container").insertbefore(this.$element).append($("
").addclass("ms-loading")),this.$loading.parent().css("position","relative"),this.options.autofill&&(this.options.fullwidth=!0,this.options.fullheight=!0),this.options.fullheight&&this.$element.addclass("ms-fullheight"),this._resize(),this.slidecontroller=new msslidecontroller(this),this.api=this.slidecontroller;for(var i=0,l=ms._plugins.length;i!==l;i++){var plugin=ms._plugins[i];-1===this.options.disableplugins.indexof(plugin.name)&&this.activeplugins.push(new plugin(this))}return this.options.forceinit&&masterslider.addjqreadyerrorcheck(this),$(document).ready(function(){that.initialized||(that._docready=!0,that._init())}),this}},p.destroy=function(insertmarkup){for(var i=0,l=this.activeplugins.length;i!==l;i++)this.activeplugins[i].destroy();if(this.controls)for(i=0,l=this.controls.length;i!==l;i++)this.controls[i].destroy();this.slidecontroller&&this.slidecontroller._destroy(),this.$loading&&this.$loading.remove(),insertmarkup?this.$element.html(this.setupmarkup).css("visibility","hidden"):this.$element.remove();var lo=this.options.layout;("fullscreen"===lo||"fullwidth"===lo)&&$(window).unbind("resize",this._updatelayout),this.view=null,this.slides=null,this.options=null,this.slidecontroller=null,this.api=null,this.resize_listener=null,this.activeplugins=null}}(jquery),function($,window,document,undefined){function mastersliderplugin(element,options){this.element=element,this.$element=$(element),this.settings=$.extend({},defaults,options),this._defaults=defaults,this._name=pluginname,this.init()}var pluginname="masterslider",defaults={controls:{}};$.extend(mastersliderplugin.prototype,{init:function(){var self=this;this._slider=new masterslider;for(var control in this.settings.controls)this._slider.control(control,this.settings.controls[control]);this._slider.setup(this.$element,this.settings);var _superdispatch=this._slider.api.dispatchevent;this._slider.api.dispatchevent=function(event){self.$element.trigger(event.type),_superdispatch.call(this,event)}},api:function(){return this._slider.api},slider:function(){return this._slider}}),$.fn[pluginname]=function(options){var args=arguments,plugin="plugin_"+pluginname;if(options===undefined||"object"==typeof options)return this.each(function(){$.data(this,plugin)||$.data(this,plugin,new mastersliderplugin(this,options))});if("string"==typeof options&&"_"!==options[0]&&"init"!==options){var returns;return this.each(function(){var instance=$.data(this,plugin);instance instanceof mastersliderplugin&&"function"==typeof instance[options]&&(returns=instance[options].apply(instance,array.prototype.slice.call(args,1))),instance instanceof mastersliderplugin&&"function"==typeof instance._slider.api[options]&&(returns=instance._slider.api[options].apply(instance._slider.api,array.prototype.slice.call(args,1))),"destroy"===options&&$.data(this,plugin,null)}),returns!==undefined?returns:this}}}(jquery,window,document),function($,window){"use strict";var sliderinstances=[];masterslider.addjqreadyerrorcheck=function(slider){sliderinstances.push(slider)};var _ready=$.fn.ready,_onerror=window.onerror;$.fn.ready=function(){return window.onerror=function(){if(0!==sliderinstances.length)for(var i=0,l=sliderinstances.length;i!==l;i++){var slider=sliderinstances[i];slider.initialized||(slider._docready=!0,slider._init())}return _onerror?_onerror.apply(this,arguments):!1},_ready.apply(this,arguments)}}(jquery,window,document),window.msviewevents=function(type,data){this.type=type,this.data=data},msviewevents.swipe_start="swipestart",msviewevents.swipe_end="swipeend",msviewevents.swipe_move="swipemove",msviewevents.swipe_cancel="swipecancel",msviewevents.scroll="scroll",msviewevents.change_start="slidechangestart",msviewevents.change_end="slidechangeend",function($){"use strict";window.msbasicview=function(options){this.options={loop:!1,dir:"h",autoheight:!1,spacing:5,mouseswipe:!0,swipe:!0,speed:17,minslidespeed:2,viewnum:20,critmargin:1},$.extend(this.options,options),this.dir=this.options.dir,this.loop=this.options.loop,this.spacing=this.options.spacing,this.__width=0,this.__height=0,this.__cssprob="h"===this.dir?"left":"top",this.__offset="h"===this.dir?"offsetleft":"offsettop",this.__dimension="h"===this.dir?"__width":"__height",this.__translate_end=window._css3d?" translatez(0px)":"",this.$slidecont=$("
").addclass("ms-slide-container"),this.$element=$("
").addclass("ms-view").addclass("ms-basic-view").append(this.$slidecont),this.currentslide=null,this.index=-1,this.slidescount=0,this.slides=[],this.slidelist=[],this.viewslideslist=[],this.css3=window._cssanim,this.start_buffer=0,this.firstslide_snap=0,this.slidechanged=!1,this.controller=new controller(0,0,{snapping:!0,snapsize:100,paging:!0,snappingminspeed:this.options.minslidespeed,friction:(100-.5*this.options.speed)/100,endless:this.loop}),this.controller.rendercallback("h"===this.dir?this._horizupdate:this._vertiupdate,this),this.controller.snappingcallback(this.__snapupdate,this),this.controller.snapcompletecallback(this.__snapcompelet,this),averta.eventdispatcher.call(this)};var p=msbasicview.prototype;p.__snapcompelet=function(){this.slidechanged&&(this.slidechanged=!1,this.__locateslides(),this.start_buffer=0,this.dispatchevent(new msviewevents(msviewevents.change_end)))},p.__snapupdate=function(controller,snap,change){if(this.loop){var target_index=this.index+change;this.updateloop(target_index),target_index>=this.slidescount&&(target_index-=this.slidescount),0>target_index&&(target_index=this.slidescount+target_index),this.index=target_index}else{if(0>snap||snap>=this.slidescount)return;this.index=snap}this._checkcritmargins(),$.browser.mozilla&&(this.slidelist[this.index].$element[0].style.margintop="0.1px",this.currentslide&&(this.currentslide.$element[0].style.margintop=""));var new_slide=this.slidelist[this.index];new_slide!==this.currentslide&&(this.currentslide=new_slide,this.autoupdatezindex&&this.__updateslideszindex(),this.slidechanged=!0,this.dispatchevent(new msviewevents(msviewevents.change_start)))},p._checkcritmargins=function(){if(!this.normalmode){var hlf=math.floor(this.options.viewnum/2),inview=this.viewslideslist.indexof(this.slidelist[this.index]),size=this[this.__dimension]+this.spacing,cm=this.options.critmargin;return this.loop?void((cm>=inview||inview>=this.viewslideslist.length-cm)&&(size*=inview-hlf,this.__locateslides(!1,size+this.start_buffer),this.start_buffer+=size)):void((cm>inview&&this.index>=cm||inview>=this.viewslideslist.length-cm&&this.index=i;++i)return_arr.unshift(this.slidelist[this.index-i<0?this.slidescount-i+this.index:this.index-i]);for(return_arr.push(this.slidelist[this.index]),i=1;after_count>=i;++i)return_arr.push(this.slidelist[this.index+i>=this.slidescount?this.index+i-this.slidescount:this.index+i]);return return_arr},p.__getsteps=function(index,target){var right=index>target?this.slidescount-index+target:target-index,left=math.abs(this.slidescount-right);return left>right?right:-left},p.__pushend=function(){var first_slide=this.slides.shift(),last_slide=this.slides[this.slidescount-2];if(this.slides.push(first_slide),this.normalmode){var pos=last_slide.$element[0][this.__offset]+this.spacing+this[this.__dimension];first_slide.$element[0].style[this.__cssprob]=pos+"px",first_slide.position=pos}},p.__pushstart=function(){var last_slide=this.slides.pop(),first_slide=this.slides[0];if(this.slides.unshift(last_slide),this.normalmode){var pos=first_slide.$element[0][this.__offset]-this.spacing-this[this.__dimension];last_slide.$element[0].style[this.__cssprob]=pos+"px",last_slide.position=pos}},p.__updateslideszindex=function(){{var slide,l=this.viewslideslist.length;math.floor(l/2)}if(this.loop)for(var loc=this.viewslideslist.indexof(this.currentslide),i=0;i!==l;i++)slide=this.viewslideslist[i],this.viewslideslist[i].$element.css("z-index",loc>=i?i+1:l-i);else{for(var beforenum=this.currentslide.index-this.viewslideslist[0].index,i=0;i!==l;i++)this.viewslideslist[i].$element.css("z-index",beforenum>=i?i+1:l-i);this.currentslide.$element.css("z-index",l)}},p.addslide=function(slide){slide.view=this,this.slides.push(slide),this.slidelist.push(slide),this.slidescount++},p.appendslide=function(slide){this.$slidecont.append(slide.$element)},p.updateloop=function(index){if(this.loop)for(var steps=this.__getsteps(this.index,index),i=0,l=math.abs(steps);l>i;++i)0>steps?this.__pushstart():this.__pushend()},p.gotoslide=function(index,fast){this.updateloop(index),this.index=index;var target_slide=this.slidelist[index];this._checkcritmargins(),this.controller.changeto(target_slide.position,!fast,null,null,!1),target_slide!==this.currentslide&&(this.slidechanged=!0,this.currentslide=target_slide,this.autoupdatezindex&&this.__updateslideszindex(),this.dispatchevent(new msviewevents(msviewevents.change_start)),fast&&this.dispatchevent(new msviewevents(msviewevents.change_end)))},p.next=function(checkloop){return checkloop&&!this.loop&&this.index+1>=this.slidescount?void this.controller.bounce(10):void this.gotoslide(this.index+1>=this.slidescount?0:this.index+1)},p.previous=function(checkloop){return checkloop&&!this.loop&&this.index-1<0?void this.controller.bounce(-10):void this.gotoslide(this.index-1<0?this.slidescount-1:this.index-1)},p.setupswipe=function(){this.swipecontrol=new averta.touchswipe(this.$element),this.swipecontrol.swipetype="h"===this.dir?"horizontal":"vertical";var that=this;this.swipecontrol.onswipe="h"===this.dir?function(status){that.horizswipemove(status)}:function(status){that.vertswipemove(status)}},p.vertswipemove=function(status){var phase=status.phase;if("start"===phase)this.controller.stop(),this.dispatchevent(new msviewevents(msviewevents.swipe_start,status));else if("move"===phase&&(!this.loop||math.abs(this.currentslide.position-this.controller.value+status.movey).1&&math.abs(speed)>=speedh?(this.controller.push(-speed),speed>this.controller.options.snappingminspeed&&this.dispatchevent(new msviewevents(msviewevents.swipe_end,status))):(this.controller.cancel(),this.dispatchevent(new msviewevents(msviewevents.swipe_cancel,status)))}},p.horizswipemove=function(status){var phase=status.phase;if("start"===phase)this.controller.stop(),this.dispatchevent(new msviewevents(msviewevents.swipe_start,status));else if("move"===phase&&(!this.loop||math.abs(this.currentslide.position-this.controller.value+status.movex).1&&math.abs(speed)>=speedv?(this.controller.push(-speed),speed>this.controller.options.snappingminspeed&&this.dispatchevent(new msviewevents(msviewevents.swipe_end,status))):(this.controller.cancel(),this.dispatchevent(new msviewevents(msviewevents.swipe_cancel,status)))}},p.setsize=function(width,height,hard){if(this.lastwidth!==width||height!==this.lastheight||hard){this.$element.width(width).height(height);for(var i=0;i=1-value?slide.$element.fadeto(0,0).css("visibility","hidden"):slide.$element.fadeto(0,1-value).css("visibility","")},p.__locateslides=function(move,start){this.__updateviewlist(),start=this.loop?start||0:this.slides.indexof(this.viewslideslist[0])*(this[this.__dimension]+this.spacing);for(var slide,l=this.viewslideslist.length,i=0;i!==l;i++){var pos=start+i*this[this.__dimension];slide=this.viewslideslist[i],slide.wakeup(),slide.position=pos}move!==!1&&this.controller.changeto(this.slidelist[this.index].position,!1,null,null,!1)},p.__pushend=function(){var first_slide=this.slides.shift(),last_slide=this.slides[this.slidescount-2];this.slides.push(first_slide),first_slide.position=last_slide.position+this[this.__dimension]},p.__pushstart=function(){var last_slide=this.slides.pop(),first_slide=this.slides[0];this.slides.unshift(last_slide),last_slide.position=first_slide.position-this[this.__dimension] },p.create=function(index){_super.create.call(this,index),this.spacing=0,this.controller.options.minvaliddist=10},msslidecontroller.registerview("fade",msfadeview)}(jquery),function($){"use strict";var basecontrol=function(){this.options={prefix:"ms-",autohide:!0,overvideo:!0,customclass:null}},p=basecontrol.prototype;p.slideaction=function(){},p.setup=function(){this.cont=this.options.insertto?$(this.options.insertto):this.slider.$controlscont,this.options.overvideo||this._hideonvideostarts()},p.checkhideunder=function(){this.options.hideunder&&(this.needsrealign=!this.options.insetto&&("left"===this.options.align||"right"===this.options.align)&&this.options.inset===!1,$(window).bind("resize",{that:this},this.onresize),this.onresize())},p.onresize=function(event){var that=event&&event.data.that||this,w=window.innerwidth;w<=that.options.hideunder&&!that.detached?(that.hide(!0),that.detached=!0,that.ondetach()):w>=that.options.hideunder&&that.detached&&(that.detached=!1,that.visible(),that.onappend())},p.create=function(){this.options.autohide&&(this.hide(!0),this.slider.$controlscont.mouseenter($.proxy(this._onmouseenter,this)).mouseleave($.proxy(this._onmouseleave,this)).mousedown($.proxy(this._onmousedown,this)),this.$element&&this.$element.mouseenter($.proxy(this._onmouseenter,this)).mouseleave($.proxy(this._onmouseleave,this)).mousedown($.proxy(this._onmousedown,this)),$(document).mouseup($.proxy(this._onmouseup,this))),this.options.align&&this.$element.addclass("ms-align-"+this.options.align),this.options.customclass&&this.$element&&this.$element.addclass(this.options.customclass)},p._onmouseenter=function(){this._disableah||this.mdown||this.visible(),this.mleave=!1},p._onmouseleave=function(){this.mdown||this.hide(),this.mleave=!0},p._onmousedown=function(){this.mdown=!0},p._onmouseup=function(){this.mdown&&this.mleave&&this.hide(),this.mdown=!1},p.onappend=function(){this.needsrealign&&this.slider._realigncontrols()},p.ondetach=function(){this.needsrealign&&this.slider._realigncontrols()},p._hideonvideostarts=function(){var that=this;this.slider.api.addeventlistener(mssliderevent.video_play,function(){that._disableah=!0,that.hide()}),this.slider.api.addeventlistener(mssliderevent.video_close,function(){that._disableah=!1,that.visible()})},p.hide=function(fast){if(fast)this.$element.css("opacity",0),this.$element.css("display","none");else{cleartimeout(this.hideto);var $element=this.$element;this.hideto=settimeout(function(){ctween.fadeout($element,400,!1)},20)}this.$element.addclass("ms-ctrl-hide")},p.visible=function(){this.detached||(cleartimeout(this.hideto),this.$element.css("display",""),ctween.fadein(this.$element,400,!1),this.$element.removeclass("ms-ctrl-hide"))},p.destroy=function(){this.options&&this.options.hideunder&&$(window).unbind("resize",this.onresize)},window.basecontrol=basecontrol}(jquery),function($){"use strict";var msarrows=function(options){basecontrol.call(this),$.extend(this.options,options)};msarrows.extend(basecontrol);var p=msarrows.prototype,_super=basecontrol.prototype;p.setup=function(){var that=this;this.$next=$("
").addclass(this.options.prefix+"nav-next").bind("click",function(){that.slider.api.next(!0)}),this.$prev=$("
").addclass(this.options.prefix+"nav-prev").bind("click",function(){that.slider.api.previous(!0)}),_super.setup.call(this),this.cont.append(this.$next),this.cont.append(this.$prev),this.checkhideunder()},p.hide=function(fast){return fast?(this.$prev.css("opacity",0).css("display","none"),void this.$next.css("opacity",0).css("display","none")):(ctween.fadeout(this.$prev,400,!1),ctween.fadeout(this.$next,400,!1),this.$prev.addclass("ms-ctrl-hide"),void this.$next.addclass("ms-ctrl-hide"))},p.visible=function(){this.detached||(ctween.fadein(this.$prev,400),ctween.fadein(this.$next,400),this.$prev.removeclass("ms-ctrl-hide").css("display",""),this.$next.removeclass("ms-ctrl-hide").css("display",""))},p.destroy=function(){_super.destroy(),this.$next.remove(),this.$prev.remove()},window.msarrows=msarrows,msslidecontroller.registercontrol("arrows",msarrows)}(jquery),function($){"use strict";var msthumblist=function(options){basecontrol.call(this),this.options.dir="h",this.options.wheel="v"===options.dir,this.options.arrows=!1,this.options.speed=17,this.options.align=null,this.options.inset=!1,this.options.margin=10,this.options.space=10,this.options.width=100,this.options.height=100,this.options.type="thumbs",this.options.hover=!1,$.extend(this.options,options),this.thumbs=[],this.index_count=0,this.__dimen="h"===this.options.dir?"width":"height",this.__alignsize="h"===this.options.dir?"height":"width",this.__jdimen="h"===this.options.dir?"outerwidth":"outerheight",this.__pos="h"===this.options.dir?"left":"top",this.click_enable=!0};msthumblist.extend(basecontrol);var p=msthumblist.prototype,_super=basecontrol.prototype;p.setup=function(){if(this.$element=$("
").addclass(this.options.prefix+"thumb-list"),"tabs"===this.options.type&&this.$element.addclass(this.options.prefix+"tabs"),this.$element.addclass("ms-dir-"+this.options.dir),_super.setup.call(this),this.$element.appendto(this.slider.$controlscont===this.cont?this.slider.$element:this.cont),this.$thumbscont=$("
").addclass("ms-thumbs-cont").appendto(this.$element),this.options.arrows){var that=this;this.$fwd=$("
").addclass("ms-thumblist-fwd").appendto(this.$element).click(function(){that.controller.push(-15)}),this.$bwd=$("
").addclass("ms-thumblist-bwd").appendto(this.$element).click(function(){that.controller.push(15)})}if(!this.options.insetto&&this.options.align){var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.detach().prependto(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addeventlistener(mssliderevent.reserved_space_change,this.align,this),this.align()),"v"===this.options.dir?this.$element.width(this.options.width):this.$element.height(this.options.height)}this.checkhideunder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reservespace(align,this.options[this.__alignsize]+2*this.options.margin);this.$element.css(align,-pos-this.options[this.__alignsize]-this.options.margin)}},p.slideaction=function(slide){var thumb_ele=slide.$element.find(".ms-thumb"),that=this,thumb_frame=$("
").addclass("ms-thumb-frame").append(thumb_ele).append($('
')).bind(this.options.hover?"hover":"click",function(){that.changeslide(thumb_frame)});if(this.options.align&&thumb_frame.width(this.options.width-("v"===this.options.dir&&"tabs"===this.options.type?12:0)).height(this.options.height).css("margin-"+("v"===this.options.dir?"bottom":"right"),this.options.space),thumb_frame[0].index=this.index_count++,this.$thumbscont.append(thumb_frame),this.options.fillmode&&thumb_ele.is("img")){var aligner=new window.msaligner(this.options.fillmode,thumb_frame,thumb_ele);thumb_ele[0].aligner=aligner,thumb_ele.one("load",function(){var $this=$(this);$this[0].aligner.init($this.width(),$this.height()),$this[0].aligner.align()}).each($.jqloadfix)}$.browser.msie&&thumb_ele.on("dragstart",function(event){event.preventdefault()}),this.thumbs.push(thumb_frame)},p.create=function(){_super.create.call(this),this.__translate_end=window._css3d?" translatez(0px)":"",this.controller=new controller(0,0,{snappingminspeed:2,friction:(100-.5*this.options.speed)/100}),this.controller.rendercallback("h"===this.options.dir?this._hmove:this._vmove,this);var that=this;this.resize_listener=function(){that.__resize()},$(window).bind("resize",this.resize_listener),this.thumbsize=this.thumbs[0][this.__jdimen](!0),this.setupswipe(),this.__resize();var that=this;this.options.wheel&&(this.wheellistener=function(event){var e=window.event||event.orginalevent||event,delta=math.max(-1,math.min(1,e.wheeldelta||-e.detail));return that.controller.push(10*-delta),!1},$.browser.mozilla?this.$element[0].addeventlistener("dommousescroll",this.wheellistener):this.$element.bind("mousewheel",this.wheellistener)),this.slider.api.addeventlistener(mssliderevent.change_start,this.update,this),this.slider.api.addeventlistener(mssliderevent.hard_update,this.realignthumbs,this),this.cindex=this.slider.api.index(),this.select(this.thumbs[this.cindex])},p._hmove=function(controller,value){return this.__contpos=value,window._cssanim?void(this.$thumbscont[0].style[window._jcsspfx+"transform"]="translatex("+-value+"px)"+this.__translate_end):void(this.$thumbscont[0].style.left=-value+"px")},p._vmove=function(controller,value){return this.__contpos=value,window._cssanim?void(this.$thumbscont[0].style[window._jcsspfx+"transform"]="translatey("+-value+"px)"+this.__translate_end):void(this.$thumbscont[0].style.top=-value+"px")},p.setupswipe=function(){this.swipecontrol=new averta.touchswipe(this.$element),this.swipecontrol.swipetype="h"===this.options.dir?"horizontal":"vertical";var that=this;this.swipecontrol.onswipe="h"===this.options.dir?function(status){that.horizswipemove(status)}:function(status){that.vertswipemove(status)}},p.vertswipemove=function(status){if(!this.dtouch){var phase=status.phase;if("start"===phase)this.controller.stop();else if("move"===phase)this.controller.drag(status.movey);else if("end"===phase||"cancel"===phase){var speed=math.abs(status.distancey/status.duration*50/3);speed>.1?this.controller.push(-status.distancey/status.duration*50/3):(this.click_enable=!0,this.controller.cancel())}}},p.horizswipemove=function(status){if(!this.dtouch){var phase=status.phase;if("start"===phase)this.controller.stop(),this.click_enable=!1;else if("move"===phase)this.controller.drag(status.movex);else if("end"===phase||"cancel"===phase){var speed=math.abs(status.distancex/status.duration*50/3);speed>.1?this.controller.push(-status.distancex/status.duration*50/3):(this.click_enable=!0,this.controller.cancel())}}},p.update=function(){var nindex=this.slider.api.index();this.cindex!==nindex&&(null!=this.cindex&&this.unselect(this.thumbs[this.cindex]),this.cindex=nindex,this.select(this.thumbs[this.cindex]),this.dtouch||this.updatethumbscroll())},p.realignthumbs=function(){this.$element.find(".ms-thumb").each(function(index,thumb){thumb.aligner&&thumb.aligner.align()})},p.updatethumbscroll=function(){var pos=this.thumbsize*this.cindex;if(0/0==this.controller.value&&(this.controller.value=0),pos-this.controller.value<0)return void this.controller.gotosnap(this.cindex,!0);if(pos+this.thumbsize-this.controller.value>this.$element[this.__dimen]()){var first_snap=this.cindex-math.floor(this.$element[this.__dimen]()/this.thumbsize)+1;return void this.controller.gotosnap(first_snap,!0)}},p.changeslide=function(thumb){this.click_enable&&this.cindex!==thumb[0].index&&this.slider.api.gotoslide(thumb[0].index)},p.unselect=function(ele){ele.removeclass("ms-thumb-frame-selected")},p.select=function(ele){ele.addclass("ms-thumb-frame-selected")},p.__resize=function(){var size=this.$element[this.__dimen]();if(this.ls!==size){this.ls=size,this.thumbsize=this.thumbs[0][this.__jdimen](!0);var len=this.slider.api.count()*this.thumbsize;this.$thumbscont[0].style[this.__dimen]=len+"px",size>=len?(this.dtouch=!0,this.controller.stop(),this.$thumbscont[0].style[this.__pos]=.5*(size-len)+"px",this.$thumbscont[0].style[window._jcsspfx+"transform"]=""):(this.dtouch=!1,this.click_enable=!0,this.$thumbscont[0].style[this.__pos]="",this.controller._max_value=len-size,this.controller.options.snapsize=this.thumbsize,this.updatethumbscroll())}},p.destroy=function(){_super.destroy(),this.options.wheel&&($.browser.mozilla?this.$element[0].removeeventlistener("dommousescroll",this.wheellistener):this.$element.unbind("mousewheel",this.wheellistener),this.wheellistener=null),$(window).unbind("resize",this.resize_listener),this.$element.remove(),this.slider.api.removeeventlistener(mssliderevent.reserved_space_change,this.align,this),this.slider.api.removeeventlistener(mssliderevent.change_start,this.update,this)},window.msthumblist=msthumblist,msslidecontroller.registercontrol("thumblist",msthumblist)}(jquery),function($){"use strict";var msbulltes=function(options){basecontrol.call(this),this.options.dir="h",this.options.inset=!0,this.options.margin=10,this.options.space=10,$.extend(this.options,options),this.bullets=[]};msbulltes.extend(basecontrol);var p=msbulltes.prototype,_super=basecontrol.prototype;p.setup=function(){if(_super.setup.call(this),this.$element=$("
").addclass(this.options.prefix+"bullets").addclass("ms-dir-"+this.options.dir).appendto(this.cont),this.$bullet_cont=$("
").addclass("ms-bullets-count").appendto(this.$element),!this.options.insetto&&this.options.align){var align=this.options.align;this.options.inset&&this.$element.css(align,this.options.margin)}this.checkhideunder()},p.create=function(){_super.create.call(this);var that=this;this.slider.api.addeventlistener(mssliderevent.change_start,this.update,this),this.cindex=this.slider.api.index();for(var i=0;i").addclass("ms-bullet");bullet[0].index=i,bullet.on("click",function(){that.changeslide(this.index)}),this.$bullet_cont.append(bullet),this.bullets.push(bullet),"h"===this.options.dir?bullet.css("margin",this.options.space/2):bullet.css("margin",this.options.space)}"h"===this.options.dir?this.$element.width(bullet.outerwidth(!0)*this.slider.api.count()):this.$element.css("margin-top",-this.$element.outerheight(!0)/2),this.select(this.bullets[this.cindex])},p.update=function(){var nindex=this.slider.api.index();this.cindex!==nindex&&(null!=this.cindex&&this.unselect(this.bullets[this.cindex]),this.cindex=nindex,this.select(this.bullets[this.cindex]))},p.changeslide=function(index){this.cindex!==index&&this.slider.api.gotoslide(index)},p.unselect=function(ele){ele.removeclass("ms-bullet-selected")},p.select=function(ele){ele.addclass("ms-bullet-selected")},p.destroy=function(){_super.destroy(),this.slider.api.removeeventlistener(mssliderevent.change_start,this.update,this),this.$element.remove()},window.msbulltes=msbulltes,msslidecontroller.registercontrol("bullets",msbulltes)}(jquery),function($){"use strict";var msscrollbar=function(options){basecontrol.call(this),this.options.dir="h",this.options.autohide=!0,this.options.width=4,this.options.color="#3d3d3d",this.options.margin=10,$.extend(this.options,options),this.__dimen="h"===this.options.dir?"width":"height",this.__jdimen="h"===this.options.dir?"outerwidth":"outerheight",this.__pos="h"===this.options.dir?"left":"top",this.__translate_end=window._css3d?" translatez(0px)":"",this.__translate_start="h"===this.options.dir?" translatex(":"translatey("};msscrollbar.extend(basecontrol);var p=msscrollbar.prototype,_super=basecontrol.prototype;p.setup=function(){if(this.$element=$("
").addclass(this.options.prefix+"sbar").addclass("ms-dir-"+this.options.dir),_super.setup.call(this),this.$element.appendto(this.slider.$controlscont===this.cont?this.slider.$element:this.cont),this.$bar=$("
").addclass(this.options.prefix+"bar").appendto(this.$element),this.slider.options.loop&&(this.disable=!0,this.$element.remove()),"v"===this.options.dir?this.$bar.width(this.options.width):this.$bar.height(this.options.width),this.$bar.css("background-color",this.options.color),!this.options.insetto&&this.options.align){this.$element.css("v"===this.options.dir?{right:"auto",left:"auto"}:{top:"auto",bottom:"auto"});var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.prependto(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addeventlistener(mssliderevent.reserved_space_change,this.align,this),this.align())}this.checkhideunder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reservespace(align,2*this.options.margin+this.options.width);this.$element.css(align,-pos-this.options.margin-this.options.width)}},p.create=function(){if(!this.disable){this.scroller=this.slider.api.scroller,this.slider.api.view.addeventlistener(msviewevents.scroll,this._update,this),this.slider.api.addeventlistener(mssliderevent.resize,this._resize,this),this._resize(),this.options.autohide&&this.$bar.css("opacity","0")}},p._resize=function(){this.vdimen=this.$element[this.__dimen](),this.bar_dimen=this.slider.api.view["__"+this.__dimen]*this.vdimen/this.scroller._max_value,this.$bar[this.__dimen](this.bar_dimen)},p._update=function(){var value=this.scroller.value*(this.vdimen-this.bar_dimen)/this.scroller._max_value;if(this.lvalue!==value){if(this.lvalue=value,this.options.autohide){cleartimeout(this.hto),this.$bar.css("opacity","1");var that=this;this.hto=settimeout(function(){that.$bar.css("opacity","0")},150)}return 0>value?void(this.$bar[0].style[this.__dimen]=this.bar_dimen+value+"px"):(value>this.vdimen-this.bar_dimen&&(this.$bar[0].style[this.__dimen]=this.vdimen-value+"px"),window._cssanim?void(this.$bar[0].style[window._jcsspfx+"transform"]=this.__translate_start+value+"px)"+this.__translate_end):void(this.$bar[0].style[this.__pos]=value+"px"))}},p.destroy=function(){_super.destroy(),this.slider.api.view.removeeventlistener(msviewevents.scroll,this._update,this),this.slider.api.removeeventlistener(mssliderevent.resize,this._resize,this),this.slider.api.removeeventlistener(mssliderevent.reserved_space_change,this.align,this),this.$element.remove()},window.msscrollbar=msscrollbar,msslidecontroller.registercontrol("scrollbar",msscrollbar)}(jquery),function($){"use strict";var mstimerbar=function(options){basecontrol.call(this),this.options.autohide=!1,this.options.width=4,this.options.color="#ffffff",this.options.inset=!0,this.options.margin=0,$.extend(this.options,options)};mstimerbar.extend(basecontrol);var p=mstimerbar.prototype,_super=basecontrol.prototype;p.setup=function(){if(_super.setup.call(this),this.$element=$("
").addclass(this.options.prefix+"timerbar"),_super.setup.call(this),this.$element.appendto(this.slider.$controlscont===this.cont?this.slider.$element:this.cont),this.$bar=$("
").addclass("ms-time-bar").appendto(this.$element),"v"===this.options.dir?(this.$bar.width(this.options.width),this.$element.width(this.options.width)):(this.$bar.height(this.options.width),this.$element.height(this.options.width)),this.$bar.css("background-color",this.options.color),!this.options.insetto&&this.options.align){this.$element.css({top:"auto",bottom:"auto"});var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.prependto(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addeventlistener(mssliderevent.reserved_space_change,this.align,this),this.align())}this.checkhideunder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reservespace(align,2*this.options.margin+this.options.width);this.$element.css(align,-pos-this.options.margin-this.options.width)}},p.create=function(){_super.create.call(this),this.slider.api.addeventlistener(mssliderevent.waiting,this._update,this),this._update()},p._update=function(){this.$bar[0].style.width=this.slider.api._delayprogress+"%"},p.destroy=function(){_super.destroy(),this.slider.api.removeeventlistener(mssliderevent.reserved_space_change,this.align,this),this.slider.api.removeeventlistener(mssliderevent.waiting,this._update,this),this.$element.remove()},window.mstimerbar=mstimerbar,msslidecontroller.registercontrol("timebar",mstimerbar)}(jquery),function($){"use strict";var mscircletimer=function(options){basecontrol.call(this),this.options.color="#a2a2a2",this.options.stroke=10,this.options.radius=4,this.options.autohide=!1,$.extend(this.options,options)};mscircletimer.extend(basecontrol);var p=mscircletimer.prototype,_super=basecontrol.prototype;p.setup=function(){return _super.setup.call(this),this.$element=$("
").addclass(this.options.prefix+"ctimer").appendto(this.cont),this.$canvas=$("").addclass("ms-ctimer-canvas").appendto(this.$element),this.$bar=$("
").addclass("ms-ctimer-bullet").appendto(this.$element),this.$canvas[0].getcontext?(this.ctx=this.$canvas[0].getcontext("2d"),this.prog=0,this.__w=2*(this.options.radius+this.options.stroke/2),this.$canvas[0].width=this.__w,this.$canvas[0].height=this.__w,void this.checkhideunder()):(this.destroy(),void(this.disable=!0))},p.create=function(){if(!this.disable){_super.create.call(this),this.slider.api.addeventlistener(mssliderevent.waiting,this._update,this);var that=this;this.$element.click(function(){that.slider.api.paused?that.slider.api.resume():that.slider.api.pause()}),this._update()}},p._update=function(){var that=this;$(this).stop(!0).animate({prog:.01*this.slider.api._delayprogress},{duration:200,step:function(){that._draw()}})},p._draw=function(){this.ctx.clearrect(0,0,this.__w,this.__w),this.ctx.beginpath(),this.ctx.arc(.5*this.__w,.5*this.__w,this.options.radius,1.5*math.pi,1.5*math.pi+2*math.pi*this.prog,!1),this.ctx.strokestyle=this.options.color,this.ctx.linewidth=this.options.stroke,this.ctx.stroke()},p.destroy=function(){_super.destroy(),this.disable||($(this).stop(!0),this.slider.api.removeeventlistener(mssliderevent.waiting,this._update,this),this.$element.remove())},window.mscircletimer=mscircletimer,msslidecontroller.registercontrol("circletimer",mscircletimer)}(jquery),function($){"use strict";window.msslideinfo=function(options){basecontrol.call(this,options),this.options.autohide=!1,this.options.align=null,this.options.inset=!1,this.options.margin=10,this.options.size=100,this.options.dir="h",$.extend(this.options,options),this.data_list=[]},msslideinfo.fadeduratation=400,msslideinfo.extend(basecontrol);var p=msslideinfo.prototype,_super=basecontrol.prototype;p.setup=function(){if(this.$element=$("
").addclass(this.options.prefix+"slide-info").addclass("ms-dir-"+this.options.dir),_super.setup.call(this),this.$element.appendto(this.slider.$controlscont===this.cont?this.slider.$element:this.cont),!this.options.insetto&&this.options.align){var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.prependto(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addeventlistener(mssliderevent.reserved_space_change,this.align,this),this.align()),"v"===this.options.dir?this.$element.width(this.options.size):this.$element.css("min-height",this.options.size)}this.checkhideunder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reservespace(align,this.options.size+2*this.options.margin);this.$element.css(align,-pos-this.options.size-this.options.margin)}},p.slideaction=function(slide){var info_ele=$(slide.$element.find(".ms-info"));info_ele.detach(),this.data_list[slide.index]=info_ele},p.create=function(){_super.create.call(this),this.slider.api.addeventlistener(mssliderevent.change_start,this.update,this),this.cindex=this.slider.api.index(),this.switchele(this.data_list[this.cindex])},p.update=function(){var nindex=this.slider.api.index();this.switchele(this.data_list[nindex]),this.cindex=nindex},p.switchele=function(ele){if(this.current_ele){this.current_ele[0].tween&&this.current_ele[0].tween.stop(!0),this.current_ele[0].tween=ctween.animate(this.current_ele,msslideinfo.fadeduratation,{opacity:0},{complete:function(){this.detach(),this[0].tween=null,ele.css("position","relative")},target:this.current_ele}),ele.css("position","absolute")}this.__show(ele)},p.__show=function(ele){ele.appendto(this.$element).css("opacity","0"),this.current_ele&&ele.height(math.max(ele.height(),this.current_ele.height())),cleartimeout(this.tou),this.tou=settimeout(function(){ctween.fadein(ele,msslideinfo.fadeduratation),ele.css("height","")},msslideinfo.fadeduratation),ele[0].tween&&ele[0].tween.stop(!0),this.current_ele=ele},p.destroy=function(){_super.destroy(),cleartimeout(this.tou),this.current_ele&&this.current_ele[0].tween&&this.current_ele[0].tween.stop("true"),this.$element.remove(),this.slider.api.removeeventlistener(mssliderevent.reserved_space_change,this.align,this),this.slider.api.removeeventlistener(mssliderevent.change_start,this.update,this)},msslidecontroller.registercontrol("slideinfo",msslideinfo)}(jquery),function($,document,window){var pid=0,$window=$(window),$doc=$(document);if(window.masterslider){var startonappear=function(slider){this.pid=pid++,this.slider=slider,this.$slider=slider.$element,this.slider.options.startonappear&&(slider.holdon(),$doc.ready($.proxy(this.init,this)))};startonappear.name="msstartonappear";var p=startonappear.prototype;p.init=function(){this.slider.api;$window.on("scroll.soa"+this.pid,$.proxy(this._onscroll,this)).trigger("scroll")},p._onscroll=function(){var vpbottom=$window.scrolltop()+$window.height(),top=this.$slider.offset().top;vpbottom>top&&($window.off("scroll.soa"+this.pid),this.slider.release())},p.destroy=function(){},masterslider.registerplugin(startonappear)}}(jquery,document,window),function($,window){"use strict";if(window.msready)for(var i=0,l=msready.length;i!==l;i++)msready[i].call(null,$)}(jquery,window,document),function(){window.mscli=function(f){f=f||"pause";var m=masterslider_instances;for(var i in m)m[i].api[f]()}}(jquery);