/*! * master slider – responsive touch swipe slider * 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.imgratio */ function($){var polyfill=function(useroptions){this.options=$.extend({},polyfill.defaultoptions,useroptions),this.isenabled=!1,(this.options.forcepolyfill||!this.supportspointerevents())&&(this.registerevents(),this.isenabled=!0)};polyfill.defaultoptions={forcepolyfill:!1,selector:"*",listenon:["click","dblclick","mousedown","mouseup"],pointereventsnoneclass:null,pointereventsallclass:null,eventnamespace:"pointer-events-polyfill"},polyfill.prototype.registerevents=function(){$(document).on(this.geteventnames(),this.options.selector,$.proxy(this.onelementclick,this))},polyfill.prototype.geteventnames=function(){var eventnamespace=this.options.eventnamespace?"."+this.options.eventnamespace:"";return this.options.listenon.join(eventnamespace+" ")+eventnamespace},polyfill.prototype.supportspointerevents=function(){var style=document.createelement("a").style;return style.csstext="pointer-events:auto","auto"===style.pointerevents},polyfill.prototype.isclickthrough=function($el){var elpointereventscss=$el.css("pointer-events");return 0===$el.length||"all"===elpointereventscss||$el.is(":root")||$el.hasclass(this.options.pointereventsallclass)?!1:"none"===elpointereventscss||$el.hasclass(this.options.pointereventsnoneclass)||this.isclickthrough($el.parent())?!0:!1},polyfill.prototype.onelementclick=function(e){var $elorg=$(e.target);if(!this.isclickthrough($elorg))return!0;$elorg.hide();var elbelow=document.elementfrompoint(e.clientx,e.clienty);return e.target=elbelow,$(elbelow).trigger(e),"a"===elbelow.tagname&&(2===e.which?window.open(elbelow.getattribute("href"),"_blank"):elbelow.click()),$elorg.show(),!1},polyfill.prototype.destroy=function(){$(document).off(this.geteventnames()),this.isenabled=!1},window.pointereventspolyfill=function(useroptions){return new polyfill(useroptions)}}(jquery),function(){"use strict";var _options={bouncing:!0,snapping:!1,snapsize:null,friction:.05,outfriction:.05,outacceleration:.09,minvaliddist:.3,snappingminspeed:2,paging:!1,endless:!1,maxspeed:160},controller=function(min,max,options){if(null===max||null===min)throw new error("max and min values are required.");this.options=options||{};for(var key in _options)key in this.options||(this.options[key]=_options[key]);this._max_value=max,this._min_value=min,this.value=min,this.end_loc=min,this.current_snap=this.getsnapnum(min),this.__extrstep=0,this.__extramove=0,this.__animid=-1},p=controller.prototype;p.changeto=function(value,animate,speed,snap_num,dispatch){if(this.stopped=!1,this._internalstop(),value=this._checklimits(value),speed=math.abs(speed||0),this.options.snapping&&(snap_num=snap_num||this.getsnapnum(value),dispatch!==!1&&this._callsnapchange(snap_num),this.current_snap=snap_num),animate){this.animating=!0;var self=this,active_id=++self.__animid,amplitude=value-self.value,timestep=0,targetposition=value,animfrict=1-self.options.friction,timeconst=animfrict+(speed-20)*animfrict*1.3/self.options.maxspeed,tick=function(){if(active_id===self.__animid){var dis=value-self.value;if(!(math.abs(dis)>self.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}(),function(window,document,$){window.mslayercontroller=function(slide){this.slide=slide,this.slider=slide.slider,this.layers=[],this.layerscount=0,this.preloadcount=0,this.$layers=$("
").addclass("ms-slide-layers"),this.$staticlayers=$("
").addclass("ms-static-layers"),this.$fixedlayers=$("
").addclass("ms-fixed-layers"),this.$animlayers=$("
").addclass("ms-anim-layers")};var p=mslayercontroller.prototype;p.addlayer=function(layer){switch(layer.slide=this.slide,layer.controller=this,layer.$element.data("position")){case"static":this.hasstaticlayer=!0,layer.$element.appendto(this.$staticlayers);break;case"fixed":this.hasfixedlayer=!0,layer.$element.appendto(this.$fixedlayers);break;default:layer.$element.appendto(this.$animlayers)}layer.create(),this.layers.push(layer),this.layerscount++,layer.parallax&&(this.hasparallaxlayer=!0),layer.needpreload&&this.preloadcount++},p.create=function(){this.slide.$element.append(this.$layers),this.$layers.append(this.$animlayers),this.hasstaticlayer&&this.$layers.append(this.$staticlayers),"center"==this.slider.options.layersmode&&(this.$layers.css("max-width",this.slider.options.width+"px"),this.hasfixedlayer&&this.$fixedlayers.css("max-width",this.slider.options.width+"px"))},p.loadlayers=function(callback){if(this._onreadycallback=callback,0===this.preloadcount)return void this._onlayersready();for(var i=0;i!==this.layerscount;++i)this.layers[i].needpreload&&this.layers[i].loadimage()},p.preparetoshow=function(){this.hasparallaxlayer&&this._enableparallaxeffect(),this.hasfixedlayer&&this.$fixedlayers.prependto(this.slide.view.$element)},p.showlayers=function(){this.layershidetween&&this.layershidetween.stop(!0),this.fixedlayershidetween&&this.fixedlayershidetween.stop(!0),this._resetlayers(),this.$animlayers.css("opacity","").css("display",""),this.hasfixedlayer&&this.$fixedlayers.css("opacity","").css("display",""),this.ready&&(this._initlayers(),this._locatelayers(),this._startlayers())},p.hidelayers=function(){if(this.slide.selected||this.slider.options.instantstartlayers){var that=this;that.layershidetween=ctween.animate(this.$animlayers,500,{opacity:0},{complete:function(){that._resetlayers()}}),this.hasfixedlayer&&(this.fixedlayershidetween=ctween.animate(this.$fixedlayers,500,{opacity:0},{complete:function(){that.$fixedlayers.detach()}})),this.hasparallaxlayer&&this._disableparallaxeffect()}},p.animhidelayers=function(){if(this.ready)for(var i=0;i!==this.layerscount;++i)this.layers[i].hide()},p.setsize=function(width,height,hard){if(this.ready&&(this.slide.selected||this.hasstaticlayer)&&(hard&&this._initlayers(!0),this._locatelayers(!this.slide.selected)),this.slider.options.autoheight&&this.updateheight(),"center"==this.slider.options.layersmode){var left=math.max(0,(width-this.slider.options.width)/2)+"px";this.$layers[0].style.left=left,this.$fixedlayers[0].style.left=left}},p.updateheight=function(){},p._onlayersready=function(){this.ready=!0,this.hasstaticlayer&&!this.slide.issleeping&&this._initlayers(!1,!0),this._onreadycallback.call(this.slide)},p.onslidesleep=function(){},p.onslidewakeup=function(){this.hasstaticlayer&&this.ready&&this._initlayers(!1,!0)},p.getlayerbyid=function(layerid){if(!layerid)return null;for(var i=0;i").addclass("ms-layer-mask"),this.link?(this.link.wrap(this.$mask),this.$mask=this.link.parent()):(this.$element.wrap(this.$mask),this.$mask=this.$element.parent()),this.maskwidth&&this.$mask.width(this.maskwidth),this.maskheight&&(this.$mask.height(this.maskheight),-1===this.__cssconfig.indexof("height")&&this.__cssconfig.push("height")));var layerorigin=this.layerorigin=this.$element.data("origin");if(layerorigin){var vorigin=layerorigin.charat(0),horigin=layerorigin.charat(1),offsetx=this.$element.data("offset-x"),offsety=this.$element.data("offset-y"),layerele=this.masked?this.$mask[0]:this.$element[0];switch(void 0===offsety&&(offsety=0),vorigin){case"t":layerele.style.top=offsety+"px";break;case"b":layerele.style.bottom=offsety+"px";break;case"m":layerele.style.top=offsety+"px",this.middlealign=!0}switch(void 0===offsetx&&(offsetx=0),horigin){case"l":layerele.style.left=offsetx+"px";break;case"r":layerele.style.right=offsetx+"px";break;case"c":layerele.style.left=offsetx+"px",this.centeralign=!0}}this.parallax=this.$element.data("parallax"),null!=this.parallax&&(this.parallax/=100,this.$parallaxelement=$("
").addclass("ms-parallax-layer"),this.masked?(this.$mask.wrap(this.$parallaxelement),this.$parallaxelement=this.$mask.parent()):this.link?(this.link.wrap(this.$parallaxelement),this.$parallaxelement=this.link.parent()):(this.$element.wrap(this.$parallaxelement),this.$parallaxelement=this.$element.parent()),this._lastparax=0,this._lastparay=0,this._parax=0,this._paray=0,this.alignedtobot=this.layerorigin&&-1!==this.layerorigin.indexof("b"),this.alignedtobot&&this.$parallaxelement.css("bottom",0),this.parallaxrender=window._css3d?this._parallaxcss3drenderer:window._css2d?this._parallaxcss2drenderer:this._parallax2drenderer,"swipe"!==this.slider.options.parallaxmode&&averta.ticker.add(this.parallaxrender,this)),$.removedataattrs(this.$element,["data-src"])},p.init=function(){this.initialized=!0;var value;this.$element.css("visibility","");for(var i=0,l=this.__cssconfig.length;l>i;i++){var key=this.__cssconfig[i];if(this._isposition(key)&&this.masked)value=this.$mask.css(key);else if("text"!==this.type||"width"!==key||this.masked||this.maskwidth){value=this.$element.css(key);var issize="width"===key||"height"===key;issize&&this.masked&&(this.maskwidth&&"width"===key?value=this.maskwidth+"px":this.maskheight&&"height"===key&&(value=this.maskheight+"px")),issize&&"0px"===value&&(value=this.$element.data(key)+"px")}else value=this.$element[0].style.width;this.layerorigin&&("top"===key&&-1===this.layerorigin.indexof("t")&&-1===this.layerorigin.indexof("m")||"bottom"===key&&-1===this.layerorigin.indexof("b")||"left"===key&&-1===this.layerorigin.indexof("l")&&-1===this.layerorigin.indexof("c")||"right"===key&&-1===this.layerorigin.indexof("r"))||"auto"!=value&&""!=value&&"normal"!=value&&(this.basestyle[key]=parseint(value))}this.middlealign&&(this.baseheight=this.$element.outerheight(!1)),this.centeralign&&(this.basewidth=this.$element.outerwidth(!1))},p.locate=function(){if(this.slide.ready){var factor,isposition,issize,width=parsefloat(this.layerscont.css("width")),height=parsefloat(this.layerscont.css("height"));!this.staticlayer&&"none"===this.$element.css("display")&&this.isvisible&&this.$element.css("display","").css("visibility","hidden"),this.staticlayer&&this.$element.addclass("ms-hover-active"),factor=this.resizefactor=width/this.slide.slider.options.width;var $layerele=this.masked?this.$mask:this.$element;for(var key in this.basestyle)isposition=this._isposition(key),issize="width"===key||"height"===key,factor=this.fixed&&isposition?1:this.resizefactor,(this.resizable||isposition)&&("top"===key&&this.middlealign?($layerele[0].style.top="0px",this.baseheight=$layerele.outerheight(!1),$layerele[0].style.top=this.basestyle.top*factor+(height-this.baseheight)/2+"px"):"left"===key&&this.centeralign?($layerele[0].style.left="0px",this.basewidth=$layerele.outerwidth(!1),$layerele[0].style.left=this.basestyle.left*factor+(width-this.basewidth)/2+"px"):isposition&&this.masked?$layerele[0].style[key]=this.basestyle[key]*factor+"px":issize&&("width"===key&&this.maskwidth||"height"===key&&this.maskheight)?$layerele[0].style[key]=this.basestyle[key]*factor+"px":this.$element.css(key,this.basestyle[key]*factor+"px")); this.visible(this.minwidthi;++i)value=eff_params[i],value in mslayereffects.preseteffparams&&(value=mslayereffects.preseteffparams[value]),eff_params[i]=value}return{eff_name:eff_name,eff_params:eff_params}},p._parseeffparams=function(params){for(var eff_params=[],i=0,l=params.length;l>i;++i){var value=params[i];"string"==typeof value&&-1!==value.indexof("|")&&(value=this._randomparam(value)),eff_params[i]=value}return eff_params},p._checkposkey=function(key,style){return"left"===key&&!(key in this.basestyle)&&"right"in this.basestyle?(style.right=-parseint(style.left)+"px",delete style.left,!0):"top"===key&&!(key in this.basestyle)&&"bottom"in this.basestyle?(style.bottom=-parseint(style.top)+"px",delete style.top,!0):!1},p._isposition=function(key){return"top"===key||"left"===key||"bottom"===key||"right"===key},p._parallaxcalc=function(){var x_def=this._parax-this._lastparax,y_def=this._paray-this._lastparay;this._lastparax+=x_def/12,this._lastparay+=y_def/12,math.abs(x_def)<.019&&(this._lastparax=this._parax),math.abs(y_def)<.019&&(this._lastparay=this._paray)},p._parallaxcss3drenderer=function(){this._parallaxcalc(),this.$parallaxelement[0].style[window._jcsspfx+"transform"]="translatex("+this._lastparax*this.parallax+"px) translatey("+this._lastparay*this.parallax+"px) translatez(0)"},p._parallaxcss2drenderer=function(){this._parallaxcalc(),this.$parallaxelement[0].style[window._jcsspfx+"transform"]="translatex("+this._lastparax*this.parallax+"px) translatey("+this._lastparay*this.parallax+"px)"},p._parallax2drenderer=function(){this._parallaxcalc(),this.alignedtobot?this.$parallaxelement[0].style.bottom=this._lastparay*this.parallax+"px":this.$parallaxelement[0].style.top=this._lastparay*this.parallax+"px",this.$parallaxelement[0].style.left=this._lastparax*this.parallax+"px"}}(jquery),function($){window.msimagelayerelement=function(){mslayerelement.call(this),this.needpreload=!0,this.__cssconfig=["width","height","margin-top","padding-top","margin-bottom","padding-left","margin-right","padding-right","margin-left","padding-bottom","left","right","top","bottom"],this.type="image"},msimagelayerelement.extend(mslayerelement);var p=msimagelayerelement.prototype,_super=mslayerelement.prototype;p.create=function(){if(this.link){var p=this.$element.parent();p.append(this.link),this.link.append(this.$element),this.link.removeclass("ms-layer"),this.$element.addclass("ms-layer"),p=null}if(_super.create.call(this),void 0!=this.$element.data("src"))this.img_src=this.$element.data("src"),this.$element.removeattr("data-src");else{var that=this;this.$element.on("load",function(){that.controller.preloadcount--,0===that.controller.preloadcount&&that.controller._onlayersready()}).each($.jqloadfix)}$.browser.msie&&this.$element.on("dragstart",function(event){event.preventdefault()})},p.loadimage=function(){var that=this;this.$element.preloadimg(this.img_src,function(){that.controller.preloadcount--,0===that.controller.preloadcount&&that.controller._onlayersready()})}}(jquery),function($){window.msvideolayerelement=function(){mslayerelement.call(this),this.__cssconfig.push("height"),this.type="video"},msvideolayerelement.extend(mslayerelement);var p=msvideolayerelement.prototype,_super=mslayerelement.prototype;p.__playvideo=function(){this.img&&ctween.fadeout(this.img,500,2),ctween.fadeout(this.video_btn,500,2),this.video_frame.attr("src","about:blank").css("display","block"),-1==this.video_url.indexof("?")&&(this.video_url+="?"),this.video_frame.attr("src",this.video_url+"&autoplay=1")},p.start=function(){_super.start.call(this),this.$element.data("autoplay")&&this.__playvideo()},p.reset=function(){return _super.reset.call(this),(this.needpreload||this.$element.data("btn"))&&(this.video_btn.css("opacity",1).css("display","block"),this.video_frame.attr("src","about:blank").css("display","none")),this.needpreload?void this.img.css("opacity",1).css("display","block"):void this.video_frame.attr("src",this.video_url)},p.create=function(){_super.create.call(this),this.video_frame=this.$element.find("iframe").css({width:"100%",height:"100%"}),this.video_url=this.video_frame.attr("src");var has_img=0!=this.$element.has("img").length;if(has_img||this.$element.data("btn")){this.video_frame.attr("src","about:blank").css("display","none");var that=this;if(this.video_btn=$("
").appendto(this.$element).addclass("ms-video-btn").click(function(){that.__playvideo()}),has_img){if(this.needpreload=!0,this.img=this.$element.find("img:first").addclass("ms-video-img"),void 0!==this.img.data("src"))this.img_src=this.img.data("src"),this.img.removeattr("data-src");else{var that=this;this.img.attr("src",this.img_src).on("load",function(){that.controller.preloadcount--,0===that.controller.preloadcount&&that.controller._onlayersready()}).each($.jqloadfix)}$.browser.msie&&this.img.on("dragstart",function(event){event.preventdefault()})}}},p.loadimage=function(){var that=this;this.img.preloadimg(this.img_src,function(){that.controller.preloadcount--,0===that.controller.preloadcount&&that.controller._onlayersready()})}}(jquery),function($){"use strict";window.mshotspotlayer=function(){mslayerelement.call(this),this.__cssconfig=["margin-top","padding-top","margin-bottom","padding-left","margin-right","padding-right","margin-left","padding-bottom","left","right","top","bottom"],this.ease="expo",this.hide_start=!0,this.type="hotspot"},mshotspotlayer.extend(mslayerelement);var p=mshotspotlayer.prototype,_super=mslayerelement.prototype;p._showtt=function(){this.show_cl&&(cleartimeout(this.hto),this._tween&&this._tween.stop(!0),this.hide_start&&(this.align=this._orgalign,this._locatett(),this.tt.css({display:"block"}),this._tween=ctween.animate(this.tt,900,this.to,{ease:"easeout"+this.ease}),this.hide_start=!1))},p._hidett=function(){if(this.show_cl){this._tween&&this._tween.stop(!0);var that=this;cleartimeout(this.hto),this.hto=settimeout(function(){that.hide_start=!0,that._tween=ctween.animate(that.tt,900,that.from,{ease:"easeout"+that.ease,complete:function(){that.tt.css("display","none")}})},200)}},p._updateclassname=function(name){this._lastclass&&this.tt.removeclass(this._lastclass),this.tt.addclass(name),this._lastclass=name},p._alignpolicy=function(){{var w=(this.tt.outerheight(!1),math.max(this.tt.outerwidth(!1),parseint(this.tt.css("max-width")))),ww=window.innerwidth;window.innerheight}switch(this.align){case"top":if(this.base_t<0)return"bottom";break;case"right":if(this.base_l+w>ww||this.base_t<0)return"bottom";break;case"left":if(this.base_l<0||this.base_t<0)return"bottom"}return null},p._locatett=function(){var os=this.$element.offset(),os2=this.slide.slider.$element.offset(),dist=50,space=15;this.pos_x=os.left-os2.left-this.slide.slider.$element.scrollleft(),this.pos_y=os.top-os2.top-this.slide.slider.$element.scrolltop(),this.from={opacity:0},this.to={opacity:1},this._updateclassname("ms-tooltip-"+this.align),this.tt_arrow.css("margin-left","");var arrow_w=15,arrow_h=15;switch(this.align){case"top":var w=math.min(this.tt.outerwidth(!1),parseint(this.tt.css("max-width")));this.base_t=this.pos_y-this.tt.outerheight(!1)-arrow_h-space,this.base_l=this.pos_x-w/2,this.base_l+w>window.innerwidth&&(this.tt_arrow.css("margin-left",-arrow_w/2+this.base_l+w-window.innerwidth+"px"),this.base_l=window.innerwidth-w),this.base_l<0&&(this.base_l=0,this.tt_arrow.css("margin-left",-arrow_w/2+this.pos_x-this.tt.outerwidth(!1)/2+"px")),window._css3d?(this.from[window._jcsspfx+"transform"]="translatey(-"+dist+"px)",this.to[window._jcsspfx+"transform"]=""):(this.from.top=this.base_t-dist+"px",this.to.top=this.base_t+"px");break;case"bottom":var w=math.min(this.tt.outerwidth(!1),parseint(this.tt.css("max-width")));this.base_t=this.pos_y+arrow_h+space,this.base_l=this.pos_x-w/2,this.base_l+w>window.innerwidth&&(this.tt_arrow.css("margin-left",-arrow_w/2+this.base_l+w-window.innerwidth+"px"),this.base_l=window.innerwidth-w),this.base_l<0&&(this.base_l=0,this.tt_arrow.css("margin-left",-arrow_w/2+this.pos_x-this.tt.outerwidth(!1)/2+"px")),window._css3d?(this.from[window._jcsspfx+"transform"]="translatey("+dist+"px)",this.to[window._jcsspfx+"transform"]=""):(this.from.top=this.base_t+dist+"px",this.to.top=this.base_t+"px");break;case"right":this.base_l=this.pos_x+arrow_w+space,this.base_t=this.pos_y-this.tt.outerheight(!1)/2,window._css3d?(this.from[window._jcsspfx+"transform"]="translatex("+dist+"px)",this.to[window._jcsspfx+"transform"]=""):(this.from.left=this.base_l+dist+"px",this.to.left=this.base_l+"px");break;case"left":this.base_l=this.pos_x-arrow_w-this.tt.outerwidth(!1)-space,this.base_t=this.pos_y-this.tt.outerheight(!1)/2,window._css3d?(this.from[window._jcsspfx+"transform"]="translatex(-"+dist+"px)",this.to[window._jcsspfx+"transform"]=""):(this.from.left=this.base_l-dist+"px",this.to.left=this.base_l+"px")}var policyalign=this._alignpolicy();return null!==policyalign?(this.align=policyalign,void this._locatett()):(this.tt.css("top",parseint(this.base_t)+"px").css("left",parseint(this.base_l)+"px"),void this.tt.css(this.from))},p.start=function(){_super.start.call(this),this.tt.appendto(this.slide.slider.$element),this.tt.css("display","none")},p.reset=function(){_super.reset.call(this),this.tt.detach()},p.create=function(){var that=this;this._orgalign=this.align=void 0!==this.$element.data("align")?this.$element.data("align"):"top",this.data=this.$element.html(),this.$element.html("").on("mouseenter",function(){that._showtt()}).on("mouseleave",function(){that._hidett()}),this.point=$('
').addclass("ms-tooltip-point").appendto(this.$element);var link=this.$element.data("link"),target=this.$element.data("target");link&&this.point.on("click",function(){window.open(link,target||"_self")}),this.tt=$("
").addclass("ms-tooltip").css("display","hidden").css("opacity",0),void 0!==this.$element.data("width")&&this.tt.css("width",this.$element.data("width")).css("max-width",this.$element.data("width")),this.tt_arrow=$("
").addclass("ms-tooltip-arrow").appendto(this.tt),this._updateclassname("ms-tooltip-"+this.align),this.ttcont=$("
").addclass("ms-tooltip-cont").html(this.data).appendto(this.tt),this.$element.data("stay-hover")===!0&&this.tt.on("mouseenter",function(){that.hide_start||(cleartimeout(that.hto),that._tween.stop(!0),that._showtt())}).on("mouseleave",function(){that._hidett()}),_super.create.call(this)}}(jquery),function(){window.msbuttonlayer=function(){mslayerelement.call(this),this.type="button"},msbuttonlayer.extend(mslayerelement);var p=msbuttonlayer.prototype,_super=mslayerelement.prototype,positionkies=["top","left","bottom","right"];p.create=function(){_super.create.call(this),this.$element.wrap('
').css("position","relative"),this.$container=this.$element.parent()},p.locate=function(){_super.locate.call(this);for(var key,tempvalue,i=0;4>i;i++)key=positionkies[i],key in this.basestyle&&(tempvalue=this.$element.css(key),this.$element.css(key,""),this.$container.css(key,tempvalue));this.$container.width(this.$element.outerwidth(!0)).height(this.$element.outerheight(!0))}}(jquery),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.setuplayercontroller=function(){this.haslayers=!0,this.layercontroller=new mslayercontroller(this)},p.assetsloaded=function(){this.ready=!0,this.slider.api._starttimer(),(this.selected||this.pselected&&this.slider.options.instantstartlayers)&&(this.haslayers&&this.layercontroller.showlayers(),this.vinit&&(this.bgvideo.play(),this.autopausebgvid||(this.bgvideo.currenttime=0))),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.bgvideo&&this.bgvideo.load(),this.hasbg&&this.bg_src){var that=this;this.$bg_img.preloadimg(this.bg_src,function(event){that._onbgload(event)})}this.haslayers&&this.layercontroller.loadlayers(this._onlayersload),this.hasbg||this.haslayers||this.assetsloaded()}},p._onlayersload=function(){this.layersloaded=!0,(!this.hasbg||this.bgloaded)&&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.setbgvideo=function($video){if($video[0].play){if(window._mobile&&!this.slider.options.mobilebgvideo)return void $video.remove();this.bgvideo=$video[0];var that=this;$video.addclass("ms-slide-bgvideo"),$video.data("loop")!==!1&&this.bgvideo.addeventlistener("ended",function(){that.bgvideo.play()}),$video.data("mute")!==!1&&(this.bgvideo.muted=!0),$video.data("autopause")===!0&&(this.autopausebgvid=!0),this.bgvideo_fillmode=$video.data("fill-mode")||"fill","none"!==this.bgvideo_fillmode&&(this.bgvideoaligner=new msaligner(this.bgvideo_fillmode,this.$element,$video),this.bgvideo.addeventlistener("loadedmetadata",function(){that.vinit||(that.vinit=!0,that.video_aspect=that.bgvideoaligner.baseheight/that.bgvideoaligner.basewidth,that.bgvideoaligner.init(that.bgvideo.videowidth,that.bgvideo.videoheight),that._alignbgvideo(),ctween.fadein($(that.bgvideo),200),that.selected&&that.bgvideo.play())})),$video.css("opacity",0),this.$bgvideocont=$("
").addclass("ms-slide-bgvideocont").append($video),this.hasbg?this.$imgcont.before(this.$bgvideocont):this.$bgvideocont.appendto(this.$element)}},p._alignbgvideo=function(){this.bgvideo_fillmode&&"none"!==this.bgvideo_fillmode&&this.bgvideoaligner.align()},p.setsize=function(width,height,hard){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(),this._alignbgvideo(),this.haslayers&&this.layercontroller.setsize(width,height,hard)},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.haslayers&&this.layercontroller.create(),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.haslayers&&(this.layercontroller.destroy(),this.layercontroller=null),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.haslayers&&this.layercontroller.preparetoshow(),this.ready&&(this.bgvideo&&this.bgvideo.play(),this.haslayers&&this.slider.options.instantstartlayers&&this.layercontroller.showlayers()),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.haslayers&&(this.slider.options.autoheight&&this.layercontroller.updateheight(),this.slider.options.instantstartlayers||this.layercontroller.showlayers()),this.ready&&this.bgvideo&&this.bgvideo.play(),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.bgvideo&&(this.bgvideo.pause(),!this.autopausebgvid&&this.vinit&&(this.bgvideo.currenttime=0)),this.haslayers&&this.layercontroller.hidelayers(),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.so.fullheight?(this.so.heightlimit=!1,this.so.autoheight=!1,this.height=this.slider.$element[0].clientheight):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.__updatewindowhash=function(){var hash=window.location.hash,dl=this.so.deeplink,dlt=this.so.deeplinktype,eq="path"===dlt?"/":"=",sep="path"===dlt?"/":"&",sliderhash=dl+eq+(this.view.index+1),regtest=new regexp(dl+eq+"[0-9]+","g");window.location.hash=""===hash?sep+sliderhash:regtest.test(hash)?hash.replace(regtest,sliderhash):hash+sep+sliderhash},p.__curentslideinhash=function(){var hash=window.location.hash,dl=this.so.deeplink,dlt=this.so.deeplinktype,eq="path"===dlt?"/":"=",regtest=new regexp(dl+eq+"[0-9]+","g");if(regtest.test(hash)){var index=number(hash.match(regtest)[0].match(/[0-9]+/g).pop());if(!isnan(index))return index-1}return-1},p.__onhashchanged=function(){var index=this.__curentslideinhash();-1!==index&&this.gotoslide(index)},p.__findlayerbyid=function(layerid){if(!this.currentslide)return null;var layer;return this.currentslide.layercontroller&&(layer=this.currentslide.layercontroller.getlayerbyid(layerid)),!layer&&this.slider.overlaylayers?this.slider.overlaylayers.layercontroller.getlayerbyid(layerid):layer},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 slideinhash=this.__curentslideinhash(),startslide=-1!==slideinhash?slideinhash: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();var that=this;this.so.deeplink&&$(window).on("hashchange",function(){that.__onhashchanged()})},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},p.showlayer=function(layerid,delay){var layer=this.__findlayerbyid(layerid);layer&&(delay?(cleartimeout(layer.actiontimeout),layer.actiontimeout=settimeout(this.showlayer,delay,layerid,0)):layer.start())},p.hidelayer=function(layerid,delay){var layer=this.__findlayerbyid(layerid);layer&&(delay?(cleartimeout(layer.actiontimeout),layer.actiontimeout=settimeout(this.hidelayer,delay,layerid,0)):layer.hide())},p.togglelayer=function(layerid,delay){var layer=this.__findlayerbyid(layerid);layer&&(delay?(cleartimeout(layer.actiontimeout),layer.actiontimeout=settimeout(this.togglelayer,delay,layerid,0)):layer.isshowing?layer.hide():layer.start())},p.showlayers=function(layerids,delay){var self=this;$.each(layerids.replace(/\s+/g,"").split("|"),function(index,layerid){self.showlayer(layerid,delay)})},p.hidelayers=function(layerids,delay){var self=this;$.each(layerids.replace(/\s+/g,"").split("|"),function(index,layerid){self.hidelayer(layerid,delay)})},p.togglelayers=function(layerids,delay){var self=this;$.each(layerids.replace(/\s+/g,"").split("|"),function(index,layerid){self.togglelayer(layerid,delay)})},averta.eventdispatcher.extend(p)}(jquery),function($){"use strict";var layertypes={image:msimagelayerelement,text:mslayerelement,video:msvideolayerelement,hotspot:mshotspotlayer,button:msbuttonlayer};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)");slide_img.length>0&&new_slide.setbg(slide_img[0]);var slide_video=$slide_ele.children("video");if(slide_video.length>0&&new_slide.setbgvideo(slide_video),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.__createslidelayers(new_slide,$slide_ele.find(".ms-layer")),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.__createslidelayers=function(slide,layers){0!=layers.length&&(slide.setuplayercontroller(),layers.each(function(index,domele){var $parent_ele,$layer_element=$(this);"a"===domele.nodename&&"image"===$layer_element.find(">img").data("type")&&($parent_ele=$(this),$layer_element=$parent_ele.find("img"));var layer=new(layertypes[$layer_element.data("type")||"text"]);layer.$element=$layer_element,layer.link=$parent_ele,layer.id=layer.$element.data("id"),layer.waitforaction=layer.$element.data("wait"),layer.masked=layer.$element.data("masked"),layer.maskwidth=layer.$element.data("mask-width"),layer.maskheight=layer.$element.data("mask-height");var eff_parameters={},end_eff_parameters={};void 0!==$layer_element.data("effect")&&(eff_parameters.name=$layer_element.data("effect")),void 0!==$layer_element.data("ease")&&(eff_parameters.ease=$layer_element.data("ease")),void 0!==$layer_element.data("duration")&&(eff_parameters.duration=$layer_element.data("duration")),void 0!==$layer_element.data("delay")&&(eff_parameters.delay=$layer_element.data("delay")),$layer_element.data("hide-effect")&&(end_eff_parameters.name=$layer_element.data("hide-effect")),$layer_element.data("hide-ease")&&(end_eff_parameters.ease=$layer_element.data("hide-ease")),void 0!==$layer_element.data("hide-duration")&&(end_eff_parameters.duration=$layer_element.data("hide-duration")),void 0!==$layer_element.data("hide-time")&&(end_eff_parameters.time=$layer_element.data("hide-time")),layer.setstartanim(eff_parameters),layer.setendanim(end_eff_parameters),slide.layercontroller.addlayer(layer)}))},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||"autofill"===lo)&&(this.options.fullheight=!0,"autofill"===lo&&(this.$autofilltarget=$(this.options.autofilltarget),0===this.$autofilltarget.length&&(this.$autofilltarget=this.$element.parent()))),"partialview"===lo&&this.$element.addclass("ms-layout-partialview"),("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,lo=that.options.layout,$element=that.$element,$win=$(window);if("fullscreen"===lo)document.body.style.overflow="hidden",$element.height($win.height()-that.options.fullscreenmargin-that.topspace-that.bottomspace),document.body.style.overflow="";else if("autofill"===lo)return void $element.height(that.$autofilltarget.height()-that.options.fullscreenmargin-that.topspace-that.bottomspace).width(that.$autofilltarget.width()-that.leftspace-that.rightspace);$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(),mslayereffects.setup(),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;idistance?-1:1),zvalue=1.2*value;slide.$element[0].style[window._jcsspfx+"transform"]="translatez("+5*-zvalue+"px) rotatey("+rvalue+"deg) "},p.__updateslidesvertic=function(slide,distance){var value=math.abs(100*distance/this.__width),rvalue=math.min(.3*value,30)*(0>distance?-1:1),zvalue=1.2*value;slide.$element[0].style[window._jcsspfx+"transform"]="translatez("+5*-zvalue+"px) rotatex("+-rvalue+"deg) "},msslidecontroller.registerview("flow",msflowview)}(jquery),function(){window.msfadeflowview=function(options){mswaveview.call(this,options),this.$element.removeclass("ms-wave-view").addclass("ms-fade-flow-view")},msfadeflowview.extend(mswaveview),msfadeflowview._3dreq=!0;{var p=msfadeflowview.prototype;mswaveview.prototype}p.__calculate=function(distance){var value=math.min(math.abs(100*distance/this.__width),100),rvalue=math.min(.5*value,50)*(0>distance?-1:1);return{value:value,rvalue:rvalue}},p.__updateslideshoriz=function(slide,distance){var clc=this.__calculate(distance);slide.$element.css("opacity",1-clc.value/300),slide.$element[0].style[window._jcsspfx+"transform"]="translatez("+-clc.value+"px) rotatey("+clc.rvalue+"deg) "},p.__updateslidesvertic=function(slide,distance){var clc=this.__calculate(distance);slide.$element.css("opacity",1-clc.value/300),slide.$element[0].style[window._jcsspfx+"transform"]="translatez("+-clc.value+"px) rotatex("+-clc.rvalue+"deg) " },msslidecontroller.registerview("fadeflow",msfadeflowview)}(),function($){"use strict";window.msmaskview=function(options){msbasicview.call(this,options),this.$element.removeclass("ms-basic-view").addclass("ms-mask-view")},msmaskview.extend(msbasicview);var p=msmaskview.prototype,_super=msbasicview.prototype;p.addslide=function(slide){slide.view=this,slide.$frame=$("
").addclass("ms-mask-frame").append(slide.$element),slide.$element[0].style.position="relative",slide.autoappend=!1,this.slides.push(slide),this.slidelist.push(slide),this.slidescount++},p.setsize=function(width,height){for(var slider=this.slides[0].slider,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";window.msscaleview=function(options){msbasicview.call(this,options),this.$element.removeclass("ms-basic-view").addclass("ms-scale-view"),this.controller.rendercallback(this.__update,this)},msscaleview.extend(msfadeview);var p=msscaleview.prototype,_super=msfadeview.prototype;p.__updateslides=function(slide,distance){var value=math.abs(distance/this[this.__dimension]),element=slide.$element[0];0>=1-value?(element.style.opacity=0,element.style.visibility="hidden",element.style[window._jcsspfx+"transform"]=""):(element.style.opacity=1-value,element.style.visibility="",element.style[window._jcsspfx+"transform"]="perspective(2000px) translatez("+value*(0>distance?-.5:.5)*300+"px)")},p.create=function(index){_super.create.call(this,index),this.controller.options.minvaliddist=.03},msslidecontroller.registerview("scale",msscaleview)}(jquery),function(){"use strict";window.msstackview=function(options){msbasicview.call(this,options),this.$element.removeclass("ms-basic-view").addclass("ms-stack-view"),this.controller.rendercallback(this.__update,this),this.autoupdatezindex=!0},msstackview.extend(msfadeview),msstackview._3dreq=!0,msstackview._fallback=msfadeview;var p=msstackview.prototype,_super=msfadeview.prototype;p.__updateslideszindex=function(){for(var slide,l=this.viewslideslist.length,i=0;i!==l;i++)slide=this.viewslideslist[i],this.viewslideslist[i].$element.css("z-index",l-i)},p.__updateslides=function(slide,distance){var value=math.abs(distance/this[this.__dimension]),element=slide.$element[0];0>=1-value?(element.style.opacity=1,element.style.visibility="hidden",element.style[window._jcsspfx+"transform"]=""):(element.style.visibility="",element.style[window._jcsspfx+"transform"]=0>distance?"perspective(2000px) translatez("+-300*value+"px)":this.__translate+"("+-value*this[this.__dimension]+"px)")},p.create=function(index){_super.create.call(this,index),this.controller.options.minvaliddist=.03,this.__translate="h"===this.dir?"translatex":"translatey"},msslidecontroller.registerview("stack",msstackview)}(jquery),function(){"use strict";var perspective=2e3;window.msfocusview=function(options){mswaveview.call(this,options),this.$element.removeclass("ms-wave-view").addclass("ms-focus-view"),this.options.centerspace=this.options.centerspace||1},msfocusview.extend(mswaveview),msfocusview._3dreq=!0,msfocusview._fallback=msfadebasicview;{var p=msfocusview.prototype;mswaveview.prototype}p.__calcview=function(z,w){var a=w/2*z/(z+perspective);return a*(z+perspective)/perspective},p.__updateslideshoriz=function(slide,distance){var value=math.abs(100*distance/this.__width);value=15*-math.min(value,100),slide.$element.css(window._csspfx+"transform","translatez("+(value+1)+"px) rotatey(0.01deg) translatex("+(0>distance?1:-1)*-this.__calcview(value,this.__width)*this.options.centerspace+"px)")},p.__updateslidesvertic=function(slide,distance){var value=math.abs(100*distance/this.__width);value=15*-math.min(value,100),slide.$element.css(window._csspfx+"transform","translatez("+(value+1)+"px) rotatey(0.01deg) translatey("+(0>distance?1:-1)*-this.__calcview(value,this.__width)*this.options.centerspace+"px)")},msslidecontroller.registerview("focus",msfocusview)}(),function(){window.mspartialwaveview=function(options){mswaveview.call(this,options),this.$element.removeclass("ms-wave-view").addclass("ms-partial-wave-view")},mspartialwaveview.extend(mswaveview),mspartialwaveview._3dreq=!0,mspartialwaveview._fallback=msfadebasicview;{var p=mspartialwaveview.prototype;mswaveview.prototype}p.__updateslideshoriz=function(slide,distance){var value=math.abs(100*distance/this.__width);slide.hasbg&&slide.$bg_img.css("opacity",(100-math.abs(120*distance/this.__width/3))/100),slide.$element.css(window._csspfx+"transform","translatez("+3*-value+"px) rotatey(0.01deg) translatex("+.75*distance+"px)")},p.__updateslidesvertic=function(slide,distance){var value=math.abs(100*distance/this.__width);slide.hasbg&&slide.$bg_img.css("opacity",(100-math.abs(120*distance/this.__width/3))/100),slide.$element.css(window._csspfx+"transform","translatez("+3*-value+"px) rotatey(0.01deg) translatey("+.75*distance+"px)")},msslidecontroller.registerview("partialwave",mspartialwaveview)}(),function(){"use strict";window.msboxview=function(options){msbasicview.call(this,options),this.$element.removeclass("ms-basic-view").addclass("ms-box-view"),this.controller.rendercallback(this.__update,this)},msboxview.extend(msfadeview),msboxview._3dreq=!0;var p=msboxview.prototype,_super=msfadeview.prototype;p.__updateslides=function(slide,distance){var value=math.abs(distance/this[this.__dimension]),element=slide.$element[0];0>=1-value?(element.style.visibility="hidden",element.style[window._jcsspfx+"transform"]=""):(element.style.visibility="",element.style[window._jcsspfx+"transform"]="rotate"+this._rotatedir+"("+value*(0>distance?1:-1)*90*this._calcfactor+"deg)",element.style[window._jcsspfx+"transformorigin"]="50% 50% -"+slide[this.__dimension]/2+"px",element.style.zindex=math.ceil(2*(1-value)))},p.create=function(index){_super.create.call(this,index),this.controller.options.minvaliddist=.03,this._rotatedir="h"===this.options.dir?"y":"x",this._calcfactor="h"===this.options.dir?1:-1},msslidecontroller.registerview("box",msboxview)}(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.mslightbox=function(options){basecontrol.call(this,options),this.options.autohide=!1,$.extend(this.options,options),this.data_list=[]},mslightbox.fadeduratation=400,mslightbox.extend(basecontrol);var p=mslightbox.prototype,_super=basecontrol.prototype;p.setup=function(){_super.setup.call(this),this.$element=$("
").addclass(this.options.prefix+"lightbox-btn").appendto(this.cont),this.checkhideunder()},p.slideaction=function(slide){$("
").addclass(this.options.prefix+"lightbox-btn").appendto(slide.$element).append($(slide.$element.find(".ms-lightbox")))},p.create=function(){_super.create.call(this)},msslidecontroller.registercontrol("lightbox",mslightbox)}(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($){window.msgallery=function(id,slider){this.id=id,this.slider=slider,this.telement=$("#"+id),this.botcont=$("
").addclass("ms-gallery-botcont").appendto(this.telement),this.thumbcont=$("
").addclass("ms-gal-thumbcont hide-thumbs").appendto(this.botcont),this.playbtn=$("
").addclass("ms-gal-playbtn").appendto(this.botcont),this.thumbtoggle=$("
").addclass("ms-gal-thumbtoggle").appendto(this.botcont),slider.control("thumblist",{insertto:this.thumbcont,autohide:!1,dir:"h"}),slider.control("slidenum",{insertto:this.botcont,autohide:!1}),slider.control("slideinfo",{insertto:this.botcont,autohide:!1}),slider.control("timebar",{insertto:this.botcont,autohide:!1}),slider.control("bullets",{insertto:this.botcont,autohide:!1})};var p=msgallery.prototype;p._init=function(){var that=this;this.slider.api.paused||this.playbtn.addclass("btn-pause"),this.playbtn.click(function(){that.slider.api.paused?(that.slider.api.resume(),that.playbtn.addclass("btn-pause")):(that.slider.api.pause(),that.playbtn.removeclass("btn-pause"))}),this.thumbtoggle.click(function(){that.vthumbs?(that.thumbtoggle.removeclass("btn-hide"),that.vthumbs=!1,that.thumbcont.addclass("hide-thumbs")):(that.thumbtoggle.addclass("btn-hide"),that.thumbcont.removeclass("hide-thumbs"),that.vthumbs=!0)})},p.setup=function(){var that=this;$(document).ready(function(){that._init()})}}(jquery),function($){var getphotoseturl=function(key,id,count){return"https://api.flickr.com/services/rest/?method=flickr.photosets.getphotos&api_key="+key+"&photoset_id="+id+"&per_page="+count+"&extras=url_o,description,date_taken,owner_name,views&format=json&jsoncallback=?"},getuserpublicurl=function(key,id,count){return"https://api.flickr.com/services/rest/?&method=flickr.people.getpublicphotos&api_key="+key+"&user_id="+id+"&per_page="+count+"&extras=url_o,description,date_taken,owner_name,views&format=json&jsoncallback=?"},getimagesource=function(fid,server,id,secret,size,data){return"_o"===size&&data?data.url_o:"https://farm"+fid+".staticflickr.com/"+server+"/"+id+"_"+secret+size+".jpg"};window.msflickrv2=function(slider,options){var _options={count:10,type:"photoset",thumbsize:"q",imgsize:"c"};if(this.slider=slider,this.slider.holdon(),!options.key)return void this.errmsg("flickr api key required. please add it in settings.");$.extend(_options,options),this.options=_options;var that=this;"photoset"===this.options.type?$.getjson(getphotoseturl(this.options.key,this.options.id,this.options.count),function(data){that._photosdata(data)}):$.getjson(getuserpublicurl(this.options.key,this.options.id,this.options.count),function(data){that.options.type="photos",that._photosdata(data)}),""!==this.options.imgsize&&"-"!==this.options.imgsize&&(this.options.imgsize="_"+this.options.imgsize),this.options.thumbsize="_"+this.options.thumbsize,this.slidetemplate=this.slider.$element.find(".ms-slide")[0].outerhtml,this.slider.$element.find(".ms-slide").remove()};var p=msflickrv2.prototype;p._photosdata=function(data){if("fail"===data.stat)return void this.errmsg("flickr api error#"+data.code+": "+data.message);{var that=this;this.options.author||this.options.desc}$.each(data[this.options.type].photo,function(i,item){var slide_cont=that.slidetemplate.replace(/{{[\w-]+}}/g,function(match){return match=match.replace(/{{|}}/g,""),shortcodes[match]?shortcodes[match](item,that):"{{"+match+"}}"});$(slide_cont).appendto(that.slider.$element)}),that._initslider()},p.errmsg=function(msg){this.slider.$element.css("display","block"),this.errele||(this.errele=$('
').appendto(this.slider.$loading)),this.errele.html(msg)},p._initslider=function(){this.slider.release()};var shortcodes={image:function(data,that){return getimagesource(data.farm,data.server,data.id,data.secret,that.options.imgsize,data)},thumb:function(data,that){return getimagesource(data.farm,data.server,data.id,data.secret,that.options.thumbsize)},title:function(data){return data.title},"owner-name":function(data){return data.ownername},"date-taken":function(data){return data.datetaken},views:function(data){return data.views},description:function(data){return data.description._content}}}(jquery),function($){window.msfacebookgallery=function(slider,options){var _options={count:10,type:"photostream",thumbsize:"320",imgsize:"orginal",https:!1,token:""};this.slider=slider,this.slider.holdon(),$.extend(_options,options),this.options=_options,this.graph="https://graph.facebook.com";var that=this;"photostream"===this.options.type?$.getjson(this.graph+"/"+this.options.username+"/photos/uploaded/?fields=source,name,link,images,from&limit="+this.options.count+"&access_token="+this.options.token,function(data){that._photosdata(data)}):$.getjson(this.graph+"/"+this.options.albumid+"/photos?fields=source,name,link,images,from&limit="+this.options.count+"&access_token="+this.options.token,function(data){that._photosdata(data)}),this.slidetemplate=this.slider.$element.find(".ms-slide")[0].outerhtml,this.slider.$element.find(".ms-slide").remove()};var p=msfacebookgallery.prototype;p._photosdata=function(content){if(content.error)return void this.errmsg("facebook api error#"+content.error.code+"("+content.error.type+"): "+content.error.message);for(var that=this,i=(this.options.author||this.options.desc,0),l=content.data.length;i!==l;i++){var slide_cont=that.slidetemplate.replace(/{{[\w-]+}}/g,function(match){return match=match.replace(/{{|}}/g,""),shortcodes[match]?shortcodes[match](content.data[i],that):"{{"+match+"}}"});$(slide_cont).appendto(that.slider.$element)}that._initslider()},p.errmsg=function(msg){this.slider.$element.css("display","block"),this.errele||(this.errele=$('
').appendto(this.slider.$loading)),this.errele.html(msg)},p._initslider=function(){this.slider.release()};var getimagesource=function(images,size){if("orginal"===size)return images[0].source;for(var i=0,l=images.length;i!==l;i++)if(-1!==images[i].source.indexof(size+"x"+size))return images[i].source;return images[0].source},shortcodes={image:function(data,that){return getimagesource(data.images,that.options.imgsize)},thumb:function(data,that){return getimagesource(data.images,that.options.thumbsize)},name:function(data){return data.name},"owner-name":function(data){return data.from.name},link:function(data){return data.link}}}(jquery),function($){"use strict";window.msscrollparallax=function(slider,parallax,bgparallax,fade){this.fade=fade,this.slider=slider,this.parallax=parallax/100,this.bgparallax=bgparallax/100,slider.api.addeventlistener(mssliderevent.init,this.init,this),slider.api.addeventlistener(mssliderevent.destroy,this.destory,this),slider.api.addeventlistener(mssliderevent.change_end,this.resetlayers,this),slider.api.addeventlistener(mssliderevent.change_start,this.updatecurrentslide,this)},window.msscrollparallax.setup=function(slider,parallax,bgparallax,fade){return window._mobile?void 0:(null==parallax&&(parallax=50),null==bgparallax&&(bgparallax=40),new msscrollparallax(slider,parallax,bgparallax,fade))};var p=window.msscrollparallax.prototype;p.init=function(){this.slider.$element.addclass("ms-scroll-parallax"),this.slideroffset=this.slider.$element.offset().top,this.updatecurrentslide();for(var slide,slides=this.slider.api.view.slidelist,i=0,l=slides.length;i!==l;i++)slide=slides[i],slide.haslayers&&(slide.layercontroller.$layers.wrap('
'),slide.$scrollparallaxcont=slide.layercontroller.$layers.parent());$(window).on("scroll",{that:this},this.moveparallax).trigger("scroll")},p.resetlayers=function(){if(this.lastslide){var layers=this.lastslide.$scrollparallaxcont;window._css2d?(layers&&(layers[0].style[window._jcsspfx+"transform"]=""),this.lastslide.hasbg&&(this.lastslide.$imgcont[0].style[window._jcsspfx+"transform"]="")):(layers&&(layers[0].style.top=""),this.lastslide.hasbg&&(this.lastslide.$imgcont[0].style.top="0px"))}},p.updatecurrentslide=function(){this.lastslide=this.currentslide,this.currentslide=this.slider.api.currentslide,this.moveparallax({data:{that:this}})},p.moveparallax=function(e){var that=e.data.that,slider=that.slider,offset=that.slideroffset,scrolltop=$(window).scrolltop(),layers=that.currentslide.$scrollparallaxcont,out=offset-scrolltop;0>=out?(layers&&(window._css3d?layers[0].style[window._jcsspfx+"transform"]="translatey("+-out*that.parallax+"px) translatez(0.4px)":window._css2d?layers[0].style[window._jcsspfx+"transform"]="translatey("+-out*that.parallax+"px)":layers[0].style.top=-out*that.parallax+"px"),that.updateslidesbg(-out*that.bgparallax+"px",!0),layers&&that.fade&&layers.css("opacity",1-math.min(1,-out/slider.api.height))):(layers&&(window._css2d?layers[0].style[window._jcsspfx+"transform"]="":layers[0].style.top=""),that.updateslidesbg("0px",!1),layers&&that.fade&&layers.css("opacity",1))},p.updateslidesbg=function(pos,fixed){for(var slides=this.slider.api.view.slidelist,position=!fixed||$.browser.msie||$.browser.opera?"":"fixed",i=0,l=slides.length;i!==l;i++)slides[i].hasbg&&(slides[i].$imgcont[0].style.position=position,slides[i].$imgcont[0].style.top=pos),slides[i].$bgvideocont&&(slides[i].$bgvideocont[0].style.position=position,slides[i].$bgvideocont[0].style.top=pos)},p.destory=function(){slider.api.removeeventlistener(mssliderevent.init,this.init,this),slider.api.removeeventlistener(mssliderevent.destroy,this.destory,this),slider.api.removeeventlistener(mssliderevent.change_end,this.resetlayers,this),slider.api.removeeventlistener(mssliderevent.change_start,this.updatecurrentslide,this),$(window).off("scroll",this.moveparallax)}}(jquery),function($,document,window){var pid=0;if(window.masterslider){var keyboardnav=function(slider){this.slider=slider,this.pid=pid++,this.slider.options.keyboard&&slider.api.addeventlistener(mssliderevent.init,this.init,this)};keyboardnav.name="mskeyboardnav";var p=keyboardnav.prototype;p.init=function(){var api=this.slider.api;$(document).on("keydown.kbnav"+this.pid,function(event){var which=event.which;37===which||40===which?api.previous(!0):(38===which||39===which)&&api.next(!0)})},p.destroy=function(){$(document).off("keydown.kbnav"+this.pid),this.slider.api.removeeventlistener(mssliderevent.init,this.init,this)},masterslider.registerplugin(keyboardnav)}}(jquery,document,window),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(document,window){var filterunits={"hue-rotate":"deg",blur:"px"},initialvalues={opacity:1,contrast:1,brightness:1,saturate:1,"hue-rotate":0,invert:0,sepia:0,blur:0,grayscale:0};if(window.masterslider){var filters=function(slider){this.slider=slider,this.slider.options.filters&&slider.api.addeventlistener(mssliderevent.init,this.init,this)};filters.name="msfilters";var p=filters.prototype;p.init=function(){var api=this.slider.api,view=api.view;this.filters=this.slider.options.filters,this.slidelist=view.slidelist,this.slidescount=view.slidescount,this.dimension=view[view.__dimension],this.target="slide"===this.slider.options.filtertarget?"$element":"$bg_img",this.filtername=$.browser.webkit?"webkitfilter":"filter";var superfun=view.controller.__renderhook.fun,superref=view.controller.__renderhook.ref;view.controller.rendercallback(function(controller,value){superfun.call(superref,controller,value),this.applyeffect(value)},this),this.applyeffect(view.controller.value)},p.applyeffect=function(value){for(var factor,slide,i=0;i