PageSourceSearch

https://static.olansith.com/concat/inikKBzavtSRqirmpnoolkiq3k/stat…/script/plugins/owlcarousel/viewer.min.js

js olansith.com collected 2026-10-01 13:03:46 UTC 364,468 bytes, 11,307 lines download raw bytes

1/* /assets/widget/script/plugins/jquery.lazyload.js,/assets/widget/script/plugins/slick/slick.js,/assets/widget/script/plugins/owlcarousel/owl.carousel.js,/assets/widget/script/plugins/owlcarousel/masterslider.js,/assets/widget/script/plugins/owlcarousel/viewer.min.js */�/* /assets/widget/script/plugins/jquery.lazyload.js */�(function(c,b,a,e){var d=c(b);
2c.fn.lazyload=function(f){var h=this;
3var i;
4var g={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:true,appear:null,load:null,afterLoad:function(){c.noop()
5},placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};
6function j(){var k=0;
7h.each(function(){var l=c(this);
8if(g.skip_invisible&&!l.is(":visible")){return
9}if(c.abovethetop(this,g)||c.leftofbegin(this,g)){}else{if(!c.belowthefold(this,g)&&!c.rightoffold(this,g)){l.trigger("appear");
10k=0
11}else{if(++k>g.failure_limit){return false
12}}}})
13}if(f){if(e!==f.failurelimit){f.failure_limit=f.failurelimit;
14delete f.failurelimit
15}if(e!==f.effectspeed){f.effect_speed=f.effectspeed;
16delete f.effectspeed
17}c.extend(g,f)
18}i=(g.container===e||g.container===b)?d:c(g.container);
19if(0===g.event.indexOf("scroll")){i.bind(g.event,function(){return j()
20})
21}this.each(function(){var k=this;
22var l=c(k);
23k.loaded=false;
24if(l.attr("src")===e||l.attr("src")===false){if(l.is("img")){l.attr("src",g.placeholder)
25}}l.one("appear",function(){if(!this.loaded){if(g.appear){var m=h.length;
26g.appear.call(k,m,g)
27}c("<img />").bind("load",function(){var o=l.attr("data-"+g.data_attribute);
28l.hide();
29if(l.is("img")){l.attr("src",o)
30}else{l.css("background-image","url('"+o+"')")
31}l[g.effect](g.effect_speed);
32k.loaded=true;
33var n=c.grep(h,function(q){return !q.loaded
34});
35h=c(n);
36if(g.load){var p=h.length;
37g.load.call(k,p,g)
38}g.afterLoad()
39}).attr("src",l.attr("data-"+g.data_attribute))
40}});
41if(0!==g.event.indexOf("scroll")){l.bind(g.event,function(){if(!k.loaded){l.trigger("appear")
42}})
43}});
44d.bind("resize",function(){j()
45});
46if((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)){d.bind("pageshow",function(k){if(k.originalEvent&&k.originalEvent.persisted){h.each(function(){c(this).trigger("appear")
47})
48}})
49}c(a).ready(function(){j()
50});
51return this
52};
53c.belowthefold=function(g,h){var f;
54if(h.container===e||h.container===b){f=(b.innerHeight?b.innerHeight:d.height())+d.scrollTop()
55}else{f=c(h.container).offset().top+c(h.container).height()
56}return f<=c(g).offset().top-h.threshold
57};
58c.rightoffold=function(g,h){var f;
59if(h.container===e||h.container===b){f=d.width()+d.scrollLeft()
60}else{f=c(h.container).offset().left+c(h.container).width()
61}return f<=c(g).offset().left-h.threshold
62};
63c.abovethetop=function(g,h){var f;
64if(h.container===e||h.container===b){f=d.scrollTop()
65}else{f=c(h.container).offset().top
66}return f>=c(g).offset().top+h.threshold+c(g).height()
67};
68c.leftofbegin=function(g,h){var f;
69if(h.container===e||h.container===b){f=d.scrollLeft()
70}else{f=c(h.container).offset().left
71}return f>=c(g).offset().left+h.threshold+c(g).width()
72};
73c.inviewport=function(f,g){return !c.rightoffold(f,g)&&!c.leftofbegin(f,g)&&!c.belowthefold(f,g)&&!c.abovethetop(f,g)
74};
75c.extend(c.expr[":"],{"below-the-fold":function(f){return c.belowthefold(f,{threshold:0})
76},"above-the-top":function(f){return !c.belowthefold(f,{threshold:0})
77},"right-of-screen":function(f){return c.rightoffold(f,{threshold:0})
78},"left-of-screen":function(f){return !c.rightoffold(f,{threshold:0})
79},"in-viewport":function(f){return c.inviewport(f,{threshold:0})
80},"above-the-fold":function(f){return !c.belowthefold(f,{threshold:0})
81},"right-of-fold":function(f){return c.rightoffold(f,{threshold:0})
82},"left-of-fold":function(f){return !c.rightoffold(f,{threshold:0})
83}})
84})(jQuery,window,document);;�/* /assets/widget/script/plugins/slick/slick.js */�(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)
85}else{if(typeof exports!=="undefined"){module.exports=a(require("jquery"))
86}else{a(jQuery)
87}}}(function(a){var b=window.Slick||{};
88b=(function(){var c=0;
89function d(g,h){var f=this,e;
90f.defaults={accessibility:true,adaptiveHeight:false,appendArrows:a(g),appendDots:a(g),arrows:true,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>
90',autoplay:false,autoplaySpeed:3000,centerMode:false,centerPadding:"50px",cssEase:"ease",customPaging:function(k,j){return'<button type="button" data-role="none" role="button" aria-required="false" tabindex="0">'+(j+1)+"</button>"
91},dots:false,dotsClass:"slick-dots",draggable:true,easing:"linear",edgeFriction:0.35,fade:false,focusOnSelect:false,infinite:true,initialSlide:0,lazyLoad:"ondemand",mobileFirst:false,pauseOnHover:true,pauseOnDotsHover:false,respondTo:"window",responsive:null,rows:1,rtl:false,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:true,swipeToSlide:false,touchMove:true,touchThreshold:5,useCSS:true,variableWidth:false,vertical:false,verticalSwiping:false,waitForAnimate:true,zIndex:1000};
92f.initials={animating:false,dragging:false,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:false,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:false,unslicked:false};
93a.extend(f,f.initials);
94f.activeBreakpoint=null;
95f.animType=null;
96f.animProp=null;
97f.breakpoints=[];
98f.breakpointSettings=[];
99f.cssTransitions=false;
100f.hidden="hidden";
101f.paused=false;
102f.positionProp=null;
103f.respondTo=null;
104f.rowCount=1;
105f.shouldClick=true;
106f.$slider=a(g);
107f.$slidesCache=null;
108f.transformType=null;
109f.transitionType=null;
110f.visibilityChange="visibilitychange";
111f.windowWidth=0;
112f.windowTimer=null;
113e=a(g).data("slick")||{};
114f.options=a.extend({},f.defaults,e,h);
115f.currentSlide=f.options.initialSlide;
116f.originalSettings=f.options;
117if(typeof document.mozHidden!=="undefined"){f.hidden="mozHidden";
118f.visibilityChange="mozvisibilitychange"
119}else{if(typeof document.webkitHidden!=="undefined"){f.hidden="webkitHidden";
120f.visibilityChange="webkitvisibilitychange"
121}}f.autoPlay=a.proxy(f.autoPlay,f);
122f.autoPlayClear=a.proxy(f.autoPlayClear,f);
123f.changeSlide=a.proxy(f.changeSlide,f);
124f.clickHandler=a.proxy(f.clickHandler,f);
125f.selectHandler=a.proxy(f.selectHandler,f);
126f.setPosition=a.proxy(f.setPosition,f);
127f.swipeHandler=a.proxy(f.swipeHandler,f);
128f.dragHandler=a.proxy(f.dragHandler,f);
129f.keyHandler=a.proxy(f.keyHandler,f);
130f.autoPlayIterator=a.proxy(f.autoPlayIterator,f);
131f.instanceUid=c++;
132f.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/;
133f.registerBreakpoints();
134f.init(true);
135f.checkResponsive(true)
136}return d
137}());
138b.prototype.addSlide=b.prototype.slickAdd=function(c,e,f){var d=this;
139if(typeof(e)==="boolean"){f=e;
140e=null
141}else{if(e<0||(e>=d.slideCount)){return false
142}}d.unload();
143if(typeof(e)==="number"){if(e===0&&d.$slides.length===0){a(c).appendTo(d.$slideTrack)
144}else{if(f){a(c).insertBefore(d.$slides.eq(e))
145}else{a(c).insertAfter(d.$slides.eq(e))
146}}}else{if(f===true){a(c).prependTo(d.$slideTrack)
147}else{a(c).appendTo(d.$slideTrack)
148}}d.$slides=d.$slideTrack.children(this.options.slide);
149d.$slideTrack.children(this.options.slide).detach();
150d.$slideTrack.append(d.$slides);
151d.$slides.each(function(g,h){a(h).attr("data-slick-index",g)
152});
153d.$slidesCache=d.$slides;
154d.reinit()
155};
156b.prototype.animateHeight=function(){var d=this;
157if(d.options.slidesToShow===1&&d.options.adaptiveHeight===true&&d.options.vertical===false){var c=d.$slides.eq(d.currentSlide).outerHeight(true);
158d.$list.animate({height:c},d.options.speed)
159}};
160b.prototype.animateSlide=function(f,e){var d={},c=this;
161c.animateHeight();
162if(c.options.rtl===true&&c.options.vertical===false){f=-f
163}if(c.transformsEnabled===false){if(c.options.vertical===false){c.$slideTrack.animate({left:f},c.options.speed,c.options.easing,e)
164}else{c.$slideTrack.animate({top:f},c.options.speed,c.options.easing,e)
165}}else{if(c.cssTransitions===false){if(c.options.rtl===true){c.currentLeft=-(c.currentLeft)
166}a({animStart:c.currentLeft}).animate({animStart:f},{duration:c.options.speed,easing:c.options.easing,step:function(g){g=Math.ceil(g);
167if(c.options.vertical===false){d[c.animType]="translate("+g+"px, 0px)";
168c.$slideTrack.css(d)
169}else{d[c.animType]="translate(0px,"+g+"px)";
170c.$slideTrack.css(d)
171}},complete:function(){if(e){e.call()
172}}})
173}else{c.applyTransition();
174f=Math.ceil(f);
175if(c.options.vertical===false){d[c.animType]="translate3d("+f+"px, 0px, 0px)"
176}else{d[c.animType]="translate3d(0px,"+f+"px, 0px)"
177}c.$slideTrack.css(d);
178if(e){setTimeout(function(){c.disableTransition();
179e.call()
180},c.options.speed)
181}}}};
182b.prototype.asNavFor=function(e){var d=this,c=d.options.asNavFor;
183if(c&&c!==null){c=a(c).not(d.$slider)
184}if(c!==null&&typeof c==="object"){c.each(function(){var f=a(this).slick("getSlick");
185if(!f.unslicked){f.slideHandler(e,true)
186}
186})
187}};
188b.prototype.applyTransition=function(c){var d=this,e={};
189if(d.options.fade===false){e[d.transitionType]=d.transformType+" "+d.options.speed+"ms "+d.options.cssEase
190}else{e[d.transitionType]="opacity "+d.options.speed+"ms "+d.options.cssEase
191}if(d.options.fade===false){d.$slideTrack.css(e)
192}else{d.$slides.eq(c).css(e)
193}};
194b.prototype.autoPlay=function(){var c=this;
195if(c.autoPlayTimer){clearInterval(c.autoPlayTimer)
196}if(c.slideCount>c.options.slidesToShow&&c.paused!==true){c.autoPlayTimer=setInterval(c.autoPlayIterator,c.options.autoplaySpeed)
197}};
198b.prototype.autoPlayClear=function(){var c=this;
199if(c.autoPlayTimer){clearInterval(c.autoPlayTimer)
200}};
201b.prototype.autoPlayIterator=function(){var c=this;
202if(c.options.infinite===false){if(c.direction===1){if((c.currentSlide+1)===c.slideCount-1){c.direction=0
203}c.slideHandler(c.currentSlide+c.options.slidesToScroll)
204}else{if((c.currentSlide-1===0)){c.direction=1
205}c.slideHandler(c.currentSlide-c.options.slidesToScroll)
206}}else{c.slideHandler(c.currentSlide+c.options.slidesToScroll)
207}};
208b.prototype.buildArrows=function(){var c=this;
209if(c.options.arrows===true){c.$prevArrow=a(c.options.prevArrow).addClass("slick-arrow");
210c.$nextArrow=a(c.options.nextArrow).addClass("slick-arrow");
211if(c.slideCount>c.options.slidesToShow){c.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex");
212c.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex");
213if(c.htmlExpr.test(c.options.prevArrow)){c.$prevArrow.prependTo(c.options.appendArrows)
214}if(c.htmlExpr.test(c.options.nextArrow)){c.$nextArrow.appendTo(c.options.appendArrows)
215}if(c.options.infinite!==true){c.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")
216}}else{c.$prevArrow.add(c.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"})
217}}};
218b.prototype.buildDots=function(){var d=this,e,c;
219if(d.options.dots===true&&d.slideCount>d.options.slidesToShow){c='<ul class="'+d.options.dotsClass+'">';
220for(e=0;
221e<=d.getDotCount();
222e+=1){c+="<li>"+d.options.customPaging.call(this,d,e)+"</li>"
223}c+="</ul>";
224d.$dots=a(c).appendTo(d.options.appendDots);
225d.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")
226}};
227b.prototype.buildOut=function(){var c=this;
228c.$slides=c.$slider.children(c.options.slide+":not(.slick-cloned)").addClass("slick-slide");
229c.slideCount=c.$slides.length;
230c.$slides.each(function(d,e){a(e).attr("data-slick-index",d).data("originalStyling",a(e).attr("style")||"")
231});
232c.$slidesCache=c.$slides;
233c.$slider.addClass("slick-slider");
234c.$slideTrack=(c.slideCount===0)?a('<div class="slick-track"/>').appendTo(c.$slider):c.$slides.wrapAll('<div class="slick-track"/>').parent();
235c.$list=c.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent();
236c.$slideTrack.css("opacity",0);
237if(c.options.centerMode===true||c.options.swipeToSlide===true){c.options.slidesToScroll=1
238}a("img[data-lazy]",c.$slider).not("[src]").addClass("slick-loading");
239c.setupInfinite();
240c.buildArrows();
241c.buildDots();
242c.updateDots();
243c.setSlideClasses(typeof c.currentSlide==="number"?c.currentSlide:0);
244if(c.options.draggable===true){c.$list.addClass("draggable")
245}};
246b.prototype.buildRows=function(){var m=this,l,k,i,d,j,h,e;
247d=document.createDocumentFragment();
248h=m.$slider.children();
249if(m.options.rows>1){e=m.options.slidesPerRow*m.options.rows;
250j=Math.ceil(h.length/e);
251for(l=0;
252l<j;
253l++){var f=document.createElement("div");
254for(k=0;
255k<m.options.rows;
256k++){var n=document.createElement("div");
257for(i=0;
258i<m.options.slidesPerRow;
259i++){var g=(l*e+((k*m.options.slidesPerRow)+i));
260if(h.get(g)){n.appendChild(h.get(g))
261}}f.appendChild(n)
262}d.appendChild(f)
263}m.$slider.html(d);
264m.$slider.children().children().children().css({width:(100/m.options.slidesPerRow)+"%",display:"inline-block"})
265}};
266b.prototype.checkResponsive=function(h,j){var k=this,i,c,e,f=false;
267var g=k.$slider.width();
268var d=window.innerWidth||a(window).width();
269if(k.respondTo==="window"){e=d
270}else{if(k.respondTo==="slider"){e=g
271}else{if(k.respondTo==="min"){e=Math.min(d,g)
272}}}if(k.options.responsive&&k.options.responsive.length&&k.options.responsive!==null){c=null;
273for(i in k.breakpoints){if(k.breakpoints.hasOwnProperty(i)){if(k.originalSettings.mobileFirst===false){if(e<k.breakpoints[i]){c=k.breakpoints[i]
274}}else{if(e>k.breakpoints[i]){c=k.breakpoints[i]
275}}}}if(c!==null){if(k.activeBreakpoint!==null){if(c!==k.activeBreakpoint||j){k.activeBreakpoint=c;
276if(k.breakpointSettings[c]==="unslick"){k.unslick(c)
277}else{k.options=a.extend({},k.originalSettings,k.breakpointSettings[c]);
278if(h===true){k.currentSlide=k.options.initialSlide
279}k.refresh(h)
280}f=c
281}}else{k.activeBreakpoint=c;
282if(k.breakpointSettings[c]==="unslick"){k.unslick(c)
283}else{k.options=a.extend({},k.originalSettings,k.breakpointSettings[c]);
284if(h===true){k.currentSlide=k.options.initialSlide
285}k.refresh(h)
286}f=c
287}}else{if(k.activeBreakpoint!==null){k.activeBreakpoint=null;
288k.options=k.originalSettings;
289if(h===true){k.currentSlide=k.options.initialSlide
290}k.refresh(h);
291f=c
292}}if(!h&&f!==false){k.$slider.trigger("breakpoint",[k,f])
293}}};
294b.prototype.changeSlide=function(g,j){var e=this,c=a(g.target),i,f,h;
295if(c.is("a")){g.preventDefault()
296}if(!c.is("li")){c=c.closest("li")
297}h=(e.slideCount%e.options.slidesToScroll!==0);
298i=h?0:(e.slideCount-e.currentSlide)%e.options.slidesToScroll;
299switch(g.data.message){case"previous":f=i===0?e.options.slidesToScroll:e.options.slidesToShow-i;
300if(e.slideCount>e.options.slidesToShow){e.slideHandler(e.currentSlide-f,false,j)
301}break;
302case"next":f=i===0?e.options.slidesToScroll:i;
303if(e.slideCount>e.options.slidesToShow){e.slideHandler(e.currentSlide+f,false,j)
304}break;
305case"index":var d=g.data.index===0?0:g.data.index||c.index()*e.options.slidesToScroll;
306e.slideHandler(e.checkNavigable(d),false,j);
307c.children().trigger("focus");
308break;
309default:return
310}};
311b.prototype.checkNavigable=function(d){var c=this,e,f;
312e=c.getNavigableIndexes();
313f=0;
314if(d>e[e.length-1]){d=e[e.length-1]
315}else{for(var g in e){if(d<e[g]){d=f;
316break
317}f=e[g]
318}}return d
319};
320b.prototype.cleanUpEvents=function(){var c=this;
321if(c.options.dots&&c.$dots!==null){a("li",c.$dots).off("click.slick",c.changeSlide);
322if(c.options.pauseOnDotsHover===true&&c.options.autoplay===true){a("li",c.$dots).off("mouseenter.slick",a.proxy(c.setPaused,c,true)).off("mouseleave.
322slick",a.proxy(c.setPaused,c,false))
323}}if(c.options.arrows===true&&c.slideCount>c.options.slidesToShow){c.$prevArrow&&c.$prevArrow.off("click.slick",c.changeSlide);
324c.$nextArrow&&c.$nextArrow.off("click.slick",c.changeSlide)
325}c.$list.off("touchstart.slick mousedown.slick",c.swipeHandler);
326c.$list.off("touchmove.slick mousemove.slick",c.swipeHandler);
327c.$list.off("touchend.slick mouseup.slick",c.swipeHandler);
328c.$list.off("touchcancel.slick mouseleave.slick",c.swipeHandler);
329c.$list.off("click.slick",c.clickHandler);
330a(document).off(c.visibilityChange,c.visibility);
331c.$list.off("mouseenter.slick",a.proxy(c.setPaused,c,true));
332c.$list.off("mouseleave.slick",a.proxy(c.setPaused,c,false));
333if(c.options.accessibility===true){c.$list.off("keydown.slick",c.keyHandler)
334}if(c.options.focusOnSelect===true){a(c.$slideTrack).children().off("click.slick",c.selectHandler)
335}a(window).off("orientationchange.slick.slick-"+c.instanceUid,c.orientationChange);
336a(window).off("resize.slick.slick-"+c.instanceUid,c.resize);
337a("[draggable!=true]",c.$slideTrack).off("dragstart",c.preventDefault);
338a(window).off("load.slick.slick-"+c.instanceUid,c.setPosition);
339a(document).off("ready.slick.slick-"+c.instanceUid,c.setPosition)
340};
341b.prototype.cleanUpRows=function(){var d=this,c;
342if(d.options.rows>1){c=d.$slides.children().children();
343c.removeAttr("style");
344d.$slider.html(c)
345}};
346b.prototype.clickHandler=function(d){var c=this;
347if(c.shouldClick===false){d.stopImmediatePropagation();
348d.stopPropagation();
349d.preventDefault()
350}};
351b.prototype.destroy=function(d){var c=this;
352c.autoPlayClear();
353c.touchObject={};
354c.cleanUpEvents();
355a(".slick-cloned",c.$slider).detach();
356if(c.$dots){c.$dots.remove()
357}if(c.options.arrows===true){if(c.$prevArrow&&c.$prevArrow.length){c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display","");
358if(c.htmlExpr.test(c.options.prevArrow)){c.$prevArrow.remove()
359}}if(c.$nextArrow&&c.$nextArrow.length){c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display","");
360if(c.htmlExpr.test(c.options.nextArrow)){c.$nextArrow.remove()
361}}}if(c.$slides){c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))
362});
363c.$slideTrack.children(this.options.slide).detach();
364c.$slideTrack.detach();
365c.$list.detach();
366c.$slider.append(c.$slides)
367}c.cleanUpRows();
368c.$slider.removeClass("slick-slider");
369c.$slider.removeClass("slick-initialized");
370c.unslicked=true;
371if(!d){c.$slider.trigger("destroy",[c])
372}};
373b.prototype.disableTransition=function(c){var d=this,e={};
374e[d.transitionType]="";
375if(d.options.fade===false){d.$slideTrack.css(e)
376}else{d.$slides.eq(c).css(e)
377}};
378b.prototype.fadeSlide=function(d,e){var c=this;
379if(c.cssTransitions===false){c.$slides.eq(d).css({zIndex:c.options.zIndex});
380c.$slides.eq(d).animate({opacity:1},c.options.speed,c.options.easing,e)
381}else{c.applyTransition(d);
382c.$slides.eq(d).css({opacity:1,zIndex:c.options.zIndex});
383if(e){setTimeout(function(){c.disableTransition(d);
384e.call()
385},c.options.speed)
386}}};
387b.prototype.fadeSlideOut=function(d){var c=this;
388if(c.cssTransitions===false){c.$slides.eq(d).animate({opacity:0,zIndex:c.options.zIndex-2},c.options.speed,c.options.easing)
389}else{c.applyTransition(d);
390c.$slides.eq(d).css({opacity:0,zIndex:c.options.zIndex-2})
391}};
392b.prototype.filterSlides=b.prototype.slickFilter=function(d){var c=this;
393if(d!==null){c.unload();
394c.$slideTrack.children(this.options.slide).detach();
395c.$slidesCache.filter(d).appendTo(c.$slideTrack);
396c.reinit()
397}};
398b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var c=this;
399return c.currentSlide
400};
401b.prototype.getDotCount=function(){var d=this;
402var f=0;
403var c=0;
404var e=0;
405if(d.options.infinite===true){while(f<d.slideCount){++e;
406f=c+d.options.slidesToShow;
407c+=d.options.slidesToScroll<=d.options.slidesToShow?d.options.slidesToScroll:d.options.slidesToShow
408}}else{if(d.options.centerMode===true){e=d.slideCount
409}else{while(f<d.slideCount){++e;
410f=c+d.options.slidesToShow;
411c+=d.options.slidesToScroll<=d.options.slidesToShow?d.options.slidesToScroll:d.options.slidesToShow
412}}}return e-1
413};
414b.prototype.getLeft=function(f){var d=this,h,e,c=0,g;
415d.slideOffset=0;
416e=d.$slides.first().outerHeight(true);
417if(d.options.infinite===true){if(d.slideCount>d.options.slidesToShow){d.slideOffset=(d.slideWidth*d.options.slidesToShow)*-1;
418c=(e*d.options.slidesToShow)*-1
419}if(d.slideCount%d.options.slidesToScroll!==0){if(f+d.options.slidesToScroll>d.slideCount&&d.slideCount>d.options.slidesToShow){if(f>d.slideCount){d.slideOffset=((d.options.slidesToShow-(f-d.slideCount))*d.slideWidth)*-1;
420c=((d.options.slidesToShow-(f-d.slideCount))*e)*-1
421}else{d.slideOffset=((d.slideCount%d.options.slidesToScroll)*d.slideWidth)*-1;
422c=((d.slideCount%d.options.slidesToScroll)*e)*-1
423}}}}else{if(f+d.options.slidesToShow>d.slideCount){d.slideOffset=((f+d.options.slidesToShow)-d.slideCount)*d.slideWidth;
424c=((f+d.options.slidesToShow)-d.slideCount)*e
425}}if(d.slideCount<=d.options.slidesToShow){d.slideOffset=0;
426c=0
427}if(d.options.centerMode===true&&d.options.infinite===true){d.slideOffset+=d.slideWidth*Math.floor(d.options.slidesToShow/2)-d.slideWidth
428}else{if(d.options.centerMode===true){d.slideOffset=0;
429d.slideOffset+=d.slideWidth*Math.floor(d.options.slidesToShow/2)
430}}if(d.options.vertical===false){h=((f*d.slideWidth)*-1)+d.slideOffset
431}else{h=((f*e)*-1)+c
432}if(d.options.variableWidth===true){if(d.slideCount<=d.options.slidesToShow||d.options.infinite===false){g=d.$slideTrack.children(".slick-slide").eq(f)
433}else{g=d.$slideTrack.children(".slick-slide").eq(f+d.options.slidesToShow)
434}h=g[0]?g[0].offsetLeft*-1:0;
435if(d.options.centerMode===true){if(d.options.infinite===false){g=d.$slideTrack.children(".slick-slide").eq(f)
436}else{g=d.$slideTrack.children(".slick-slide").eq(f+d.options.slidesToShow+1)
437}h=g[0]?g[0].offsetLeft*-1:0;
438h+=(d.$list.width()-g.outerWidth())/2
439}}return h
440};
441b.prototype.getOption=b.prototype.slickGetOption=function(d){var c=this;
442return c.options[d]
443};
444b.prototype.getNavigableIndexes=function(){var f=this,g=0,d=0,e=[],c;
445if(f.options.infinite===false){c=f.slideCount
446}else{g=f.options.slidesToScroll*-1;
447d=f.options.slidesToScroll*-1;
448c=f.slideCount*2
449}while(g<c){e.push(g);
450g=d+f.options.slidesToScroll;
451d+=f.options.slidesToScroll<=f.options.slidesToShow?f.options.slidesToScroll:f.options.slidesToShow
452}return e
453};
454b.prototype.getSlick=function(){return this
455};
456b.prototype.getSlideCount=function(){var e=this,d,f,c;
457c=e.options.centerMode===true?e.slideWidth*Math.floor(e.options.slidesToShow/2):0;
458if(e.options.swipeToSlide===true){e.$slideTrack.find(".slick-slide").each(function(h,g){if(g.offsetLeft-c+(a(g).outerWidth()/2)>(e.swipeLeft*-1)){f=g;
459return false
460}});
461d=Math.abs(a(f).attr("data-slick-index")-e.currentSlide)||1;
462return d
463}else{return e.options.slidesToScroll
464}};
465b.prototype.goTo=b.prototype.slickGoTo=function(c,e){var d=this;
466d.changeSlide({data:{message:"index",index:parseInt(c)}},e)
467};
468b.prototype.init=function(c){var d=this;
469if(!a(d.$slider).hasClass("slick-initialized")){a(d.$slider).addClass("slick-initialized");
470d.buildRows();
471d.buildOut();
472d.setProps();
473d.startLoad();
474d.loadSlider();
475d.initializeEvents();
476d.updateArrows();
477d.updateDots()
478}if(c){d.$slider.trigger("init",[d])
479}if(d.options.accessibility===true){d.initADA()
480}};
481b.prototype.initArrowEvents=function(){var c=this;
482if(c.options.arrows===true&&c.slideCount>c.options.slidesToShow){c.$prevArrow.on("click.slick",{message:"previous"},c.changeSlide);
483c.$nextArrow.on("click.slick",{message:"next"},c.changeSlide)
484}};
485b.prototype.initDotEvents=function(){var c=this;
486if(c.options.dots===true&&c.slideCount>c.options.slidesToShow){a("li",c.$dots).on("click.slick",{message:"index"},c.changeSlide)
487}if(c.options.dots===true&&c.options.pauseOnDotsHover===true&&c.options.autoplay===true){a("li",c.$dots).on("mouseenter.slick",a.proxy(c.setPaused,c,true)).on("mouseleave.slick",a.proxy(c.setPaused,c,false))
488}};
489b.prototype.initializeEvents=function(){var c=this;
490c.initArrowEvents();
491c.initDotEvents();
492c.$list.on("touchstart.slick mousedown.slick",{action:"start"},c.swipeHandler);
493c.$list.on("touchmove.slick mousemove.slick",{action:"move"},c.swipeHandler);
494c.$list.on("touchend.slick mouseup.slick",{action:"end"},c.swipeHandler);
vendor: 1,635 bytes, lines 495-520
495c.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},c.swipeHandler);
496c.$list.on("click.slick",c.clickHandler);
497a(document).on(c.visibilityChange,a.proxy(c.visibility,c));
498c.$list.on("mouseenter.slick",a.proxy(c.setPaused,c,true));
499c.$list.on("mouseleave.slick",a.proxy(c.setPaused,c,false));
500if(c.options.accessibility===true){c.$list.on("keydown.slick",c.keyHandler)
501}if(c.options.focusOnSelect===true){a(c.$slideTrack).children().on("click.slick",c.selectHandler)
502}a(window).on("orientationchange.slick.slick-"+c.instanceUid,a.proxy(c.orientationChange,c));
503a(window).on("resize.slick.slick-"+c.instanceUid,a.proxy(c.resize,c));
504a("[draggable!=true]",c.$slideTrack).on("dragstart",c.preventDefault);
505a(window).on("load.slick.slick-"+c.instanceUid,c.setPosition);
506a(document).on("ready.slick.slick-"+c.instanceUid,c.setPosition)
507};
508b.prototype.initUI=function(){var c=this;
509if(c.options.arrows===true&&c.slideCount>c.options.slidesToShow){c.$prevArrow.show();
510c.$nextArrow.show()
511}if(c.options.dots===true&&c.slideCount>c.options.slidesToShow){c.$dots.show()
512}if(c.options.autoplay===true){c.autoPlay()
513}};
514b.prototype.keyHandler=function(d){var c=this;
515if(!d.target.tagName.match("TEXTAREA|INPUT|SELECT")){if(d.keyCode===37&&c.options.accessibility===true){c.changeSlide({data:{message:"previous"}})
516}else{if(d.keyCode===39&&c.options.accessibility===true){c.changeSlide({data:{message:"next"}})
517}}}};
518b.prototype.lazyLoad=function(){var e=this,c,h,g,f;
519function d(i){a("img[data-lazy]",i).each(function(){var k=a(this),l=a(this).attr("data-lazy"),j=document.createElement("img");
520j.onload=function(){k.animate({opacity:0}
520,100,function(){k.attr("src",l).animate({opacity:1},200,function(){k.removeAttr("data-lazy").removeClass("slick-loading")
521})
522})
523};
524j.src=l
525})
526}if(e.options.centerMode===true){if(e.options.infinite===true){g=e.currentSlide+(e.options.slidesToShow/2+1);
527f=g+e.options.slidesToShow+2
528}else{g=Math.max(0,e.currentSlide-(e.options.slidesToShow/2+1));
529f=2+(e.options.slidesToShow/2+1)+e.currentSlide
530}}else{g=e.options.infinite?e.options.slidesToShow+e.currentSlide:e.currentSlide;
531f=g+e.options.slidesToShow;
532if(e.options.fade===true){if(g>0){g--
533}if(f<=e.slideCount){f++
534}}}c=e.$slider.find(".slick-slide").slice(g,f);
535d(c);
536if(e.slideCount<=e.options.slidesToShow){h=e.$slider.find(".slick-slide");
537d(h)
538}else{if(e.currentSlide>=e.slideCount-e.options.slidesToShow){h=e.$slider.find(".slick-cloned").slice(0,e.options.slidesToShow);
539d(h)
540}else{if(e.currentSlide===0){h=e.$slider.find(".slick-cloned").slice(e.options.slidesToShow*-1);
541d(h)
542}}}};
543b.prototype.loadSlider=function(){var c=this;
544c.setPosition();
545c.$slideTrack.css({opacity:1});
546c.$slider.removeClass("slick-loading");
547c.initUI();
548if(c.options.lazyLoad==="progressive"){c.progressiveLazyLoad()
549}};
550b.prototype.next=b.prototype.slickNext=function(){var c=this;
551c.changeSlide({data:{message:"next"}})
552};
553b.prototype.orientationChange=function(){var c=this;
554c.checkResponsive();
555c.setPosition()
556};
557b.prototype.pause=b.prototype.slickPause=function(){var c=this;
558c.autoPlayClear();
559c.paused=true
560};
561b.prototype.play=b.prototype.slickPlay=function(){var c=this;
562c.paused=false;
563c.autoPlay()
564};
565b.prototype.postSlide=function(d){var c=this;
566c.$slider.trigger("afterChange",[c,d]);
567c.animating=false;
568c.setPosition();
569c.swipeLeft=null;
570if(c.options.autoplay===true&&c.paused===false){c.autoPlay()
571}if(c.options.accessibility===true){c.initADA()
572}};
573b.prototype.prev=b.prototype.slickPrev=function(){var c=this;
574c.changeSlide({data:{message:"previous"}})
575};
576b.prototype.preventDefault=function(c){c.preventDefault()
577};
578b.prototype.progressiveLazyLoad=function(){var d=this,c,e;
579c=a("img[data-lazy]",d.$slider).length;
580if(c>0){e=a("img[data-lazy]",d.$slider).first();
581e.attr("src",e.attr("data-lazy")).removeClass("slick-loading").load(function(){e.removeAttr("data-lazy");
582d.progressiveLazyLoad();
583if(d.options.adaptiveHeight===true){d.setPosition()
584}}).error(function(){e.removeAttr("data-lazy");
585d.progressiveLazyLoad()
586})
587}};
588b.prototype.refresh=function(c){var d=this,e=d.currentSlide;
589d.destroy(true);
590a.extend(d,d.initials,{currentSlide:e});
591d.init();
592if(!c){d.changeSlide({data:{message:"index",index:e}},false)
593}};
594b.prototype.registerBreakpoints=function(){var e=this,d,f,c,g=e.options.responsive||null;
595if(a.type(g)==="array"&&g.length){e.respondTo=e.options.respondTo||"window";
596for(d in g){c=e.breakpoints.length-1;
597f=g[d].breakpoint;
598if(g.hasOwnProperty(d)){while(c>=0){if(e.breakpoints[c]&&e.breakpoints[c]===f){e.breakpoints.splice(c,1)
599}c--
600}e.breakpoints.push(f);
601e.breakpointSettings[f]=g[d].settings
602}}e.breakpoints.sort(function(i,h){return(e.options.mobileFirst)?i-h:h-i
603})
604}};
605b.prototype.reinit=function(){var c=this;
606c.$slides=c.$slideTrack.children(c.options.slide).addClass("slick-slide");
607c.slideCount=c.$slides.length;
608if(c.currentSlide>=c.slideCount&&c.currentSlide!==0){c.currentSlide=c.currentSlide-c.options.slidesToScroll
609}if(c.slideCount<=c.options.slidesToShow){c.currentSlide=0
610}c.registerBreakpoints();
611c.setProps();
612c.setupInfinite();
613c.buildArrows();
614c.updateArrows();
615c.initArrowEvents();
616c.buildDots();
617c.updateDots();
618c.initDotEvents();
619c.checkResponsive(false,true);
620if(c.options.focusOnSelect===true){a(c.$slideTrack).children().on("click.slick",c.selectHandler)
621}c.setSlideClasses(0);
622c.setPosition();
623c.$slider.trigger("reInit",[c]);
624if(c.options.autoplay===true){c.focusHandler()
625}};
626b.prototype.resize=function(){var c=this;
627if(a(window).width()!==c.windowWidth){clearTimeout(c.windowDelay);
628c.windowDelay=window.setTimeout(function(){c.windowWidth=a(window).width();
629c.checkResponsive();
630if(!c.unslicked){c.setPosition()
631}},50)
632}};
633b.prototype.removeSlide=b.prototype.slickRemove=function(d,f,e){var c=this;
634if(typeof(d)==="boolean"){f=d;
635d=f===true?0:c.slideCount-1
636}else{d=f===true?--d:d
637}if(c.slideCount<1||d<0||d>c.slideCount-1){return false
638}c.unload();
639if(e===true){c.$slideTrack.children().remove()
640}else{c.$slideTrack.children(this.options.slide).eq(d).remove()
641}c.$slides=c.$slideTrack.children(this.options.slide);
642c.$slideTrack.children(this.options.slide).detach();
643c.$slideTrack.append(c.$slides);
644c.$slidesCache=c.$slides;
645c.reinit()
646};
647b.prototype.setCSS=function(d){var e=this,f={}
647,c,g;
648if(e.options.rtl===true){d=-d
649}c=e.positionProp=="left"?Math.ceil(d)+"px":"0px";
650g=e.positionProp=="top"?Math.ceil(d)+"px":"0px";
651f[e.positionProp]=d;
652if(e.transformsEnabled===false){e.$slideTrack.css(f)
653}else{f={};
654if(e.cssTransitions===false){f[e.animType]="translate("+c+", "+g+")";
655e.$slideTrack.css(f)
656}else{f[e.animType]="translate3d("+c+", "+g+", 0px)";
657e.$slideTrack.css(f)
658}}};
659b.prototype.setDimensions=function(){var c=this;
660if(c.options.vertical===false){if(c.options.centerMode===true){c.$list.css({padding:("0px "+c.options.centerPadding)})
661}}else{c.$list.height(c.$slides.first().outerHeight(true)*c.options.slidesToShow);
662if(c.options.centerMode===true){c.$list.css({padding:(c.options.centerPadding+" 0px")})
663}}c.listWidth=c.$list.width();
664c.listHeight=c.$list.height();
665if(c.options.vertical===false&&c.options.variableWidth===false){c.slideWidth=Math.ceil(c.listWidth/c.options.slidesToShow);
666c.$slideTrack.width(Math.ceil((c.slideWidth*c.$slideTrack.children(".slick-slide").length)))
667}else{if(c.options.variableWidth===true){c.$slideTrack.width(5000*c.slideCount)
668}else{c.slideWidth=Math.ceil(c.listWidth);
669c.$slideTrack.height(Math.ceil((c.$slides.first().outerHeight(true)*c.$slideTrack.children(".slick-slide").length)))
670}}var d=c.$slides.first().outerWidth(true)-c.$slides.first().width();
671if(c.options.variableWidth===false){c.$slideTrack.children(".slick-slide").width(c.slideWidth-d)
672}};
673b.prototype.setFade=function(){var c=this,d;
674c.$slides.each(function(e,f){d=(c.slideWidth*e)*-1;
675if(c.options.rtl===true){a(f).css({position:"relative",right:d,top:0,zIndex:c.options.zIndex-2,opacity:0}
675)
676}else{a(f).css({position:"relative",left:d,top:0,zIndex:c.options.zIndex-2,opacity:0})
677}});
678c.$slides.eq(c.currentSlide).css({zIndex:c.options.zIndex-1,opacity:1})
679};
680b.prototype.setHeight=function(){var d=this;
681if(d.options.slidesToShow===1&&d.options.adaptiveHeight===true&&d.options.vertical===false){var c=d.$slides.eq(d.currentSlide).outerHeight(true);
682d.$list.css("height",c)
683}};
684b.prototype.setOption=b.prototype.slickSetOption=function(f,h,e){var d=this,c,g;
685if(f==="responsive"&&a.type(h)==="array"){for(g in h){if(a.type(d.options.responsive)!=="array"){d.options.responsive=[h[g]]
686}else{c=d.options.responsive.length-1;
687while(c>=0){if(d.options.responsive[c].breakpoint===h[g].breakpoint){d.options.responsive.splice(c,1)
688}c--
689}d.options.responsive.push(h[g])
690}}}else{d.options[f]=h
691}if(e===true){d.unload();
692d.reinit()
693}};
694b.prototype.setPosition=function(){var c=this;
695c.setDimensions();
696c.setHeight();
697if(c.options.fade===false){c.setCSS(c.getLeft(c.currentSlide))
698}else{c.setFade()
699}c.$slider.trigger("setPosition",[c])
700};
701b.prototype.setProps=function(){var d=this,c=document.body.style;
702d.positionProp=d.options.vertical===true?"top":"left";
703if(d.positionProp==="top"){d.$slider.addClass("slick-vertical")
704}else{d.$slider.removeClass("slick-vertical")
705}if(c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.msTransition!==undefined){if(d.options.useCSS===true){d.cssTransitions=true
706}}if(d.options.fade){if(typeof d.options.zIndex==="number"){if(d.options.zIndex<3){d.options.zIndex=3
707}}else{d.options.zIndex=d.defaults.zIndex
708}}if(c.OTransform!==undefined){d.animType="OTransform";
709d.transformType="-o-transform";
710d.transitionType="OTransition";
711if(c.perspectiveProperty===undefined&&c.webkitPerspective===undefined){d.animType=false
712}}if(c.MozTransform!==undefined){d.animType="MozTransform";
713d.transformType="-moz-transform";
714d.transitionType="MozTransition";
715if(c.perspectiveProperty===undefined&&c.MozPerspective===undefined){d.animType=false
716}}if(c.webkitTransform!==undefined){d.animType="webkitTransform";
717d.transformType="-webkit-transform";
718d.transitionType="webkitTransition";
719if(c.perspectiveProperty===undefined&&c.webkitPerspective===undefined){d.animType=false
720}}if(c.msTransform!==undefined){d.animType="msTransform";
721d.transformType="-ms-transform";
722d.transitionType="msTransition";
723if(c.msTransform===undefined){d.animType=false
724}}if(c.transform!==undefined&&d.animType!==false){d.animType="transform";
725d.transformType="transform";
726d.transitionType="transition"
727}d.transformsEnabled=(d.animType!==null&&d.animType!==false)
728};
729b.prototype.setSlideClasses=function(f){var e=this,c,d,h,g;
730d=e.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true");
731e.$slides.eq(f).addClass("slick-current");
732if(e.options.centerMode===true){c=Math.floor(e.options.slidesToShow/2);
733if(e.options.infinite===true){if(f>=c&&f<=(e.slideCount-1)-c){e.$slides.slice(f-c,f+c+1).addClass("slick-active").attr("aria-hidden","false")
734}else{h=e.options.slidesToShow+f;
735d.slice(h-c+1,h+c+2).addClass("slick-active").attr("aria-hidden","false")
736}if(f===0){d.eq(d.length-1-e.options.slidesToShow).addClass("slick-center")
737}else{if(f===e.slideCount-1){d.eq(e.options.slidesToShow).addClass("slick-center")
738}}}e.$slides.eq(f).addClass("slick-center")
739}else{if(f>=0&&f<=(e.slideCount-e.options.slidesToShow)){e.$slides.slice(f,f+e.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")
740}else{if(d.length<=e.options.slidesToShow){d.addClass("slick-active").attr("aria-hidden","false")
741}else{g=e.slideCount%e.options.slidesToShow;
742h=e.options.infinite===true?e.options.slidesToShow+f:f;
743if(e.options.slidesToShow==e.options.slidesToScroll&&(e.slideCount-f)<e.options.slidesToShow){d.slice(h-(e.options.slidesToShow-g),h+g).addClass("slick-active").attr("aria-hidden","false")
744}else{d.slice(h,h+e.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")
745}}}}if(e.options.lazyLoad==="ondemand"){e.lazyLoad()
746}};
747b.prototype.setupInfinite=function(){var c=this,d,f,e;
748if(c.options.fade===true){c.options.centerMode=false
749}if(c.options.infinite===true&&c.options.fade===false){f=null;
750if(c.slideCount>c.options.slidesToShow){if(c.options.centerMode===true){e=c.options.slidesToShow+1
751}else{e=c.options.slidesToShow
752}for(d=c.slideCount;
753d>(c.slideCount-e);
754d-=1){f=d-1;
755a(c.$slides[f]).clone(true).attr("id","").attr("data-slick-index",f-c.slideCount).prependTo(c.$slideTrack).addClass("slick-cloned")
756}for(d=0;
757d<e;
758d+=1){f=d;
759a(c.$slides[f]).clone(true).attr("id","").attr("data-slick-index",f+c.slideCount).appendTo(c.$slideTrack).addClass("slick-cloned")
760}c.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")
761})
762}}};
763b.prototype.setPaused=function(d){var c=this;
764if(c.options.autoplay===true&&c.options.pauseOnHover===true){c.paused=d;
765if(!d){c.autoPlay()
766}else{c.autoPlayClear()
767}}};
768b.prototype.selectHandler=function(f){var e=this;
769var d=a(f.target).is(".slick-slide")?a(f.target):a(f.target).parents(".slick-slide");
770var c=parseInt(d.attr("data-slick-index"));
771if(!c){c=0
772}if(e.slideCount<=e.options.slidesToShow){e.setSlideClasses(c);
773e.asNavFor(c);
774return
775}e.slideHandler(c)
776};
777b.prototype.slideHandler=function(e,h,d){var c,k,g,i,f=null,j=this;
778h=h||false;
779if(j.animating===true&&j.options.waitForAnimate===true){return
780}if(j.options.fade===true&&j.currentSlide===e){return
781}if(j.slideCount<=j.options.slidesToShow){return
782}if(h===false){j.asNavFor(e)
783}c=e;
784f=j.getLeft(c);
785i=j.getLeft(j.currentSlide);
786j.currentLeft=j.swipeLeft===null?i:j.swipeLeft;
787if(j.options.infinite===false&&j.options.centerMode===false&&(e<0||e>j.getDotCount()*j.options.slidesToScroll)){if(j.options.fade===false){c=j.currentSlide;
788if(d!==true){j.animateSlide(i,function(){j.postSlide(c)
789})
790}else{j.postSlide(c)
791}}return
792}else{if(j.options.infinite===false&&j.options.centerMode===true&&(e<0||e>
792(j.slideCount-j.options.slidesToScroll))){if(j.options.fade===false){c=j.currentSlide;
793if(d!==true){j.animateSlide(i,function(){j.postSlide(c)
794})
795}else{j.postSlide(c)
796}}return
797}}if(j.options.autoplay===true){clearInterval(j.autoPlayTimer)
798}if(c<0){if(j.slideCount%j.options.slidesToScroll!==0){k=j.slideCount-(j.slideCount%j.options.slidesToScroll)
799}else{k=j.slideCount+c
800}}else{if(c>=j.slideCount){if(j.slideCount%j.options.slidesToScroll!==0){k=0
801}else{k=c-j.slideCount
802}}else{k=c
803}}j.animating=true;
804j.$slider.trigger("beforeChange",[j,j.currentSlide,k]);
805g=j.currentSlide;
806j.currentSlide=k;
807j.setSlideClasses(j.currentSlide);
808j.updateDots();
809j.updateArrows();
810if(j.options.fade===true){if(d!==true){j.fadeSlideOut(g);
811j.fadeSlide(k,function(){j.postSlide(k)
812})
813}else{j.postSlide(k)
814}j.animateHeight();
815return
816}if(d!==true){j.animateSlide(f,function(){j.postSlide(k)
817})
818}else{j.postSlide(k)
819}};
820b.prototype.startLoad=function(){var c=this;
821if(c.options.arrows===true&&c.slideCount>c.options.slidesToShow){c.$prevArrow.hide();
822c.$nextArrow.hide()
823}if(c.options.dots===true&&c.slideCount>c.options.slidesToShow){c.$dots.hide()
824}c.$slider.addClass("slick-loading")
825};
826b.prototype.swipeDirection=function(){var c,f,e,g,d=this;
827c=d.touchObject.startX-d.touchObject.curX;
828f=d.touchObject.startY-d.touchObject.curY;
829e=Math.atan2(f,c);
830g=Math.round(e*180/Math.PI);
831if(g<0){g=360-Math.abs(g)
832}if((g<=45)&&(g>=0)){return(d.options.rtl===false?"left":"right")
833}if((g<=360)&&(g>=315)){return(d.options.rtl===false?"left":"right")
834}if((g>=135)&&(g<=225)){return(d.options.rtl===false?"right":"left")
835}if(d.options.verticalSwiping===true){if((g>=35)&&(g<=135)){return"left"
836}else{return"right"
837}}return"vertical"
838};
839b.prototype.swipeEnd=function(e){var d=this,c;
840d.dragging=false;
841d.shouldClick=(d.touchObject.swipeLength>10)?false:true;
842if(d.touchObject.curX===undefined){return false
843}if(d.touchObject.edgeHit===true){d.$slider.trigger("edge",[d,d.swipeDirection()])
844}if(d.touchObject.swipeLength>=d.touchObject.minSwipe){switch(d.swipeDirection()){case"left":c=d.options.swipeToSlide?d.checkNavigable(d.currentSlide+d.getSlideCount()):d.currentSlide+d.getSlideCount();
845d.slideHandler(c);
846d.currentDirection=0;
847d.touchObject={};
848d.$slider.trigger("swipe",[d,"left"]);
849break;
850case"right":c=d.options.swipeToSlide?d.checkNavigable(d.currentSlide-d.getSlideCount()):d.currentSlide-d.getSlideCount();
851d.slideHandler(c);
852d.currentDirection=1;
853d.touchObject={};
854d.$slider.trigger("swipe",[d,"right"]);
855break
856}}else{if(d.touchObject.startX!==d.touchObject.curX){d.slideHandler(d.currentSlide);
857d.touchObject={}
858}}};
859b.prototype.swipeHandler=function(d){var c=this;
860if((c.options.swipe===false)||("ontouchend" in document&&c.options.swipe===false)){return
861}else{if(c.options.draggable===false&&d.type.indexOf("mouse")!==-1){return
862}}c.touchObject.fingerCount=d.originalEvent&&d.originalEvent.touches!==undefined?d.originalEvent.touches.length:1;
863c.touchObject.minSwipe=c.listWidth/c.options.touchThreshold;
864if(c.options.verticalSwiping===true){c.touchObject.minSwipe=c.listHeight/c.options.touchThreshold
865}switch(d.data.action){case"start":c.swipeStart(d);
866break;
867case"move":c.swipeMove(d);
868break;
869case"end":c.swipeEnd(d);
870break
871}};
872b.prototype.swipeMove=function(f){var e=this,j=false,h,d,g,c,i;
873i=f.originalEvent!==undefined?f.originalEvent.touches:null;
874if(!e.dragging||i&&i.length!==1){return false
875}h=e.getLeft(e.currentSlide);
876e.touchObject.curX=i!==undefined?i[0].pageX:f.clientX;
877e.touchObject.curY=i!==undefined?i[0].pageY:f.clientY;
878e.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(e.touchObject.curX-e.touchObject.startX,2)));
879if(e.options.verticalSwiping===true){e.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(e.touchObject.curY-e.touchObject.startY,2)))
880}d=e.swipeDirection();
881if(d==="vertical"){return
882}if(f.originalEvent!==undefined&&e.touchObject.swipeLength>4){f.preventDefault()
883}c=(e.options.rtl===false?1:-1)*(e.touchObject.curX>e.touchObject.startX?1:-1);
884if(e.options.verticalSwiping===true){c=e.touchObject.curY>e.touchObject.startY?1:-1
885}g=e.touchObject.swipeLength;
886e.touchObject.edgeHit=false;
887if(e.options.infinite===false){if((e.currentSlide===0&&d==="right")||(e.currentSlide>=e.getDotCount()&&d==="left")){g=e.touchObject.swipeLength*e.options.edgeFriction;
888e.touchObject.edgeHit=true
889}}if(e.options.vertical===false){e.swipeLeft=h+g*c
890}else{e.swipeLeft=h+(g*(e.$list.height()/e.listWidth))*c
891}if(e.options.verticalSwiping===true){e.swipeLeft=h+g*c
892}if(e.options.fade===true||e.options.touchMove===false){return false
893}if(e.animating===true){e.swipeLeft=null;
894return false
895}e.setCSS(e.swipeLeft)
896};
897b.prototype.swipeStart=function(d){var c=this,e;
898if(c.touchObject.fingerCount!==1||c.slideCount<=c.options.slidesToShow){c.touchObject={};
899return false
900}if(d.originalEvent!==undefined&&d.originalEvent.touches!==undefined){e=d.originalEvent.touches[0]
901}c.touchObject.startX=c.touchObject.curX=e!==undefined?e.pageX:d.clientX;
902c.touchObject.startY=c.touchObject.curY=e!==undefined?e.pageY:d.clientY;
903c.dragging=true
904};
905b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var c=this;
906if(c.$slidesCache!==null){c.unload();
907c.$slideTrack.children(this.options.slide).detach();
908c.$slidesCache.appendTo(c.$slideTrack);
909c.reinit()
910}};
911b.prototype.unload=function(){var c=this;
912a(".slick-cloned",c.$slider).remove();
913if(c.$dots){c.$dots.remove()
914}if(c.$prevArrow&&c.htmlExpr.test(c.options.prevArrow)){c.$prevArrow.remove()
915}if(c.$nextArrow&&c.htmlExpr.test(c.options.nextArrow)){c.$nextArrow.remove()
916}c.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")
917};
918b.prototype.unslick=function(d){var c=this;
919c.$slider.trigger("unslick",[c,d]);
920c.destroy()
921};
922b.prototype.updateArrows=function(){var d=this,c;
923c=Math.floor(d.options.slidesToShow/2);
924if(d.options.arrows===true&&d.slideCount>d.options.slidesToShow&&!d.options.infinite){d.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false");
925d.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false");
926if(d.currentSlide===0){d.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true");
927d.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")
928}else{if(d.currentSlide>=d.slideCount-d.options.slidesToShow&&d.options.centerMode===false){d.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true");
929d.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")
930}else{if(d.currentSlide>=d.slideCount-1&&d.options.centerMode===true){d.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true");
931d.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")
932}}}}};
933b.prototype.updateDots=function(){var c=this;
934if(c.$dots!==null){c.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true");
935c.$dots.find("li").eq(Math.floor(c.currentSlide/c.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false")
936}};
937b.prototype.visibility=function(){var c=this;
938if(document[c.hidden]){c.paused=true;
939c.autoPlayClear()
940}else{if(c.options.autoplay===true){c.paused=false;
941c.autoPlay()
942}}};
943b.prototype.initADA=function(){var c=this;
944c.$slides.add(c.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"});
945c.$slideTrack.attr("role","listbox");
946c.$slides.not(c.$slideTrack.find(".slick-cloned")).each(function(d){a(this).attr({role:"option","aria-describedby":"slick-slide"+c.instanceUid+d+""})
947});
948if(c.$dots!==null){c.$dots.attr("role","tablist").find("li").each(function(d){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+c.instanceUid+d+"",id:"slick-slide"+c.instanceUid+d+""})
949}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar")
950}c.activateADA()
951};
952b.prototype.activateADA=function(){var c=this,d=c.$slider.find("*").is(":focus");
953c.$slideTrack.find(".slick-active").attr({"aria-hidden":"false",tabindex:"0"}).find("a, input, button, select").attr({tabindex:"0"});
954(d)&&c.$slideTrack.find(".slick-active").focus()
955};
956b.prototype.focusHandler=function(){var c=this;
957c.$slider.on("focus.slick blur.slick","*",function(e){e.stopImmediatePropagation();
958var d=a(this);
959setTimeout(function(){if(c.isPlay){if(d.is(":focus")){c.autoPlayClear();
960c.paused=true
961}else{c.paused=false;
962c.autoPlay()
963}}},0)
964})
965};
966a.fn.slick=function(){var f=this,h=arguments[0],e=Array.prototype.slice.call(arguments,1),c=f.length,g=0,d;
967for(g;
968g<c;
969g++){if(typeof h=="object"||typeof h=="undefined"){f[g].slick=new b(f[g],h)
970}else{d=f[g].slick[h].apply(f[g].slick,e)
971}if(typeof d!="undefined"){return d
972}}return f
973}
974}));;�/* /assets/widget/script/plugins/owlcarousel/owl.carousel.js */�if(typeof Object.create!=="function"){Object.create=function(b){function a(){}a.prototype=b;
975return new a()
976}
977}(function(d,c,a){var e={init:function(f,g){var h=this;
978h.$elem=d(g);
979h.options=d.extend({},d.fn.owlCarousel.options,h.$elem.data(),f);
980h.userOptions=f;
981h.loadContent()
982},loadContent:function(){var h=this,g;
983function f(l){var j,k="";
984if(typeof h.options.jsonSuccess==="function"){h.options.jsonSuccess.apply(this,[l])
985}else{for(j in l.owl){if(l.owl.hasOwnProperty(j)){k+=l.owl[j].item
986}}h.$elem.html(k)
987}h.logIn()
988}if(typeof h.options.beforeInit==="function"){h.options.beforeInit.apply(this,[h.$elem])
989}if(typeof h.options.jsonPath==="string"){g=h.options.jsonPath;
990d.getJSON(g,f)
991}else{h.logIn()
992}},logIn:function(){var f=this;
993f.$elem.data("owl-originalStyles",f.$elem.attr("style"));
994f.$elem.data("owl-originalClasses",f.$elem.attr("class"));
995f.$elem.css({opacity:0});
996f.orignalItems=f.options.items;
997f.checkBrowser();
998f.wrapperWidth=0;
999f.checkVisible=null;
1000f.setVars()
1001},setVars:function(){var f=this;
1002if(f.$elem.children().length===0){return false
1003}f.baseClass();
1004f.eventTypes();
1005f.$userItems=f.$elem.children();
1006f.itemsAmount=f.$userItems.length;
1007f.wrapItems();
1008f.$owlItems=f.$elem.find(".owl-item");
1009f.$owlWrapper=f.$elem.find(".owl-wrapper");
1010f.playDirection="next";
1011f.prevItem=0;
1012f.prevArr=[0];
1013f.currentItem=0;
1014f.customEvents();
1015f.onStartup()
1016},onStartup:function(){var f=this;
1017f.updateItems();
1018f.calculateAll();
1019f.buildControls();
1020f.updateControls();
1021f.response();
1022f.moveEvents();
1023f.stopOnHover();
1024f.owlStatus();
1025if(f.options.transitionStyle!==false){f.transitionTypes(f.options.transitionStyle)
1026}if(f.options.autoPlay===true){f.options.autoPlay=5000
1027}f.play();
1028f.$elem.find(".owl-wrapper").css("display","block");
1029if(!f.$elem.is(":visible")){f.watchVisibility()
1030}else{f.$elem.css("opacity",1)
1031}f.onstartup=false;
1032f.eachMoveUpdate();
1033if(typeof f.options.afterInit==="function"){f.options.afterInit.apply(this,[f.$elem])
1034}},eachMoveUpdate:function(){var f=this;
1035if(f.options.lazyLoad===true){f.lazyLoad()
1036}if(f.options.autoHeight===true){f.autoHeight()
1037}f.onVisibleItems();
1038if(typeof f.options.afterAction==="function"){f.options.afterAction.apply(this,[f.$elem])
1039}}
1039,updateVars:function(){var f=this;
1040if(typeof f.options.beforeUpdate==="function"){f.options.beforeUpdate.apply(this,[f.$elem])
1041}f.watchVisibility();
1042f.updateItems();
1043f.calculateAll();
1044f.updatePosition();
1045f.updateControls();
1046f.eachMoveUpdate();
1047if(typeof f.options.afterUpdate==="function"){f.options.afterUpdate.apply(this,[f.$elem])
1048}},reload:function(){var f=this;
1049c.setTimeout(function(){f.updateVars()
1050},0)
1051},watchVisibility:function(){var f=this;
1052if(f.$elem.is(":visible")===false){f.$elem.css({opacity:0});
1053c.clearInterval(f.autoPlayInterval);
1054c.clearInterval(f.checkVisible)
1055}else{return false
1056}f.checkVisible=c.setInterval(function(){if(f.$elem.is(":visible")){f.reload();
1057f.$elem.animate({opacity:1},200);
1058c.clearInterval(f.checkVisible)
1059}},500)
1060},wrapItems:function(){var f=this;
1061if(f.$userItems.hasClass("hasTop")){f.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item gbBgColor0"></div>')
1062}else{f.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>')
1063}f.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">');
1064f.wrapperOuter=f.$elem.find(".owl-wrapper-outer");
1065f.$elem.css("display","block")
1066},baseClass:function(){var h=this,f=h.$elem.hasClass(h.options.baseClass),g=h.$elem.hasClass(h.options.theme);
1067if(!f){h.$elem.addClass(h.options.baseClass)
1068}if(!g){h.$elem.addClass(h.options.theme)
1069}},updateItems:function(){var h=this,g,f;
1070if(h.options.responsive===false){return false
1071}if(h.options.singleItem===true){h.options.items=h.orignalItems=1;
1072h.options.itemsCustom=false;
1073h.options.itemsDesktop=false;
1074h.options.itemsDesktopSmall=false;
1075h.options.itemsTablet=false;
1076h.options.itemsTabletSmall=false;
1077h.options.itemsMobile=false;
1078return false
1079}g=d(h.options.responsiveBaseWidth).width();
1080if(g>(h.options.itemsDesktop[0]||h.orignalItems)){h.options.items=h.orignalItems
1081}if(h.options.itemsCustom!==false){h.options.itemsCustom.sort(function(j,i){return j[0]-i[0]
1082});
1083for(f=0;
1084f<h.options.itemsCustom.length;
1085f+=1){if(h.options.itemsCustom[f][0]<=g){h.options.items=h.options.itemsCustom[f][1]
1086}}}else{if(g<=h.options.itemsDesktop[0]&&h.options.itemsDesktop!==false){h.options.items=h.options.itemsDesktop[1]
1087}if(g<=h.options.itemsDesktopSmall[0]&&h.options.itemsDesktopSmall!==false){h.options.items=h.options.itemsDesktopSmall[1]
1088}if(g<=h.options.itemsTablet[0]&&h.options.itemsTablet!==false){h.options.items=h.options.itemsTablet[1]
1089}if(g<=h.options.itemsTabletSmall[0]&&h.options.itemsTabletSmall!==false){h.options.items=h.options.itemsTabletSmall[1]
1090}if(g<=h.options.itemsMobile[0]&&h.options.itemsMobile!==false){h.options.items=h.options.itemsMobile[1]
1091}}if(h.options.items>h.itemsAmount&&h.options.itemsScaleUp===true){h.options.items=h.itemsAmount
1092}},response:function(){var h=this,g,f;
1093if(h.options.responsive!==true){return false
1094}f=d(c).width();
1095h.resizer=function(){if(d(c).width()!==f){if(h.options.autoPlay!==false){c.clearInterval(h.autoPlayInterval)
1096}c.clearTimeout(g);
1097g=c.setTimeout(function(){f=d(c).width();
1098h.updateVars()
1099},h.options.responsiveRefreshRate)
1100}};
1101d(c).resize(h.resizer)
1102},updatePosition:function(){var f=this;
1103f.jumpTo(f.currentItem);
1104if(f.options.autoPlay!==false){f.checkAp()
1105}},appendItemsSizes:function(){var h=this,f=0,g=h.itemsAmount-h.options.items;
1106h.$owlItems.each(function(i){var j=d(this);
1107j.css({width:h.itemWidth}).data("owl-item",Number(i));
1108if(i%h.options.items===0||i===g){if(!(i>g)){f+=1
1109}}j.data("owl-roundPages",f)
1110})
1111},appendWrapperSizes:function(){var g=this,f=g.$owlItems.length*g.itemWidth;
1112g.$owlWrapper.css({width:f*2,left:0});
1113g.appendItemsSizes()
1114},calculateAll:function(){var f=this;
1115f.calculateWidth();
1116f.appendWrapperSizes();
1117f.loops();
1118f.max()
1119},calculateWidth:function(){var f=this;
1120f.itemWidth=Math.round(f.$elem.width()/f.options.items)
1121},max:function(){var f=this,g=((f.itemsAmount*f.itemWidth)-f.options.items*f.itemWidth)*-1;
1122if(f.options.items>f.itemsAmount){f.maximumItem=0;
1123g=0;
1124f.maximumPixels=0
1125}else{f.maximumItem=f.itemsAmount-f.options.items;
1126f.maximumPixels=g
1127}return g
1128},min:function(){return 0
1129},loops:function(){var l=this,k=0,h=0,g,j,f;
1130l.positionsInArray=[0];
1131l.pagesInArray=[];
1132for(g=0;
1133g<l.itemsAmount;
1134g+=1){h+=l.itemWidth;
1135l.positionsInArray.push(-h);
1136if(l.options.scrollPerPage===true){j=d(l.$owlItems[g]);
1137f=j.data("owl-roundPages");
1138if(f!==k){l.pagesInArray[k]=l.positionsInArray[g];
1139k=f
1140}}}},buildControls:function(){var f=this;
1141if(f.options.navigation===true||f.options.pagination===true){f.owlControls=d('<div class="owl-control
1141s"/>').toggleClass("clickable",!f.browser.isTouch).appendTo(f.$elem)
1142}if(f.options.pagination===true){f.buildPagination()
1143}if(f.options.navigation===true){f.buildButtons()
1144}},buildButtons:function(){var g=this,f=d('<div class="owl-buttons"/>');
1145g.owlControls.append(f);
1146g.buttonPrev=d("<div/>",{"class":"owl-prev",html:g.options.navigationText[0]||""});
1147g.buttonNext=d("<div/>",{"class":"owl-next",html:g.options.navigationText[1]||""});
1148f.append(g.buttonPrev).append(g.buttonNext);
1149f.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(h){h.preventDefault()
1150});
1151f.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(h){h.preventDefault();
1152if(d(this).hasClass("owl-next")){g.next()
1153}else{g.prev()
1154}})
1155},buildPagination:function(){var f=this;
1156f.paginationWrapper=d('<div class="owl-pagination"/>');
1157f.owlControls.append(f.paginationWrapper);
1158f.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(g){g.preventDefault();
1159if(Number(d(this).data("owl-page"))!==f.currentItem){f.goTo(Number(d(this).data("owl-page")),true)
1160}})
1161},updatePagination:function(){var m=this,g,l,k,j,h,f;
1162if(m.options.pagination===false){return false
1163}m.paginationWrapper.html("");
1164g=0;
1165l=m.itemsAmount-m.itemsAmount%m.options.items;
1166for(j=0;
1167j<m.itemsAmount;
1168j+=1){if(j%m.options.items===0){g+=1;
1169if(l===j){k=m.itemsAmount-m.options.items
1170}h=d("<div/>",{"class":"owl-page"});
1171f=d("<span></span>",{text:m.options.paginationNumbers===true?g:"","class":m.options.paginationNumbers===true?"owl-numbers":""});
1172h.append(f);
1173h.data("owl-page",l===j?k:j);
1174h.data("owl-roundPages",g);
1175m.paginationWrapper.append(h)
1176}}m.checkPagination()
1177},checkPagination:function(){var f=this;
1178if(f.options.pagination===false){return false
1179}f.paginationWrapper.find(".owl-page").each(function(){if(d(this).data("owl-roundPages")===d(f.$owlItems[f.currentItem]).data("owl-roundPages")){f.paginationWrapper.find(".owl-page").removeClass("active");
1180d(this).addClass("active")
1181}})
1182},checkNavigation:function(){var f=this;
1183if(f.options.navigation===false){return false
1184}if(f.options.rewindNav===false){if(f.currentItem===0&&f.maximumItem===0){f.buttonPrev.addClass("disabled");
1185f.buttonNext.addClass("disabled")
1186}else{if(f.currentItem===0&&f.maximumItem!==0){f.buttonPrev.addClass("disabled");
1187f.buttonNext.removeClass("disabled")
1188}else{if(f.currentItem===f.maximumItem){f.buttonPrev.removeClass("disabled");
1189f.buttonNext.addClass("disabled")
1190}else{if(f.currentItem!==0&&f.currentItem!==f.maximumItem){f.buttonPrev.removeClass("disabled");
1191f.buttonNext.removeClass("disabled")
1192}}}}}},updateControls:function(){var f=this;
1193f.updatePagination();
1194f.checkNavigation();
1195if(f.owlControls){if(f.options.items>=f.itemsAmount){f.owlControls.hide()
1196}else{f.owlControls.show()
1197}}},destroyControls:function(){var f=this;
1198if(f.owlControls){f.owlControls.remove()
1199}},next:function(g){var f=this;
1200if(f.isTransition){return false
1201}f.currentItem+=f.options.scrollPerPage===true?f.options.items:1;
1202if(f.currentItem>f.maximumItem+(f.options.scrollPerPage===true?(f.options.items-1):0)){if(f.options.rewindNav===true){f.currentItem=0;
1203g="rewind"
1204}else{f.currentItem=f.maximumItem;
1205return false
1206}}f.goTo(f.currentItem,g)
1207},prev:function(g){var f=this;
1208if(f.isTransition){return false
1209}if(f.options.scrollPerPage===true&&f.currentItem>0&&f.currentItem<f.options.items){f.currentItem=0
1210}else{f.currentItem-=f.options.scrollPerPage===true?f.options.items:1
1211}if(f.currentItem<0){if(f.options.rewindNav===true){f.currentItem=f.maximumItem;
1212g="rewind"
1213}else{f.currentItem=0;
1214return false
1215}}f.goTo(f.currentItem,g)
1216},goTo:function(f,j,h){var i=this,g;
1217if(i.isTransition){return false
1218}if(typeof i.options.beforeMove==="function"){i.options.beforeMove.apply(this,[i.$elem])
1219}if(f>=i.maximumItem){f=i.maximumItem
1220}else{if(f<=0){f=0
1221}}i.currentItem=i.owl.currentItem=f;
1222if(i.options.transitionStyle!==false&&h!=="drag"&&i.options.items===1&&i.browser.support3d===true){i.swapSpeed(0);
1223if(i.browser.support3d===true){i.transition3d(i.positionsInArray[f])
1224}else{i.css2slide(i.positionsInArray[f],1)
1225}i.afterGo();
1226i.singleItemTransition();
1227return false
1228}g=i.positionsInArray[f];
1229if(i.browser.support3d===true){i.isCss3Finish=false;
1230if(j===true){i.swapSpeed("paginationSpeed");
1231c.setTimeout(function(){i.isCss3Finish=true
1232},i.options.paginationSpeed)
1233}else{if(j==="rewind"){i.swapSpeed(i.options.rewindSpeed);
1234c.setTimeout(function(){i.isCss3Finish=true
1235},i.options.rewindSpeed)
1236}else{i.swapSpeed("slideSpeed");
1237c.setTimeout(function(){i.isCss3Finish=true
1238},i.options.slideSpeed)
1239}}i.transition3d(g)
1240}else{if(j===true){i.css2slide(g,i.options.paginationSpeed)
1241}else{if(j==="rewind"){i.css2slide(g,i.options.rewindSpeed)
1242}else{i.css2slide(g,i.options.slideSpeed)
1243}}}i.afterGo()
1244},jumpTo:function(f){var g=this;
1245if(typeof g.options.beforeMove==="function"){g.options.beforeMove.apply(this,[g.$elem])
1246}if(f>=g.maximumItem||f===-1){f=g.maximumItem
1247}else{if(f<=0){f=0
1248}}g.swapSpeed(0);
1249if(g.browser.support3d===true){g.transition3d(g.positionsInArray[f])
1250}else{g.css2slide(g.positionsInArray[f],1)
1251}g.currentItem=g.owl.currentItem=f;
1252g.afterGo()
1253},afterGo:function(){var f=this;
1254f.prevArr.push(f.currentItem);
1255f.prevItem=f.owl.prevItem=f.prevArr[f.prevArr.length-2];
1256f.prevArr.shift(0);
1257if(f.prevItem!==f.currentItem){f.checkPagination();
1258f.checkNavigation();
1259f.eachMoveUpdate();
1260if(f.options.autoPlay!==false){f.checkAp()
1261}}if(typeof f.options.afterMove==="function"&&f.prevItem!==f.currentItem){f.options.afterMove.apply(this,[f.$elem])
1262}},stop:function(){var f=this;
1263f.apStatus="stop";
1264c.clearInterval(f.autoPlayInterval)
1265},checkAp:function(){var f=this;
1266if(f.apStatus!=="stop"){f.play()
1267}},play:function(){var f=this;
1268f.apStatus="play";
1269if(f.options.autoPlay===false){return false
1270}c.clearInterval(f.autoPlayInterval);
1271f.autoPlayInterval=c.setInterval(function(){f.next(true)
1272},f.options.autoPlay)
1273},swapSpeed:function(g){var f=this;
1274if(g==="slideSpeed"){f.$owlWrapper.css(f.addCssSpeed(f.options.slideSpeed))
1275}else{if(g==="paginationSpeed"){f.$owlWrapper.css(f.addCssSpeed(f.options.paginationSpeed))
1276}else{if(typeof g!=="string"){f.$owlWrapper.css(f.addCssSpeed(g))
1277}}}},addCssSpeed:function(f){return{"-webkit-transition":"all "+f+"ms ease","-moz-transition":"all "+f+"ms ease","-o-transition":"all "+f+"ms ease",transition:"all "+f+"ms ease"}
1278},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}
1279},doTranslate:function(f){return{"-webkit-transform":"translate3d("+f+"px, 0px, 0px)","-moz-transform":"translate3d("+f+"px, 0px, 0px)","-o-transform":"translate3d("+f+"px, 0px, 0px)","-ms-transform":"translate3d("+f+"px, 0px, 0px)",transform:"translate3d("+f+"px, 0px,0px)"}
1280},transition3d:function(g){var f=this;
1281f.$owlWrapper.css(f.doTranslate(g))
1282},css2move:function(g){var f=this;
1283f.$owlWrapper.css({left:g})
1284},css2slide:function(h,g){var f=this;
1285f.isCssFinish=false;
1286f.$owlWrapper.stop(true,true).animate({left:h},{duration:g||f.options.slideSpeed,complete:function(){f.isCssFinish=true
1287}})
1288},checkBrowser:function(){var k=this,h="translate3d(0px, 0px, 0px)",j=a.createElement("div"),i,g,l,f;
1289j.style.cssText="  -moz-transform:"+h+"; -ms-transform:"+h+"; -o-transform:"+h+"; -webkit-transform:"+h+"; transform:"+h;
1290i=/translate3d\(0px, 0px, 0px\)/g;
1291g=j.style.cssText.match(i);
1292l=(g!==null&&g.length===1);
1293f="ontouchstart" in c||c.navigator.msMaxTouchPoints;
1294k.browser={support3d:l,isTouch:f}
1295},moveEvents:function(){var f=this;
1296if(f.options.mouseDrag!==false||f.options.touchDrag!==false){f.gestures();
1297f.disabledEvents()
1298}},eventTypes:function(){var g=this,f=["s","e","x"];
1299g.ev_types={};
1300if(g.options.mouseDrag===true&&g.options.touchDrag===true){f=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]
1301}else{if(g.options.mouseDrag===false&&g.options.touchDrag===true){f=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]
1302}else{if(g.options.mouseDrag===true&&g.options.touchDrag===false){f=["mousedown.owl","mousemove.owl","mouseup.owl"]
1303}}}g.ev_types.start=f[0];
1304g.ev_types.move=f[1];
1305g.ev_types.end=f[2]
1306},disabledEvents:function(){var f=this;
1307f.$elem.on("dragstart.owl",function(g){g.preventDefault()
1308});
1309f.$elem.on("mousedown.disableTextSelect",function(g){return d(g.target).is("input, textarea, select, option")
1310})
1311},gestures:function(){var i=this,j={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};
1312i.isCssFinish=true;
1313function l(m){if(m.touches!==undefined){return{x:m.touches[0].pageX,y:m.touches[0].pageY}
1314}if(m.touches===undefined){if(m.pageX!==undefined){return{x:m.pageX,y:m.pageY}
1315}if(m.pageX===undefined){return{x:m.clientX,y:m.clientY}
1316}}}function k(m){if(m==="on"){d(a).on(i.ev_types.move,h);
1317d(a).on(i.ev_types.end,f)
1318}else{if(m==="off"){d(a).off(i.ev_types.move);
1319d(a).off(i.ev_types.end)
1320}}}function g(o){var n=o.originalEvent||o||c.event,m;
1321if(n.which===3){return false
1322}if(i.itemsAmount<=i.options.items){return
1323}if(i.isCssFinish===false&&!i.options.dragBeforeAnimFinish){return false
1324}if(i.isCss3Finish===false&&!i.options.dragBeforeAnimFinish){return false
1325}if(i.options.autoPlay!==false){c.clearInterval(i.autoPlayInterval)
1326}if(i.browser.isTouch!==true&&!i.$owlWrapper.hasClass("grabbing")){i.$owlWrapper.addClass("grabbing")
1327}i.newPosX=0;
1328i.newRelativeX=0;
1329d(this).css(i.removeTransition());
1330m=d(this).position();
1331j.relativePos=m.left;
1332j.offsetX=l(n).x-m.left;
1333j.offsetY=l(n).y-m.top;
1334k("on");
1335j.sliding=false;
1336j.targetElement=n.target||n.srcElement
1337}function h(p){var o=p.originalEvent||p||c.event,m,n;
1338i.newPosX=l(o).x-j.offsetX;
1339i.newPosY=l(o).y-j.offsetY;
1340i.newRelativeX=i.newPosX-j.relativePos;
1341if(typeof i.options.startDragging==="function"&&j.dragging!==true&&i.newRelativeX!==0){j.dragging=true;
1342i.options.startDragging.apply(i,[i.$elem])
1343}if((i.newRelativeX>8||i.newRelativeX<-8)&&(i.browser.isTouch===true)){if(o.preventDefault!==undefined){o.preventDefault()
1344}else{o.returnValue=false
1345}j.sliding=true
1346}if((i.newPosY>10||i.newPosY<-10)&&j.sliding===false){d(a).off("touchmove.owl")
1347}m=function(){return i.newRelativeX/5
1348};
1349n=function(){return i.maximumPixels+i.newRelativeX/5
1350};
1351i.newPosX=Math.max(Math.min(i.newPosX,m()),n());
1352if(i.browser.support3d===true){i.transition3d(i.newPosX)
1353}else{i.css2move(i.newPosX)
1354}}function f(q){var p=q.originalEvent||q||c.event,o,n,m;
1355p.target=p.target||p.srcElement;
1356j.dragging=false;
1357if(i.browser.isTouch!==true){i.$owlWrapper.removeClass("grabbing")
1358}if(i.newRelativeX<0){i.dragDirection=i.owl.dragDirection="left"
1359}else{i.dragDirection=i.owl.dragDirection="right"
1360}if(i.newRelativeX!==0){o=i.getNewPosition();
1361i.goTo(o,false,"drag");
1362if(j.targetElement===p.target&&i.browser.isTouch!==true){d(p.target).on("click.disable",function(r){r.stopImmediatePropagation();
1363r.stopPropagation();
1364r.preventDefault();
1365d(r.target).off("click.disable")
1366});
1367n=d._data(p.target,"events").click;
1368m=n.pop();
1369n.splice(0,0,m)
1370}}k("off")
1371}i.$elem.on(i.ev_types.start,".owl-wrapper",g)
1372},getNewPosition:function(){var g=this,f=g.closestItem();
1373if(f>g.maximumItem){g.currentItem=g.maximumItem;
1374f=g.maximumItem
1375}else{if(g.newPosX>=0){f=0;
1376g.currentItem=0
1377}}return f
1378},closestItem:function(){var h=this,i=h.options.scrollPerPage===true?h.pagesInArray:h.positionsInArray,f=h.newPosX,g=null;
1379d.each(i,function(k,j){if(f-(h.itemWidth/20)>i[k+1]&&f-(h.itemWidth/20)<j&&h.moveDirection()==="left"){g=j;
1380if(h.options.scrollPerPage===true){h.currentItem=d.inArray(g,h.positionsInArray)
1381}else{h.currentItem=k
1382}}else{if(f+(h.itemWidth/20)<j&&f+(h.itemWidth/20)>(i[k+1]||i[k]-h.itemWidth)&&h.moveDirection()==="right"){if(h.options.scrollPerPage===true){g=i[k+1]||i[i.length-1];
1383h.currentItem=d.inArray(g,h.positionsInArray)
1384}else{g=i[k+1];
1385h.currentItem=k+1
1386}}}});
1387return h.currentItem
1388},moveDirection:function(){var f=this,g;
1389if(f.newRelativeX<0){g="right";
1390f.playDirection="next"
1391}else{g="left";
1392f.playDirection="prev"
1393}return g
1394},customEvents:function(){var f=this;
1395f.$elem.on("owl.next",function(){f.next()
1396});
1397f.$elem.on("owl.prev",function(){f.prev()
1398});
1399f.$elem.on("owl.play",function(g,h){f.options.autoPlay=h;
1400f.play();
1401f.hoverStatus="play"
1402});
1403f.$elem.on("owl.stop",function(){f.stop();
1404f.hoverStatus="stop"
1405});
1406f.$elem.on("owl.goTo",function(h,g){f.goTo(g)
1407});
1408f.$elem.on("owl.jumpTo",function(h,g){f.jumpTo(g)
1409})
1410},stopOnHover:function(){var f=this;
1411if(f.options.stopOnHover===true&&f.browser.isTouch!==true&&f.options.autoPlay!==false){f.$elem.on("mouseover",function(){f.stop()
1412});
1413f.$elem.on("mouseout",function(){if(f.hoverStatus!=="stop"){f.play()
1414}})
1415}},lazyLoad:function(){var l=this,j,g,k,h,f;
1416if(l.options.lazyLoad===false){return false
1417}for(j=0;
1418j<l.itemsAmount;
1419j+=1){g=d(l.$owlItems[j]);
1420if(g.data("owl-loaded")==="loaded"){continue
1421}k=g.data("owl-item");
1422h=g.find(".lazyOwl");
1423if(typeof h.data("src")!=="string"){g.data("owl-loaded","loaded");
1424continue
1425}if(g.data("owl-loaded")===undefined){h.hide();
1426g.addClass("loading").data("owl-loaded","checked")
1427}if(l.options.lazyFollow===true){f=k>=l.currentItem
1428}else{f=true
1429}if(f&&k<l.currentItem+l.options.items&&h.length){l.lazyPreload(g,h)
1430}}},lazyPreload:function(f,g){var j=this,i=0,k;
1431if(g.prop("tagName")==="DIV"){g.css("background-image","url("+g.data("src")+")");
1432k=true
1433}else{g[0].src=g.data("src")
1434}function h(){f.data("owl-loaded","loaded").removeClass("loading");
1435g.removeAttr("data-src");
1436if(j.options.lazyEffect==="fade"){g.fadeIn(400)
1437}else{g.show()
1438}if(typeof j.options.afterLazyLoad==="function"){j.options.afterLazyLoad.apply(this,[j.$elem])
1439}}function l(){i+=1;
1440if(j.completeImg(g.get(0))||k===true){h()
1441}else{if(i<=100){c.setTimeout(l,100)
1442}else{h()
1443}}}l()
1444},autoHeight:function(){var i=this,j=d(i.$owlItems[i.currentItem]).find("img"),h;
1445function f(){var k=d(i.$owlItems[i.currentItem]).height();
1446i.wrapperOuter.css("height",k+"px");
1447if(!i.wrapperOuter.hasClass("autoHeight")){c.setTimeout(function(){i.wrapperOuter.addClass("autoHeight")
1448},0)
1449}}function g(){h+=1;
1450if(i.completeImg(j.get(0))){f()
1451}else{if(h<=100){c.setTimeout(g,100)
1452}else{i.wrapperOuter.css("height","")
1453}}}if(j.get(0)!==undefined){h=0;
1454g()
1455}else{f()
1456}},completeImg:function(f){var g;
1457if(!f.complete){return false
1458}g=typeof f.naturalWidth;
1459if(g!=="undefined"&&f.naturalWidth===0){return false
1460}return true
1461},onVisibleItems:function(){var g=this,f;
1462if(g.options.addClassActive===true){g.$owlItems.removeClass("active")
1463}g.visibleItems=[];
1464for(f=g.currentItem;
1465f<g.currentItem+g.options.items;
1466f+=1){g.visibleItems.push(f);
1467if(g.options.addClassActive===true){d(g.$owlItems[f]).addClass("active");
1468if(g.$elem.parents(".pro_pic_small").find(".video_play_icon").length){if(d(g.$owlItems[f]).index()===0){g.$elem.parents(".pro_pic_small").find(".video_play_icon").show()
1469}else{g.$elem.parents(".pro_pic_small").find(".video_play_icon").hide()
1470}}}}g.owl.visibleItems=g.visibleItems
1471},transitionTypes:function(f){var g=this;
1472g.outClass="owl-"+f+"-out";
1473g.inClass="owl-"+f+"-in"
1474},singleItemTransition:function(){var g=this,i=g.outClass,l=g.inClass,k=g.$owlItems.eq(g.currentItem),j=g.$owlItems.eq(g.prevItem),n=Math.abs(g.positionsInArray[g.currentItem])+g.positionsInArray[g.prevItem],m=Math.abs(g.positionsInArray[g.currentItem])+g.itemWidth/2,h="webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend";
1475g.isTransition=true;
1476g.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":m+"px","-moz-perspective-origin":m+"px","perspective-origin":m+"px"});
1477function f(o){return{position:"relative",left:o+"px"}
1478}j.css(f(n,10)).addClass(i).on(h,function(){g.endPrev=true;
1479j.off(h);
1480g.clearTransStyle(j,i)
1481});
1482k.addClass(l).on(h,function(){g.endCurrent=true;
1483k.off(h);
1484g.clearTransStyle(k,l)
1485})
1486},clearTransStyle:function(g,f){var h=this;
1487g.css({position:"",left:""}).removeClass(f);
1488if(h.endPrev&&h.endCurrent){h.$owlWrapper.removeClass("owl-origin");
1489h.endPrev=false;
1490h.endCurrent=false;
1491h.isTransition=false
1492}},owlStatus:function(){var f=this;
1493f.owl={userOptions:f.userOptions,baseElement:f.$elem,userItems:f.$userItems,owlItems:f.$owlItems,currentItem:f.currentItem,prevItem:f.prevItem,visibleItems:f.visibleItems,isTouch:f.browser.isTouch,browser:f.browser,dragDirection:f.dragDirection}
1494},clearEvents:function(){var f=this;
1495f.$elem.off(".owl owl mousedown.disableTextSelect");
1496d(a).off(".owl owl");
1497d(c).off("resize",f.resizer)
1498},unWrap:function(){var f=this;
1499if(f.$elem.children().length!==0){f.$owlWrapper.unwrap();
1500f.$userItems.unwrap().unwrap();
1501if(f.owlControls){f.owlControls.remove()
1502}}f.clearEvents();
1503f.$elem.attr("style",f.$elem.data("owl-originalStyles")||"").attr("class",f.$elem.data("owl-originalClasses"))
1504},destroy:function(){var f=this;
1505f.stop();
1506c.clearInterval(f.checkVisible);
1507f.unWrap();
1508f.$elem.removeData()
1509},reinit:function(h){var g=this,f=d.extend({},g.userOptions,h);
1510g.unWrap();
1511g.init(f,g.$elem)
1512},addItem:function(i,g){var h=this,f;
1513if(!i){return false
1514}if(h.$elem.children().length===0){h.$elem.append(i);
1515h.setVars();
1516return false
1517}h.unWrap();
1518if(g===undefined||g===-1){f=-1
1519}else{f=g
1520}if(f>=h.$userItems.length||f===-1){h.$userItems.eq(-1).after(i)
1521}else{h.$userItems.eq(f).before(i)
1522}h.setVars()
1523},removeItem:function(g){var h=this,f;
1524if(h.$elem.children().length===0){return false
1525}if(g===undefined||g===-1){f=-1
1526}else{f=g
1527}h.unWrap();
1528h.$userItems.eq(f).remove();
1529h.setVars()
1530}};
1531function b(g,f){console.log(g,f);
1532console.log(13213)
1533}d.fn.owlCarousel=function(f){return this.each(function(){if(d(this).data("owl-init")===true){return false
1534}d(this).data("owl-init",true);
1535var g=Object.create(e);
1536g.init(f,this);
1537d.data(this,"owlCarousel",g)
1538})
1539};
1540d.fn.owlCarousel.options={items:5,itemsCustom:false,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:false,itemsMobile:[479,1],singleItem:false,itemsScaleUp:false,slideSpeed:200,paginationSpeed:800,rewindSpeed:1000,autoPlay:false,stopOnHover:false,navigation:false,navigationText:["prev","next"],rewindNav:true,scrollPerPage:false,pagination:true,paginationNumbers:false,responsive:true,responsiveRefreshRate:200,responsiveBaseWidth:c,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:false,lazyFollow:true,lazyEffect:"fade",autoHeight:false,jsonPath:false,jsonSuccess:false,dragBeforeAnimFinish:true,mouseDrag:true,touchDrag:true,addClassActive:false,transitionStyle:false,beforeUpdate:false,afterUpdate:false,beforeInit:false,afterInit:false,beforeMove:false,afterMove:false,afterAction:false,startDragging:false,afterLazyLoad:false}
1541}(jQuery,window,document));;�/* /assets/widget/script/plugins/owlcarousel/masterslider.js */�/*!
1542 * Master Slider – Responsive Touch Swipe Slider
1543 * Copyright © 2015 All Rights Reserved.
1544 *
1545 * @author Averta [www.averta.net]
1546 * @version 2.16.3
1547 * @date Dec 2015
1548 */
1549
1550
1551/* ================== bin-debug/js/pro/tools/base.js =================== */
1552window.averta = {};
1553
1554;(function($){
1555
1556	//"use strict";
1557
1558	window.package = function(name){
1559		if(!window[name]) window[name] = {};
1560	};
1561
1562	var extend = function(target , object){
1563		for(var key in object)	target[key] = object[key];
1564	};
1565
1566	Function.prototype.extend = function(superclass){
1567		if(typeof superclass.prototype.constructor === "function"){
1568			extend(this.prototype , superclass.prototype);
1569			this.prototype.constructor = this;
1570		}else{
1571			this.prototype.extend(superclass);
1572			this.prototype.constructor = this;
1573		}
1574	};
1575
1576	// Converts JS prefix to CSS prefix
1577	var trans = {
1578		'Moz'    : '-moz-',
1579		'Webkit' : '-webkit-',
1580		'Khtml'  : '-khtml-' ,
1581		'O'		 : '-o-',
1582		'ms'	 : '-ms-',
1583		'Icab'   : '-icab-'
1584	};
1585
1586	window._mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
1587	window._touch  = 'ontouchstart' in document;
1588	$(document).ready(function(){
1589		window._jcsspfx 		= getVendorPrefix();	   // JS CSS VendorPrefix
1590		window._csspfx 			= trans[window._jcsspfx];  // CSS VendorPrefix
1591		window._cssanim 		= supportsTransitions();
1592		window._css3d   		= supports3DTransforms();
1593		window._css2d   		= supportsTransforms();
1594	});
1595
1596
1597	// Thanks to LEA VEROU
1598	// http://lea.verou.me/2009/02/find-the-vendor-prefix-of-the-current-browser/
1599	function getVendorPrefix() {
1600
1601		if('result' in arguments.callee) return arguments.callee.result;
1602
1603		var regex = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/;
1604
1605		var someScript = document.getElementsByTagName('script')[0];
1606
1607		for(var prop in someScript.style){
1608			if(regex.test(prop)){
1609				return arguments.callee.result = prop.match(regex)[0];
1610			}
1611		}
1612
1613		if('WebkitOpacity' in someScript.style) return arguments.callee.result = 'Webkit';
1614		if('KhtmlOpacity' in someScript.style) return arguments.callee.result = 'Khtml';
1615
1616		return arguments.callee.result = '';
1617	}
1618
1619
1620	// Thanks to Steven Benner.
1621	// http://stevenbenner.com/2010/03/javascript-regex-trick-parse-a-query-string-into-an-object/
1622	window.parseQueryString = function(url){
1623		var queryString = {};
1624		url.replace(
1625		    new RegExp("([^?=&]+)(=([^&]*))?", "g"),
1626		    function($0, $1, $2, $3) { queryString[$1] = $3; }
1627		);
1628
1629		return queryString;
1630	};
1631
1632	function checkStyleValue(prop){
1633		 var b = document.body || document.documentElement;
1634	    var s = b.style;
1635	    var p = prop;
1636	    if(typeof s[p] == 'string') {return true; }
1637
1638	    // Tests for vendor specific prop
1639	    v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms'],
1640	    p = p.charAt(0).toUpperCase() + p.substr(1);
1641	    for(var i=0; i<v.length; i++) {
1642	      if(typeof s[v[i] + p] == 'string') { return true; }
1643	    }
1644	    return false;
1645	}
1646
1647	function supportsTransitions() {
1648	   return checkStyleValue('transition');
1649	}
1650
1651	function supportsTransforms(){
1652	   return checkStyleValue('transform');
1653	}
1654
1655	function supports3DTransforms(){
1656		if(!supportsTransforms()) return false;
1657	    var el = document.createElement('i'),
1658	    has3d,
1659	    transforms = {
1660	        'WebkitTransform':'-webkit-transform',
1661	        'OTransform':'-o-transform',
1662	        'MSTransform':'-ms-transform',
1663	        'msTransform':'-ms-transform',
1664	        'MozTransform':'-moz-transform',
1665	        'Transform':'transform',
1666	        'transform':'transform'
1667	    };
1668
1669		el.style.display = 'block';
1670
1671	    // Add it to the body to get the computed style
1672	    document.body.insertBefore(el, null);
1673
1674	    for(var t in transforms){
1675	        if( el.style[t] !== undefined ){
1676	            el.style[t] = 'translate3d(1px,1px,1px)';
1677	            has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);
1678	        }
1679	    }
1680
1681	    document.body.removeChild(el);
1682
1683	    return (has3d != null && has3d.length > 0 && has3d !== "none");
1684	}
1685
1686	/**
1687	 * Provides requestAnimationFrame in a cross browser way.
1688	 * @author paulirish / http://paulirish.com/
1689	 */
1690	var fps60 = 50/3;
1691
1692	if ( !window.requestAnimationFrame ) {
1693
1694		window.requestAnimationFrame = ( function() {
1695
1696			return window.webkitRequestAnimationFrame ||
1697			window.mozRequestAnimationFrame ||
1698			window.oRequestAnimationFrame ||
1699			window.msRequestAnimationFrame ||
1700			function( /* function FrameRequestCallback */ callback, /* DOMElement Element */ element ) {
1701
1702				window.setTimeout( callback, fps60 );
1703
1704			};
1705
1706		} )();
1707
1708	}
1709
1710	if (!window.getComputedStyle) {
1711	    window.getComputedStyle = function(el, pseudo) {
1712	        this.el = el;
1713	        this.getPropertyValue = function(prop) {
1714	            var re = /(\-([a-z]){1})/g;
1715	            if (prop == 'float') prop = 'styleFloat';
1716	            if (re.test(prop)) {
1717	                prop = prop.replace(re, function () {
1718	                    return arguments[2].toUpperCase();
1719	                });
1720	            }
1721	            return el.currentStyle[prop] ? el.currentStyle[prop] : null;
1722	        };
1723	        return el.currentStyle;
1724	    };
1725	}
1726
1727	// IE8 Array indexOf fix
1728	if (!Array.prototype.indexOf) {
1729	  Array.prototype.indexOf = function(elt /*, from*/) {
1730	    var len = this.length >>> 0;
1731
1732	    var from = Number(arguments[1]) || 0;
1733	    from = (from < 0)
1734	         ? Math.ceil(from)
1735	         : Math.floor(from);
1736	    if (from < 0)
1737	      from += len;
1738
1739	    for (; from < len; from++)
1740	    {
1741	      if (from in this &&
1742	          this[from] === elt)
1743	        return from;
1744	    }
1745	    return -1;
1746	  };
1747	}
1748
1749
1750	/**
1751	 * check ie browser
1752	 * @param  {Number | string}  version
1753	 * @return {Boolean}
1754	 */
1755	window.isMSIE = function ( version ) {
1756		if ( !$.browser.msie ) {
1757			return false;
1758		} else if ( !version ) {
1759			return true;
1760		}
1761		var ieVer = $.browser.version.slice(0 , $.browser.version.indexOf('.'));
1762		if ( typeof version === 'string' ) {
1763			if ( version.indexOf('<') !== -1  || version.indexOf('>') !== -1) {
1764				return eval( ieVer + version );
1765			} else {
1766				return eval( version + '==' + ieVer );
1767			}
1768		} else {
1769			return version == ieVer;
1770		}
1771	}
1772
1773	$.removeDataAttrs = function($target, exclude) {
1774	    var i,
1775	        attrName,
1776	        dataAttrsToDelete = [],
1777	        dataAttrs = $target[0].attributes,
1778	        dataAttrsLen = dataAttrs.length;
1779
1780	    exclude = exclude || [];
1781
1782	    // loop through attributes and make a list of those
1783	    // that begin with 'data-'
1784	    for (i=0; i<dataAttrsLen; i++) {
1785	    	attrName = dataAttrs[i].name;
1786	        if ( 'data-' === attrName.substring(0,5) && exclude.indexOf(attrName) === -1 ) {
1787	            // Why don't you just delete the attributes here?
1788	            // Deleting an attribute changes the indices of the
1789	            // others wreaking havoc on the loop we are inside
1790	            // b/c dataAttrs is a NamedNodeMap (not an array or obj)
1791	            dataAttrsToDelete.push(dataAttrs[i].name);
1792	        }
1793	    }
1794	    // delete each of the attributes we found above
1795	    // i.e. those that start with "data-"
1796	    $.each( dataAttrsToDelete, function( index, attrName ) {
1797	        $target.removeAttr( attrName );
1798	    })
1799	};
1800
1801	if(jQuery){
1802		$.jqLoadFix = function(){
1803			if(this.complete){
1804				var that = this;
1805				setTimeout(function(){$(that).load();} , 1);
1806			}
1807		};
1808
1809		jQuery.uaMatch = jQuery.uaMatch || function( ua ) {
1810			ua = ua.toLowerCase();
1811
1812			var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
1813				/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
1814				/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
1815				/(msie) ([\w.]+)/.exec( ua ) ||
1816				ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
1817				[];
1818
1819			return {
1820				browser: match[ 1 ] || "",
1821				version: match[ 2 ] || "0"
1822			};
1823		};
1824
1825		// Don't clobber any existing jQuery.browser in case it's different
1826		//if ( !jQuery.browser ) {
1827			matched = jQuery.uaMatch( navigator.userAgent );
1828			browser = {};
1829
1830			if ( matched.browser ) {
1831				browser[ matched.browser ] = true;
1832				browser.version = matched.version;
1833			}
1834
1835			// Chrome is Webkit, but Webkit is also Safari.
1836			if ( browser.chrome ) {
1837				browser.webkit = true;
1838			} else if ( browser.webkit ) {
1839				browser.safari = true;
1840			}
1841
1842			// hofix for IE11 detection
1843			var isIE11 = !!navigator.userAgent.match(/Trident\/7\./);
1844			if (isIE11) {
1845				browser.msie = "true";
1846				delete browser.mozilla;
1847			}
1848
1849			jQuery.browser = browser;
1850
1851		//}
1852
1853		$.fn.preloadImg = function(src , _event){
1854			this.each(function(){
1855				var $this = $(this);
1856				var self  = this;
1857				var img = new Image();
1858				img.onload = function(event){
1859					if(event == null) event = {}; // IE8
1860					$this.attr('src' , src);
1861					event.width = img.width;
1862					event.height = img.height;
1863					$this.data('width', img.width);
1864					$this.data('height', img.height);
1865					setTimeout(function(){_event.call(self , event);},50);
1866					img = null;
1867				};
1868				img.src = src;
1869			});
1870			return this;
1871		};
1872	}
1873})(jQuery);
1874
1875/* ================== bin-debug/js/pro/tools/EventDispatcher.js =================== */
1876;(function(){
1877
1878	"use strict";
1879
1880	averta.EventDispatcher = function(){
1881		this.listeners = {};
1882	};
1883
1884	averta.EventDispatcher.extend = function(_proto){
1885		var instance = new averta.EventDispatcher();
1886		for(var key in instance)
1887			if(key != 'constructor') _proto[key] =  averta.EventDispatcher.prototype[key];
1888	};
1889
1890	averta.EventDispatcher.prototype = {
1891
1892		constructor : averta.EventDispatcher,
1893
1894		addEventListener : function(event , listener , ref){
1895			if(!this.listeners[event]) this.listeners[event] = [];
1896			this.listeners[event].push({listener:listener , ref:ref});
1897
1898		},
1899
1900		removeEventListener : function(event , listener , ref){
1901			if(this.listeners[event]){
1902
1903				for(var i = 0; i < this.listeners[event].length ; ++i){
1904
1905					if(listener === this.listeners[event][i].listener && ref === this.listeners[event][i].ref){
1906						this.listeners[event].splice(i--,1);
1907					}
1908				}
1909
1910				if (this.listeners[event].length === 0){
1911					this.listeners[event] = null;
1912				}
1913			}
1914		},
1915
1916		dispatchEvent : function (event) {
1917			event.target = this;
1918			if(this.listeners[event.type]){
1919				for(var i = 0 , l = this.listeners[event.type].length; i < l ; ++i){
1920					this.listeners[event.type][i].listener.call(this.listeners[event.type][i].ref , event);
1921				}
1922			}
1923		}
1924	};
1925
1926})();
1927
1928/* ================== bin-debug/js/pro/tools/TouchSwipe.js =================== */
1929;(function($){
1930
1931    "use strict";
1932
1933    var isTouch     = 'ontouchstart' in document,
1934        isPointer   = window.navigator.pointerEnabled,
1935        isMSPoiner  = !isPointer && window.navigator.msPointerEnabled,
1936        usePointer  = isPointer || isMSPoiner,
1937    // Events
1938        ev_start  = (isPointer ? 'pointerdown ' : '' ) + (isMSPoiner ? 'MSPointerDown ' : '' ) + (isTouch ? 'touchstart ' : '' ) + 'mousedown',
1939        ev_move   = (isPointer ? 'pointermove ' : '' ) + (isMSPoiner ? 'MSPointerMove ' : '' ) + (isTouch ? 'touchmove '  : '' ) + 'mousemove',
1940        ev_end    = (isPointer ? 'pointerup '   : '' ) + (isMSPoiner ? 'MSPointerUp '   : '' ) + (isTouch ? 'touchend '   : '' ) + 'mouseup',
1941        ev_cancel = (isPointer ? 'pointercancel '   : '' ) + (isMSPoiner ? 'MSPointerCancel ': '' ) + 'touchcancel';
1942
1943
1944    averta.TouchSwipe = function($element){
1945        this.$element = $element;
1946        this.enabled = true;
1947
1948        $element.bind(ev_start  , {target: this} , this.__touchStart);
1949
1950        $element[0].swipe = this;
1951
1952        this.onSwipe    = null;
1953        this.swipeType  = 'horizontal';
1954        this.noSwipeSelector = 'input, textarea, button, .no-swipe, .ms-no-swipe';
1955
1956        this.lastStatus = {};
1957
1958    };
1959
1960    var p = averta.TouchSwipe.prototype;
1961
1962    /*-------------- METHODS --------------*/
1963
1964    p.getDirection = function(new_x , new_y){
1965        switch(this.swipeType){
1966            case 'horizontal':
1967                return new_x <= this.start_x ? 'left' : 'right';
1968            break;
1969            case 'vertical':
1970                return new_y <= this.start_y ? 'up' : 'down';
1971            break;
1972            case 'all':
1973                if(Math.abs(new_x - this.start_x) > Math.abs(new_y - this.start_y))
1974                    return new_x <= this.start_x ? 'left' : 'right';
1975                else
1976                    return new_y <= this.start_y ? 'up' : 'down';
1977            break;
1978        }
1979    };
1980
1981    p.priventDefultEvent = function(new_x , new_y){
1982        //if(this.priventEvt != null) return this.priventEvt;
1983        var dx = Math.abs(new_x - this.start_x);
1984        var dy = Math.abs(new_y - this.start_y);
1985
1986        var horiz =  dx > dy;
1987
1988        return (this.swipeType === 'horizontal' && horiz) ||
1989               (this.swipeType === 'vertical' && !horiz);
1990
1991        //return this.priventEvt;
1992    };
1993
1994    p.createStatusObject = function(evt){
1995        var status_data = {} , temp_x , temp_y;
1996
1997        temp_x = this.lastStatus.distanceX || 0;
1998        temp_y = this.lastStatus.distanceY || 0;
1999
2000        status_data.distanceX = evt.pageX - this.start_x;
2001        status_data.distanceY = evt.pageY - this.start_y;
2002        status_data.moveX = status_data.distanceX - temp_x;
2003        status_data.moveY = status_data.distanceY - temp_y;
2004
2005        status_data.distance  = parseInt( Math.sqrt(Math.pow(status_data.distanceX , 2) + Math.pow(status_data.distanceY , 2)) );
2006
2007        status_data.duration  = new Date().getTime() - this.start_time;
2008        status_data.direction = this.getDirection(evt.pageX , evt.pageY);
2009
2010        return status_data;
2011    };
2012
2013
2014    p.__reset = function(event , jqevt){
2015        this.reset = false;
2016        this.lastStatus = {};
2017        this.start_time = new Date().getTime();
2018
2019        var point = this.__getPoint( event, jqevt );
2020        this.start_x = point.pageX;
2021        this.start_y = point.pageY;
2022    };
2023
2024    p.__touchStart = function(event){
2025
2026        var swipe = event.data.target;
2027        var jqevt = event;
2028        if(!swipe.enabled) return;
2029
2030        if ( $(event.target).closest(swipe.noSwipeSelector, swipe.$element).length > 0 ) {
2031            return;
2032        }
2033
2034        event = event.originalEvent;
2035
2036        if( usePointer ) {
2037            $(this).css('-ms-touch-action', swipe.swipeType === 'horizontal' ? 'pan-y' : 'pan-x');
2038        }
2039
2040        if(!swipe.onSwipe) {
2041            $.error('Swipe listener is undefined');
2042            return;
2043        }
2044
2045        // don't catch the touch start again, also don't go further if the delay between touchstart and mousedown is small
2046        // if ( swipe.touchStarted ) {
2047        if ( swipe.touchStarted || isTouch && swipe.start_time && event.type === 'mousedown' &&  new Date().getTime() - swipe.start_time < 600 ) {
2048            return;
2049        }
2050
2051        var point = swipe.__getPoint( event, jqevt );
2052        swipe.start_x = point.pageX;
2053        swipe.start_y = point.pageY;
2054
2055        swipe.start_time = new Date().getTime();
2056
2057        $(document).bind(ev_end    , {target: swipe} , swipe.__touchEnd).
2058                    bind(ev_move   , {target: swipe} , swipe.__touchMove).
2059                    bind(ev_cancel , {target: swipe} , swipe.__touchCancel);
2060
2061        var status = swipe.createStatusObject(point);
2062        status.phase = 'start';
2063
2064        swipe.onSwipe.call(null , status);
2065
2066        if(!isTouch)
2067            jqevt.preventDefault();
2068
2069        swipe.lastStatus = status;
2070        swipe.touchStarted = true;
2071    };
2072
2073    p.__touchMove = function(event){
2074        var swipe = event.data.target;
2075        var jqevt = event;
2076        event = event.originalEvent;
2077
2078        if(!swipe.touchStarted) return;
2079
2080        clearTimeout(swipe.timo);
2081        swipe.timo = setTimeout(function(){swipe.__reset(event , jqevt);} , 60);
2082
2083        var point = swipe.__getPoint( event, jqevt );
2084
2085        var status = swipe.createStatusObject(point);
2086
2087        if(swipe.priventDefultEvent(point.pageX , point.pageY))
2088            jqevt.preventDefault();
2089
2090        status.phase = 'move';
2091
2092        //if(swipe.lastStatus.direction !== status.direction) swipe.__reset(event , jqevt);
2093
2094        swipe.lastStatus = status;
2095
2096        swipe.onSwipe.call(null , status);
2097    };
2098
2099    p.__touchEnd = function(event){
2100
2101        var swipe = event.data.target;
2102        var jqevt = event;
2103        event = event.originalEvent;
2104
2105        clearTimeout(swipe.timo);
2106
2107        var status = swipe.lastStatus;
2108
2109        if(!isTouch)
2110            jqevt.preventDefault();
2111
2112        status.phase = 'end';
2113
2114        swipe.touchStarted = false;
2115        swipe.priventEvt   = null;
2116
2117        $(document).unbind(ev_end     , swipe.__touchEnd).
2118                    unbind(ev_move    , swipe.__touchMove).
2119                    unbind(ev_cancel  , swipe.__touchCancel);
2120
2121        status.speed = status.distance / status.duration;
2122
2123        swipe.onSwipe.call(null , status);
2124
2125    };
2126
2127    p.__touchCancel = function(event){
2128        var swipe = event.data.target;
2129        swipe.__touchEnd(event);
2130    };
2131
2132    p.__getPoint = function( event, jqEvent ) {
2133        if ( isTouch && event.type.indexOf('mouse') === -1 ) {
2134            return event.touches[0];
2135        } else if ( usePointer ) {
2136            return event;
2137        } else {
2138            return jqEvent;
2139        }
2140    };
2141
2142    p.enable = function(){
2143        if(this.enabled) return;
2144        this.enabled = true;
2145    };
2146
2147    p.disable = function(){
2148        if(!this.enabled) return;
2149        this.enabled = false;
2150    };
2151
2152})(jQuery);
2153
2154/* ================== bin-debug/js/pro/tools/Timer.js =================== */
2155/**
2156 * 	Ticker Class
2157 * 	Author: Averta Ltd
2158 */
2159
2160;(function(){
2161	"use strict";
2162
2163	averta.Ticker = function(){};
2164
2165	var st = averta.Ticker,
2166		list = [],
2167		len = 0,
2168		__stopped = true;
2169
2170	st.add = function (listener , ref){
2171		list.push([listener , ref]);
2172
2173		if(list.length === 1) st.start();
2174		len = list.length;
2175		return len;
2176	};
2177
2178	st.remove = function (listener , ref) {
2179		for(var i = 0 , l = list.length ; i<l ; ++i){
2180			if(list[i] && list[i][0] === listener && list[i][1] === ref){
2181				list.splice(i , 1);
2182			}
2183		}
2184
2185		len = list.length;
2186
2187		if( len === 0 ){
2188			st.stop();
2189		}
2190	};
2191
2192	st.start = function (){
2193		if(!__stopped) return;
2194		__stopped = false;
2195		__tick();
2196	};
2197
2198	st.stop = function (){
2199		__stopped = true;
2200	};
2201
2202	var __tick = function () {
2203		if(st.__stopped) return;
2204		var item;
2205		for(var i = 0; i!==len; i++){
2206			item = list[i];
2207			item[0].call(item[1]);
2208		}
2209
2210		requestAnimationFrame(__tick);
2211	};
2212
2213})();
2214
2215/**
2216 * 	Timer Class
2217 * 	Author: Averta Ltd
2218 */
2219;(function(){
2220	"use strict";
2221
2222	if(!Date.now){
2223		Date.now = function(){
2224			return new Date().getTime();
2225		};
2226	}
2227
2228	averta.Timer = function(delay , autoStart) {
2229		this.delay = delay;
2230		this.currentCount = 0;
2231		this.paused = false;
2232		this.onTimer = null;
2233		this.refrence = null;
2234
2235		if(autoStart) this.start();
2236
2237	};
2238
2239	averta.Timer.prototype = {
2240
2241		constructor : averta.Timer,
2242
2243		start : function(){
2244			this.paused = false;
2245			this.lastTime = Date.now();
2246			averta.Ticker.add(this.update , this);
2247		},
2248
2249		stop : function(){
2250			this.paused = true;
2251			averta.Ticker.remove(this.update , this);
2252		},
2253
2254		reset : function(){
2255			this.currentCount = 0;
2256			this.paused = true;
2257			this.lastTime = Date.now();
2258		},
2259
2260		update : function(){
2261			if(this.paused || Date.now() - this.lastTime < this.delay) return;
2262			this.currentCount ++;
2263			this.lastTime = Date.now();
2264			if(this.onTimer)
2265				this.onTimer.call(this.refrence , this.getTime());
2266
2267		} ,
2268
2269		getTime : function(){
2270			return this.delay * this.currentCount;
2271		}
2272
2273	};
2274})();
2275
2276/* ================== bin-debug/js/pro/tools/CSSTweener.js =================== */
2277;(function(){
2278
2279	"use strict";
2280
2281	var evt = null;
2282
2283	window.CSSTween = function(element , duration , delay , ease){
2284
2285		this.$element 	= element;
2286		this.duration 	= duration  || 1000;
2287		this.delay 		= delay 	|| 0;
2288		this.ease 		= ease 		|| 'linear';
2289
2290		/*if(!evt){
2291			if(window._jcsspfx === 'O')
2292				evt = 'otransitionend';
2293			else if(window._jcsspfx == 'Webkit')
2294				evt = 'webkitTransitionEnd';
2295			else
2296				evt = 'transitionend' ;
2297		}*/
2298
2299	};
2300
2301	var p = CSSTween.prototype;
2302
2303	/*-------------- METHODS --------------*/
2304
2305	p.to = function(callback , target){
2306		this.to_cb 			= callback;
2307		this.to_cb_target 	= target;
2308
2309		return this;
2310	};
2311
2312	p.from = function(callback , target ){
2313		this.fr_cb 			= callback;
2314		this.fr_cb_target 	= target;
2315
2316		return this;
2317	};
2318
2319	p.onComplete = function(callback ,target){
2320		this.oc_fb 			= callback;
2321		this.oc_fb_target 	= target;
2322
2323		return this;
2324	};
2325
2326	p.chain = function(csstween){
2327		this.chained_tween = csstween;
2328		return this;
2329	};
2330
2331	p.reset = function(){
2332		//element.removeEventListener(evt , this.onTransComplete , true);
2333		clearTimeout(this.start_to);
2334		clearTimeout(this.end_to);
2335	};
2336
2337	p.start = function(){
2338		var element = this.$element[0];
2339
2340		clearTimeout(this.start_to);
2341		clearTimeout(this.end_to);
2342
2343		this.fresh = true;
2344
2345		if(this.fr_cb){
2346			element.style[window._jcsspfx + 'TransitionDuration'] = '0ms';
2347			this.fr_cb.call(this.fr_cb_target);
2348		}
2349
2350		var that = this;
2351
2352		this.onTransComplete = function(event){
2353
2354			if(!that.fresh) return;
2355
2356			//that.$element[0].removeEventListener(evt , this.onTransComplete, true);
2357			//event.stopPropagation();
2358
2359
2360			that.reset();
2361
2362			element.style[window._jcsspfx + 'TransitionDuration'] = '';
2363			element.style[window._jcsspfx + 'TransitionProperty'] = '';
2364			element.style[window._jcsspfx + 'TransitionTimingFunction'] = '';
2365			element.style[window._jcsspfx + 'TransitionDelay'] = '';
2366
2367			that.fresh = false;
2368			if(that.chained_tween) that.chained_tween.start();
2369			if(that.oc_fb)	that.oc_fb.call(that.oc_fb_target);
2370
2371		};
2372
2373		this.start_to = setTimeout(function(){
2374			if ( !that.$element ) return;
2375			element.style[window._jcsspfx + 'TransitionDuration'] = that.duration + 'ms';
2376			element.style[window._jcsspfx + 'TransitionProperty'] = that.transProperty || 'all';
2377
2378			if(that.delay > 0)	element.style[window._jcsspfx + 'TransitionDelay'] = that.delay + 'ms';
2379			else				element.style[window._jcsspfx + 'TransitionDelay'] = '';
2380
2381			element.style[window._jcsspfx + 'TransitionTimingFunction'] = that.ease;
2382
2383			if(that.to_cb)	that.to_cb.call(that.to_cb_target);
2384
2385			//that.$element[0].addEventListener(evt , that.onTransComplete , true );
2386
2387			that.end_to = setTimeout(function(){that.onTransComplete();} , that.duration + (that.delay || 0));
2388		}
2388 , 100);
2389
2390		return this;
2391	};
2392
2393})();
2394
2395/**
2396 *	Cross Tween Class
2397 */
2398;(function(){
2399
2400	"use strict";
2401
2402	var _cssanim = null;
2403	window.CTween = {};
2404
2405	function transPos(element, properties){
2406		if(properties.x !== undefined || properties.y !== undefined){
2407			if(_cssanim){
2408				var trans = window._jcsspfx+"Transform";
2409				if(properties.x !== undefined){
2410					properties[trans] = (properties[trans] || '') + ' translateX('+properties.x+'px)';
2411					delete properties.x;
2412				}
2413
2414				if(properties.y !== undefined){
2415					properties[trans] = (properties[trans] || '') + ' translateY('+properties.y+'px)';
2416					delete properties.y;
2417				}
2418			}else{
2419				if(properties.x !== undefined){
2420					var posx = element.css('right') !== 'auto' ? 'right' : 'left';
2421					//if(!element[0].bx) element[0].bx = parseInt(element.css(posx));
2422					properties[posx] = /*element[0].bx + */properties.x + 'px';
2423					delete properties.x;
2424				}
2425
2426				if(properties.y !== undefined){
2427					var posy = element.css('bottom') !== 'auto' ? 'bottom' : 'top';
2428					//if(!element[0].by) element[0].by = parseInt(element.css(posy));
2429					properties[posy] = /*element[0].by + */properties.y + 'px';
2430					delete properties.y;
2431				}
2432			}
2433		}
2434		return properties;
2435	}
2436
2437	CTween.setPos = function(element , pos){
2438		element.css(transPos(element , pos));
2439	};
2440
2441	CTween.animate = function(element , duration , properties , options){
2442		if(_cssanim == null) _cssanim = window._cssanim;
2443
2444		options = options || {};
2445
2446		transPos(element , properties);
2447
2448		if(_cssanim){
2449			var tween = new CSSTween(element , duration , options.delay , EaseDic[options.ease]);
2450			if ( options.transProperty ) {
2451				tween.transProperty = options.transProperty;
2452			}
2453			tween.to(function(){ element.css(properties);});
2454			if(options.complete) tween.onComplete(options.complete , options.target);
2455			tween.start();
2456			tween.stop = tween.reset;
2457			return tween;
2458		}
2459
2460		var onCl;
2461
2462		if(options.delay) element.delay(options.delay);
2463		if(options.complete)
2464			onCl = function(){
2465				options.complete.call(options.target);
2466			};
2467
2468		element.stop(true).animate(properties , duration , options.ease || 'linear' , onCl);
2469
2470		return element;
2471	};
2472
2473	CTween.fadeOut = function(target , duration , remove) {
2474		var options = {};
2475		if(remove === true) {
2476			options.complete = function(){target.remove();};
2477		} else if ( remove === 2 ) {
2478			options.complete = function(){target.css('display', 'none');};
2479		}
2480
2481		CTween.animate(target , duration || 1000 , {opacity : 0} , options);
2482	};
2483
2484	CTween.fadeIn = function(target , duration, reset){
2485		if( reset !== false ) {
2486			target.css('opacity' , 0).css('display', '');
2487		}
2488
2489		CTween.animate(target , duration || 1000 , {opacity : 1});
2490	};
2491
2492})();
2493
2494;(function(){
2495
2496	// Thanks to matthewlein
2497	// https://github.com/matthewlein/Ceaser
2498
2499	window.EaseDic = {
2500		'linear'            : 'linear',
2501	    'ease'              : 'ease',
2502	    'easeIn'            : 'ease-in',
2503	    'easeOut'           : 'ease-out',
2504	    'easeInOut'         : 'ease-in-out',
2505
2506	    'easeInCubic'       : 'cubic-bezier(.55,.055,.675,.19)',
2507	    'easeOutCubic'      : 'cubic-bezier(.215,.61,.355,1)',
2508	    'easeInOutCubic'    : 'cubic-bezier(.645,.045,.355,1)',
2509	    'easeInCirc'        : 'cubic-bezier(.6,.04,.98,.335)',
2510	    'easeOutCirc'       : 'cubic-bezier(.075,.82,.165,1)',
2511	    'easeInOutCirc'     : 'cubic-bezier(.785,.135,.15,.86)',
2512	    'easeInExpo'        : 'cubic-bezier(.95,.05,.795,.035)',
2513	    'easeOutExpo'       : 'cubic-bezier(.19,1,.22,1)',
2514	    'easeInOutExpo'     : 'cubic-bezier(1,0,0,1)',
2515	    'easeInQuad'        : 'cubic-bezier(.55,.085,.68,.53)',
2516	    'easeOutQuad'       : 'cubic-bezier(.25,.46,.45,.94)',
2517	    'easeInOutQuad'     : 'cubic-bezier(.455,.03,.515,.955)',
2518	    'easeInQuart'       : 'cubic-bezier(.895,.03,.685,.22)',
2519	    'easeOutQuart'      : 'cubic-bezier(.165,.84,.44,1)',
2520	    'easeInOutQuart'    : 'cubic-bezier(.77,0,.175,1)',
2521	    'easeInQuint'       : 'cubic-bezier(.755,.05,.855,.06)',
2522	    'easeOutQuint'      : 'cubic-bezier(.23,1,.32,1)',
2523	    'easeInOutQuint'    : 'cubic-bezier(.86,0,.07,1)',
2524	    'easeInSine'        : 'cubic-bezier(.47,0,.745,.715)',
2525	    'easeOutSine'       : 'cubic-bezier(.39,.575,.565,1)',
2526	    'easeInOutSine'     : 'cubic-bezier(.445,.05,.55,.95)',
2527	    'easeInBack'        : 'cubic-bezier(.6,-.28,.735,.045)',
2528	    'easeOutBack'       : 'cubic-bezier(.175, .885,.32,1.275)',
2529	    'easeInOutBack'     : 'cubic-bezier(.68,-.55,.265,1.55)'
2530	};
2531})();
2532
2533/* ================== bin-debug/js/pro/tools/Aligner.js =================== */
2534;(function(){
2535
2536	"use strict";
2537
2538	window.MSAligner = function(type , $container , $img ){
2539
2540		this.$container = $container;
2541		this.$img	    = $img;
2542
2543		this.type 		= type || 'stretch'; // fill , fit , stretch , tile , center
2544
2545		this.widthOnly = false;
2546		this.heightOnly = false;
2547	};
2548
2549	var p = MSAligner.prototype;
2550
2551	/*-------------- METHODS --------------*/
2552
2553	p.init = function(w , h){
2554
2555		this.baseWidth = w;
2556		this.baseHeight = h;
2557		this.imgRatio = w / h;
2558		this.imgRatio2 = h / w;
2559
2560		switch(this.type){
2561			case 'tile':
2562				this.$container.css('background-image' , 'url('+ this.$img.attr('src') +')');
2563				this.$img.remove();
2564			break;
2565			case 'center':
2566				this.$container.css('background-image' , 'url('+ this.$img.attr('src') +')');
2567				this.$container.css({
2568					backgroundPosition 	: 'center center',
2569					backgroundRepeat	: 'no-repeat'
2570				});
2571				this.$img.remove();
2572			break;
2573			case 'stretch':
2574				this.$img.css({
2575					width	: 	'100%',
2576					height	: 	'100%'
2577				});
2578			break;
2579			case 'fill':
2580			case 'fit' :
2581				this.needAlign = true;
2582				this.align();
2583			break;
2584		}
2585
2586	};
2587
2588	p.align = function(){
2589		//图片成比例缩放并在容器中全部显示
2590		var w = this.$img.width();
2591		var h = this.$img.height();
2592		if (w > h) {
2593			this.$img.css({
2594				"width" : "100%",
2595				"height" : "auto",
2596				"position" : "absolute",
2597				"top" : "50%",
2598				"left" : "0",
2599				"-webkit-transform" : "translateY(-50%)",
2600				"-moz-transform" : "translateY(-50%)",
2601				"-ms-transform" : "translateY(-50%)",
2602				"-o-transform" : "translateY(-50%)",
2603				"transform" : "translateY(-50%)"
2604			});
2605		} else {
2606			this.$img.css({
2607				"height" : "100%",
2608				"width" : "auto",
2609				"position" : "absolute",
2610				"top" : "0",
2611				"left" : "50%",
2612				"-webkit-transform" : "translateX(-50%)",
2613				"-moz-transform" : "translateX(-50%)",
2614				"-ms-transform" : "translateX(-50%)",
2615				"-o-transform" : "translateX(-50%)",
2616				"transform" : "translateX(-50%)"
2617			});
2618		}
2619		return;
2620
2621		if(!this.needAlign) return;
2622
2623		var cont_w = this.$container.width();
2624		var cont_h = this.$container.height();
2625
2626		var contRatio = cont_w / cont_h;
2627
2628		if(this.type == 'fill'){
2629			if(this.imgRatio < contRatio ){
2630				this.$img.width(cont_w);
2631				this.$img.height(cont_w * this.imgRatio2);
2632			}else{
2633				this.$img.height(cont_h);
2634				this.$img.width(cont_h * this.imgRatio);
2635			}
2636
2637		}else if(this.type == 'fit'){
2638
2639			if(this.imgRatio < contRatio){
2640				this.$img.height(cont_h);
2641				this.$img.width(cont_h * this.imgRatio);
2642			}else{
2643				this.$img.width(cont_w);
2644				this.$img.height(cont_w * this.imgRatio2);
2645			}
2646		}
2647
2648		this.setMargin();
2649
2650	};
2651
2652	p.setMargin = function(){
2653
2654		var cont_w = this.$container.width();
2655		var cont_h = this.$container.height();
2656
2657		this.$img.css('margin-top' , (cont_h - this.$img[0].offsetHeight) / 2 + 'px');
2658		this.$img.css('margin-left', (cont_w - this.$img[0].offsetWidth ) / 2 + 'px');
2659	}
2660
2661})();
2662
2663/* ================== bin-debug/js/pro/controls/controller.js =================== */
2664/**
2665 *  Touch List Control
2666 * 	version 1.1.2
2667 *
2668 * 	Copyright (C) 2014, Averta Ltd. All rights reserved.
2669 */
2670
2671;(function(){
2672
2673	"use strict";
2674
2675	var _options = {
2676		bouncing 			: true,
2677		snapping			: false,
2678		snapsize			: null,
2679		friction			: 0.05,
2680		outFriction			: 0.05,
2681		outAcceleration		: 0.09,
2682		minValidDist		: 0.3,
2683		snappingMinSpeed	: 2,
2684		paging				: false,
2685		endless				: false,
2686		maxSpeed			: 160
2687	};
2688
2689
2690	var Controller = function(min , max , options){
2691
2692		if(max === null || min === null) {
2693			throw new Error('Max and Min values are required.');
2694		}
2695
2696		this.options = options || {};
2697
2698		for(var key in _options){
2699			if(!(key in this.options))
2700				this.options[key] = _options[key];
2701		}
2702
2703		this._max_value 	= max;
2704		this._min_value 	= min;
2705
2706		this.value 			= min;
2707		this.end_loc 		= min;
2708
2709		this.current_snap	= this.getSnapNum(min);
2710
2711		this.__extrStep 	= 0;
2712		this.__extraMove 	= 0;
2713
2714		this.__animID	 	= -1;
2715
2716	};
2717
2718	var p = Controller.prototype;
2719
2720	/*
2721	---------------------------------------------------
2722		PUBLIC METHODS
2723	----------------------------------------------------
2724	*/
2725
2726
2727	p.changeTo = function(value , animate , speed , snap_num , dispatch) {
2728		this.stopped = false;
2729		this._internalStop();
2730		value = this._checkLimits(value);
2731		speed = Math.abs(speed || 0);
2732
2733		if(this.options.snapping){
2734			snap_num = snap_num || this.getSnapNum(value);
2735			if( dispatch !== false )this._callsnapChange(snap_num);
2736			this.current_snap = snap_num;
2737		}
2738
2739		if(animate){
2740			this.animating = true;
2741
2742			var self = this,
2743				active_id = ++self.__animID,
2744				amplitude = value - self.value,
2745				timeStep = 0,
2746				targetPosition = value,
2747				animFrict = 1 - self.options.friction,
2748				timeconst = animFrict + (speed - 20)  * animFrict * 1.3 / self.options.maxSpeed;
2749
2750			var tick = function(){
2751
2752				if(active_id !== self.__animID) return;
2753
2754				var dis =  value - self.value;
2755
2756				if( Math.abs(dis) > self.options.minValidDist && self.animating ){
2757					window.requestAnimationFrame(tick);
2758				} else {
2759
2760					if( self.animating ){
2761						self.value = value;
2762						self._callrenderer();
2763					}
2764
2765					self.animating = false;
2766
2767					if( active_id !== self.__animID ){
2768						self.__animID = -1;
2769					}
2770
2771					self._callonComplete('anim');
2772
2773					return;
2774				}
2775
2776				//self.value += dis * timeconst
2777				self.value = targetPosition - amplitude * Math.exp(-++timeStep * timeconst);
2778
2779				self._callrenderer();
2780			};
2781
2782			tick();
2783
2784			return;
2785		}
2786
2787		this.value = value;
2788		this._callrenderer();
2789	};
2790
2791	p.drag = function(move){
2792
2793		if(this.start_drag){
2794			this.drag_start_loc  = this.value;
2795			this.start_drag = false;
2796		}
2797
2798		this.animating 		= false;
2799		this._deceleration 	= false;
2800
2801		this.value -= move;
2802
2803		if ( !this.options.endless && (this.value > this._max_value || this.value < 0)) {
2804			if (this.options.bouncing) {
2805				this.__isout = true;
2806				this.value += move * 0.6;
2807			} else if (this.value > this._max_value) {
2808				this.value = this._max_value;
2809			} else {
2810				this.value = 0;
2811			}
2812		}else if(!this.options.endless && this.options.bouncing){
2813				this.__isout = false;
2814		}
2815
2816		this._callrenderer();
2817
2818	};
2819
2820	p.push = function(speed){
2821		this.stopped = false;
2822		if(this.options.snapping && Math.abs(speed) <= this.options.snappingMinSpeed){
2823			this.cancel();
2824			return;
2825		}
2826
2827		this.__speed = speed;
2828		this.__startSpeed = speed;
2829
2830		this.end_loc = this._calculateEnd();
2831
2832		if(this.options.snapping){
2833
2834			var snap_loc = this.getSnapNum(this.value),
2835				end_snap = this.getSnapNum(this.end_loc);
2836
2837			if(this.options.paging){
2838				snap_loc = this.getSnapNum(this.drag_start_loc);
2839
2840				this.__isout = false;
2841				if(speed > 0){
2842					this.gotoSnap(snap_loc + 1 , true , speed);
2843				}else{
2844					this.gotoSnap(snap_loc - 1 , true , speed);
2845				}
2846				return;
2847			}else if(snap_loc === end_snap){
2848				this.cancel();
2849				return;
2850			}
2851
2852			this._callsnapChange(end_snap);
2853			this.current_snap = end_snap;
2854
2855		}
2856
2857		this.animating = false;
2858
2859		this.__needsSnap = this.options.endless || (this.end_loc > this._min_value && this.end_loc < this._max_value) ;
2860
2861		if(this.options.snapping && this.__needsSnap)
2862			this.__extraMove = this._calculateExtraMove(this.end_loc);
2863
2864
2865		this._startDecelaration();
2866	};
2867
2868	p.bounce = function(speed){
2869		if(this.animating) return;
2870		this.stopped = false;
2871		this.animating = false;
2872
2873		this.__speed = speed;
2874		this.__startSpeed = speed;
2875
2876		this.end_loc = this._calculateEnd();
2877
2878		//if(this.options.paging){}
2879
2880		this._startDecelaration();
2881	};
2882
2883	p.stop = function(){
2884		this.stopped = true;
2885		this._internalStop();
2886	};
2887
2888	p.cancel = function(){
2889		this.start_drag = true; // reset flag for next drag
2890		if(this.__isout){
2891			this.__speed = 0.0004;
2892			this._startDecelaration();
2893		}else if(this.options.snapping){
2894			this.gotoSnap(this.getSnapNum(this.value) , true);
2895		}
2896
2897	};
2898
2899	p.renderCallback = function(listener , ref){
2900		this.__renderHook = {fun:listener , ref:ref};
2901	};
2902
2903	p.snappingCallback = function(listener , ref){
2904		this.__snapHook = {fun:listener , ref:ref};
2905	};
2906
2907	p.snapCompleteCallback = function(listener , ref){
2908		this.__compHook = {fun:listener , ref:ref};
2909	};
2910
2911	p.getSnapNum = function(value){
2912		return Math.floor(( value + this.options.snapsize / 2 ) / this.options.snapsize);
2913	};
2914
2915	p.nextSnap = function(){
2916		this._internalStop();
2917
2918		var curr_snap = this.getSnapNum(this.value);
2919
2920		if(!this.options.endless && (curr_snap + 1) * this.options.snapsize > this._max_value){
2921			this.__speed = 8;
2922			this.__needsSnap = false;
2923			this._startDecelaration();
2924		}else{
2925			this.gotoSnap(curr_snap + 1 , true);
2926		}
2927
2928	};
2929
2930	p.prevSnap = function(){
2931		this._internalStop();
2932
2933		var curr_snap = this.getSnapNum(this.value);
2934
2935		if(!this.options.endless && (curr_snap - 1) * this.options.snapsize < this._min_value){
2936			this.__speed = -8;
2937			this.__needsSnap = false;
2938			this._startDecelaration();
2939		}else{
2940			this.gotoSnap(curr_snap - 1 , true);
2941		}
2942
2943	};
2944
2945	p.gotoSnap = function(snap_num , animate , speed){
2946		this.changeTo(snap_num * this.options.snapsize , animate , speed , snap_num);
2947	};
2948
2949	p.destroy = function(){
2950		this._internalStop();
2951		this.__renderHook = null;
2952		this.__snapHook = null;
2953		this.__compHook = null;
2954	};
2955
2956	/*
2957	---------------------------------------------------
2958		PRIVATE METHODS
2959	----------------------------------------------------
2960	*/
2961
2962	p._internalStop = function(){
2963		this.start_drag = true; // reset flag for next drag
2964		this.animating = false;
2965		this._deceleration = false;
2966		this.__extrStep = 0;
2967	};
2968
2969	p._calculateExtraMove = function(value){
2970		var m = value % this.options.snapsize;
2971		return m < this.options.snapsize / 2  ? -m : this.options.snapsize - m;
2972	};
2973
2974	p._calculateEnd = function(step){
2975		var temp_speed = this.__speed;
2976		var temp_value = this.value;
2977		var i = 0;
2978		while(Math.abs(temp_speed) > this.options.minValidDist){
2979			temp_value += temp_speed;
2980			temp_speed *= this.options.friction;
2981			i++;
2982		}
2983		if(step) return i;
2984		return temp_value;
2985	};
2986
2987	p._checkLimits = function(value){
2988		if(this.options.endless) 	return value;
2989		if(value < this._min_value) return this._min_value;
2990		if(value > this._max_value) return this._max_value;
2991		return value;
2992	};
2993
2994	p._callrenderer = function(){
2995		if(this.__renderHook) this.__renderHook.fun.call(this.__renderHook.ref , this , this.value);
2996	};
2997
2998	p._callsnapChange = function(targetSnap){
2999		if(!this.__snapHook || targetSnap === this.current_snap) return;
3000		this.__snapHook.fun.call(this.__snapHook.ref , this , targetSnap , targetSnap - this.current_snap);
3001	};
3002
3003	p._callonComplete = function(type){
3004		if(this.__compHook && !this.stopped){
3005			this.__compHook.fun.call(this.__compHook.ref , this , this.current_snap , type);
3006		}
3007
3008	};
3009
3010	p._computeDeceleration = function(){
3011
3012		if(this.options.snapping && this.__needsSnap){
3013			var xtr_move = (this.__startSpeed - this.__speed) / this.__startSpeed * this.__extraMove;
3014			this.value += this.__speed + xtr_move - this.__extrStep;
3015			this.__extrStep = xtr_move;
3016		}else{
3017			this.value += this.__speed;
3018		}
3019
3020		this.__speed *= this.options.friction; //* 10;
3021
3022		if(!this.options.endless && !this.options.bouncing){
3023			if(this.value <= this._min_value){
3024				this.value = this._min_value;
3025				this.__speed = 0;
3026			}else if(this.value >= this._max_value){
3027				this.value = this._max_value;
3028				this.__speed = 0;
3029			}
3030		}
3031
3032		this._callrenderer();
3033
3034		if(!this.options.endless && this.options.bouncing){
3035
3036			var out_value = 0;
3037
3038			if(this.value < this._min_value){
3039				out_value = this._min_value - this.value;
3040			}else if(this.value > this._max_value){
3041				out_value = this._max_value - this.value;
3042			}
3043
3044			this.__isout =  Math.abs(out_value) >= this.options.minValidDist;
3045
3046			if(this.__isout){
3047				if(this.__speed * out_value <= 0){
3048					this.__speed += out_value * this.options.outFriction;
3049				}else {
3050					this.__speed = out_value * this.options.outAcceleration;
3051				}
3052			}
3053		}
3054	};
3055
3056	p._startDecelaration = function(){
3057		if(this._deceleration) return;
3058		this._deceleration = true;
3059
3060		var self = this;
3061
3062		var tick = function (){
3063
3064			if(!self._deceleration) return;
3065
3066			self._computeDeceleration();
3067
3068			if(Math.abs(self.__speed) > self.options.minValidDist || self.__isout){
3069				window.requestAnimationFrame(tick);
3070			}else{
3071				self._deceleration = false;
3072				self.__isout = false;
3073
3074				if(self.__needsSnap && self.options.snapping && !self.options.paging){
3075					self.value = self._checkLimits(self.end_loc + self.__extraMove);
3076				}else{
3077					self.value = Math.round(self.value);
3078				}
3079
3080				self._callrenderer();
3081				self._callonComplete('decel');
3082			}
3083		};
3084
3085		tick();
3086	};
3087
3088	window.Controller = Controller;
3089
3090})();
3091
3092/* ================== bin-debug/js/pro/layers/LayerController.js =================== */
3093/**
3094 * Master Slider Layer Controller
3095 * @author averta
3096 * @package Master Slider jQuery PRO
3097 * @since 2.11.1
3098 */
3099;(function(window, document, $){
3100
3101	/**
3102	 * Layer Controller constructor
3103	 * @param {MSSlide} slide layer controller's slide.
3104	 */
3105	window.MSLayerController = function (slide) {
3106		this.slide = slide;
3107		this.slider = slide.slider;
3108		this.layers = [];
3109		this.layersCount = 0;
3110		this.preloadCount = 0;
3111		this.$layers = $('<div></div>').addClass('ms-slide-layers');
3112		this.$staticLayers = $('<div></div>').addClass('ms-static-layers');
3113		this.$fixedLayers = $('<div></div>').addClass('ms-fixed-layers');
3114		this.$animLayers = $('<div></div>').addClass('ms-anim-layers');
3115
3116	};
3117
3118	var p = MSLayerController.prototype;
3119
3120
3121	/*-----------------------------------------*\
3122		Public Methods
3123	\*-----------------------------------------*/
3124
3125	/**
3126	 * Adds new layer to the controller and slide
3127	 * @param {MSLayerElement} layer
3128	 */
3129	p.addLayer = function (layer) {
3130		layer.slide = this.slide;
3131		layer.controller = this;
3132
3133		// append layer element to the layers container based on `data-position` attribute.
3134		switch ( layer.$element.data('position') ) {
3135			case 'static':
3136				this.hasStaticLayer = true;
3137				layer.$element.appendTo(this.$staticLayers);
3138				break;
3139			case 'fixed':
3140				this.hasFixedLayer = true;
3141				layer.$element.appendTo(this.$fixedLayers);
3142				break;
3143			default:
3144				layer.$element.appendTo(this.$animLayers);
3145				break;
3146		}
3147
3148		layer.create();
3149		this.layers.push(layer);
3150		this.layersCount ++;
3151
3152		// @since 1.7.0
3153		if( layer.parallax ){
3154			this.hasParallaxLayer = true;
3155		}
3156
3157		if ( layer.needPreload ) {
3158			this.preloadCount ++;
3159		}
3160	};
3161
3162	/**
3163	 * add layers over slide
3164	 * it calls after addLayer
3165	 */
3166	p.create = function () {
3167		this.slide.$element.append(this.$layers);
3168		this.$layers.append(this.$animLayers);
3169
3170		if ( this.hasStaticLayer ) {
3171			this.$layers.append(this.$staticLayers);
3172		}
3173
3174		if(this.slider.options.layersMode == 'center'){
3175			this.$layers.css('max-width' , this.slider.options.width + 'px');
3176
3177			if ( this.hasFixedLayer ) {
3178				this.$fixedLayers.css('max-width' , this.slider.options.width + 'px');
3179			}
3180		}
3181	};
3182
3183	/**
3184	 * load layers that requires preloading
3185	 * @param {Function} callback onload callback function
3186	 */
3187	p.loadLayers = function (callback) {
3188		this._onReadyCallback = callback;
3189
3190		if ( this.preloadCount === 0 ) {
3191			this._onlayersReady();
3192			return;
3193		}
3194
3195		for(var i = 0 ; i !== this.layersCount; ++i){
3196			if(this.layers[i].needPreload) {
3197				this.layers[i].loadImage();
3198			}
3199		}
3200	};
3201
3202	/**
3203	 * prepare layers to show over slide, this method will be called via `prepareToSelect` method of slide.
3204	 */
3205	p.prepareToShow = function () {
3206		if ( this.hasParallaxLayer ) {
3207			this._enableParallaxEffect();
3208		}
3209
3210		if ( this.hasFixedLayer ) {
3211			this.$fixedLayers.prependTo(this.slide.view.$element);
3212		}
3213	};
3214
3215	/**
3216	 * show layers over slide
3217	 */
3218	p.showLayers = function(){
3219		if ( this.layersHideTween ) {
3220			this.layersHideTween.stop(true);
3221		}
3222
3223		if ( this.fixedLayersHideTween ) {
3224			this.fixedLayersHideTween.stop(true);
3225		}
3226
3227		this._resetLayers();
3228		this.$animLayers.css('opacity', '').css('display', '');
3229
3230		if ( this.hasFixedLayer ){
3231			this.$fixedLayers.css('opacity', '').css('display', '');
3232		}
3233
3234		if ( this.ready ) {
3235			this._initLayers();
3236			this._locateLayers();
3237			this._startLayers();
3238		}
3239	};
3240
3241	/**
3242	 * hideLayers this method will be called via slide class.
3243	 */
3244	p.hideLayers = function () {
3245
3246		if( this.slide.selected || this.slider.options.instantStartLayers ){
3247			var that = this;
3248			that.layersHideTween = CTween.animate(this.$animLayers, 500, {opacity: 0}, {
3249				complete:function(){
3250					that._resetLayers();
3251				}
3252			});
3253
3254			if ( this.hasFixedLayer ) {
3255				this.fixedLayersHideTween = CTween.animate(this.$fixedLayers, 500, {opacity: 0}, {
3256					complete:function(){
3257						that.$fixedLayers.detach();
3258					}
3259				});
3260			}
3261
3262			// disables parallax effect
3263			// @since 1.6.0
3264			if ( this.hasParallaxLayer ) {
3265				this._disableParallaxEffect();
3266			}
3267		}
3268	};
3269
3270	/**
3271	 * hide layers from slide
3272	 */
3273	p.animHideLayers = function(){
3274		if ( !this.ready ) {
3275			return;
3276		}
3277
3278		for(var i = 0; i !== this.layersCount; ++i){
3279			this.layers[i].hide();
3280		}
3281	};
3282
3283	/**
3284	 * calculate new size of layers containers and locate layers
3285	 * @param {Number} width  slider width
3286	 * @param {Number} height slider height
3287	 * @param {Boolean} hard  whether call init layers.
3288	 */
3289	p.setSize = function (width, height, hard) {
3290
3291		if ( this.ready && (this.slide.selected || this.hasStaticLayer) ) {
3292			if ( hard ) {
3293				this._initLayers(true);
3294			}
3295			this._locateLayers(!this.slide.selected);
3296		}
3297
3298		if ( this.slider.options.autoHeight ) {
3299			this.updateHeight();
3300		}
3301
3302		if ( this.slider.options.layersMode == 'center' ) {
3303			var left = Math.max( 0 ,  (width - this.slider.options.width) / 2 ) + 'px';
3304			this.$layers[0].style.left = left;
3305			this.$fixedLayers[0].style.left = left;
3306		}
3307
3308	};
3309
3310	/**
3311	 * updates layers container height
3312	 */
3313	p.updateHeight = function () {
3314		var h = this.slide.getHeight() + 'px';
3315		this.$layers[0].style.height = h;
3316		this.$fixedLayers[0].style.height = h;
3317	};
3318
3319	/**
3320	 * This method will be called by the last layer after loading all of layers.
3321	 */
3322	p._onlayersReady = function(){
3323		this.ready = true;
3324
3325		if ( this.hasStaticLayer && !this.slide.isSleeping ) {
3326			this._initLayers(false, true);
3327		}
3328
3329		this._onReadyCallback.call(this.slide);
3330	};
3331
3332	/**
3333	 * this method will be called by slide when it starts sleeping
3334	 */
3335	p.onSlideSleep = function () {
3336
3337	};
3338
3339	/**
3340	 * this method will be called by slide after waking up
3341	 */
3342	p.onSlideWakeup = function () {
3343		if ( this.hasStaticLayer && this.ready ) {
3344			this._initLayers(false, true);
3345		}
3346	};
3347
3348	/**
3349	 * destroy layer controller and stop layer animations
3350	 */
3351	p.destroy = function () {
3352		if ( this.slide.selected && this.hasParallaxLayer ) {
3353			this._disableParallaxEffect();
3354		}
3355
3356		for(var i = 0; i < this.layersCount; ++i){
3357			this.layers[i].$element.stop(true).remove();
3358		}
3359
3360		this.$layers.remove();
3361		this.$staticLayers.remove();
3362		this.$fixedLayers.remove();
3363		this.$animLayers.remove();
3364	};
3365
3366
3367	/*-----------------------------------------*\
3368		Private Methods
3369	\*-----------------------------------------*/
3370
3371	/**
3372	 * start layer effect
3373	 */
3374	p._startLayers = function(){
3375		for(var i = 0; i !== this.layersCount; ++i){
3376			this.layers[i].start();
3377		}
3378	};
3379
3380	/**
3381	 * call init method of all layers
3382	 * @param  {Boolean} force
3383	 */
3384	p._initLayers = function(force, onlyStatics){
3385
3386		if ( this.init && !force || this.slider.init_safemode ) {
3387			return;
3388		}
3389
3390		this.init = onlyStatics !== true;
3391
3392		var i = 0;
3393		if ( onlyStatics && !this.staticsInit ) {  // init only static layers
3394			this.staticsInit = true;
3395			for ( ;i !== this.layersCount; ++i ) {
3396				if ( this.layers[i].staticLayer ) {
3397					this.layers[i].init();
3398				}
3399			}
3400		} else if ( this.staticsInit && !force ) { // statics are already initiated, init dynamics
3401			for ( ;i !== this.layersCount; ++i ) {
3402				if ( !this.layers[i].staticLayer ){
3403					this.layers[i].init();
3404				}
3405			}
3406		} else {	 // init all
3407			for ( ;i !== this.layersCount; ++i ) {
3408				this.layers[i].init();
3409			}
3410		}
3411	};
3412
3413	/**
3414	 * locate layers over slide
3415	 */
3416	p._locateLayers = function (onlyStatics){
3417		var i = 0;
3418		if ( onlyStatics ) {
3419			for ( ;i !== this.layersCount; ++i ) {
3420				if ( this.layers[i].staticLayer ) {
3421					this.layers[i].locate();
3422				}
3423			}
3424		} else {
3425			for ( ;i !== this.layersCount; ++i ) {
3426				this.layers[i].locate();
3427			}
3428		}
3429	};
3430
3431	/**
3432	 * rest layers
3433	 */
3434	p._resetLayers = function(){
3435		this.$animLayers.css('display', 'none').css('opacity',  1);
3436		for ( var i = 0; i !== this.layersCount; ++i ) {
3437			this.layers[i].reset();
3438		}
3439	};
3440
3441	/**
3442	 * moves layers based on x and y
3443	 * @param  {Number} x
3444	 * @param  {Number} y
3445	 * @param  {Boolean} fast whether animate or not
3446	 */
3447	p._applyParallax = function(x, y, fast){
3448		for(var i = 0 ; i !== this.layersCount; ++i){
3449			if( this.layers[i].parallax != null ){
3450				this.layers[i].moveParallax(x, y, fast);
3451			}
3452		}
3453	};
3454
3455	/**
3456	 * enable parallax moving layers
3457	 */
3458	p._enableParallaxEffect = function(){
3459		if( this.slider.options.parallaxMode === 'swipe' ){
3460			this.slide.view.addEventListener(MSViewEvents.SCROLL, this._swipeParallaxMove, this);
3461		} else {
3462			this.slide.$element.on('mousemove' , {that:this}, this._mouseParallaxMove)
3463						 .on('mouseleave', {that:this}, this._resetParalax);
3464			/**
3465			 * Calculates new position of parallax based on device orintation gamma and beta
3466			 * @param  {Event} e
3467			 * @since 1.6.0
3468			 */
3469			/*if( window._mobile && window.DeviceOrientationEvent ){
3470
3471				var that = this;
3472				this.orientationParallaxMove = function(e){
3473					var beta = Math.round(e.beta),
3474						gamma = Math.round(e.gamma);
3475
3476					that._applyParallax(beta * that.__width / 360 , -gamma * that.__height / 360);
3477				};
3478
3479				window.addEventListener('deviceorientation', this.orientationParallaxMove, false);
3480			}*/
3481		}
3482	};
3483
3484	/**
3485	 * disable parallax effect
3486	 */
3487	p._disableParallaxEffect = function(){
3488		if( this.slider.options.parallaxMode === 'swipe' ){
3489			this.slide.view.removeEventListener(MSViewEvents.SCROLL, this._swipeParallaxMove, this);
3490		} else {
3491			this.slide.$element.off('mousemove', this._mouseParallaxMove)
3492						 .off('mouseleave', this._resetParalax);
3493
3494			/*if( window._mobile && window.DeviceOrientationEvent ){
3495				window.removeEventListener('deviceorientation', this.orientationParallaxMove);
3496			}*/
3497		}
3498	};
3499
3500	/**
3501	 * reset layers parallax position to 0, 0
3502	 */
3503	p._resetParalax = function(e){
3504		var that = e.data.that;
3505		that._applyParallax(0,0);
3506	};
3507
3508	/**
3509	 * Calculates new mouse position over slide and moves layers
3510	 * @since 1.6.0
3511	 */
3512	p._mouseParallaxMove = function(e){
3513		var that = e.data.that,
3514			os = that.slide.$element.offset(),
3515			slider = that.slider;
3516
3517			if( slider.options.parallaxMode !== 'mouse:y-only' ){
3518				var x = e.pageX - os.left - that.slide.__width  / 2;
3519			} else {
3520				var x = 0;
3521			}
3522
3523			if( slider.options.parallaxMode !== 'mouse:x-only' ){
3524				var y = e.pageY - os.top  - that.slide.__height / 2;
3525			} else {
3526				var y = 0;
3527			}
3528
3529		that._applyParallax(-x, -y);
3530	};
3531
3532
3533	/**
3534	 * Calculates new position of parallax based on slide position
3535	 * @param  {Event} e
3536	 * @since 1.6.0
3537	 */
3538	p._swipeParallaxMove = function(e){
3539		var value = this.slide.position - this.slide.view.__contPos;
3540
3541		if ( this.slider.options.dir === 'v' ) {
3542			this._applyParallax(0, value, true);
3543		} else {
3544			this._applyParallax(value, 0, true);
3545		}
3546	};
3547
3548
3549})(window, document, jQuery);
3550
3551/* ================== bin-debug/js/pro/layers/LayerEffects.js =================== */
3552;(function($){
3553
3554	window.MSLayerEffects = {};
3555
3556	var installed,
3557		_fade = {opacity:0};
3558
3559	MSLayerEffects.setup = function(){
3560
3561		if(installed) return;
3562		installed = true;
3563
3564		var st 					= MSLayerEffects,
3565			transform_css 		= window._jcsspfx + 'Transform',
3566			transform_orig_css  = window._jcsspfx + 'TransformOrigin',
3567			o					= $.browser.opera; // Opera sucks :|
3568			_2d					= window._css2d && window._cssanim && !o;
3569
3570		st.defaultValues = {left : 0 , top: 0 , opacity:(isMSIE('<=9')?1:'') , right:0 , bottom:0};
3571		st.defaultValues[transform_css] 	 = '';
3572		//st.defaultValues[transform_orig_css] = '';
3573		st.rf = 1;
3574
3575		st.presetEffParams = {
3576			random: '30|300',
3577			long 	: 300,
3578			short	: 30,
3579			'false'	:false,
3580			'true'	:true,
3581			tl	 : 'top left'	,	bl: 'bottom left',
3582			tr   : 'top right'	,   br: 'bottom right',
3583			rt   : 'top right'	,	lb: 'bottom left',
3584			lt   : 'top left'	,	rb: 'bottom right',
3585			t	 : 'top'		,	b : 'bottom',
3586			r	 : 'right'		,	l : 'left',
3587			c	 : 'center'
3588		};
3589
3590
3591		/*
3592		 ----------------------------------------
3593		 				2D Effects
3594		 ----------------------------------------
3595		 */
3596
3597		st.fade = function(){
3598			return _fade;
3599		};
3600
3601		st.left = (_2d)? function(dist , fade){
3602			var r = fade === false ? {} : {opacity:0};
3603			r[transform_css] = 'translateX(' + -dist*st.rf + 'px)';
3604			return r;
3605		} : function (dist, fade){
3606			var r = fade === false ? {} : {opacity:0};
3607			r.left = -dist*st.rf + 'px';
3608			return r;
3609		};
3610
3611		st.right = (_2d)? function(dist , fade){
3612			var r = fade === false ? {} : {opacity:0};
3613			r[transform_css] = 'translateX(' + dist*st.rf + 'px)';
3614			return r;
3615		} : function (dist, fade){
3616			var r = fade === false ? {} : {opacity:0};
3617			r.left = dist*st.rf + 'px';
3618			return r;
3619		};
3620
3621		st.top = (_2d)? function(dist , fade){
3622			var r = fade === false ? {} : {opacity:0};
3623			r[transform_css] = 'translateY(' + -dist*st.rf + 'px)';
3624			return r;
3625		} : function (dist, fade){
3626			var r = fade === false ? {} : {opacity:0};
3627			r.top = -dist*st.rf + 'px';
3628			return r;
3629		};
3630
3631		st.bottom = (_2d)? function(dist , fade){
3632			var r = fade === false ? {} : {opacity:0};
3633			r[transform_css] = 'translateY(' + dist*st.rf + 'px)';
3634			return r;
3635		} : function (dist, fade){
3636			var r = fade === false ? {} : {opacity:0};
3637			r.top = dist*st.rf + 'px';
3638			return r;
3639		};
3640
3641		st.from = (_2d)? function(leftdis , topdis , fade){
3642			var r = fade === false ? {} : {opacity:0};
3643			r[transform_css] = 'translateX('+leftdis*st.rf+'px) translateY(' + topdis*st.rf + 'px)';
3644			return r;
3645		} : function (leftdis , topdis, fade){
3646			var r = fade === false ? {} : {opacity:0};
3647			r.top = topdis*st.rf + 'px';
3648			r.left = leftdis*st.rf + 'px';
3649			return r;
3650		};
3651
3652
3653		// --------------------------------------------------------------------
3654
3655		st.rotate = (_2d)? function(deg , orig ){
3656			var r = {opacity: 0};
3657			r[transform_css] = ' rotate('+deg+'deg)';
3658			if(orig) r[transform_orig_css] = orig;
3659			return r;
3660		} : function (deg, orig){
3661			return _fade;
3662		};
3663
3664		st.rotateleft = (_2d)? function(deg , dist , orig , fade){
3665			var r = st.left(dist , fade);
3666			r[transform_css] += ' rotate('+deg+'deg)';
3667			if(orig) r[transform_orig_css] = orig;
3668			return r;
3669		} : function (deg , dist , orig , fade){
3670			return st.left(dist , fade);
3671		};
3672
3673		st.rotateright = (_2d)? function(deg , dist , orig , fade){
3674			var r = st.right(dist , fade);
3675			r[transform_css] += ' rotate('+deg+'deg)';
3676			if(orig) r[transform_orig_css] = orig;
3677			return r;
3678		} : function (deg , dist , orig , fade){
3679			return st.right(dist , fade);
3680		};
3681
3682		st.rotatetop = (_2d)? function(deg , dist , orig , fade){
3683			var r = st.top(dist , fade);
3684			r[transform_css] += ' rotate('+deg+'deg)';
3685			if(orig) r[transform_orig_css] = orig;
3686			return r;
3687		} : function (deg , dist , orig , fade){
3688			return st.top(dist , fade);
3689		};
3690
3691		st.rotatebottom = (_2d)? function(deg , dist , orig , fade){
3692			var r = st.bottom(dist , fade);
3693			r[transform_css] += ' rotate('+deg+'deg)';
3694			if(orig) r[transform_orig_css] = orig;
3695			return r;
3696		} : function (deg , dist , orig , fade){
3697			return st.bottom(dist , fade);
3698		};
3699
3700		st.rotatefrom = (_2d)? function(deg , leftdis , topdis , orig , fade){
3701			var r = st.from(leftdis , topdis , fade);
3702			r[transform_css] += ' rotate('+deg+'deg)';
3703			if(orig) r[transform_orig_css] = orig;
3704			return r;
3705		} : function (deg , leftdis , topdis , orig , fade){
3706			return st.from(leftdis , topdis , fade);
3707		};
3708
3709		st.skewleft = (_2d)? function(deg , dist , fade){
3710			var r = st.left(dist , fade);
3711			r[transform_css] += ' skewX(' + deg + 'deg)';
3712			return r;
3713		} : function (deg , dist , fade){
3714			return st.left(dist , fade);
3715		};
3716
3717		st.skewright = (_2d)? function(deg , dist , fade){
3718			var r = st.right(dist , fade);
3719			r[transform_css] += ' skewX(' + -deg + 'deg)';
3720			return r;
3721		} : function (deg , dist , fade){
3722			return st.right(dist , fade);
3723		};
3724
3725		st.skewtop = (_2d)? function(deg , dist , fade){
3726			var r = st.top(dist , fade);
3727			r[transform_css] += ' skewY(' + deg + 'deg)';
3728			return r;
3729		} : function (deg , dist , fade){
3730			return st.top(dist , fade);
3731		};
3732
3733		st.skewbottom = (_2d)? function(deg , dist , fade){
3734			var r = st.bottom(dist , fade);
3735			r[transform_css] += ' skewY(' + -deg + 'deg)';
3736			return r;
3737		} : function (deg , dist , fade){
3738			return st.bottom(dist , fade);
3739		};
3740
3741
3742		st.scale = (_2d)? function(x , y , orig , fade){
3743			var r = fade === false ? {} : {opacity:0}
3743;
3744			r[transform_css] = ' scaleX('+x+') scaleY('+y+')';
3745			if(orig) r[transform_orig_css] = orig;
3746			return r;
3747		} : function (x , y , orig , fade){
3748			return fade === false ? {} : {opacity:0};
3749		};
3750
3751		st.scaleleft = (_2d)? function(x , y  , dist , orig , fade){
3752			var r = st.left(dist , fade);
3753			r[transform_css] = ' scaleX('+x+') scaleY('+y+')';
3754			if(orig) r[transform_orig_css] = orig;
3755			return r;
3756		} : function (x , y  , dist , orig , fade){
3757			return st.left(dist , fade);
3758		};
3759
3760		st.scaleright = (_2d)? function(x , y  , dist , orig , fade){
3761			var r = st.right(dist , fade);
3762			r[transform_css] = ' scaleX('+x+') scaleY('+y+')';
3763			if(orig) r[transform_orig_css] = orig;
3764			return r;
3765		} : function (x , y  , dist , orig , fade){
3766			return st.right(dist , fade);
3767		};
3768
3769		st.scaletop = (_2d)? function(x , y  , dist , orig , fade){
3770			var r = st.top(dist , fade);
3771			r[transform_css] = ' scaleX('+x+') scaleY('+y+')';
3772			if(orig) r[transform_orig_css] = orig;
3773			return r;
3774		} : function (x , y  , dist , orig , fade){
3775			return st.top(dist , fade);
3776		};
3777
3778		st.scalebottom = (_2d)? function(x , y  , dist , orig , fade){
3779			var r = st.bottom(dist , fade);
3780			r[transform_css] = ' scaleX('+x+') scaleY('+y+')';
3781			if(orig) r[transform_orig_css] = orig;
3782			return r;
3783		} : function (x , y  , dist , orig , fade){
3784			return st.bottom(dist , fade);
3785		};
3786
3787		st.scalefrom = (_2d)? function(x , y  , leftdis , topdis , orig , fade){
3788			var r = st.from(leftdis , topdis , fade);
3789			r[transform_css] += ' scaleX('+x+') scaleY('+y+')';
3790			if(orig) r[transform_orig_css] = orig;
3791			return r;
3792		} : function (x , y  , leftdis , topdis , orig , fade){
3793			return st.from(leftdis , topdis , fade);
3794		};
3795
3796		st.rotatescale = (_2d)? function(deg , x , y  ,  orig , fade){
3797			var r = st.scale(x , y , orig , fade);
3798			r[transform_css] += ' rotate('+deg+'deg)';
3799			if(orig) r[transform_orig_css] = orig;
3800			return r;
3801		} : function (deg , x , y  ,  orig , fade){
3802			return st.scale(x , y , orig , fade);
3803		};
3804
3805
3806		/*
3807		 ----------------------------------------
3808		 				3D Effects
3809		 ----------------------------------------
3810		 */
3811
3812		st.front = (window._css3d)? function(dist , fade){
3813			var r = fade === false ? {} : {opacity:0};
3814			r[transform_css] = 'perspective(2000px) translate3d(0 , 0 ,' + dist + 'px ) rotate(0.001deg)';
3815			return r;
3816		} : function (dist){
3817			return _fade;
3818		};
3819
3820		st.back = (window._css3d)? function(dist, fade){
3821			var r = fade === false ? {} : {opacity:0};
3822			r[transform_css] = 'perspective(2000px) translate3d(0 , 0 ,' + -dist + 'px ) rotate(0.001deg)';
3823			return r;
3824		} : function (dist){
3825			return _fade;
3826		};
3827
3828		st.rotatefront = (window._css3d)? function(deg , dist , orig , fade ){
3829			var r = fade === false ? {} : {opacity:0};
3830			r[transform_css] = 'perspective(2000px) translate3d(0 , 0 ,' + dist + 'px ) rotate('+ (deg || 0.001) +'deg)';
3831			if(orig) r[transform_orig_css] = orig;
3832			return r;
3833		} : function (deg , dist , orig , fade ){
3834			return _fade;
3835		};
3836
3837		st.rotateback = (window._css3d)? function(deg , dist , orig , fade ){
3838			var r = fade === false ? {} : {opacity:0};
3839			r[transform_css] = 'perspective(2000px) translate3d(0 , 0 ,' + -dist + 'px ) rotate('+ (deg || 0.001) +'deg)';
3840			if(orig) r[transform_orig_css] = orig;
3841			return r;
3842		} : function (deg , dist , orig , fade ){
3843			return _fade;
3844		};
3845
3846		st.rotate3dleft = (window._css3d)? function(x , y , z , dist , orig , fade){
3847			var r = st.left(dist , fade);
3848			r[transform_css] += (x?' rotateX('+x+'deg)' : ' ')+(y?' rotateY('+y+'deg)' : '')+(z?' rotateZ('+z+'deg)' : '');
3849			if(orig) r[transform_orig_css] = orig;
3850			return r;
3851
3852		} : function (x , y , z , dist , orig , fade){
3853			return st.left(dist , fade);;
3854		};
3855
3856		st.rotate3dright = (window._css3d)? function(x , y , z , dist , orig , fade){
3857			var r = st.right(dist , fade);
3858			r[transform_css] += (x?' rotateX('+x+'deg)' : ' ')+(y?' rotateY('+y+'deg)' : '')+(z?' rotateZ('+z+'deg)' : '');
3859			if(orig) r[transform_orig_css] = orig;
3860			return r;
3861		} : function (x , y , z , dist , orig , fade){
3862			return st.right(dist , fade);;
3863		};
3864
3865		st.rotate3dtop = (window._css3d)? function(x , y , z , dist , orig , fade){
3866			var r = st.top(dist , fade);
3867			r[transform_css] += (x?' rotateX('+x+'deg)' : ' ')+(y?' rotateY('+y+'deg)' : '')+(z?' rotateZ('+z+'deg)' : '');
3868			if(orig) r[transform_orig_css] = orig;
3869			return r;
3870		} : function (x , y , z , dist , orig , fade){
3871			return st.top(dist , fade);;
3872		};
3873
3874		st.rotate3dbottom = (window._css3d)? function(x , y , z , dist , orig , fade){
3875			var r = st.bottom(dist , fade);
3876			r[transform_css] += (x?' rotateX('+x+'deg)' : ' ')+(y?' rotateY('+y+'deg)' : '')+(z?' rotateZ('+z+'deg)' : '');
3877			if(orig) r[transform_orig_css] = orig;
3878			return r;
3879		} : function (x , y , z , dist , orig , fade){
3880			return st.bottom(dist , fade);
3881		};
3882
3883		st.rotate3dfront = (window._css3d)? function(x , y , z , dist , orig , fade){
3884			var r = st.front(dist , fade);
3885			r[transform_css] += (x?' rotateX('+x+'deg)' : ' ')+(y?' rotateY('+y+'deg)' : '')+(z?' rotateZ('+z+'deg)' : '');
3886			if(orig) r[transform_orig_css] = orig;
3887			return r;
3888		} : function (x , y , z , dist , orig , fade){
3889			return st.front(dist , fade);
3890		};
3891
3892		st.rotate3dback = (window._css3d)? function(x , y , z , dist , orig , fade){
3893			var r = st.back(dist , fade);
3894			r[transform_css] += (x?' rotateX('+x+'deg)' : ' ')+(y?' rotateY('+y+'deg)' : '')+(z?' rotateZ('+z+'deg)' : '');
3895			if(orig) r[transform_orig_css] = orig;
3896			return r;
3897		} : function (x , y , z , dist , orig , fade){
3898			return st.back(dist , fade);
3899		};
3900
3901		// transform effect
3902		st.t = (window._css3d)? function(fade,tx,ty,tz,r,rx,ry,rz,scx,scy,skx,sky,ox,oy,oz){
3903			var _r = fade === false ? {} : {opacity:0}
3903;
3904			var transform = 'perspective(2000px) ';
3905
3906			tx  !== 'n' && (transform += 'translateX(' + tx * st.rf + 'px) ');
3907			ty  !== 'n' && (transform += 'translateY(' + ty * st.rf + 'px) ');
3908			tz  !== 'n' && (transform += 'translateZ(' + tz * st.rf + 'px) ');
3909			r   !== 'n' && (transform += 'rotate(' + r + 'deg) ');
3910			rx  !== 'n' && (transform += 'rotateX(' + rx + 'deg) ');
3911			ry  !== 'n' && (transform += 'rotateY(' + ry + 'deg) ');
3912			rz  !== 'n' && (transform += 'rotateZ(' + rz + 'deg) ');
3913			skx !== 'n' && (transform += 'skewX(' + skx + 'deg) ');
3914			sky !== 'n' && (transform += 'skewY(' + sky + 'deg) ');
3915			scx !== 'n' && (transform += 'scaleX(' + scx + ') ');
3916			scy !== 'n' && (transform += 'scaleY(' + scy + ')');
3917
3918			_r[transform_css] = transform;
3919
3920			var trans_origin = '';
3921
3922			trans_origin += (ox !== 'n' ? ox + '% ' : '50% ');
3923			trans_origin += (oy !== 'n' ? oy + '% ' : '50% ');
3924			trans_origin += (oz !== 'n' ? oz + 'px' : '');
3925
3926			_r[transform_orig_css] = trans_origin;
3927
3928			return _r;
3929
3930		} : function(fade,tx,ty,tz,r,rx,ry,rz,scx,scy,skx,sky,ox,oy,oz) {
3931
3932			var r = fade === false ? {} : {opacity:0};
3933			tx  !== 'n' && (r.left = tx * st.rf + 'px');
3934			ty  !== 'n' && (r.top  = ty * st.rf + 'px');
3935			return r;
3936		}
3937	};
3938})(jQuery);
3939
3940/* ================== bin-debug/js/pro/layers/LayerElement.js =================== */
3941/**
3942 * Master Slider Layer Element
3943 * @author Averta
3944 * @package Master Slider jQuery
3945 */
3946
3947;(function($){
3948
3949	/**
3950	 * master slider layer element constructor
3951	 */
3952	window.MSLayerElement = function(){
3953
3954		// default layer start animation
3955		this.start_anim = {
3956			name		: 'fade',
3957			duration	: 1000,
3958			ease 		: 'linear',
3959			delay		: 0
3960		};
3961
3962		// default layer end animation
3963		this.end_anim = {
3964			duration	: 1000,
3965			ease 		: 'linear'
3966		};
3967
3968		// default layer type
3969		this.type = 'text'; // video , image
3970
3971		//this.swipe 		= true;
3972		this.resizable 	= true;
3973		this.minWidth 	= -1;
3974		this.isVisible  = true;
3975
3976		// list of styles which should stores initial values and changes based on screen size for resizable layers
3977		this.__cssConfig = [
3978			'margin-top' 	,      'padding-top'	,
3979			'margin-bottom'	,      'padding-left'	,
3980			'margin-right'	,      'padding-right'	,
3981			'margin-left'	,      'padding-bottom' ,
3982
3983
3984			'font-size' 	,  		'line-height'	,
3985			/*'height'		, */	'width'			,
3986			'left'			,       'right'			,
3987			'top'			,       'bottom'
3988		];
3989
3990		this.baseStyle = {};
3991	};
3992
3993	var p = MSLayerElement.prototype;
3994
3995	/*--------------------------------------------------*\
3996		Public Methods
3997	\*--------------------------------------------------*/
3998
3999	/**
4000	 * determine start animation for the layer
4001	 * @param {Objec} anim
4002	 */
4003	p.setStartAnim = function(anim){
4004		$.extend(this.start_anim , anim); $.extend(this.start_anim, this._parseEff(this.start_anim.name));
4005		this.$element.css('visibility' , 'hidden');
4006	};
4007
4008	/**
4009	 * determine end/hide animation for the layer
4010	 * @param {Object} anim
4011	 */
4012	p.setEndAnim = function(anim){
4013		$.extend(this.end_anim, anim);
4014	};
4015
4016	/**
4017	 * create layer object from layer element
4018	 */
4019	p.create = function(){
4020		this.$element.css('display', 'none');
4021
4022		// resizable layer
4023		this.resizable = this.$element.data('resize') !== false;
4024
4025		// fixed positioning
4026		this.fixed = this.$element.data('fixed') === true;
4027
4028		// hide under parameter
4029		if( this.$element.data('widthlimit') !== undefined ) {
4030			this.minWidth = this.$element.data('widthlimit');
4031		}
4032
4033		if( !this.end_anim.name ) {
4034			this.end_anim.name = this.start_anim.name;
4035		}
4036
4037		if( this.end_anim.time ) {
4038			this.autoHide = true;//this.end_anim.delay = this.slide.delay * 1000 - this.end_anim.duration;
4039		}
4040
4041		// is this layer static?
4042		this.staticLayer = this.$element.data('position') === 'static';
4043		this.fixedLayer = this.$element.data('position') === 'fixed';
4044		this.layersCont = this.controller.$layers;
4045
4046		// make it visible if it's static
4047		if ( this.staticLayer ) {
4048			this.$element.css('display', '')
4049						 .css('visibility', '');
4050		}
4051
4052		// create action event
4053		// @since v1.7.2
4054		if( this.$element.data('action') !== undefined ) {
4055			var slideController = this.slide.slider.slideController;
4056			this.$element.on('click', function(event){
4057				slideController.runAction($(this).data('action'));
4058				event.preventDefault();
4059			}).addClass('ms-action-layer');
4060		}
4061
4062		$.extend(this.end_anim  , this._parseEff(this.end_anim.name));
4063		this.slider = this.slide.slider;
4064
4065		// new alignment method
4066		// @since v1.6.1
4067		var layerOrigin = this.layerOrigin = this.$element.data('origin');
4068		if ( layerOrigin ){
4069
4070			var vOrigin  = layerOrigin.charAt(0),
4071				hOrigin  = layerOrigin.charAt(1),
4072				offsetX  = this.$element.data('offset-x'),
4073				offsetY  = this.$element.data('offset-y');
4074
4075			if( offsetY === undefined ){
4076				offsetY = 0;
4077			}
4078
4079			switch ( vOrigin ){
4080				case 't':
4081					this.$element[0].style.top = offsetY + 'px';
4082					break;
4083				case 'b':
4084					this.$element[0].style.bottom = offsetY + 'px';
4085					break;
4086				case 'm':
4087					this.$element[0].style.top = offsetY + 'px';
4088					this.middleAlign = true;
4089			}
4090
4091			if( offsetX === undefined ){
4092				offsetX = 0;
4093			}
4094
4095			switch ( hOrigin ){
4096				case 'l':
4097					this.$element[0].style.left = offsetX + 'px';
4098					break;
4099				case 'r':
4100					this.$element[0].style.right = offsetX + 'px';
4101					break;
4102				case 'c':
4103					this.$element[0].style.left = offsetX + 'px';
4104					this.centerAlign = true;
4105			}
4106		}
4107
4108		// parallax effect
4109		// @since v1.6.0
4110		this.parallax = this.$element.data('parallax')
4111		if( this.parallax != null ) {
4112			this.parallax /= 100;
4113			this.$parallaxElement = $('<div></div>').addClass('ms-parallax-layer');
4114			if( this.link ) { // only for image layer
4115				this.link.wrap(this.$parallaxElement);
4116				this.$parallaxElement = this.link.parent();
4117			} else {
4118				this.$element.wrap(this.$parallaxElement);
4119				this.$parallaxElement = this.$element.parent();
4120			}
4121
4122			this._lastParaX = 0;
4123			this._lastParaY = 0;
4124			this._paraX = 0;
4125			this._paraY = 0;
4126
4127
4128			// add bottom 0 to the parallax element if layer origin specified to the bottom
4129			this.alignedToBot = this.layerOrigin && this.layerOrigin.indexOf('b') !== -1;
4130			if( this.alignedToBot ) {
4131				this.$parallaxElement.css('bottom', 0);
4132			}
4133
4134			if( window._css3d ){
4135				this.parallaxRender = this._parallaxCSS3DRenderer;
4136			} else if ( window._css2d ){
4137				this.parallaxRender = this._parallaxCSS2DRenderer;
4138			} else {
4139				this.parallaxRender = this._parallax2DRenderer;
4140			}
4141
4142			if( this.slider.options.parallaxMode !== 'swipe' ){ // mouse mode
4143				averta.Ticker.add(this.parallaxRender, this);
4144			}
4145		}
4146
4147		// remove all data- attributes excluding data-src
4148		$.removeDataAttrs(this.$element, ['data-src']);
4149	};
4150
4151	/**
4152	 * initialize layer
4153	 */
4154	p.init = function(){
4155		//if(this.initialized) return;
4156		this.initialized = true;
4157
4158		var value;
4159
4160		this.$element.css('visibility' , '');
4161		// store initial layer styles
4162		for(var i = 0 , l = this.__cssConfig.length; i < l ; i ++){
4163			var key = this.__cssConfig[i];
4164			if( this.type === 'text' && key === 'width'){ // in some browsers using computed style for width in text layer causes unexpected word wrapping
4165				value = this.$element[0].style.width;
4166			} else {
4167				value = this.$element.css(key);
4168
4169				// fix for Google Chrome in ios, sometimes image layers over first slide not showing correctly.
4170				if ( (key === 'width' || key === 'height') && value === '0px' ) {
4171					value = this.$element.data(key) + 'px';
4172				}
4173			}
4174
4175			if( value != 'auto' && value != "" && value != "normal" ) {
4176				this.baseStyle[key] = parseInt(value);
4177			}
4178		}
4179
4180		// @since v1.6.0
4181		if ( this.middleAlign ){
4182			this.baseHeight = this.$element.outerHeight(false);//this.$element.height();
4183		}
4184
4185		if ( this.centerAlign ){
4186			// in some browsers using computed style for width in text layer causes unexpected word wrapping
4187			//if ( this.type === 'text' ){
4188			//	this.baseWidth = parseInt(this.$element[0].style.width);
4189			//} else {
4190				this.baseWidth = this.$element.outerWidth(false);
4191			//}
4192		}
4193
4194	};
4195
4196	/**
4197	 * locate layer over slider
4198	 */
4199	p.locate = function(){
4200		// is slide ready?
4201		if ( !this.slide.ready ) {
4202			return;
4203		}
4204
4205		var width 		= parseFloat(this.layersCont.css('width')),
4206			height 		= parseFloat(this.layersCont.css('height')),
4207			factor, isPosition;
4208
4209		if( !this.staticLayer && this.$element.css('display') === 'none' && this.isVisible) {
4210			this.$element.css('display', '')
4211						 .css('visibility', 'hidden');
4212		}
4213
4214		factor = this.resizeFactor 	= width / this.slide.slider.options.width;
4215		// updated @since v1.6.1
4216		for (var key in this.baseStyle) {
4217
4218			isPosition = key === 'top' || key === 'left' || key === 'bottom' || key === 'right';
4219
4220			//switch resize/position factor
4221			if( this.fixed && isPosition ){
4222				factor = 1;
4223			} else {
4224				factor = this.resizeFactor;
4225			}
4226
4227			if( !this.resizable && !isPosition ){
4228				continue;
4229			}
4230
4231			if ( key === 'top' && this.middleAlign ){
4232				this.$element[0].style.top = '0px';
4233				this.baseHeight = this.$element.outerHeight(false);
4234				this.$element[0].style.top = this.baseStyle['top'] * factor + (height - this.baseHeight) / 2  + 'px';
4235			} else if ( key === 'left' && this.centerAlign ){
4236				this.$element[0].style.left = '0px';
4237				this.baseWidth = this.$element.outerWidth(false);
4238				this.$element[0].style.left = this.baseStyle['left'] * factor + (width - this.baseWidth) / 2  + 'px';
4239			} else {
4240				this.$element.css(key , this.baseStyle[key] * factor + 'px');
4241			}
4242		}
4243
4244		this.visible(this.minWidth < width);
4245	};
4246
4247	/**
4248	 * start layer animation
4249	 */
4250	p.start = function(){
4251
4252		// is it already showing or is it a static layer?
4253		if ( this.isShowing || this.staticLayer ) {
4254			return;
4255		}
4256
4257		this.isShowing = true;
4258
4259		var key , base;
4260
4261		// reads css value form LayerEffects
4262		MSLayerEffects.rf = this.resizeFactor;
4263		var effect_css = MSLayerEffects[this.start_anim.eff_name].apply(null , this._parseEffParams(this.start_anim.eff_params));
4264
4265		// checkes effect css and defines TO css values
4266		var start_css_eff = {};
4267
4268		// set from position
4269		for(key in effect_css){
4270
4271			// check the position key (top, left, right or bottom) for animatin
4272			// It mostly will be used in old browsers
4273			// In effect left:100, layer base style right:300 -> effect changes to right:100
4274			if( this._checkPosKey(key , effect_css) ){
4275				continue;
4276			}
4277
4278			// set default value from Layer Effects Class
4279			if( MSLayerEffects.defaultValues[key] != null ){
4280				start_css_eff[key] = MSLayerEffects.defaultValues[key];
4281			}
4282
4283			if( key in this.baseStyle ){
4284				base = this.baseStyle[key];
4285
4286				// updated @since v1.6.1
4287				if ( this.middleAlign && key === 'top' ){
4288					base += (parseInt(this.layersCont.height()) - this.$element.outerHeight(false)) / 2;
4289				}
4290
4291				if ( this.centerAlign && key === 'left' ){
4292					base += (parseInt(this.layersCont.width()) - this.$element.outerWidth(false)) / 2;
4293				}
4294				//----------------------
4295
4296				effect_css[key] = base + parseFloat(effect_css[key]) + 'px';
4297				start_css_eff[key] = base + 'px';
4298			}
4299
4300			this.$element.css(key , effect_css[key]);
4301		}
4302
4303		var that = this;
4304
4305		clearTimeout(this.to);
4306		this.to = setTimeout(function(){
4307			//that.locate();
4308			that.$element.css('visibility', '');
4309			that._playAnimation(that.start_anim , start_css_eff);
4310		} , that.start_anim.delay || 0.01);
4311
4312
4313		this.clTo = setTimeout(function(){
4314			that.show_cl = true;
4315		},(this.start_anim.delay || 0.01) + this.start_anim.duration);
4316
4317		if( this.autoHide ){
4318			clearTimeout(this.hto);
4319			this.hto = setTimeout(function(){that.hide();} , that.end_anim.time );
4320		}
4321
4322	};
4323
4324	/**
4325	 * starts hide animation
4326	 */
4327	p.hide = function(){
4328
4329		// static layers doesn't support animations
4330		if ( this.staticLayer ) {
4331			return;
4332		}
4333
4334		this.isShowing = false;
4335
4336		// reads css value form LayerEffects
4337		var effect_css = MSLayerEffects[this.end_anim.eff_name].apply(null , this._parseEffParams(this.end_anim.eff_params));
4338
4339		for(key in effect_css){
4340
4341			if(this._checkPosKey(key , effect_css)) continue;
4342
4343			if( key === window._jcsspfx + 'TransformOrigin' ){
4344				this.$element.css(key , effect_css[key]);
4345			}
4346
4347			if(key in this.baseStyle){
4348				effect_css[key] = this.baseStyle[key] + parseFloat(effect_css[key]) +  'px';
4349			}
4350
4351		}
4352
4353		this._playAnimation(this.end_anim , effect_css);
4354
4355		clearTimeout(this.to);
4356		clearTimeout(this.hto);
4357		clearTimeout(this.clTo);
4358	};
4359
4360	/**
4361	 * reset layer
4362	 */
4363	p.reset = function(){
4364		if ( this.staticLayer ) {
4365			return;
4366		}
4367
4368		this.isShowing = false;
4369		//this.$element.css(window._csspfx + 'animation-name', ''	);
4370		this.$element[0].style.display = 'none';
4371		this.$element.css('opacity', '');
4372		this.$element[0].style['transitionDuration'] = '';
4373
4374		if(this.show_tween)
4375			this.show_tween.stop(true);
4376
4377		clearTimeout(this.to);
4378		clearTimeout(this.hto);
4379	};
4380
4381	/**
4382	 * destroy layer
4383	 */
4384	p.destroy = function(){
4385		this.reset();
4386		this.$element.remove();
4387	};
4388
4389	/**
4390	 * change the visibility status
4391	 * @param  {Boolean} value
4392	 */
4393	p.visible = function(value){
4394		if(this.isVisible == value) return;
4395
4396		this.isVisible = value;
4397
4398		this.$element.css('display' , (value ? '' : 'none'));
4399	};
4400
4401	/**
4402	 * Change the detestation of parallax position
4403	 * @param  {Number} x
4404	 * @param  {Number} y
4405	 * @since  1.6.0
4406	 */
4407	p.moveParallax = function(x, y , fast){
4408		this._paraX = x;
4409		this._paraY = y;
4410		if( fast ){
4411			this._lastParaX = x;
4412			this._lastParaY = y;
4413			this.parallaxRender();
4414		}
4415	};
4416
4417	/*------------------------------------*\
4418		Private Methods
4419	\*------------------------------------*/
4420
4421	/**
4422	 * play layer animation
4423	 * @param  {Obeject} animation layer animation object
4424	 * @param  {Object} css       animation css object
4425	 */
4426	p._playAnimation = function(animation , css){
4427		var options = {};
4428
4429		if(animation.ease){
4430			options.ease = animation.ease;
4431		}
4432
4433		options.transProperty = window._csspfx + 'transform,opacity';
4434
4435		this.show_tween = CTween.animate(this.$element, animation.duration , css , options);
4436	};
4437
4438	/**
4439	 * generate random value
4440	 * @param  {String} value the pattern value min|max
4441	 * @return {Number}
4442	 */
4443	p._randomParam = function(value){
4444		var min = Number(value.slice(0,value.indexOf('|')));
4445		var max = Number(value.slice(value.indexOf('|')+1));
4446
4447		return min + Math.random() * (max - min);
4448	};
4449
4450	/**
4451	 * parse effect function
4452	 * @param  {String} eff_name effect function
4453	 * @return {Object}
4454	 */
4455	p._parseEff = function(eff_name){
4456
4457		var eff_params = [];
4458
4459		if ( eff_name.indexOf('(') !== -1 ) {
4460			var temp   = eff_name.slice(0 , eff_name.indexOf('(')).toLowerCase();
4461			var	value;
4462
4463			eff_params = eff_name.slice(eff_name.indexOf('(') + 1 , -1).replace(/\"|\'|\s/g , '').split(',');
4464			eff_name   = temp;
4465
4466			for ( var i = 0, l = eff_params.length; i < l; ++i) {
4467				value = eff_params[i];
4468
4469				if ( value in MSLayerEffects.presetEffParams) {
4470					value = MSLayerEffects.presetEffParams[value];
4471				}
4472
4473				eff_params[i] = value;
4474			}
4475		}
4476
4477		return {eff_name:eff_name , eff_params:eff_params};
4478	};
4479
4480	/**
4481	 * parse effect function parameters
4482	 * @param  {Aarray} params effect parameters
4483	 * @return {Array}
4484	 */
4485	p._parseEffParams = function(params){
4486		var eff_params = [];
4487		for(var i = 0 , l = params.length; i < l ; ++i){
4488			var value = params[i];
4489			if(typeof value === 'string' && value.indexOf('|') !== -1) value = this._randomParam(value);
4490
4491			eff_params[i] = value;
4492		}
4493
4494		return eff_params;
4495	};
4496
4497	/**
4498	 * calculates layer position based on initial positioning style and layer effect
4499	 * @param  {string} key   positioning key
4500	 * @param  {Object} style style object
4501	 * @return {Boolean}
4502	 */
4503	p._checkPosKey = function(key , style){
4504		if(key === 'left' && !(key in this.baseStyle) && 'right' in this.baseStyle){
4505			 style.right = -parseInt(style.left) + 'px';
4506			 delete style.left;
4507			 return true;
4508		}
4509
4510		if(key === 'top'  && !(key in this.baseStyle) && 'bottom' in this.baseStyle){
4511			style.bottom = -parseInt(style.top) + 'px';
4512			delete style.top;
4513			return true;
4514		}
4515
4516		return false;
4517	};
4518
4519	/**
4520	 * calculate parallax position
4521	 */
4522	p._parallaxCalc = function(){
4523		var x_def = this._paraX - this._lastParaX,
4524			y_def = this._paraY - this._lastParaY;
4525
4526		this._lastParaX += x_def / 12;
4527		this._lastParaY += y_def / 12;
4528
4529		if( Math.abs( x_def ) < 0.019 ) {
4530			this._lastParaX = this._paraX;
4531		}
4532
4533		if( Math.abs( y_def ) < 0.019 ) {
4534			this._lastParaY = this._paraY;
4535		}
4536
4537	}
4538
4539	/**
4540	 * Parallax move ticker function
4541	 */
4542	p._parallaxCSS3DRenderer = function(){
4543		this._parallaxCalc();
4544		this.$parallaxElement[0].style[window._jcsspfx + 'Transform'] = 'translateX(' + this._lastParaX * this.parallax + 'px) translateY(' + this._lastParaY * this.parallax + 'px) translateZ(0)';
4545	};
4546
4547	/**
4548	 * parallax move ticker for CSS2 browsers
4549	 * @return {[type]} [description]
4550	 */
4551	p._parallaxCSS2DRenderer = function(){
4552		this._parallaxCalc();
4553		this.$parallaxElement[0].style[window._jcsspfx + 'Transform'] = 'translateX(' + this._lastParaX * this.parallax + 'px) translateY(' + this._lastParaY * this.parallax + 'px)';
4554	};
4555
4556	/**
4557	 * parallax move ticker for zombie browsers
4558	 */
4559	p._parallax2DRenderer = function(){
4560		this._parallaxCalc();
4561
4562		// change bottom instead of top if layer aligned to the bottom (origin)
4563		if( this.alignedToBot ) {
4564			this.$parallaxElement[0].style.bottom  = this._lastParaY * this.parallax + 'px';
4565		} else {
4566			this.$parallaxElement[0].style.top  = this._lastParaY * this.parallax + 'px';
4567		}
4568
4569		this.$parallaxElement[0].style.left = this._lastParaX * this.parallax + 'px';
4570	};
4571
4572})(jQuery);
4573
4574/* ================== bin-debug/js/pro/layers/ImageLayerElement.js =================== */
4575;(function($){
4576
4577	window.MSImageLayerElement = function(){
4578		MSLayerElement.call(this);
4579		this.needPreload = true;
4580
4581		this.__cssConfig = [
4582			'width'			,		'height'		,
4583			'margin-top' 	,      'padding-top'	,
4584			'margin-bottom'	,      'padding-left'	,
4585			'margin-right'	,      'padding-right'	,
4586			'margin-left'	,      'padding-bottom' ,
4587
4588			'left'			,       'right'			,
4589			'top'			,       'bottom'
4590		];
4591
4592		this.type = 'image';
4593	};
4594
4595	MSImageLayerElement.extend(MSLayerElement);
4596
4597	var p = MSImageLayerElement.prototype;
4598	var _super = MSLayerElement.prototype;
4599
4600	/*-------------- METHODS --------------*/
4601
4602	p.create = function(){
4603
4604		if(this.link){
4605			var p = this.$element.parent();
4606			p.append(this.link);
4607			this.link.append(this.$element);
4608			this.link.removeClass('ms-layer');
4609			this.$element.addClass('ms-layer');
4610			p = null;
4611		}
4612
4613		_super.create.call(this);
4614
4615		if(this.$element.data('src') != undefined){
4616			this.img_src = this.$element.data('src');
4617			this.$element.removeAttr('data-src');
4618		}else{
4619			var that = this;
4620			this.$element.on('load', function(event){
4621				that.controller.preloadCount--;
4622				if(that.controller.preloadCount === 0)
4623					that.controller._onlayersReady();
4624			}).each($.jqLoadFix);
4625		}
4626
4627		if($.browser.msie)
4628			this.$element.on('dragstart', function(event) { event.preventDefault(); }); // disable native dragging
4629	};
4630
4631	p.loadImage = function(){
4632		var that = this;
4633
4634		this.$element.preloadImg(this.img_src , function(event){
4635			//this.$element.width(event.width).height(event.height);
4636			that.controller.preloadCount--;
4637			if(that.controller.preloadCount === 0) that.controller._onlayersReady();
4638		});
4639	};
4640
4641})(jQuery);
4642
4643/* ================== bin-debug/js/pro/layers/VideoLayerElement.js =================== */
4644;(function($){
4645
4646	window.MSVideoLayerElement = function(){
4647		MSLayerElement.call(this);
4648
4649		this.__cssConfig.push(
4650				'height'
4651		);
4652
4653		this.type = 'video';
4654	};
4655
4656	MSVideoLayerElement.extend(MSLayerElement);
4657
4658	var p  = MSVideoLayerElement.prototype;
4659	var _super  = MSLayerElement.prototype;
4660
4661	/*-------------- METHODS --------------*/
4662	p.__playVideo = function(){
4663		if(this.img)CTween.fadeOut(this.img , 500 , 2);
4664		CTween.fadeOut(this.video_btn , 500 , 2);
4665		this.video_frame.attr('src' , 'about:blank').css('display' , 'block');
4666		if(this.video_url.indexOf('?') == -1) this.video_url += '?';
4667		this.video_frame.attr('src' , this.video_url + '&autoplay=1');
4668	};
4669
4670	p.start = function(){
4671		_super.start.call(this);
4672
4673		if ( this.$element.data('autoplay') ) {
4674			this.__playVideo();
4675		}
4676	};
4677
4678	p.reset = function(){
4679		_super.reset.call(this);
4680
4681		if(this.needPreload || this.$element.data('btn')){
4682			this.video_btn.css('opacity' , 1).css('display', 'block');
4683			this.video_frame.attr('src' , 'about:blank').css('display' , 'none');
4684		}
4685
4686		if(this.needPreload){
4687			this.img.css('opacity' , 1).css('display', 'block');
4688			return;
4689		}
4690
4691		this.video_frame.attr('src' , this.video_url);
4692	};
4693
4694	p.create = function(){
4695		_super.create.call(this);
4696
4697		this.video_frame = this.$element.find('iframe').css({width:'100%' , height:'100%'});
4698		this.video_url   = this.video_frame.attr('src');
4699
4700		var has_img = this.$element.has('img').length != 0;
4701
4702		if(!has_img && !this.$element.data('btn')) return;
4703
4704		this.video_frame.attr('src' , 'about:blank').css('display' , 'none');
4705
4706		var that = this;
4707
4708		this.video_btn = $('<div></div>').appendTo(this.$element).addClass('ms-video-btn').click(function() {
4709			that.__playVideo();
4710		});
4711
4712		//this.video_frame.attr('src' , 'about:blank');
4713
4714		if(!has_img) return;
4715
4716		this.needPreload = true;
4717		this.img = this.$element.find('img:first').addClass('ms-video-img');
4718
4719		if(this.img.data('src') !== undefined){
4720			this.img_src = this.img.data('src');
4721			this.img.removeAttr('data-src');
4722		}else{
4723			var that = this;
4724			this.img.attr('src' , this.img_src).on('load', function(event) {
4725				that.controller.preloadCount--;
4726				if(that.controller.preloadCount === 0)
4727					that.controller._onlayersReady();
4728			}).each($.jqLoadFix);
4729		}
4730
4731		if($.browser.msie)
4732			this.img.on('dragstart', function(event) { event.preventDefault(); }); // disables native dragging
4733	};
4734
4735	p.loadImage = function(){
4736		var that = this;
4737		this.img.preloadImg(this.img_src, function(event) {
4738			that.controller.preloadCount--;
4739			if(that.controller.preloadCount === 0) that.controller._onlayersReady();
4740		});
4741	};
4742
4743})(jQuery);
4744
4745/* ================== bin-debug/js/pro/layers/HotspotLayer.js =================== */
4746;(function($){
4747
4748	"use strict";
4749
4750	window.MSHotspotLayer = function(){
4751		MSLayerElement.call(this);
4752
4753		this.__cssConfig = [
4754			'margin-top' 	,      'padding-top'	,
4755			'margin-bottom'	,      'padding-left'	,
4756			'margin-right'	,      'padding-right'	,
4757			'margin-left'	,      'padding-bottom' ,
4758
4759			'left'			,       'right'			,
4760			'top'			,       'bottom'
4761		];
4762
4763
4764		this.ease = 'Expo';
4765		this.hide_start = true;
4766		this.type = 'hotspot';
4767	};
4768
4769	MSHotspotLayer.extend(MSLayerElement);
4770
4771	var p = MSHotspotLayer.prototype;
4772	var _super = MSLayerElement.prototype;
4773
4774	/*-------------- METHODS --------------*/
4775
4776	p._showTT = function(){
4777		if(!this.show_cl)  return;
4778
4779		clearTimeout(this.hto);
4780		if(this._tween)	this._tween.stop(true);
4781
4782		if( this.hide_start ){
4783			this.align = this._orgAlign;
4784			this._locateTT();
4785
4786			this.tt.css({display:'block'});
4787			this._tween = CTween.animate(this.tt , 900 , this.to , {ease:'easeOut'+this.ease});
4788			this.hide_start = false;
4789		}
4790
4791	};
4792
4793	p._hideTT = function(){
4794		if(!this.show_cl)  return;
4795		if(this._tween)	this._tween.stop(true);
4796
4797		var that = this;
4798
4799		clearTimeout(this.hto);
4800		this.hto = setTimeout(function(){
4801			that.hide_start = true;
4802			that._tween = CTween.animate(that.tt , 900 , that.from , {ease:'easeOut'+that.ease , complete:function(){that.tt.css('display' , 'none');}} );
4803		} , 200);
4804	};
4805
4806	p._updateClassName = function(name){
4807		if(this._lastClass)	this.tt.removeClass(this._lastClass);
4808		this.tt.addClass(name);
4809		this._lastClass = name;
4810	}
4811
4812	p._alignPolicy = function(){
4813		var h = this.tt.outerHeight(false),
4814		    w = Math.max(this.tt.outerWidth(false) , parseInt(this.tt.css('max-width'))),
4815		 	ww = window.innerWidth,
4816		 	wh = window.innerHeight;
4817
4818		switch(this.align){
4819			case 'top':
4820				if(this.base_t < 0 )
4821					return 'bottom';
4822			break;
4823			case 'right':
4824				if(this.base_l + w > ww || this.base_t < 0)
4825					return 'bottom';
4826			break;
4827			case 'left':
4828				if(this.base_l < 0 || this.base_t < 0)
4829					return 'bottom';
4830			break;
4831		}
4832
4833		return null;
4834	};
4835
4836	p._locateTT = function(){
4837		var os = this.$element.offset(),
4838		os2 = this.slide.slider.$element.offset();
4839
4840		var dist = 50,
4841			space = 15 //* this.factor;
4842
4843		this.pos_x = os.left - os2.left - this.slide.slider.$element.scrollLeft();
4844		this.pos_y = os.top - os2.top - this.slide.slider.$element.scrollTop();
4845
4846		this.from = {opacity:0};
4847		this.to = {opacity:1};
4848
4849		this._updateClassName('ms-tooltip-'+this.align);
4850		this.tt_arrow.css('margin-left' , '');
4851
4852		var arrow_w = 15,//parseInt(this.tt_arrow.css('border-left')) + parseInt(this.tt_arrow.css('border-right')),
4853			arrow_h = 15;//parseInt(this.tt_arrow.css('border-top'))  + parseInt(this.tt_arrow.css('border-bottom'));
4854
4855			//console.log(arrow_h,arrow_w);
4856		//
4857		switch(this.align){
4858			case 'top':
4859				var w = Math.min(this.tt.outerWidth(false) , parseInt(this.tt.css('max-width')));
4860				this.base_t = this.pos_y - this.tt.outerHeight(false) - arrow_h - space;
4861				this.base_l = this.pos_x - w/2;
4862
4863				if(this.base_l + w > window.innerWidth){
4864					this.tt_arrow.css('margin-left' , -arrow_w/2 + this.base_l + w -window.innerWidth + 'px');
4865					this.base_l = window.innerWidth - w;
4866				}
4867
4868				if(this.base_l < 0){
4869					this.base_l = 0;
4870					this.tt_arrow.css('margin-left' , -arrow_w/2 + this.pos_x - this.tt.outerWidth(false) / 2 + 'px');
4871				}
4872
4873				if(window._css3d){
4874					this.from[window._jcsspfx+'Transform'] = 'translateY(-'+dist+'px)';
4875					this.to[window._jcsspfx+'Transform']   = '';
4876				}else{
4877					this.from.top = (this.base_t - dist) + 'px';
4878					this.to.top = this.base_t + 'px';
4879				}
4880
4881			break;
4882			case 'bottom':
4883				var w = Math.min(this.tt.outerWidth(false) , parseInt(this.tt.css('max-width')));
4884
4885				this.base_t = this.pos_y + arrow_h + space;
4886				this.base_l = this.pos_x - w/2;
4887
4888				if(this.base_l + w > window.innerWidth){
4889					this.tt_arrow.css('margin-left' , -arrow_w/2 + this.base_l + w -window.innerWidth + 'px');
4890					this.base_l = window.innerWidth - w;
4891				}
4892
4893				if(this.base_l < 0){
4894					this.base_l = 0;
4895					this.tt_arrow.css('margin-left' , -arrow_w/2 + this.pos_x - this.tt.outerWidth(false) / 2 + 'px');
4896				}
4897
4898				if(window._css3d){
4899					this.from[window._jcsspfx+'Transform'] = 'translateY('+dist+'px)';
4900					this.to[window._jcsspfx+'Transform'] = '';
4901				}else{
4902					this.from.top = (this.base_t + dist) + 'px';
4903					this.to.top = this.base_t + 'px';
4904				}
4905
4906			break;
4907
4908			case 'right':
4909				this.base_l = this.pos_x + arrow_w + space;
4910				this.base_t = this.pos_y - this.tt.outerHeight(false) / 2;
4911
4912				if(window._css3d){
4913					this.from[window._jcsspfx+'Transform'] = 'translateX('+dist+'px)';
4914					this.to[window._jcsspfx+'Transform'] = '';
4915				}else{
4916					this.from.left = (this.base_l + dist) + 'px';
4917					this.to.left = this.base_l + 'px';
4918				}
4919
4920			break;
4921			case 'left':
4922				this.base_l = this.pos_x - arrow_w - this.tt.outerWidth(false) - space;
4923				this.base_t = this.pos_y - this.tt.outerHeight(false) / 2;
4924
4925				if(window._css3d){
4926					this.from[window._jcsspfx+'Transform'] = 'translateX(-'+dist+'px)';
4927					this.to[window._jcsspfx+'Transform'] = '';
4928				}else{
4929					this.from.left = (this.base_l - dist) + 'px';
4930					this.to.left = this.base_l + 'px';
4931				}
4932
4933			break;
4934		}
4935
4936
4937
4938		var policyAlign = this._alignPolicy();
4939		if(policyAlign !== null){
4940			this.align = policyAlign;
4941			this._locateTT();
4942			return;
4943		}
4944
4945		this.tt.css('top'  ,parseInt(this.base_t)+'px').
4946				css('left' ,parseInt(this.base_l)+'px');
4947
4948		this.tt.css(this.from);
4949
4950	};
4951
4952	p.start = function(){
4953		_super.start.call(this);
4954		this.tt.appendTo(this.slide.slider.$element);
4955		//this._locateTT();
4956		this.tt.css('display' , 'none');
4957	};
4958
4959	p.reset = function(){
4960		_super.reset.call(this);
4961		this.tt.detach();
4962	};
4963
4964	/**
4965	 * locate hotspot over slide
4966	 * @override LayerElement.locate
4967	 * @since 2.2.0
4968	 */
4969/*	p.locate = function(){
4970		_super.locate.call(this);
4971
4972		if ( this.relativeToBG ) {
4973			console.log(this.baseOffsetX , this.slide.$bg_img.width()  , this.slide.bgWidth)
4974			this.$element[0].style.left = this.baseOffsetX * this.slide.$bg_img.width()  / this.slide.bgWidth + 'px';
4975			this.$element[0].style.top  = this.baseOffsetY * this.slide.$bg_img.height() / this.slide.bgHeight + 'px';
4976		}
4977
4978	};
4979*/
4980	p.create = function(){
4981		var that = this;
4982
4983		//@since 2.2.0
4984		//chnage offset progin to top left
4985	/*	this.relativeToBG = this.$element.data('relative') && (this.slide.fillMode === 'fill' || this.slide.fillMode === 'fit');
4986		if ( this.relativeToBG ) {
4987
4988			var origin = this.$element.data('origin'),
4989				osy = this.$element.data('offset-y'),
4990				osx = this.$element.data('offset-x');
4991
4992			if ( origin ) {
4993				if ( origin.charAt(0) === 'b' ){
4994					osy = this.slide.slider.options.height - this.$element.data('offset-y');
4995					this.$element.data('offset-y',  osy);
4996				}
4997
4998				if ( origin.charAt(1) === 'r' ){
4999					osx = this.slide.slider.options.width - this.$element.data('offset-x');
5000					this.$element.data('offset-x', osx);
5001				}
5002
5003			}
5004
5005			this.$element.data('origin', 'tl');
5006
5007			this.baseOffsetX = osx;
5008			this.baseOffsetY = osy;
5009		}*/
5010
5011
5012		this._orgAlign = this.align = this.$element.data('align') !== undefined ? this.$element.data('align') : 'top';
5013
5014		this.data = this.$element.html();
5015
5016		this.$element.html('').on('mouseenter' , function(){that._showTT();}).on('mouseleave',function(){that._hideTT();});
5017
5018		this.point = $('<div><div class="ms-point-center"></div><div class="ms-point-border"></div></div>')
5019					.addClass('ms-tooltip-point')
5020					.appendTo(this.$element);
5021
5022		var link = this.$element.data('link'),
5023			target = this.$element.data('target');
5024
5025		if( link ){
5026			this.point.on('click', function(){window.open(link , target || '_self');});
5027		}
5028
5029		this.tt =  $('<div></div>')
5030					.addClass('ms-tooltip')
5031					//.addClass('ms-tooltip-'+this.align)
5032					.css('display','hidden')
5033					.css('opacity' , 0);
5034
5035		// @since v1.6.1
5036		if( this.$element.data('width') !== undefined ){
5037			this.tt.css('width', this.$element.data('width'))
5038				   .css('max-width', this.$element.data('width'));
5039		}
5040
5041		this.tt_arrow = $('<div></div>')
5042						.addClass('ms-tooltip-arrow')
5043						.appendTo(this.tt);
5044
5045		this._updateClassName('ms-tooltip-'+this.align);
5046
5047		this.ttcont = $('<div></div>')
5048					  .addClass('ms-tooltip-cont')
5049					  .html(this.data)
5050					  .appendTo(this.tt)
5051
5052
5053		if( this.$element.data('stay-hover') === true ) {
5054			this.tt.on('mouseenter' , function(){
5055				if( that.hide_start ){
5056					return
5057				}
5058				clearTimeout(that.hto);
5059				that._tween.stop(true);
5060				that._showTT();
5061			}).on('mouseleave', function(){
5062				that._hideTT();
5063			});
5064		}
5065
5066		_super.create.call(this);
5067	};
5068
5069})(jQuery);
5070
5071/* ================== bin-debug/js/pro/layers/ButtonLayer.js =================== */
5072/**
5073 * Master Slider Button Layer
5074 * @author Averta
5075 * @since 1.7.2
5076 * @extends {MSLayerElement}
5077 */
5078(function($){
5079
5080	window.MSButtonLayer = function(){
5081		MSLayerElement.call(this);
5082
5083		this.type = 'button';
5084	};
5085
5086	MSButtonLayer.extend(MSLayerElement);
5087
5088	var p = MSButtonLayer.prototype;
5089	var _super = MSLayerElement.prototype;
5090
5091	var positionKies = ['top', 'left', 'bottom', 'right'];
5092
5093	/*-------------- METHODS --------------*/
5094
5095	p.create = function(){
5096		_super.create.call(this);
5097		this.$element.wrap('<div class="ms-btn-container"></div>').css('position', 'relative');
5098		this.$container = this.$element.parent();
5099	};
5100
5101	p.locate = function(){
5102		_super.locate.call(this);
5103		var key, tempValue;
5104
5105		for (var i=0; i<4; i++){
5106			key = positionKies[i];
5107			if ( key in this.baseStyle ) {
5108				tempValue = this.$element.css(key);
5109				this.$element.css(key, '');
5110				this.$container.css(key, tempValue);
5111			}
5112		}
5113
5114		this.$container.width(this.$element.outerWidth(true))
5115					   .height(this.$element.outerHeight(true));
5116	};
5117
5118})(jQuery);
5119
5120/* ================== bin-debug/js/pro/controls/SliderEvent.js =================== */
5121window.MSSliderEvent = function (type){
5122	this.type = type;
5123};
5124
5125MSSliderEvent.CHANGE_START      	= 'ms_changestart';
5126MSSliderEvent.CHANGE_END       		= 'ms_changeend';
5127MSSliderEvent.WAITING		      	= 'ms_waiting';
5128MSSliderEvent.AUTOPLAY_CHANGE   	= 'ms_autoplaychange';
5129MSSliderEvent.VIDEO_PLAY		   	= 'ms_videoPlay';
5130MSSliderEvent.VIDEO_CLOSE		   	= 'ms_videoclose';
5131MSSliderEvent.INIT					= 'ms_init';
5132MSSliderEvent.HARD_UPDATE			= 'ms_hard_update';
5133MSSliderEvent.RESIZE				= 'ms_resize';
5134MSSliderEvent.RESERVED_SPACE_CHANGE = 'ms_rsc'; // internal use
5135MSSliderEvent.DESTROY				= 'ms_destroy';
5136
5137/* ================== bin-debug/js/pro/controls/Slide.js =================== */
5138/**
5139 * Master Slider Slide Class
5140 * @author averta
5141 * @package Master Slider jQuery
5142 */
5143;(function(window, document, $){
5144
5145	"use strict";
5146
5147	window.MSSlide = function(){
5148
5149		this.$element = null;
5150		this.$loading = $('<div></div>').addClass('ms-slide-loading');
5151
5152		this.view 		= null;
5153		this.index 		= -1;
5154
5155		this.__width 	= 0;
5156		this.__height 	= 0;
5157
5158		this.fillMode = 'fill'; // fill , fit , stretch , tile , center
5159
5160		this.selected = false;
5161		this.pselected = false;
5162		this.autoAppend = true;
5163		this.isSleeping = true;
5164
5165		this.moz = $.browser.mozilla;
5166	};
5167
5168	var p = MSSlide.prototype;
5169
5170	/**
5171	 * on swipe start handler
5172	 */
5173	p.onSwipeStart = function(){
5174		//this.$layers.css(window._csspfx + 'transition-duration' , '0ms');
5175		if ( this.link ) {
5176			this.linkdis = true;
5177		}
5178
5179		if ( this.video ) {
5180			this.videodis = true;
5181		}
5182	};
5183
5184	/**
5185	 * on swipe move handler
5186	 */
5187	p.onSwipeMove = function (e) {
5188		var move = Math.max(Math.abs(e.data.distanceX), Math.abs(e.data.distanceY));
5189		this.swipeMoved = move > 4;
5190	};
5191
5192	/**
5193	 * on swipe cancel handler
5194	 */
5195	p.onSwipeCancel = function(e){
5196		if ( this.swipeMoved ) {
5197			this.swipeMoved = false;
5198			return;
5199		}
5200
5201		if ( this.link ) {
5202			this.linkdis = false;
5203		}
5204
5205		if ( this.video ) {
5206			this.videodis = false;
5207		}
5208		//this.$layers.css(window._csspfx + 'transition-duration' , this.view.__slideDuration + 'ms');
5209	};
5210
5211	/**
5212	 * setup layer controller for the slide
5213	 * @since 2.11.0
5214	 */
5215	p.setupLayerController = function () {
5216		this.hasLayers = true;
5217		this.layerController = new MSLayerController(this);
5218	};
5219	/**
5220	 * this method called after loading all assets related to this slide
5221	 */
5222	p.assetsLoaded = function(){
5223		this.ready = true;
5224		this.slider.api._startTimer();
5225
5226		if( this.selected || (this.pselected && this.slider.options.instantStartLayers) ){
5227
5228			if ( this.hasLayers ) {
5229				this.layerController.showLayers();
5230			}
5231
5232			if(this.vinit){
5233				this.bgvideo.play();
5234				if( !this.autoPauseBgVid ) {
5235					this.bgvideo.currentTime = 0;
5236				}
5237			}
5238
5239		}
5240		if ( !this.isSleeping ) {
5241			this.setupBG();
5242		}
5243
5244		CTween.fadeOut(this.$loading , 300 , true);
5245
5246		//sequence loading
5247		if ( (this.slider.options.preload === 0 || this.slider.options.preload === 'all') && this.index < this.view.slideList.length - 1 ) {
5248			this.view.slideList[this.index + 1].loadImages();
5249		} else if ( this.slider.options.preload === 'all' && this.index === this.view.slideList.length - 1 ){
5250			this.slider._removeLoading();
5251		}
5252
5253	};
5254
5255	/**
5256	 * adds backgroun image to the slider
5257	 * @param {Element} img slide image element
5258	 */
5259	p.setBG = function(img){
5260		this.hasBG = true;
5261		var that = this;
5262
5263		this.$imgcont = $('<div></div>').addClass('ms-slide-bgcont');
5264
5265		this.$element.append(this.$loading)
5266			   		 .append(this.$imgcont);
5267
5268		this.$bg_img = $(img).css('visibility' , 'hidden');
5269		this.$imgcont.append(this.$bg_img);
5270
5271		this.bgAligner = new MSAligner(that.fillMode , that.$imgcont, that.$bg_img );
5272		this.bgAligner.widthOnly = this.slider.options.autoHeight;
5273
5274		if ( that.slider.options.autoHeight && (that.pselected || that.selected) ) {
5275			that.slider.setHeight(that.slider.options.height);
5276		}
5277
5278		if ( this.$bg_img.data('src') !== undefined ) {
5279			this.bg_src = this.$bg_img.data('src');
5280			this.$bg_img.removeAttr('data-src');
5281		} else {
5282			this.$bg_img.one('load', function(event) {that._onBGLoad(event);})
5283						.each($.jqLoadFix);
5284		}
5285
5286	};
5287
5288	/**
5289	 * align and resize backgrund image over slide
5290	 */
5291	p.setupBG = function(){
5292
5293		//if(this.isSettedup) return;
5294		//this.isSettedup = true;
5295
5296		if ( !this.initBG && this.bgLoaded ) {
5297			this.initBG = true;
5298			this.$bg_img.css('visibility' , '');
5299			this.bgWidth  = this.bgNatrualWidth  || this.$bg_img.width();
5300			this.bgHeight = this.bgNatrualHeight || this.$bg_img.height();
5301
5302			CTween.fadeIn(this.$imgcont , 300);
5303
5304			if(this.slider.options.autoHeight){
5305				this.$imgcont.height(this.bgHeight * this.ratio);
5306			}
5307
5308			this.bgAligner.init(this.bgWidth  , this.bgHeight);
5309			this.setSize(this.__width , this.__height);
5310
5311			if(this.slider.options.autoHeight && (this.pselected || this.selected))
5312			 	this.slider.setHeight(this.getHeight());
5313		}
5314
5315	};
5316
5317
5318
5319	/**
5320	 * start loading images
5321	 */
5322	p.loadImages = function(){
5323		if ( this.ls ) {
5324			return;
5325		}
5326
5327		this.ls = true;
5328
5329		if ( this.bgvideo ) {
5330			this.bgvideo.load();
5331		}
5332		if ( this.hasBG && this.bg_src ) {
5333			var that = this;
5334			this.$bg_img.preloadImg(this.bg_src , function(event) {that._onBGLoad(event);});
5335		}
5336
5337		if ( this.hasLayers ) {
5338			this.layerController.loadLayers(this._onLayersLoad);
5339		}
5340		// There is nothing to preload? so slide is ready to show.
5341		if( !this.hasBG && !this.hasLayers ) {
5342			this.assetsLoaded();
5343		}
5344
5345	};
5346
5347	/**
5348	 * layerController on assets load callback
5349	 */
5350	p._onLayersLoad = function () {
5351		this.layersLoaded = true;
5352		if ( !this.hasBG || this.bgLoaded ) {
5353			this.assetsLoaded();
5354		}
5355	};
5356	/**
5357	 * on background image loaded
5358	 * @param  {Event} event
5359	 */
5360	p._onBGLoad = function(event){
5361		this.bgNatrualWidth = event.width;
5362		this.bgNatrualHeight = event.height;
5363
5364		this.bgLoaded = true;
5365
5366		if ( $.browser.msie ) {
5367			this.$bg_img.on('dragstart', function(event) { event.preventDefault(); }); // disables native dragging
5368		}
5369
5370		if ( !this.hasLayers || this.layerController.ready ) {
5371			this.assetsLoaded();
5372		}
5373	};
5374
5375	/* -----------------------------------------------------*/
5376
5377	/**
5378	 * add video background to the slide
5379	 * @param {jQuery Element} $video
5380	 */
5381	p.setBGVideo = function($video){
5382
5383		if ( !$video[0].play ) {
5384			return;
5385		}
5386
5387		// disables video in mobile devices
5388		if ( window._mobile ) {
5389			$video.remove();
5390			return;
5391		}
5392
5393		this.bgvideo  = $video[0];
5394		var that = this;
5395
5396		$video.addClass('ms-slide-bgvideo');
5397
5398		if ( $video.data('loop') !== false ) {
5399			this.bgvideo.addEventListener('ended' , function(){
5400				//that.bgvideo.currentTime = -1;
5401				that.bgvideo.play();
5402			});
5403		}
5404
5405		if ( $video.data('mute') !== false ) {
5406			this.bgvideo.muted = true;
5407		}
5408
5409		if ( $video.data('autopause') === true ) {
5410			this.autoPauseBgVid = true;
5411		}
5412
5413		this.bgvideo_fillmode = $video.data('fill-mode') || 'fill'; // fill , fit , none
5414
5415		if ( this.bgvideo_fillmode !== 'none' ) {
5416			this.bgVideoAligner = new MSAligner(this.bgvideo_fillmode , this.$element, $video );
5417
5418			this.bgvideo.addEventListener('loadedmetadata' , function(){
5419				if(that.vinit) return;
5420
5421				that.vinit = true;
5422				that.video_aspect = that.bgVideoAligner.baseHeight/that.bgVideoAligner.baseWidth;
5423				that.bgVideoAligner.init(that.bgvideo.videoWidth , that.bgvideo.videoHeight);
5424				that._alignBGVideo();
5425				CTween.fadeIn($(that.bgvideo) , 200);
5426
5427				if ( that.selected ) {
5428					that.bgvideo.play();
5429				}
5430			});
5431		}
5432
5433		$video.css('opacity' , 0);
5434
5435		this.$bgvideocont = $('<div></div>').addClass('ms-slide-bgvideocont').append($video);
5436
5437		if ( this.hasBG ) {
5438			this.$imgcont.before(this.$bgvideocont);
5439		} else {
5440			this.$bgvideocont.appendTo(this.$element);
5441		}
5442	};
5443
5444	/**
5445	 * align video in slide
5446	 */
5447	p._alignBGVideo = function () {
5448		if ( !this.bgvideo_fillmode || this.bgvideo_fillmode === 'none' ) {
5449			return;
5450		}
5451		this.bgVideoAligner.align();
5452	};
5453
5454	/* -----------------------------------------------------*/
5455
5456	/**
5457	 * resize slide
5458	 * @param {Number} width
5459	 * @param {Number} height
5460	 * @param {Boolean} hard   after resizing reinitializes layers
5461	 */
5462	p.setSize = function(width, height, hard) {
5463
5464		this.__width  = width;
5465
5466		if ( this.slider.options.autoHeight ) {
5467			if ( this.bgLoaded ) {
5468				this.ratio = this.__width / this.bgWidth;
5469				height = Math.floor(this.ratio * this.bgHeight);
5470				this.$imgcont.height(height);
5471			} else {
5472				this.ratio = width / this.slider.options.width;
5473				height = this.slider.options.height * this.ratio;
5474			}
5475		}
5476
5477		this.__height = height;
5478		this.$element.width(width).height(height);
5479
5480		if(this.hasBG && this.bgLoaded)this.bgAligner.align();
5481
5482		this._alignBGVideo();
5483
5484		if ( this.hasLayers ) {
5485			this.layerController.setSize(width, height, hard);
5486		}
5487	};
5488
5489	/**
5490	 * calculates slide height
5491	 * @return {Number} slide height
5492	 */
5493	p.getHeight = function(){
5494
5495		if ( this.hasBG && this.bgLoaded ) {
5496			return this.bgHeight * this.ratio;
5497		}
5498
5499		return Math.max(this.$element[0].clientHeight, this.slider.options.height * this.ratio);
5500	};
5501
5502	/* -----------------------------------------------------*/
5503	// YouTube and Vimeo videos
5504
5505	/**
5506	 * playe embeded video
5507	 */
5508	p.__playVideo = function (){
5509
5510		if ( this.vplayed || this.videodis ) {
5511			return;
5512		}
5513
5514		this.vplayed = true;
5515
5516		if ( !this.slider.api.paused ) {
5517			this.slider.api.pause();
5518			this.roc = true; // resume on close;
5519		}
5520
5521		this.vcbtn.css('display' , '');
5522		CTween.fadeOut(this.vpbtn 	, 500 , false);
5523		CTween.fadeIn(this.vcbtn 	, 500);
5524		CTween.fadeIn(this.vframe 	, 500);
5525		this.vframe.css('display' , 'block').attr('src' , this.video + '&autoplay=1');
5526		this.view.$element.addClass('ms-def-cursor');
5527
5528		// remove perspective style from view if it's Firefox.
5529		// it fixes video fullscreen issue in Firefox
5530		if ( this.moz ) {
5531			this.view.$element.css('perspective', 'none');
5532		}
5533
5534		// if swipe navigation enabled
5535		if ( this.view.swipeControl ) {
5536			this.view.swipeControl.disable();
5537		}
5538
5539		this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_PLAY));
5540	};
5541
5542	/**
5543	 * close embeded video
5544	 */
5545	p.__closeVideo = function(){
5546
5547		if ( !this.vplayed ) {
5548			return;
5549		}
5550
5551		this.vplayed = false;
5552
5553		if(this.roc){
5554			this.slider.api.resume();
5555		}
5556
5557		var that = this;
5558
5559		CTween.fadeIn(this.vpbtn	, 500);
5560		CTween.animate(this.vcbtn   , 500 , {opacity:0} , {complete:function(){	that.vcbtn.css  ('display'  , 'none'); }});
5561		CTween.animate(this.vframe  , 500 , {opacity:0} , {complete:function(){	that.vframe.attr('src'  , 'about:blank').css('display'  , 'none');}});
5562
5563		//  video fullscreen issue in Firefox
5564		if ( this.moz ) {
5565			this.view.$element.css('perspective', '');
5566		}
5567
5568		// if swipe navigation enabled
5569		if ( this.view.swipeControl ) {
5570			this.view.swipeControl.enable();
5571		}
5572
5573		this.view.$element.removeClass('ms-def-cursor');
5574		this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_CLOSE));
5575	};
5576
5577	/* -----------------------------------------------------*/
5578
5579	/**
5580	 * create slide - it adds requierd elements over slide
5581	 */
5582	p.create = function(){
5583		var that = this;
5584
5585		if ( this.hasLayers ) {
5586			this.layerController.create();
5587		}
5588
5589		if ( this.link ) {
5590			this.link.addClass('ms-slide-link').html('').click(function(e){
5591				if ( that.linkdis ) {
5592					e.preventDefault();
5593				}
5594			});
5595
5596			// this.$element.css('cursor' , 'pointer')
5597			// 			 .click(function(){ if(!that.linkdis) window.open(that.link , that.link_targ || '_self'); });
5598		}
5599
5600		if ( this.video ) {
5601
5602			if ( this.video.indexOf('?') === -1 ) {
5603				this.video += '?';
5604			}
5605
5606			this.vframe = $('<iframe></iframe>')
5607						  .addClass('ms-slide-video')
5608						  .css({width:'100%' , height:'100%' , display:'none'})
5609						  .attr('src' , 'about:blank')
5610						  .attr('allowfullscreen', 'true')
5611						  .appendTo(this.$element);
5612
5613			this.vpbtn = $('<div></div>')
5614						.addClass('ms-slide-vpbtn')
5615						.click(function(){that.__playVideo();})
5616						.appendTo(this.$element);
5617
5618			this.vcbtn = $('<div></div>')
5619						.addClass('ms-slide-vcbtn')
5620						.click(function(){that.__closeVideo();})
5621						.appendTo(this.$element)
5622						.css('display','none');
5623
5624			if ( window._touch ) {
5625				this.vcbtn.removeClass('ms-slide-vcbtn')
5626						  .addClass('ms-slide-vcbtn-mobile')
5627						  .append('<div class="ms-vcbtn-txt">Close video</div>')
5628						  .appendTo(this.view.$element.parent());
5629			}
5630		}
5631
5632		if ( !this.slider.options.autoHeight && this.hasBG ) {
5633			this.$imgcont.css('height' , '100%');
5634
5635			if ( this.fillMode === 'center' || this.fillMode === 'stretch' ){
5636				this.fillMode = 'fill';
5637			}
5638		}
5639
5640		if ( this.slider.options.autoHeight ) {
5641			this.$element.addClass('ms-slide-auto-height');
5642		}
5643
5644		this.sleep(true);
5645	};
5646
5647	/**
5648	 * destory the slide
5649	 */
5650	p.destroy = function(){
5651		if ( this.hasLayers ) {
5652			this.layerController.destroy();
5653			this.layerController = null;
5654		}
5655		this.$element.remove();
5656		this.$element = null;
5657	};
5658
5659	/**
5660	 * everything require to do before selecting slide
5661	 */
5662	p.prepareToSelect = function(){
5663
5664		if ( this.pselected || this.selected ) {
5665			return;
5666		}
5667
5668		this.pselected = true;
5669
5670		if ( this.link || this.video ) {
5671			this.view.addEventListener(MSViewEvents.SWIPE_START  , this.onSwipeStart  , this);
5672			this.view.addEventListener(MSViewEvents.SWIPE_MOVE  , this.onSwipeMove  , this);
5673			this.view.addEventListener(MSViewEvents.SWIPE_CANCEL , this.onSwipeCancel , this);
5674			this.linkdis = false;
5675			this.swipeMoved = false;
5676		}
5677
5678		this.loadImages();
5679
5680		if ( this.hasLayers ) {
5681			this.layerController.prepareToShow();
5682		}
5683
5684		if ( this.ready ) {
5685			if( this.bgvideo ){
5686				this.bgvideo.play();
5687			}
5688
5689			if ( this.hasLayers && this.slider.options.instantStartLayers ){
5690				this.layerController.showLayers();
5691			}
5692		}
5693		if( this.moz ){
5694			this.$element.css('margin-top' , '');
5695		}
5696
5697
5698	};
5699
5700	/*p.prepareToUnselect = function(){
5701		if(!this.pselected || !this.selected) return;
5702
5703		this.pselected = false;
5704
5705	};*/
5706
5707	/**
5708	 * select slide
5709	 */
5710	p.select = function(){
5711		if ( this.selected ) {
5712			return;
5713		}
5714
5715		this.selected = true;
5716		this.pselected = false;
5717		this.$element.addClass('ms-sl-selected');
5718
5719		if(this.hasLayers){
5720
5721			if ( this.slider.options.autoHeight ) {
5722				this.layerController.updateHeight();
5723			}
5724
5725			if( !this.slider.options.instantStartLayers ) {
5726				this.layerController.showLayers();
5727			}
5728
5729			//this.view.addEventListener(MSViewEvents.SCROLL 		, this.updateLayers  , this)
5730		}
5731
5732
5733		if( this.ready && this.bgvideo ) {
5734			this.bgvideo.play();
5735		}
5736
5737		// @since 1.8.0
5738		// Autoplay iframe video
5739		if ( this.videoAutoPlay ) {
5740			this.videodis = false;
5741			this.vpbtn.trigger('click');
5742		}
5743
5744	};
5745
5746	/**
5747	 * remove selected status
5748	 */
5749	p.unselect = function(){
5750		this.pselected = false;
5751
5752		if ( this.moz ) {
5753			this.$element.css('margin-top' , '0.1px');
5754		}
5755
5756		if ( this.link || this.video ) {
5757			this.view.removeEventListener(MSViewEvents.SWIPE_START 	 , this.onSwipeStart  , this);
5758			this.view.removeEventListener(MSViewEvents.SWIPE_MOVE  , this.onSwipeMove  , this);
5759			this.view.removeEventListener(MSViewEvents.SWIPE_CANCEL  , this.onSwipeCancel , this);
5760		}
5761
5762		if (this.bgvideo ) {
5763			this.bgvideo.pause();
5764			if(!this.autoPauseBgVid && this.vinit)
5765				this.bgvideo.currentTime = 0;
5766		}
5767
5768		// hide layers
5769		if ( this.hasLayers ) {
5770			this.layerController.hideLayers();
5771		}
5772
5773		if ( !this.selected ) {
5774			return;
5775		}
5776
5777		this.selected = false;
5778
5779		this.$element.removeClass('ms-sl-selected');
5780		if(this.video && this.vplayed){
5781			this.__closeVideo();
5782			this.roc = false;
5783		}
5784
5785	};
5786
5787	/**
5788	 * remove slide from DOM
5789	 */
5790	p.sleep = function(force){
5791		if ( this.isSleeping && !force ) {
5792			return;
5793		}
5794
5795		this.isSleeping = true;
5796
5797		if ( this.autoAppend ) {
5798			this.$element.detach();
5799		}
5800
5801		if ( this.hasLayers ) {
5802			this.layerController.onSlideSleep();
5803		}
5804	};
5805
5806	/**
5807	 * add slide to the DOM
5808	 */
5809	p.wakeup = function(){
5810		if ( !this.isSleeping ) {
5811			return;
5812		}
5813
5814		this.isSleeping = false;
5815
5816		if ( this.autoAppend ) {
5817			this.view.$slideCont.append(this.$element);
5818		}
5819
5820		if ( this.moz ){
5821			this.$element.css('margin-top' , '0.1px');
5822		}
5823
5824		this.setupBG();
5825
5826		// aling bg
5827		if ( this.hasBG ){
5828			this.bgAligner.align();
5829		}
5830
5831		if ( this.hasLayers ) {
5832			this.layerController.onSlideWakeup();
5833		}
5834	};
5835
5836})(window, document, jQuery);
5837
5838/* ================== bin-debug/js/pro/controls/SlideController.js =================== */
5839;(function($){
5840
5841	"use strict";
5842
5843	var SliderViewList = {};
5844
5845	window.MSSlideController = function(slider){
5846
5847		this._delayProgress		= 0;
5848
5849		this._timer 			= new averta.Timer(100);
5850		this._timer.onTimer 	= this.onTimer;
5851		this._timer.refrence 	= this;
5852
5853		this.currentSlide		= null;
5854
5855		this.slider 	= slider;
5856		this.so 		= slider.options;
5857
5858		averta.EventDispatcher.call(this);
5859
5860	};
5861
5862	MSSlideController.registerView = function(name , _class){
5863		if(name in SliderViewList){
5864			 throw new Error( name + ', is already registered.');
5865			 return;
5866		}
5867
5868		SliderViewList[name] = _class;
5869	};
5870
5871	MSSlideController.SliderControlList = {};
5872	MSSlideController.registerControl = function(name , _class){
5873		if(name in MSSlideController.SliderControlList){
5874			 throw new Error( name + ', is already registered.');
5875			 return;
5876		}
5877
5878		MSSlideController.SliderControlList[name] = _class;
5879	};
5880
5881	var p = MSSlideController.prototype;
5882
5883	/*-------------- METHODS --------------*/
5884
5885
5886	p.setupView = function(){
5887
5888		var that = this;
5889		this.resize_listener = function(){that.__resize();};
5890
5891		// in @version 1.5.7 it will be added in Masterslider.js _setupSliderLayout function
5892		//$(window).bind('resize', this.resize_listener);
5893
5894		//if(this.so.smoothHeight) this.so.autoHeight = true;
5895
5896		var viewOptions = {
5897			spacing: 		this.so.space,
5898			mouseSwipe:		this.so.mouse,
5899			loop:			this.so.loop,
5900			autoHeight:		this.so.autoHeight,
5901			swipe:			this.so.swipe,
5902			speed:			this.so.speed,
5903			dir:			this.so.dir,
5904			viewNum: 		this.so.inView,
5905			critMargin: 	this.so.critMargin
5906		};
5907
5908		if(this.so.viewOptions)
5909			$.extend(viewOptions , this.so.viewOptions);
5910
5911		if(this.so.autoHeight) this.so.heightLimit = false;
5912
5913		//this.view.slideDuration = this.so.duration;
5914
5915		var viewClass = SliderViewList[this.slider.options.view] || MSBasicView;
5916		if(viewClass._3dreq && (!window._css3d || $.browser.msie) ) viewClass = viewClass._fallback || MSBasicView;
5917
5918		this.view = new viewClass(viewOptions);
5919
5920		if(this.so.overPause){
5921			var that = this;
5922			this.slider.$element.mouseenter(function(){
5923				that.is_over = true;
5924				that._stopTimer();
5925			}).mouseleave(function(){
5926				that.is_over = false;
5927				that._startTimer();
5928			});
5929		}
5930	};
5931
5932	p.onChangeStart = function(){
5933
5934		this.change_started = true;
5935
5936		if(this.currentSlide) this.currentSlide.unselect();
5937		this.currentSlide = this.view.currentSlide;
5938		this.currentSlide.prepareToSelect();
5939		//this.__appendSlides();
5940		if(this.so.endPause && this.currentSlide.index === this.slider.slides.length - 1){
5941			this.pause();
5942			//this._timer.reset();
5943			this.skipTimer();
5944		}
5945
5946		if(this.so.autoHeight){
5947			this.slider.setHeight(this.currentSlide.getHeight());
5948		}
5949
5950		if ( this.so.deepLink ) {
5951			this.__updateWindowHash();
5952		}
5953
5954		this.dispatchEvent(new MSSliderEvent(MSSliderEvent.CHANGE_START));
5955	};
5956
5957	p.onChangeEnd = function(){
5958		//if(!this.currentSlide.selected)
5959		//	this._timer.reset();
5960		this.change_started = false;
5961
5962		this._startTimer();
5963		this.currentSlide.select();
5964
5965		if(this.so.preload > 1){
5966			var loc ,i , l = this.so.preload - 1, slide;
5967
5968			// next slides
5969			for(i=1;i<=l;++i){
5970				loc = this.view.index + i;
5971
5972				if(loc >= this.view.slideList.length) {
5973					if(this.so.loop){
5974						loc = loc - this.view.slideList.length;
5975					}else{
5976						i = l;
5977						continue;
5978					}
5979				}
5980
5981				slide = this.view.slideList[loc];
5982				if ( slide ) {
5983					slide.loadImages();
5984				}
5985
5986			}
5987
5988			// previous slides
5989			if(l > this.view.slideList.length/2)
5990				l = Math.floor(this.view.slideList.length/2);
5991
5992			for(i=1;i<=l;++i){
5993
5994				loc = this.view.index - i;
5995
5996				if(loc < 0){
5997					if(this.so.loop){
5998						loc = this.view.slideList.length + loc;
5999					}else{
6000						i = l;
6001						continue;
6002					}
6003				}
6004
6005				slide = this.view.slideList[loc];
6006				if ( slide ) {
6007					slide.loadImages();
6008				}
6009
6010			}
6011		}
6012
6013		this.dispatchEvent(new MSSliderEvent(MSSliderEvent.CHANGE_END));
6014
6015	};
6016
6017	p.onSwipeStart = function(){
6018		//this._timer.reset();
6019		this.skipTimer();
6020	};
6021
6022	p.skipTimer = function(){
6023		this._timer.reset();
6024		this._delayProgress  = 0;
6025		this.dispatchEvent(new MSSliderEvent(MSSliderEvent.WAITING));
6026	};
6027
6028	p.onTimer = function(time) {
6029
6030		if(this._timer.getTime() >= this.view.currentSlide.delay * 1000){
6031			//this._timer.reset();
6032			this.skipTimer();
6033			this.view.next();
6034			this.hideCalled = false;
6035		}
6036		this._delayProgress = this._timer.getTime() / (this.view.currentSlide.delay * 10);
6037
6038		if(this.so.hideLayers && !this.hideCalled && this.view.currentSlide.delay * 1000 - this._timer.getTime() <= 300){
6039			var currentSlide = this.view.currentSlide;
6040			if ( currentSlide.hasLayers ) {
6041				currentSlide.layerController.animHideLayers();
6042			}
6043			this.hideCalled = true;
6044		}
6045
6046		this.dispatchEvent(new MSSliderEvent(MSSliderEvent.WAITING));
6047	};
6048
6049	p._stopTimer = function(){
6050		if(this._timer)
6051			this._timer.stop();
6052	};
6053
6054	p._startTimer = function(){
6055		if(!this.paused && !this.is_over && this.currentSlide && this.currentSlide.ready && !this.change_started)
6056			this._timer.start();
6057	};
6058
6059	p.__appendSlides = function(){
6060		var slide , loc , i = 0 , l = this.view.slideList.length -1;
6061
6062		// detach all
6063		for ( i ; i < l ; ++i){
6064			slide = this.view.slideList[i];
6065			if(!slide.detached){
6066			 	slide.$element.detach();
6067			 	slide.detached = true;
6068			}
6069		}
6070
6071		// append current slide
6072		this.view.appendSlide(this.view.slideList[this.view.index]);
6073
6074		l = 3;
6075
6076		// next slides
6077		for(i=1;i<=l;++i){
6078			loc = this.view.index + i;
6079
6080			if(loc >= this.view.slideList.length) {
6081				if(this.so.loop){
6082					loc = loc - this.view.slideList.length;
6083				}else{
6084					i = l;
6085					continue;
6086				}
6087			}
6088
6089			slide = this.view.slideList[loc];
6090			slide.detached = false;
6091			this.view.appendSlide(slide);
6092
6093		}
6094
6095		// previous slides
6096		if(l > this.view.slideList.length/2)
6097			l = Math.floor(this.view.slideList.length/2);
6098
6099		for(i=1;i<=l;++i){
6100
6101			loc = this.view.index - i;
6102
6103			if(loc < 0){
6104				if(this.so.loop){
6105					loc = this.view.slideList.length + loc;
6106				}else{
6107					i = l;
6108					continue;
6109				}
6110			}
6111
6112			slide = this.view.slideList[loc];
6113			slide.detached = false;
6114			this.view.appendSlide(slide);
6115		}
6116
6117	}
6118
6119	p.__resize = function(hard){
6120		if(!this.created) return;
6121
6122		this.width = this.slider.$element[0].clientWidth || this.so.width;
6123
6124		if(!this.so.fullwidth){
6125			this.width = Math.min(this.width , this.so.width);
6126			//this.view.$element.css('left' , (this.slider.$element[0].clientWidth - this.width) / 2 + 'px');
6127		}
6128
6129		if( this.so.fullheight ){
6130			this.so.heightLimit = false;
6131			this.so.autoHeight = false;
6132			this.height = this.slider.$element[0].clientHeight;
6133		} else {
6134			this.height = this.width / this.slider.aspect;
6135		}
6136		if( this.so.autoHeight ){
6137			this.currentSlide.setSize(this.width , null , hard);
6138			this.view.setSize(this.width , this.currentSlide.getHeight() , hard);
6139		} else {
6140			this.view.setSize(this.width , ( Math.max( this.so.minHeight, ( this.so.heightLimit ? Math.min(this.height , this.so.height) :  this.height ) ) ) , hard);
6141		}
6142
6143		if(this.slider.$controlsCont){
6144			if(this.so.centerControls && this.so.fullwidth) {
6145				this.view.$element.css('left' , Math.min(0,-(this.slider.$element[0].clientWidth - this.so.width) / 2) + 'px');
6146			}
6147		}
6148
6149		this.dispatchEvent(new MSSliderEvent(MSSliderEvent.RESIZE));
6150	};
6151
6152	p.__dispatchInit = function(){
6153		this.dispatchEvent(new MSSliderEvent(MSSliderEvent.INIT));
6154	};
6155
6156	/**
6157	 * used by deep link feature, uptades window hash value on slide changes
6158	 * @since 2.1.0
6159	 */
6160	p.__updateWindowHash = function(){
6161		var hash = window.location.hash,
6162			dl = this.so.deepLink,
6163			dlt = this.so.deepLinkType,
6164			eq = dlt === 'path' ? '\/' : '=',
6165			sep = dlt === 'path' ? '\/' : '&',
6166			sliderHash = dl + eq + (this.view.index + 1),
6167			regTest = new RegExp( dl + eq + '[0-9]+', 'g');
6168
6169		if ( hash === '' ) {
6170			window.location.hash = sep + sliderHash;
6171		} else if( regTest.test(hash) ) {
6172			window.location.hash = hash.replace(regTest, sliderHash);
6173		} else {
6174			window.location.hash = hash + sep + sliderHash;
6175		}
6176	};
6177
6178	p.__curentSlideInHash = function(){
6179		var hash = window.location.hash,
6180			dl = this.so.deepLink,
6181			dlt = this.so.deepLinkType,
6182			eq = dlt === 'path' ? '\/' : '=',
6183			regTest = new RegExp( dl + eq + '[0-9]+', 'g' );
6184
6185		if ( regTest.test(hash) ) {
6186			var index = Number(hash.match(regTest)[0].match(/[0-9]+/g).pop());
6187			if ( !isNaN(index) ) {
6188				return index - 1;
6189			}
6190		}
6191
6192		return -1;
6193	};
6194
6195	p.__onHashChanged = function(){
6196		var index = this.__curentSlideInHash();
6197		if ( index !== -1 ){
6198			this.gotoSlide(index);
6199		}
6200	};
6201
6202	p.setup = function(){
6203
6204		this.created = true;
6205		this.paused = !this.so.autoplay;
6206
6207		//this.slider.$element.append(this.view.$element);
6208		this.view.addEventListener(MSViewEvents.CHANGE_START , this.onChangeStart , this);
6209		this.view.addEventListener(MSViewEvents.CHANGE_END   , this.onChangeEnd   , this);
6210		this.view.addEventListener(MSViewEvents.SWIPE_START  , this.onSwipeStart  , this);
6211
6212		//this.currentSlide = this.view.slides[this.so.start - 1];
6213		this.currentSlide = this.view.slideList[this.so.start - 1];
6214		this.__resize();
6215
6216		var slideInHash = this.__curentSlideInHash(),
6217			startSlide = slideInHash !== -1 ? slideInHash : this.so.start - 1;
6218		this.view.create(startSlide);
6219
6220		if(this.so.preload === 0){
6221			this.view.slideList[0].loadImages();
6222		}
6223
6224		this.scroller = this.view.controller;
6225
6226		if(this.so.wheel){
6227			var that = this;
6228			var last_time = new Date().getTime();
6229			this.wheellistener = function(event){
6230
6231				var e = window.event || event.orginalEvent || event;
6232				e.preventDefault();
6233
6234				var current_time = new Date().getTime();
6235				if(current_time - last_time < 400) return;
6236				last_time = current_time;
6237
6238				var delta = Math.abs(e.detail || e.wheelDelta);
6239
6240				if ( $.browser.mozilla ) {
6241					delta *= 100;
6242				}
6243
6244				var scrollThreshold = 15;
6245
6246				// --- Scrolling up ---
6247				if (e.detail < 0 || e.wheelDelta > 0) {
6248					if ( delta >= scrollThreshold) {
6249						that.previous(true);
6250					}
6251				}
6252				// --- Scrolling down ---
6253				else {
6254					if (delta >= scrollThreshold) {
6255						that.next(true);
6256					}
6257				}
6258
6259				return false;
6260			};
6261
6262			if($.browser.mozilla) this.slider.$element[0].addEventListener('DOMMouseScroll' , this.wheellistener);
6263			else this.slider.$element.bind('mousewheel', this.wheellistener);
6264		}
6265
6266		// if(this.so.wheel){
6267		// 	var that = this;
6268		// 	var last_time = new Date().getTime();
6269		// 	this.wheellistener = function(event){
6270		// 		var current_time = new Date().getTime();
6271		// 		if(current_time - last_time < 550) return;
6272		// 		last_time = current_time;
6273		// 		var e = window.event || event.orginalEvent || event;
6274		// 		var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));
6275		// 		if(delta < 0)		that.next();
6276		// 		else if(delta > 0)	that.previous();
6277		// 		return false;
6278		// 	};
6279
6280		// 	if($.browser.mozilla) this.slider.$element[0].addEventListener('DOMMouseScroll' , this.wheellistener);
6281		// 	else this.slider.$element.bind('mousewheel', this.wheellistener);
6282		// }
6283
6284		if(this.slider.$element[0].clientWidth === 0)
6285			this.slider.init_safemode = true;
6286
6287		this.__resize();
6288
6289		var that = this;
6290		if( this.so.deepLink ) {
6291			$(window).on('hashchange', function() {
6292			  that.__onHashChanged();
6293			});
6294		}
6295	};
6296
6297	p.index = function(){
6298		return this.view.index;
6299	};
6300
6301	p.count = function(){
6302		return this.view.slidesCount;
6303	};
6304
6305	p.next = function(checkLoop){
6306		this.skipTimer();
6307		this.view.next(checkLoop);
6308		this.view.initVideoPlay(this.view.index);
6309	};
6310
6311	p.previous = function(checkLoop){
6312		this.skipTimer();
6313		this.view.previous(checkLoop);
6314		this.view.initVideoPlay(this.view.index);
6315	};
6316
6317	p.gotoSlide = function(index) {
6318		index = Math.min(index, this.count()-1);
6319		this.skipTimer();
6320		this.view.gotoSlide(index);
6321	};
6322
6323	p.destroy = function(reset){
6324		this.dispatchEvent(new MSSliderEvent(MSSliderEvent.DESTROY));
6325		this.slider.destroy(reset);
6326	};
6327
6328	p._destroy = function(){
6329		this._timer.reset();
6330		this._timer = null;
6331
6332		$(window).unbind('resize', this.resize_listener);
6333		this.view.destroy();
6334		this.view = null;
6335
6336		if(this.so.wheel){
6337			if($.browser.mozilla) this.slider.$element[0].removeEventListener('DOMMouseScroll' , this.wheellistener);
6338			else this.slider.$element.unbind('mousewheel', this.wheellistener);
6339			this.wheellistener = null;
6340		}
6341
6342		this.so = null;
6343	};
6344	/**
6345	 * run layer actions like next, previous,...
6346	 * @param  {String} action
6347	 * @since v1.7.2
6348	 */
6349	p.runAction = function(action){
6350		var actionParams = [];
6351
6352		if( action.indexOf('(') !== -1 ){
6353			var temp = action.slice(0 , action.indexOf('('));
6354			actionParams = action.slice(action.indexOf('(') + 1 , -1).replace(/\"|\'|\s/g , '').split(',');
6355			action   = temp;
6356		}
6357
6358		if ( action in this ){
6359			this[action].apply(this, actionParams);
6360		} else if ( console ){
6361			console.log('Master Slider Error: Action "'+action+'" not found.');
6362		}
6363	};
6364
6365	p.update = function(hard){
6366		if(this.slider.init_safemode && hard)
6367			this.slider.init_safemode = false;
6368		this.__resize(hard);
6369
6370		if ( hard ) {
6371			this.dispatchEvent(new MSSliderEvent(MSSliderEvent.HARD_UPDATE));
6372		}
6373
6374	};
6375
6376	p.locate = function(){
6377		this.__resize();
6378	};
6379
6380	p.resume = function(){
6381		if(!this.paused) return;
6382		this.paused = false;
6383		this._startTimer();
6384	};
6385
6386	p.pause = function(){
6387		if(this.paused) return;
6388		this.paused = true;
6389		this._stopTimer();
6390	};
6391
6392	p.currentTime = function(){
6393		return this._delayProgress;
6394	};
6395
6396	averta.EventDispatcher.extend(p);
6397})(jQuery);
6398
6399/* ================== bin-debug/js/pro/MasterSlider.js =================== */
6400/**
6401 * Master Slider Main JavaScript File
6402 */
6403
6404;(function($){
6405
6406	"use strict";
6407
6408	var LayerTypes = {
6409		'image' 	: MSImageLayerElement,
6410		'text'  	: MSLayerElement,
6411		'video' 	: MSVideoLayerElement,
6412		'hotspot'	: MSHotspotLayer,
6413		'button'	: MSButtonLayer
6414	};
6415	window.MasterSlider = function(){
6416
6417		// Default Options
6418		this.options = {
6419            forceInit           : true,       // Force calling init even an error occurs in jQuery's dom ready method.
6420			autoplay 			: false,      // Enables the autoplay slideshow.
6421			loop 				: false,	  // Enables the continuous sliding mode.
6422			mouse				: true,		  // Whether the user can use mouse drag navigation.
6423			swipe				: true,		  // Whether the drag/swipe navigation is enabled.
6424			grabCursor			: true,		  // Whether the slider uses grab mouse cursor.
6425			space  				: 0,		  // The spacing value between slides in pixels.
6426			fillMode			: 'fill',  	  // Specifies the slide background scaling method. Its acceptable values are "fill", "fit", "stretch", "center" and "tile".
6427			start				: 1,		  // The slider starting slide number.
6428			view				: 'basic',	  // The slide changing transition.
6429			width				: 300,		  // The base width of slides. It helps the slider to resize in correct ratio.
6430			height				: 150,		  // The base height of slides, It helps the slider to resize in correct ratio.
6431			inView				: 15, 		  // Specifies number of slides which will be added at a same time in DOM.
6432			critMargin			: 1,		  //
6433			heightLimit			: true,		  // It force the slide to use max height value as its base specified height value.
6434			smoothHeight		: true,		  // Whether the slider uses smooth animation while its height changes.
6435			autoHeight			: false,      // Whether the slider adapts its height to each slide height or not. It overrides heightLimit option.
6436			minHeight 			: -1,		  // @since 2.13.0, Specifies min height value for the slider, it prevents slider to shows too narrow in small screens.
6437			fullwidth			: false,	  // It enables the slider to adapt width to its parent element. It's very useful for creating full-width sliders. In default it takes max width as its base width value.
6438			fullheight			: false,	  // It enables the slider to adapt height to its parent element.
6439			autofill			: false,	  // It enables the slider to adapt width and height to its parent element, It's very useful for creating fullscreen or fullwindow slider.
6440			layersMode			: 'center',	  // It accepts two values "center" and "full". The "center" value indicates that the slider aligns layers to the center. This option is only effective in full width mode.
6441			hideLayers			: false,	  // Whether the slider hides all layers before changing slide.
6442			endPause			: false,	  // Whether the slider pauses slideshow when it stays at the last slide.
6443			centerControls 		: true,		  // Whether the slider aligns UI controls to center. This option is only effective in full width mode.
6444			overPause			: true,		  // Whether the slider pauses slideshow on hover.
6445			shuffle				: false,	  // Enables the shuffle slide order.
6446			speed				: 17, 		  // Specifies slide changing speed. It accepts float values between 0 and 100.
6447			dir					: 'h',		  // Specifies slide changing direction. It accepts two values "h" (horizontal) and "v" (vertical).
6448			preload				: 0,		  // Specifies number of slides which will be loaded by slider. 0 value means the slider loads slides in sequence.
6449			wheel				: false,	  // Whether slider uses mouse wheel for navigation.
6450			layout				: 'boxed',	  // It accepts 'fullwidth', 'fullscreen', 'fillwidth', 'autofill', 'partialview', 'boxed'. It overrides 'fullwidth' and 'autofill' (added in v1.5.6)
6451			autofillTarget 		: null,		  // @since 2.13.0, Specifies the parent element of slider width jQuery selector, it used for sizing slider with autofill layout. Default value is the first parent element of slider.
6452			fullscreenMargin	: 0,		  // Specifies margin amount to the bottom of slider, it's only effective on fullscreen slider.
6453			instantStartLayers	: false, 	  // @since 1.5.0, Whether instantly shows slide layers.
6454			parallaxMode 		: 'mouse',	  // @since 1.6.0, Specifies mode of parallax effect accepts: "mouse", "mouse:x-only", "mouse:y-only" and "swipe"
6455			rtl 				: false,	  // @since 1.8.0, Whether Right-to-left direction slider.
6456			deepLink			: null,       // @since 2.1.0, null value disables slider deep-linking any string values identifies the slider in page's url like /#msslider-1
6457			deepLinkType 		: 'path', 	  // @since 2.1.0, type of hash value in page's url possible values, path and query (  #gallery/1 || #gallery=4 )
6458			disablePlugins      : []		  // @since 2.9.6, list of disabled Master Slider plugin names for this instance.
6459		};
6460
6461		this.slides = [];
6462		this.activePlugins = [];
6463		this.$element = null;
6464
6465		// used by new layout method. to force fullwidth or fullscreen
6466		this.lastMargin = 0;
6467
6468		// Reserved side spaces of slider
6469		this.leftSpace = 0;
6470		this.topSpace = 0;
6471		this.rightSpace = 0;
6472		this.bottomSpace = 0;
6473
6474		// hold on stack
6475		this._holdOn = 0;
6476
6477		var that = this;
6478		this.resize_listener = function(){that._resize();};
6479		$(window).bind('resize', this.resize_listener);
6480
6481	};
6482
6483	MasterSlider.author  		= 'Averta Ltd. (www.averta.net)';
6484	MasterSlider.version 		= '2.16.3';
6485	MasterSlider.releaseDate 	= 'Dec 2015';
6486
6487	// Master Slider plugins.
6488	MasterSlider._plugins = []
6489	var MS = MasterSlider;
6490	MS.registerPlugin = function ( plugin ) {
6491		if ( MS._plugins.indexOf(plugin) === -1 ) {
6492			MS._plugins.push(plugin);
6493		}
6494	};
6495
6496	var p = MasterSlider.prototype;
6497
6498	/*-------------- METHODS --------------*/
6499
6500	/**
6501	 * create one slide object for each slide and add it to slide controller
6502	 * @since 1.0
6503	 * @private
6504	 */
6505	p.__setupSlides = function(){
6506		var that = this,
6507			new_slide,
6508			ind = 0;
6509
6510		this.$element.children('.ms-slide').each(function(index) {
6511
6512			var $slide_ele = $(this);
6513
6514			new_slide 			= new MSSlide();
6515			new_slide.$element 	= $slide_ele;
6516			new_slide.slider 	= that;
6517			new_slide.delay  	= $slide_ele.data('delay') 		!== undefined ? $slide_ele.data('delay') 		: 3;
6518			new_slide.fillMode 	= $slide_ele.data('fill-mode')	!== undefined ? $slide_ele.data('fill-mode') 	: that.options.fillMode;
6519			new_slide.index 	= ind++;
6520
6521			// Slide Background Image
6522			var slide_img = $slide_ele.children('img:not(.ms-layer)');
6523			if( slide_img.length > 0 ){
6524				new_slide.setBG(slide_img[0]);
6525			}
6526
6527			// Slide Video Background
6528			var slide_video = $slide_ele.children('video');
6529			if( slide_video.length > 0 ) new_slide.setBGVideo(slide_video);
6530			// controls
6531			if(that.controls){
6532				for(var i = 0 , l = that.controls.length; i<l ; ++i)
6533					that.controls[i].slideAction(new_slide);
6534			}
6535
6536			// Slide Link and Video
6537			var slide_link = $slide_ele.children('a').each(function(index) {
6538			  var $this = $(this);
6539			  if(this.getAttribute('data-type') === 'video'){
6540				new_slide.video = this.getAttribute('href');
6541
6542				new_slide.videoAutoPlay = $this.data('autoplay');
6543
6544				$this.remove();
6545			  }else if(!$this.hasClass('ms-layer')) {
6546				new_slide.link  = $(this);
6547				//new_slide.link_targ = this.getAttribute('target');
6548				//$this.remove();
6549			  }
6550			});//.remove();
6551
6552			// Slide Layers
6553			that.__createSlideLayers(new_slide , $slide_ele.find('.ms-layer'));
6554			that.slides.push(new_slide);
6555			that.slideController.view.addSlide(new_slide);
6556
6557		});
6558	};
6559
6560	/**
6561	 * Creates layers of specified layer
6562	 * @param  {MSSlide} slide
6563	 * @param  {Array} layers
6564	 * @since 1.0
6565	 * @private
6566	 */
6567	p.__createSlideLayers = function(slide , layers) {
6568		if(layers.length == 0) return;
6569		slide.setupLayerController();
6570
6571		layers.each(function(index , domEle){
6572			var $layer_element = $(this),
6573				$parent_ele;
6574
6575			if( domEle.nodeName === 'A' && $layer_element.find('>img').data('type') === 'image' ) {
6576				$parent_ele = $(this);
6577				$layer_element = $parent_ele.find('img');
6578			}
6579
6580			var layer = new (LayerTypes[$layer_element.data('type') || 'text']) ();
6581			layer.$element = $layer_element;
6582			layer.link = $parent_ele;
6583
6584			var eff_parameters = {},
6585				end_eff_parameters = {};
6586
6587			if($layer_element.data('effect') 	!== undefined)		eff_parameters.name 			= $layer_element.data('effect');
6588			if($layer_element.data('ease')		!== undefined) 		eff_parameters.ease 			= $layer_element.data('ease');
6589			if($layer_element.data('duration')  !== undefined)  	eff_parameters.duration 		= $layer_element.data('duration');
6590			if($layer_element.data('delay')   	!== undefined)   	eff_parameters.delay			= $layer_element.data('delay');
6591
6592			if($layer_element.data('hide-effect'))		    		end_eff_parameters.name 		= $layer_element.data('hide-effect');
6593			if($layer_element.data('hide-ease'))		   			end_eff_parameters.ease 		= $layer_element.data('hide-ease');
6594			if($layer_element.data('hide-duration') !== undefined)  end_eff_parameters.duration		= $layer_element.data('hide-duration');
6595			if($layer_element.data('hide-time') 	!== undefined)  end_eff_parameters.time 		= $layer_element.data('hide-time');
6596
6597			layer.setStartAnim(eff_parameters);
6598			layer.setEndAnim(end_eff_parameters);
6599
6600			slide.layerController.addLayer(layer);
6601
6602		});
6603
6604	};
6605	/**
6606	 * remove slider initialize loading
6607	 * @since 1.0
6608	 * @private
6609	 */
6610	p._removeLoading = function(){
6611		$(window).unbind('resize', this.resize_listener);
6612		this.$element.removeClass('before-init')
6613					.css('visibility', 'visible')
6614					.css('height','')
6615					.css('opacity' , 0);
6616		CTween.fadeIn(this.$element);
6617		this.$loading.remove();
6618
6619		if(this.slideController)
6620			this.slideController.__resize();
6621	};
6622
6623	/**
6624	 * resize listener, it only used for aligning slider loading and after slider init it will be removed
6625	 * @param  {Event} e
6626	 * @since 1.0
6627	 * @private
6628	 */
6629	p._resize = function(e){
6630		if(this.$loading){
6631			var h = this.$loading[0].clientWidth / this.aspect;
6632			h = this.options.heightLimit ? Math.min(h , this.options.height) : h;
6633
6634			this.$loading.height(h);
6635			this.$element.height(h);
6636		}
6637	};
6638
6639	/**
6640	 * changes the order of slides element before setup slides
6641	 * @since 1.0
6642	 * @private
6643	 */
6644	p._shuffleSlides = function(){
6645		var slides = this.$element.children('.ms-slide') , r;
6646
6647		for(var i = 0 , l = slides.length; i < l ; ++i){
6648			r = Math.floor(Math.random() * (l - 1));
6649			if(i != r){
6650				this.$element[0].insertBefore(slides[i] , slides[r]);
6651				slides = this.$element.children('.ms-slide');
6652			}
6653		}
6654	};
6655
6656	/**
6657	 * New method of setting up the layout of slider
6658	 * @since 1.5.6
6659	 */
6660	p._setupSliderLayout = function(){
6661
6662		// create side spaces
6663		this._updateSideMargins();
6664		this.lastMargin = this.leftSpace;
6665
6666		var lo = this.options.layout;
6667
6668
6669		if( lo !== 'boxed' && lo !== 'partialview' ){
6670			this.options.fullwidth = true;  // enable slider fullscreen for fullwidth, fillwidth, autofill and fullscreen layouts.
6671		}
6672		if( lo === 'fullscreen' || lo === 'autofill' ){
6673			this.options.fullheight = true;
6674
6675			if ( lo === 'autofill' ) {
6676				this.$autofillTarget = $(this.options.autofillTarget);
6677				if ( this.$autofillTarget.length === 0 ) {
6678					this.$autofillTarget = this.$element.parent();
6679				}
6680			}
6681
6682		}
6683
6684		// partial view
6685		if ( lo === 'partialview' ){
6686			this.$element.addClass('ms-layout-partialview');
6687		}
6688		if( lo === 'fullscreen' ||  lo === 'fullwidth' || lo === 'autofill' ){
6689			$(window).bind('resize', {that:this}, this._updateLayout);
6690			this._updateLayout();
6691		}
6692
6693		// bind resize handler of slidecontroller __resize
6694		$(window).bind('resize', this.slideController.resize_listener);
6695	};
6696
6697	/**
6698	 * updates layout of slider based on window size
6699	 * @param  {Event} event
6700	 * @since 1.5.6
6701	 */
6702	p._updateLayout = function(event){
6703		var that = event? event.data.that : this,
6704			lo = that.options.layout,
6705			$element = that.$element,
6706			$win = $(window);
6707
6708		// height
6709		if( lo === 'fullscreen' ){
6710			document.body.style.overflow = 'hidden';
6711			$element.height( $win.height() - that.options.fullscreenMargin - that.topSpace - that.bottomSpace);
6712			document.body.style.overflow = '';
6713		} else if ( lo === 'autofill' ) {
6714			$element.height(that.$autofillTarget.height() - that.options.fullscreenMargin - that.topSpace - that.bottomSpace)
6715					.width(that.$autofillTarget.width() - that.leftSpace - that.rightSpace);
6716			return;
6717		}
6718		// width
6719		$element.width($win.width() - that.leftSpace - that.rightSpace);
6720		var margin = -$element.offset().left + that.leftSpace + that.lastMargin;
6721		$element.css('margin-left', margin );
6722		that.lastMargin = margin;
6723//
6724	};
6725
6726
6727	/**
6728	 * initialize the slider, called by document ready
6729	 * <code>holdOn</code> property prevents auto initialize slider after document ready it used by plugins of slider like Flickr
6730	 * @since 1.0
6731	 * @protected
6732	 */
6733	p._init = function(){
6734
6735		if ( this._holdOn > 0 || !this._docReady ) {
6736			return;
6737		}
6738
6739		this.initialized = true;
6740
6741		if(this.options.preload !== 'all'){
6742			this._removeLoading();
6743		}
6744		//else
6745		//	this.$element.css('width' , this.$loading[0].clientWidth);
6746
6747		if(this.options.shuffle) 	this._shuffleSlides();
6748
6749		MSLayerEffects.setup();
6750		this.slideController.setupView();
6751		this.view = this.slideController.view;
6752
6753		this.$controlsCont = $('<div></div>').addClass('ms-inner-controls-cont');//.appendTo(this.$element);
6754		if(this.options.centerControls){
6755			this.$controlsCont.css('max-width' , this.options.width + 'px');
6756		}
6757
6758		this.$controlsCont.prepend(this.view.$element);
6759		this.$controlsCont.append('<span class="video_play_icon hide" ></span>');
6760		this.$msContainer = $('<div></div>').addClass('ms-container').prependTo(this.$element).append(this.$controlsCont);
6761
6762		if(this.controls){
6763			for(var i = 0 , l = this.controls.length; i<l ; ++i){
6764				this.controls[i].setup();
6765			}
6766		}
6767		/*else{
6768			this.$element.append(this.view.$element);
6769		}*/
6770
6771		this._setupSliderLayout();
6772		this.__setupSlides();
6773		this.slideController.setup();
6774
6775		if(this.controls){
6776			for(i = 0 , l = this.controls.length; i<l ; ++i)
6777				this.controls[i].create();
6778		}
6779
6780		if(this.options.autoHeight){
6781			this.slideController.view.$element.height(this.slideController.currentSlide.getHeight());
6782		}
6783
6784		// add grab cursor
6785		if(this.options.swipe && !window._touch && this.options.grabCursor && this.options.mouse){
6786			var $view = this.view.$element;
6787
6788			$view.mousedown(function(){
6789				$view.removeClass('ms-grab-cursor');
6790				$view.addClass('ms-grabbing-cursor');
6791
6792				if ( $.browser.msie && window.ms_grabbing_curosr ) {
6793					$view[0].style.cursor = 'url(' + window.ms_grabbing_curosr + '), move';
6794				}
6795
6796			}).addClass('ms-grab-cursor');
6797
6798			$(document).mouseup(function(){
6799				$view.removeClass('ms-grabbing-cursor');
6800				$view.addClass('ms-grab-cursor');
6801
6802				if ( $.browser.msie && window.ms_grab_curosr ) {
6803					$view[0].style.cursor = 'url(' + window.ms_grab_curosr + '), move';
6804				}
6805
6806			});
6807		}
6808
6809		this.slideController.__dispatchInit();
6810	};
6811
6812	/**
6813	 * changes the height of slider, it used in autoheight slider
6814	 * @param {Number} value
6815	 * @since 1.0
6816	 * @public
6817	 */
6818	p.setHeight = function(value){
6819		if(this.options.smoothHeight){
6820			if(this.htween){
6821				if(this.htween.reset)this.htween.reset();
6822				else	 			 this.htween.stop(true);
6823			}
6824			this.htween = CTween.animate(this.slideController.view.$element , 500 , {height:value} , {ease:'easeOutQuart'});
6825		}else
6826			this.slideController.view.$element.height(value);
6827	};
6828
6829	/**
6830	 * reserves white space in sides of slider, it used by controls
6831	 * @param  {String} side  left|right|top|bottom
6832	 * @param  {Number} space
6833	 * @returns {Number} start position in space.
6834	 * @since 1.5.7
6835	 * @public
6836	 */
6837	p.reserveSpace = function(side, space){
6838		var sideSpace = side+'Space',
6839			pos = this[sideSpace];
6840
6841		this[sideSpace] += space;
6842
6843		this._updateSideMargins();
6844
6845		return pos;
6846	};
6847
6848	/**
6849	 * returns the reserved space, it used by controls and called when aligned control hides
6850	 * @param  {String} side
6851	 * @param  {Number} space
6852	 * @since 1.5.7
6853	 * @public
6854	 */
6855	/*p.returnSpace = function(side, space){
6856		var sideSpace = side+'Space';
6857		this[sideSpace] = Math.max(0 , this[sideSpace] - space);
6858
6859		this.api.dispatchEvent(new MSSliderEvent(MSSliderEvent.RESERVED_SPACE_CHANGE));
6860		this._updateSideMargins();
6861	};*/
6862
6863	p._updateSideMargins = function(){
6864		this.$element.css('margin', this.topSpace + 'px ' + this.rightSpace + 'px ' + this.bottomSpace + 'px ' + this.leftSpace + 'px');
6865	}
6866
6867	p._realignControls = function(){
6868		this.rightSpace = this.leftSpace = this.topSpace = this.bottomSpace = 0;
6869		this._updateSideMargins();
6870		this.api.dispatchEvent(new MSSliderEvent(MSSliderEvent.RESERVED_SPACE_CHANGE));
6871	};
6872
6873	/*------------------------- Public Methods -----------------------*/
6874
6875	/**
6876	 * Adds new control to the slider
6877	 * @param  {String} control
6878	 * @param  {Object} options [description]
6879	 * @since 1.0
6880	 * @public
6881	 */
6882	p.control = function(control , options){
6883		if(!(control in MSSlideController.SliderControlList)) return;
6884		if(!this.controls) this.controls = [];
6885		var ins = new MSSlideController.SliderControlList[control](options);
6886		ins.slider = this;
6887		this.controls.push(ins);
6888
6889		return this;
6890	};
6891
6892	/**
6893	 * Hold on slider from initialization
6894	 * @since 2.9.6
6895	 * @public
6896	 */
6897	p.holdOn = function () {
6898		this._holdOn ++;
6899	};
6900
6901	/**
6902	 * Let the slider to initialize
6903	 * @since 2.9.6
6904	 */
6905	p.release = function () {
6906		this._holdOn --;
6907		this._init();
6908	};
6909
6910	/**
6911	 * setup slider
6912	 * @param  {String|jQuery object} id
6913	 * @param  {Object} options
6914	 * @since 1.0
6915	 * @public
6916	 */
6917	p.setup = function(target , options){
6918		if(typeof target === 'string'){
6919			this.$element = $('#' + target);
6920		} else {
6921			this.$element = target.eq(0);
6922		}
6923
6924		//create a copy from slider markup, it will be used in destroy method.
6925		this.setupMarkup = this.$element.html();
6926
6927		if( this.$element.length === 0 ){
6928			//if(console) console.log('Master Slider Error: #'+id+' not found.');
6929			return;
6930		}
6931
6932		this.$element.addClass('master-slider').addClass('before-init');
6933
6934		// IE prefix class
6935		// add browser prefix class name
6936		if($.browser.msie){
6937			this.$element.addClass('ms-ie')
6938						 .addClass('ms-ie' + $.browser.version.slice(0 , $.browser.version.indexOf('.')));
6939		} else if ( $.browser.webkit ) {
6940			this.$element.addClass('ms-wk');
6941		} else if ( $.browser.mozilla ) {
6942			this.$element.addClass('ms-moz');
6943		}
6944
6945
6946		// Android prefix class
6947		var ua = navigator.userAgent.toLowerCase();
6948		var isAndroid = ua.indexOf("android") > -1;
6949		if(isAndroid) {
6950		  this.$element.addClass('ms-android');
6951		}
6952
6953		var that = this;
6954		$.extend(this.options, options);
6955
6956		this.aspect = this.options.width / this.options.height;
6957
6958		this.$loading = $('<div></div>').
6959						addClass('ms-loading-container').
6960						insertBefore(this.$element).
6961						append($('<div></div>').addClass('ms-loading'));
6962
6963		this.$loading.parent().css('position' , 'relative');
6964
6965		// old methods
6966		if(this.options.autofill){
6967			this.options.fullwidth = true;
6968			this.options.fullheight = true;
6969		}
6970
6971		if(this.options.fullheight){
6972			this.$element.addClass('ms-fullheight');
6973		}
6974
6975		//this._setupSliderLayout();
6976		this._resize();
6977
6978		// define slide controller and api
6979		this.slideController = new MSSlideController(this);
6980		this.api = this.slideController;
6981
6982		// setup plugins
6983		for ( var i = 0, l = MS._plugins.length; i !== l; i++ ) {
6984			var plugin = MS._plugins[i];
6985
6986			if ( this.options.disablePlugins.indexOf(plugin.name) === -1 ) {
6987				this.activePlugins.push(new plugin(this));
6988			}
6989		}
6990
6991        if ( this.options.forceInit ) {
6992            MasterSlider.addJQReadyErrorCheck( this );
6993        }
6994
6995		$(document).ready(function(){
6996            if ( !that.initialize ) {
6997    			that._docReady = true;
6998    			that._init();
6999            }
7000		});
7001
7002		return this;
7003	};
7004
7005	/**
7006	 * destroy the slider instance
7007	 * @param  {Boolean} insertMarkup	 whether add slider markup after destroy.
7008	 * @since 1.4
7009	 * @public
7010	 */
7011	p.destroy = function(insertMarkup){
7012
7013		// destroy active plugins
7014		for ( var i = 0, l = this.activePlugins.length; i !== l; i++ ) {
7015			this.activePlugins[i].destroy();
7016		}
7017
7018		if(this.controls){
7019			for( i = 0, l = this.controls.length; i !== l; i++ )
7020				this.controls[i].destroy();
7021		}
7022
7023		if(this.slideController) this.slideController._destroy();
7024
7025		if(this.$loading) this.$loading.remove();
7026
7027		if ( insertMarkup ) {
7028			this.$element.html(this.setupMarkup).css('visibility' , 'hidden');
7029		} else {
7030			this.$element.remove();
7031		}
7032
7033		var lo = this.options.layout;
7034		if( lo === 'fullscreen' ||  lo === 'fullwidth' ){
7035			$(window).unbind('resize', this._updateLayout);
7036		}
7037
7038		this.view = null;
7039		this.slides = null;
7040		this.options = null;
7041		this.slideController = null;
7042		this.api = null;
7043		this.resize_listener = null;
7044
7045
7046		this.activePlugins = null;
7047	};
7048
7049})(jQuery);
7050
7051/**
7052 * Master Slider jQuery Plugin
7053 * @author Averta
7054 */
7055(function ( $, window, document, undefined ) {
7056
7057		var pluginName = "masterslider",
7058			defaults = {
7059				controls:{}
7060			};
7061
7062		function MasterSliderPlugin ( element, options ) {
7063			this.element = element;
7064			this.$element = $(element);
7065			this.settings = $.extend( {}, defaults, options );
7066			this._defaults = defaults;
7067			this._name = pluginName;
7068			this.init();
7069		}
7070
7071		$.extend(MasterSliderPlugin.prototype, {
7072			init : function () {
7073
7074				var self = this;
7075
7076				// create new instance form Master Slider
7077				this._slider = new MasterSlider();
7078
7079				// add controls
7080				for ( var control in this.settings.controls ){
7081					this._slider.control(control, this.settings.controls[control]);
7082				}
7083
7084				this._slider.setup(this.$element, this.settings);
7085
7086				// override api eventdisaptcher method
7087				var _superDispatch = this._slider.api.dispatchEvent;
7088				this._slider.api.dispatchEvent = function(event){
7089					self.$element.trigger(event.type);
7090					_superDispatch.call(this, event);
7091				};
7092
7093			},
7094
7095			api : function() {
7096				return this._slider.api;
7097			},
7098
7099			slider : function() {
7100				return this._slider;
7101			}
7102
7103		});
7104
7105		$.fn[pluginName] = function ( options ) {
7106			var args = arguments,
7107				plugin = 'plugin_' + pluginName;
7108
7109			// Is the first parameter an object (options), or was omitted,
7110			// instantiate a new instance of the plugin.
7111			if (options === undefined || typeof options === 'object') {
7112				return this.each(function () {
7113
7114					// Only allow the plugin to be instantiated once,
7115					// so we check that the element has no plugin instantiation yet
7116					if (!$.data(this, plugin)) {
7117						$.data(this, plugin, new MasterSliderPlugin( this, options ));
7118					}
7119				});
7120
7121			// If the first parameter is a string and it doesn't start
7122			// with an underscore or "contains" the `init`-function,
7123			// treat this as a call to a public method.
7124			} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
7125
7126				// Cache the method call
7127				// to make it possible
7128				// to return a value
7129				var returns;
7130
7131				this.each(function () {
7132					var instance = $.data(this, plugin);
7133
7134					// Tests that there's already a plugin-instance
7135					// and checks that the requested public method exists
7136					if (instance instanceof MasterSliderPlugin && typeof instance[options] === 'function') {
7137
7138						// Call the method of our plugin instance,
7139						// and pass it the supplied arguments.
7140						returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
7141					}
7142
7143					// Map slider api functions to slider jq plugin
7144					if ( instance instanceof MasterSliderPlugin && typeof instance._slider.api[options] === 'function' ) {
7145						returns = instance._slider.api[options].apply( instance._slider.api, Array.prototype.slice.call( args, 1 ) );
7146					}
7147
7148					// Allow instances to be destroyed via the 'destroy' method
7149					if (options === 'destroy') {
7150					  $.data(this, plugin, null);
7151					}
7152				});
7153
7154				// If the earlier cached method
7155				// gives a value back return the value,
7156				// otherwise return this to preserve chainability.
7157				return returns !== undefined ? returns : this;
7158			}
7159		};
7160
7161})( jQuery, window, document );
7162
7163;(function ( $, window, document, undefined ) {
7164    "use strict";
7165
7166    /* ------------------------------------------------------------------------------ */
7167
7168    var sliderInstances = [];
7169    MasterSlider.addJQReadyErrorCheck = function ( slider ) {
7170        sliderInstances.push( slider );
7171    };
7172
7173    var _ready = $.fn.ready,
7174        _onerror = window.onerror;
7175
7176    // override jQuery ready
7177    $.fn.ready = function() {
7178
7179        // override window on load event
7180        window.onerror = function() {
7181
7182            if ( sliderInstances.length !== 0 ) {
7183                for ( var i = 0, l = sliderInstances.length; i !== l; i++ ) {
7184                    var slider = sliderInstances[i];
7185                    if ( !slider.initialized ) {
7186                        slider._docReady = true;
7187                        slider._init();
7188                    }
7189                }
7190            }
7191
7192            if ( _onerror ) {
7193                return _onerror.apply( this, arguments );
7194            }
7195
7196            return false;
7197        }
7198
7199        _ready.apply( this, arguments );
7200    };
7201
7202})(jQuery, window, document);
7203
7204/* ================== bin-debug/js/pro/views/ViewEvents.js =================== */
7205window.MSViewEvents = function (type, data){
7206	this.type = type;
7207	this.data = data;
7208};
7209
7210MSViewEvents.SWIPE_START      	= 'swipeStart';
7211MSViewEvents.SWIPE_END       	= 'swipeEnd';
7212MSViewEvents.SWIPE_MOVE			= 'swipeMove';
7213MSViewEvents.SWIPE_CANCEL   	= 'swipeCancel';
7214MSViewEvents.SCROLL 			= 'scroll';
7215MSViewEvents.CHANGE_START   	= 'slideChangeStart';
7216MSViewEvents.CHANGE_END	     	= 'slideChangeEnd';
7217
7218/* ================== bin-debug/js/pro/views/BasicView.js =================== */
7219;(function($){
7220
7221	"use strict";
7222
7223	window.MSBasicView = function(options){
7224
7225		this.options = {
7226			loop 			: false,
7227			dir  			: 'h',
7228			autoHeight 		: false,
7229			spacing			: 5,
7230			mouseSwipe		: true,
7231			swipe			: true,
7232			speed			: 17,
7233			minSlideSpeed	: 2,
7234			viewNum			: 20,
7235			critMargin		: 1
7236		};
7237
7238		$.extend(this.options , options);
7239
7240		this.dir		= this.options.dir;
7241		this.loop   	= this.options.loop;
7242		this.spacing	= this.options.spacing;
7243
7244		this.__width  = 0;
7245		this.__height = 0;
7246
7247		this.__cssProb 		= this.dir === 'h' ? 'left'    : 'top';
7248		this.__offset 		= this.dir === 'h' ? 'offsetLeft' : 'offsetTop';
7249		this.__dimension    = this.dir === 'h' ? '__width' : '__height';
7250
7251		this.__translate_end	= window._css3d ? ' translateZ(0px)' : '';
7252
7253		this.$slideCont	= $('<div></div>').addClass('ms-slide-container');
7254		this.$element 	= $('<div></div>').addClass('ms-view').addClass('ms-basic-view').append(this.$slideCont);
7255
7256		this.currentSlide 	= null;
7257		this.index 			= -1;
7258		this.slidesCount	= 0;
7259
7260		this.slides			= [];
7261		this.slideList		= []; // All of slides with added priority sort;
7262		this.viewSlidesList = [];
7263
7264		this.css3 			= window._cssanim;
7265		this.start_buffer = 0;
7266		this.firstslide_snap = 0;
7267
7268		this.slideChanged 	= false;
7269
7270		this.controller 	 = new Controller(0 , 0 , {
7271			snapping	     : true,
7272			snapsize		 : 100,
7273			paging			 : true,
7274			snappingMinSpeed : this.options.minSlideSpeed,
7275			friction		 : (100 - this.options.speed * 0.5) / 100,
7276			endless			 : this.loop
7277		});
7278
7279		this.controller.renderCallback(this.dir === 'h'? this._horizUpdate : this._vertiUpdate , this);
7280		this.controller.snappingCallback(this.__snapUpdate , this);
7281		this.controller.snapCompleteCallback(this.__snapCompelet , this);
7282
7283		averta.EventDispatcher.call(this);
7284	};
7285
7286	var p = MSBasicView.prototype;
7287
7288	/*-------------- METHODS --------------*/
7289
7290	p.__snapCompelet = function(snap , type){
7291		// if(this.loop && Math.abs(this.__contPos) > 20000){
7292		// 	this.__locateSlides();
7293		// 	this.gotoSlide(this.index , true);
7294		// }
7295		//
7296
7297		if ( !this.slideChanged ) {
7298			return;
7299		}
7300
7301		this.slideChanged = false;
7302
7303		this.__locateSlides();
7304		this.start_buffer = 0;
7305		this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_END));
7306	};
7307
7308	p.__snapUpdate = function(controller , snap , change){
7309
7310		if(this.loop){
7311			var target_index = this.index + change;
7312			this.updateLoop(target_index);
7313
7314			if(target_index >= this.slidesCount)	target_index = target_index - this.slidesCount;
7315			if(target_index <  0)					target_index = this.slidesCount + target_index;
7316
7317			this.index = target_index;
7318		}else{
7319			if(snap < 0 ||  snap >= this.slidesCount) return
7320			this.index = snap;
7321		}
7322
7323		this._checkCritMargins();
7324
7325		if($.browser.mozilla){
7326			this.slideList[this.index].$element[0].style.marginTop 	= '0.1px';
7327			if(this.currentSlide){
7328				this.currentSlide.$element[0].style.marginTop 	= '';
7329			}
7330		}
7331		var new_slide = this.slideList[this.index];
7332		if(new_slide === this.currentSlide)return;
7333		this.currentSlide = new_slide;
7334
7335		if ( this.autoUpdateZIndex ) {
7336			this.__updateSlidesZindex();
7337		}
7338
7339		this.slideChanged = true;
7340		this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START));
7341	};
7342
7343
7344	p._checkCritMargins = function(){
7345		if(this.normalMode) return;
7346
7347		var hlf 	= Math.floor(this.options.viewNum / 2),
7348			inView 	= this.viewSlidesList.indexOf(this.slideList[this.index]),
7349			size 	= (this[this.__dimension] + this.spacing),
7350			cm 		= this.options.critMargin;
7351
7352		if(this.loop){
7353			if(inView <= cm || inView >= this.viewSlidesList.length - cm){
7354				size *= (inView - hlf);
7355				this.__locateSlides(false ,  size + this.start_buffer );
7356				this.start_buffer += size;
7357			}
7358
7359			return;
7360		}
7361
7362		if( (inView < cm && this.index >= cm ) || (inView >= this.viewSlidesList.length - cm && this.index < this.slidesCount - cm)){
7363			this.__locateSlides(false);
7364		}
7365
7366	};
7367
7368
7369	p._vertiUpdate = function(controller , value){
7370
7371		this.__contPos = value;
7372		this.dispatchEvent(new MSViewEvents(MSViewEvents.SCROLL));
7373
7374		if(this.css3){
7375			this.$slideCont[0].style[window._jcsspfx + 'Transform'] = 'translateY('+-value+'px)' + this.__translate_end;
7376			return;
7377		}
7378
7379		this.$slideCont[0].style.top = -value + 'px';
7380
7381	};
7382
7383	p._horizUpdate = function(controller , value){
7384
7385		this.__contPos = value;
7386		this.dispatchEvent(new MSViewEvents(MSViewEvents.SCROLL));
7387
7388		if(this.css3) {
7389			this.$slideCont[0].style[window._jcsspfx + 'Transform'] = 'translateX('+-value+'px)'+ this.__translate_end;
7390			return;
7391		}
7392
7393		this.$slideCont[0].style.left = -value + 'px';
7394
7395	};
7396
7397
7398	p.__updateViewList = function(){
7399
7400		if(this.normalMode) {
7401			this.viewSlidesList = this.slides;
7402			return;
7403		}
7404
7405		var temp = this.viewSlidesList.slice();
7406
7407		// update view list
7408		this.viewSlidesList = [];
7409		var i = 0 , hlf = Math.floor(this.options.viewNum / 2) , l;
7410
7411		if(this.loop){
7412			for(; i !== this.options.viewNum ; i++)
7413				this.viewSlidesList.push(this.slides[this.currentSlideLoc - hlf + i]);
7414		}else{
7415			// before
7416			for(i = 0 ; i !== hlf && this.index - i !== -1 ; i++)
7417				this.viewSlidesList.unshift(this.slideList[this.index - i]);
7418			// after
7419			for(i = 1; i !== hlf && this.index + i !== this.slidesCount; i++)
7420				this.viewSlidesList.push(this.slideList[this.index + i]);
7421		}
7422
7423		for (i = 0 , l = temp.length ; i !== l ; i++)
7424			if( this.viewSlidesList.indexOf(temp[i]) === -1)
7425				temp[i].sleep();
7426
7427		temp = null;
7428
7429		if( this.currentSlide ) {
7430			this.__updateSlidesZindex();
7431		}
7432	};
7433
7434	p.__locateSlides = function(move , start){
7435
7436		this.__updateViewList();
7437
7438		start = !this.loop ? this.slides.indexOf(this.viewSlidesList[0]) * (this[this.__dimension] + this.spacing ) : start || 0;
7439
7440		// old method
7441		/*for(i = 0; i < this.slidesCount ; ++i){
7442			var pos =  i * (this[this.__dimension] + this.spacing);
7443
7444			this.slides[i].position = pos;
7445			this.slides[i].$element[0].style[this.__cssProb] =  pos + 'px';
7446		}*/
7447
7448		var l = this.viewSlidesList.length , slide;
7449
7450		for(var i = 0; i !== l ; i++){
7451			var pos =  start + i * (this[this.__dimension] + this.spacing );
7452			slide = this.viewSlidesList[i];
7453			slide.wakeup();
7454			slide.position = pos;
7455			slide.$element[0].style[this.__cssProb] =  pos + 'px';
7456		}
7457
7458		if(move !== false)this.controller.changeTo( this.slideList[this.index].position , false , null , null , false);
7459
7460	};
7461
7462	p.__createLoopList = function(){
7463		var return_arr = [];
7464		var i = 0,
7465			count = this.slidesCount / 2;
7466
7467		var before_count  = (this.slidesCount % 2 === 0)? count - 1	: Math.floor(count);
7468		var after_count	  = (this.slidesCount % 2 === 0)? count 	: Math.floor(count);
7469
7470		this.currentSlideLoc = before_count;
7471
7472		// before
7473		for(i = 1 ; i <= before_count ; ++i)
7474			return_arr.unshift(this.slideList[(this.index - i < 0)? this.slidesCount -  i + this.index: this.index - i]);
7475
7476		// current
7477		return_arr.push(this.slideList[this.index]);
7478
7479		// after
7480		for(i = 1; i <= after_count; ++i)
7481			return_arr.push(this.slideList[(this.index + i >= this.slidesCount)? this.index + i - this.slidesCount : this.index + i]);
7482
7483		return return_arr;
7484
7485	};
7486
7487	/*
7488	 * Calculate shortest distance from index to target.
7489	 * It will used in loop gesture.
7490	 *
7491	 * Negative values means left direction.
7492	 */
7493
7494	p.__getSteps = function(index , target){
7495		var right = (target < index)?  this.slidesCount - index + target : target - index;
7496		var left  = Math.abs(this.slidesCount - right);
7497
7498		return (right < left)? right : -left;
7499	};
7500
7501	p.__pushEnd = function(){
7502		var first_slide = this.slides.shift();
7503		var last_slide = this.slides[this.slidesCount - 2];
7504
7505		this.slides.push(first_slide);
7506
7507		if(!this.normalMode) return;
7508
7509		var pos = last_slide.$element[0][this.__offset] + this.spacing + this[this.__dimension];
7510		first_slide.$element[0].style[this.__cssProb] = pos + 'px';
7511		first_slide.position = pos;
7512	};
7513
7514	p.__pushStart = function(){
7515		var last_slide =  this.slides.pop();
7516		var first_slide = this.slides[0];
7517
7518		this.slides.unshift(last_slide);
7519
7520		if(!this.normalMode) return;
7521
7522		var pos = first_slide.$element[0][this.__offset] - this.spacing - this[this.__dimension];
7523		last_slide.$element[0].style[this.__cssProb] = pos + 'px';
7524		last_slide.position = pos;
7525	};
7526
7527	// @since 1.7.0
7528	// adds z-index to slides
7529	p.__updateSlidesZindex = function(){
7530
7531
7532		var slide,
7533			l = this.viewSlidesList.length,
7534			hlf = Math.floor( l/2 );
7535
7536		if( this.loop ){
7537			var loc = this.viewSlidesList.indexOf(this.currentSlide);
7538			for ( var i = 0; i!==l; i++ ){
7539				slide = this.viewSlidesList[i];
7540				this.viewSlidesList[i].$element.css('z-index', i<=loc ? i+1 : l-i);
7541			}
7542		} else {
7543
7544			var beforeNum = this.currentSlide.index - this.viewSlidesList[0].index,
7545				afterNum = l - beforeNum,
7546				diff = beforeNum - afterNum;
7547
7548			for ( var i = 0; i!==l; i++ ){
7549				this.viewSlidesList[i].$element.css('z-index', i<=beforeNum ? i+1 : l-i);
7550			}
7551
7552			this.currentSlide.$element.css('z-index', l);
7553		}
7554
7555	};
7556
7557	p.addSlide = function(slide){
7558		slide.view = this;
7559		this.slides.push(slide);
7560		this.slideList.push(slide);
7561		this.slidesCount++;
7562	};
7563
7564	p.appendSlide = function(slide){
7565		this.$slideCont.append(slide.$element);
7566	};
7567
7568	p.updateLoop = function(index){
7569		if(this.loop){
7570			var steps = this.__getSteps(this.index , index);
7571
7572			for(var i = 0 , l = Math.abs(steps) ; i < l ; ++ i){
7573				if(steps < 0) 	this.__pushStart();
7574				else			this.__pushEnd();
7575			}
7576		}
7577	};
7578
7579	p.gotoSlide = function(index , fast){
7580		this.updateLoop(index);
7581		this.index = index;
7582
7583		var target_slide = this.slideList[index];
7584
7585		this._checkCritMargins();
7586
7587		this.controller.changeTo( target_slide.position , !fast , null , null , false);
7588		if(target_slide === this.currentSlide) return;
7589		this.slideChanged = true;
7590		this.currentSlide = target_slide;
7591
7592		if ( this.autoUpdateZIndex ) {
7593			this.__updateSlidesZindex();
7594		}
7595
7596		this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START));
7597		if(fast)this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_END));
7598	};
7599
7600	p.next = function(checkLoop){
7601		if ( checkLoop && !this.loop && this.index + 1 >= this.slidesCount ) {
7602			this.controller.bounce(10);
7603			return;
7604		}
7605
7606		this.gotoSlide((this.index + 1 >= this.slidesCount)? 0 : this.index + 1);
7607	};
7608
7609	p.previous = function(checkLoop){
7610		if ( checkLoop && !this.loop && this.index - 1 < 0 ) {
7611			this.controller.bounce(-10);
7612			return;
7613		}
7614
7615		this.gotoSlide((this.index - 1 < 0)? this.slidesCount - 1 : this.index - 1);
7616	};
7617
7618	p.initVideoPlay = function(index) {
7619		var parentDom = this.$element.parents(".sitewidget-proddetail");
7620		if (parentDom.length && parentDom.find(".video_play_icon").length) {
7621			if (index === 0) {
7622					$(".proddetail-wrap .video_play_icon").show();
7623					if (parentDom.find("#prod_video").length > 0) {
7624						parentDom.find(".ms-container").hide();
7625						if ($(window).innerWidth() > 990) {
7626							parentDom.find(".prodetail-video-box-m").hide();
7627							parentDom.find(".master-slider .prodetail-video-box.prodetail-video-box-p").show();
7628						} else {
7629								parentDom.find(".prodetail-video-box-p").hide();
7630								parentDom.find(".master-slider .prodetail-video-box.prodetail-video-box-m").show();
7631						}
7632					}
7633			} else {
7634					var videoHei = parseFloat(parentDom.find("#prod_video").css("height"));
7635					$(".proddetail-wrap .video_play_icon").hide();
7636					if (videoHei > 2) {
7637							parentDom.find(".proddetail-picArea .proddetail-picshow .proddetail-showinner").css("height", (videoHei - 2) + "px");
7638					}
7639					parentDom.find(".proddetail-picArea").show();
7640					parentDom.find(".ms-container").show();
7641					parentDom.find(".prodetail-video-box").hide();
7642			};
7643		}
7644	};
7645
7646	/* --------------- Swipe control ------------------*/
7647
7648	p.setupSwipe = function(){
7649
7650		this.swipeControl = new averta.TouchSwipe(this.$element);
7651		this.swipeControl.swipeType = this.dir === 'h'? 'horizontal' : 'vertical';
7652		var that = this;
7653
7654		if(this.dir === 'h'){
7655			this.swipeControl.onSwipe = function(status){
7656				that.horizSwipeMove(status);
7657			};
7658		}else{
7659			this.swipeControl.onSwipe = function(status){
7660				that.vertSwipeMove(status);
7661			};
7662		}
7663
7664	};
7665
7666	p.vertSwipeMove = function(status){
7667		var phase = status.phase;
7668		if(phase === 'start'){
7669			this.controller.stop();
7670			this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_START, status));
7671		}else if(phase === 'move' && (!this.loop || Math.abs(this.currentSlide.position - this.controller.value + status.moveY ) < this.cont_size / 2)){
7672			this.controller.drag(status.moveY);
7673			this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_MOVE, status));
7674		}else if(phase === 'end' || phase === 'cancel'){
7675
7676            var speed = status.distanceY / status.duration * 50/3,
7677			    speedh = Math.abs( status.distanceY / status.duration * 50/3 );
7678
7679			if ( Math.abs(speed) > 0.1 && Math.abs(speed) >= speedh ){
7680				this.controller.push(-speed);
7681				if(speed > this.controller.options.snappingMinSpeed)
7682				this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_END, status));
7683			}else {
7684				this.controller.cancel();
7685				this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_CANCEL, status));
7686			}
7687
7688		}
7689	};
7690
7691	p.horizSwipeMove = function(status){
7692		var phase = status.phase;
7693
7694		if(phase === 'start'){
7695			this.controller.stop();
7696			this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_START, status));
7697		}else if(phase === 'move' && (!this.loop || Math.abs(this.currentSlide.position - this.controller.value + status.moveX ) < this.cont_size / 2)){
7698			this.controller.drag(status.moveX);
7699			this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_MOVE, status));
7700		}else if(phase === 'end' || phase === 'cancel'){
7701
7702			var speed = status.distanceX / status.duration * 50/3,
7703                speedv = Math.abs( status.distanceY / status.duration * 50/3 );
7704
7705			if ( Math.abs(speed) > 0.1 && Math.abs(speed) >= speedv ) {
7706				this.controller.push(-speed );
7707				if(speed > this.controller.options.snappingMinSpeed)
7708				this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_END, status));
7709			}else{
7710				this.controller.cancel();
7711				this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_CANCEL, status));
7712			}
7713
7714		}
7715	};
7716
7717	/* ------------------------------------------------*/
7718
7719	p.setSize = function(width , height , hard){
7720		if(this.lastWidth === width && height === this.lastHeight && !hard) return;
7721
7722		this.$element.width(width).height(height);
7723
7724		for(var i = 0; i < this.slidesCount ; ++i)
7725				this.slides[i].setSize(width , height , hard);
7726
7727		this.__width 	= width;
7728		this.__height 	= height;
7729
7730		if(this.__created){
7731			this.__locateSlides();
7732
7733			this.cont_size = (this.slidesCount - 1) * (this[this.__dimension] + this.spacing);
7734			if(!this.loop) 	this.controller._max_value = this.cont_size;
7735
7736			this.controller.options.snapsize = this[this.__dimension] + this.spacing;
7737			this.controller.changeTo(this.currentSlide.position , false , null , null , false );
7738			this.controller.cancel();
7739
7740			this.lastWidth = width;
7741			this.lastHeight = height;
7742		}
7743	};
7744
7745	p.create = function(index){
7746
7747		this.__created = true;
7748
7749		this.index = Math.min((index || 0), this.slidesCount - 1);
7750		this.lastSnap = this.index; // it will be used to check snap changed or not on snap complete
7751
7752		if(this.loop)
7753			this.slides = this.__createLoopList();
7754
7755		this.normalMode = this.slidesCount <= this.options.viewNum;
7756
7757		for(var i = 0; i < this.slidesCount ; ++i)
7758			this.slides[i].create();
7759
7760		this.__locateSlides();
7761
7762		this.controller.options.snapsize = this[this.__dimension] + this.spacing;
7763		if(!this.loop)	this.controller._max_value = (this.slidesCount - 1) * (this[this.__dimension] + this.spacing);
7764
7765		this.gotoSlide(this.index , true);
7766
7767		if(this.options.swipe && (window._touch || this.options.mouseSwipe))
7768			this.setupSwipe();
7769
7770	};
7771
7772	p.destroy = function(){
7773		if(!this.__created) return;
7774
7775		for(var i = 0; i < this.slidesCount ; ++i)
7776			this.slides[i].destroy();
7777
7778		this.slides = null;
7779		this.slideList = null;
7780		this.$element.remove();
7781
7782		this.controller.destroy();
7783		this.controller = null;
7784	};
7785
7786	averta.EventDispatcher.extend(p);
7787
7788	MSSlideController.registerView('basic' , MSBasicView);
7789
7790})(jQuery);
7791
7792/* ================== bin-debug/js/pro/views/WaveView.js =================== */
7793;(function($){
7794
7795	"use strict";
7796
7797	window.MSWaveView = function(options){
7798		MSBasicView.call(this , options);
7799		this.$element.removeClass('ms-basic-view').addClass('ms-wave-view');
7800		this.$slideCont.css(window._csspfx + 'transform-style' , 'preserve-3d');
7801
7802		// Auto update z index of slides
7803		// @since 1.7
7804		this.autoUpdateZIndex = true;
7805	};
7806
7807	MSWaveView.extend(MSBasicView);
7808	MSWaveView._3dreq = true;
7809	MSWaveView._fallback = MSBasicView;
7810
7811	var p  = MSWaveView.prototype;
7812	var _super  = MSBasicView.prototype;
7813
7814	/*-------------- METHODS --------------*/
7815
7816	/*p.__setSlideTransDuration = function(value){
7817		for(var i=0; i<this.slidesCount; ++i)
7818			this.slides[i].$element.css(window._csspfx + 'transition-duration' , value + 'ms');
7819	};*/
7820
7821	p._horizUpdate = function(controller , value){
7822
7823		_super._horizUpdate.call(this, controller , value);
7824
7825		var cont_scroll = -value;
7826		var slide_pos , slide , distance;
7827
7828		for(var i = 0; i < this.slidesCount; ++i){
7829			slide = this.slideList[i];
7830			//slide_pos = parseInt(slide.$element.css('left'));
7831			distance = -cont_scroll - slide.position;
7832			this.__updateSlidesHoriz(slide , distance);
7833		}
7834
7835	};
7836
7837	p._vertiUpdate = function(controller , value){
7838
7839		_super._vertiUpdate.call(this, controller , value);
7840
7841		var cont_scroll = -value;
7842		var slide_pos , slide , distance;
7843
7844		for(var i = 0; i < this.slidesCount; ++i){
7845			slide = this.slideList[i];
7846			//slide_pos = parseInt(slide.$element.css('left'));
7847			distance = -cont_scroll - slide.position;
7848			this.__updateSlidesVertic(slide , distance);
7849		}
7850
7851	};
7852
7853
7854	p.__updateSlidesHoriz = function(slide , distance){
7855		var value =  Math.abs(distance * 100 / this.__width);
7856		//var value2 = Math.min(value , 100);
7857	//	var sp = Math.min(100 , )
7858		//slide.$bg_img.css('opacity' , (100 -  Math.abs(distance * 120 / this.__width / 3)) / 100);
7859		slide.$element.css(window._csspfx + 'transform' , 'translateZ('+ -value * 3 +'px) rotateY(0.01deg)'/* translateX('+(distance < 0 ? 1 : -1) * -value * 5+'px)'*/);
7860	};
7861
7862	p.__updateSlidesVertic = function(slide , distance){
7863		this.__updateSlidesHoriz(slide , distance);
7864	};
7865
7866	/*
7867	p.swipeMove = function(status){
7868
7869		if(status.phase == 'start'){
7870			this.__setSlideTransDuration(0);
7871		}else if(status.phase == 'end'){
7872			this.__setSlideTransDuration(this.__slideDuration);
7873		}
7874
7875		_super.swipeMove.call(this , status);
7876	};
7877
7878	p.create = function(index){
7879		_super.create.call(this , index);
7880
7881		for(var i = 0; i<this.slidesCount ; ++i){
7882			this.slides[i].$element.css(window._csspfx + 'transition-property' , window._csspfx 		+ 'transform');
7883			this.slides[i].$element.css(window._csspfx + 'transition-duration' , this.slideDuration + 'ms');
7884		}
7885	};
7886	*/
7887	MSSlideController.registerView('wave' , MSWaveView);
7888})(jQuery);
7889
7890/* ================== bin-debug/js/pro/views/FadeBasicView.js =================== */
7891/**
7892 * Master Slider Fade Basic view
7893 * @author averta
7894 * @version 1.1
7895 * @package MS
7896 */
7897
7898;(function(){
7899
7900	window.MSFadeBasicView = function(options){
7901		MSWaveView.call(this , options);
7902		this.$element.removeClass('ms-wave-view').addClass('ms-fade-basic-view');
7903	};
7904
7905	MSFadeBasicView.extend(MSWaveView);
7906
7907	var p = MSFadeBasicView.prototype;
7908	var _super = MSFadeBasicView.prototype;
7909
7910	/*-------------- METHODS --------------*/
7911
7912	p.__updateSlidesHoriz = function(slide , distance){
7913		var value =  Math.abs(distance * 0.6 / this.__width);
7914		value = 1 - Math.min(value , 0.6);
7915		slide.$element.css('opacity' , value);
7916	};
7917
7918	p.__updateSlidesVertic = function(slide , distance){
7919		this.__updateSlidesHoriz(slide , distance);
7920	};
7921
7922	MSSlideController.registerView('fadeBasic' , MSFadeBasicView);
7923	MSWaveView._fallback = MSFadeBasicView;
7924})();
7925
7926/* ================== bin-debug/js/pro/views/FadeWaveView.js =================== */
7927/**
7928 * Master Slider Fade Wave View
7929 * @author averta
7930 * @version 1.0
7931 * @extends {MSWaveView}
7932 */
7933;(function(){
7934
7935	window.MSFadeWaveView = function(options){
7936		MSWaveView.call(this , options);
7937		this.$element.removeClass('ms-wave-view').addClass('ms-fade-wave-view');
7938	};
7939
7940	MSFadeWaveView.extend(MSWaveView);
7941	MSFadeWaveView._3dreq = true;
7942	MSFadeWaveView._fallback = MSFadeBasicView;
7943
7944	var p = MSFadeWaveView.prototype;
7945	var _super = MSWaveView.prototype;
7946
7947	/*-------------- METHODS --------------*/
7948
7949	p.__updateSlidesHoriz = function(slide , distance){
7950		var value =  Math.abs(distance * 100 / this.__width);
7951		 value = Math.min(value , 100);
7952		slide.$element.css('opacity' , 1-value/300);
7953		slide.$element[0].style[window._jcsspfx + 'Transform'] = 'scale('+ (1 - value/800) +') rotateY(0.01deg) ';
7954	};
7955
7956	p.__updateSlidesVertic = function(slide , distance){
7957		this.__updateSlidesHoriz(slide , distance);
7958	};
7959
7960	MSSlideController.registerView('fadeWave' , MSFadeWaveView);
7961
7962})();
7963
7964/* ================== bin-debug/js/pro/views/FlowView.js =================== */
7965;(function($){
7966
7967	"use strict";
7968
7969	window.MSFlowView = function(options){
7970		MSWaveView.call(this , options);
7971		this.$element.removeClass('ms-wave-view').addClass('ms-flow-view');
7972		//this.$slideCont.css(window._csspfx + 'transform-style' , 'preserve-3d');
7973	};
7974
7975	MSFlowView.extend(MSWaveView);
7976	MSFlowView._3dreq = true;
7977	MSFlowView._fallback = MSFadeBasicView;
7978
7979	var p  = MSFlowView.prototype;
7980	var _super  = MSWaveView.prototype;
7981
7982	/*-------------- METHODS --------------*/
7983
7984
7985	p.__updateSlidesHoriz = function(slide , distance){
7986		var value  =  Math.abs(distance * 100 / this.__width);
7987		var rvalue =  Math.min(value * 0.3 , 30) * (distance < 0 ? -1 : 1);
7988		var zvalue = value * 1.2;
7989		slide.$element[0].style[window._jcsspfx + 'Transform'] = 'translateZ('+ -zvalue*5 +'px) rotateY(' + rvalue + 'deg) ';
7990	};
7991
7992	p.__updateSlidesVertic  = function(slide , distance){
7993		var value  =  Math.abs(distance * 100 / this.__width);
7994		var rvalue =  Math.min(value * 0.3 , 30) * (distance < 0 ? -1 : 1);
7995		var zvalue = value * 1.2;
7996		slide.$element[0].style[window._jcsspfx + 'Transform'] = 'translateZ('+ -zvalue*5 +'px) rotateX(' + -rvalue + 'deg) ';
7997	};
7998
7999
8000	MSSlideController.registerView('flow' , MSFlowView);
8001})(jQuery);
8002
8003/* ================== bin-debug/js/pro/views/FadeFlowView.js =================== */
8004/**
8005 * Master Slider Fade Flow View
8006 * @author averta
8007 * @extends {MSWaveView}
8008 * @version 1.0
8009 */
8010;(function(){
8011
8012	window.MSFadeFlowView = function(options){
8013		MSWaveView.call(this , options);
8014		this.$element.removeClass('ms-wave-view').addClass('ms-fade-flow-view');
8015	};
8016
8017	MSFadeFlowView.extend(MSWaveView);
8018	MSFadeFlowView._3dreq = true;
8019
8020	var p = MSFadeFlowView.prototype;
8021	var _super = MSWaveView.prototype;
8022
8023	/*-------------- METHODS --------------*/
8024
8025	p.__calculate = function(distance){
8026		var value = Math.min(Math.abs(distance * 100 / this.__width) , 100);
8027		var rvalue =  Math.min(value * 0.5 , 50) * (distance < 0 ? -1 : 1);
8028		return {value: value, rvalue: rvalue};
8029	};
8030
8031	p.__updateSlidesHoriz = function(slide , distance){
8032		var clc = this.__calculate(distance);
8033		slide.$element.css('opacity' , 1-clc.value/300);
8034		console.log(window._jcsspfx + 'transform','translateZ('+ -clc.value +'px) rotateY(' + clc.rvalue + 'deg) ')
8035		slide.$element[0].style[window._jcsspfx + 'Transform'] = 'translateZ('+ -clc.value +'px) rotateY(' + clc.rvalue + 'deg) ';
8036	};
8037
8038	p.__updateSlidesVertic = function(slide , distance){
8039		var clc = this.__calculate(distance);
8040		slide.$element.css('opacity' , 1-clc.value/300);
8041		slide.$element[0].style[window._jcsspfx + 'Transform'] = 'translateZ('+ -clc.value +'px) rotateX(' + -clc.rvalue + 'deg) ';
8042	};
8043
8044	MSSlideController.registerView('fadeFlow' , MSFadeFlowView);
8045
8046})();
8047
8048/* ================== bin-debug/js/pro/views/MaskView.js =================== */
8049;(function($){
8050
8051	"use strict";
8052
8053	window.MSMaskView = function(options){
8054		MSBasicView.call(this , options);
8055		this.$element.removeClass('ms-basic-view').addClass('ms-mask-view');
8056
8057	};
8058
8059	MSMaskView.extend(MSBasicView);
8060
8061	var p  = MSMaskView.prototype;
8062	var _super  = MSBasicView.prototype;
8063
8064	/*-------------- METHODS --------------*/
8065
8066	p.addSlide = function(slide){ // OK
8067		slide.view = this;
8068
8069		slide.$frame = $('<div></div>').addClass('ms-mark-frame').append(slide.$element);
8070		slide.$element[0].style.position = 'relative';
8071		//this.$slideCont.append(slide.$frame);
8072		slide.autoAppend = false;
8073
8074		this.slides.push(slide);
8075		this.slideList.push(slide);
8076
8077		this.slidesCount++;
8078	};
8079
8080	p.setSize = function(width , height){
8081		var slider = this.slides[0].slider;
8082
8083		for(var i = 0; i < this.slidesCount ; ++i){
8084			this.slides[i].$frame[0].style.width  = width  + 'px';
8085			if(!slider.options.autoHeight)
8086				this.slides[i].$frame[0].style.height = height + 'px';
8087		}
8088
8089		_super.setSize.call(this , width , height);
8090	};
8091
8092	// p.__snapUpdate = function(controller , snap , change){
8093
8094	// 	if(this.loop){
8095	// 		var target_index = this.index + change;
8096	// 		this.updateLoop(target_index);
8097
8098	// 		if(target_index >= this.slidesCount)	target_index = target_index - this.slidesCount;
8099	// 		if(target_index <  0)					target_index = this.slidesCount + target_index;
8100
8101	// 		this.index = target_index;
8102	// 	}else{
8103	// 		if(snap < 0 ||  snap >= this.slidesCount) return
8104	// 		this.index = snap;
8105	// 	}
8106
8107
8108	// 	this._checkCritMargins();
8109
8110	// 	if($.browser.mozilla){
8111
8112	// 		this.slideList[this.index].$frame[0].style.marginTop 	= '0.1px';
8113	// 		this.slideList[this.index].$element[0].style.marginTop 	= '0.1px';
8114
8115	// 		if(this.currentSlide){
8116	// 			this.currentSlide.$frame[0].style.marginTop 	= '';
8117	// 			this.currentSlide.$element[0].style.marginTop 	= '';
8118	// 		}
8119	// 	}
8120
8121	// 		var new_slide = this.slideList[this.index];
8122	// 	if(new_slide === this.currentSlide)return;
8123
8124	// 	this.currentSlide = new_slide;
8125	// 	this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START));
8126	// };
8127
8128	p._horizUpdate = function(controller , value){
8129
8130		_super._horizUpdate.call(this , controller , value);
8131
8132		var i = 0;
8133
8134		if(this.css3) {
8135			for(i = 0 ; i < this.slidesCount ; ++i){
8136				this.slideList[i].$element[0].style[window._jcsspfx + 'Transform'] = 'translateX('+(value - this.slideList[i].position)+'px)'+ this.__translate_end;
8137			}
8138			return;
8139		}
8140
8141		for(i = 0 ; i < this.slidesCount ; ++i){
8142			this.slideList[i].$element[0].style.left = (value - this.slideList[i].position) + 'px';
8143		}
8144
8145	};
8146
8147	p._vertiUpdate = function(controller , value){
8148
8149		_super._vertiUpdate.call(this , controller , value);
8150
8151		var i = 0;
8152
8153		if(this.css3) {
8154			for(i = 0 ; i < this.slidesCount ; ++i){
8155				this.slideList[i].$element[0].style[window._jcsspfx + 'Transform'] = 'translateY('+(value - this.slideList[i].position)+'px)'+ this.__translate_end;
8156			}
8157			return;
8158		}
8159
8160		for(i = 0 ; i < this.slidesCount ; ++i){
8161			this.slideList[i].$element[0].style.top = (value - this.slideList[i].position) + 'px';
8162		}
8163
8164	};
8165
8166	p.__pushEnd = function(){ // OK
8167		var first_slide = this.slides.shift();
8168		var last_slide = this.slides[this.slidesCount - 2];
8169
8170		this.slides.push(first_slide);
8171		if(!this.normalMode) return;
8172
8173		var pos = last_slide.$frame[0][this.__offset] + this.spacing + this[this.__dimension];
8174		first_slide.$frame[0].style[this.__cssProb] = pos + 'px';
8175		first_slide.position = pos;
8176	};
8177
8178	p.__pushStart = function(){ // OK
8179
8180		var last_slide =  this.slides.pop();
8181		var first_slide = this.slides[0];
8182
8183		this.slides.unshift(last_slide);
8184
8185		if(!this.normalMode) return;
8186
8187		var pos = first_slide.$frame[0][this.__offset] - this.spacing - this[this.__dimension];
8188		last_slide.$frame[0].style[this.__cssProb] = pos + 'px';
8189		last_slide.position = pos;
8190	};
8191
8192	p.__updateViewList = function(){
8193
8194			if(this.normalMode) {
8195			this.viewSlidesList = this.slides;
8196			return;
8197		}
8198
8199		var temp = this.viewSlidesList.slice();
8200
8201		// update view list
8202		this.viewSlidesList = [];
8203		var i = 0 , hlf = Math.floor(this.options.viewNum / 2) , l;
8204
8205		if(this.loop){
8206			for(; i !== this.options.viewNum ; i++)
8207				this.viewSlidesList.push(this.slides[this.currentSlideLoc - hlf + i]);
8208		}else{
8209			// before
8210			for(i = 0 ; i !== hlf && this.index - i !== -1 ; i++)
8211				this.viewSlidesList.unshift(this.slideList[this.index - i]);
8212			// after
8213			for(i = 1; i !== hlf && this.index + i !== this.slidesCount; i++)
8214				this.viewSlidesList.push(this.slideList[this.index + i]);
8215		}
8216
8217		for (i = 0 , l = temp.length ; i !== l ; i++){
8218			if( this.viewSlidesList.indexOf(temp[i]) === -1){
8219				temp[i].sleep();
8220				temp[i].$frame.detach();
8221			}
8222		}
8223
8224		temp = null;
8225	};
8226
8227
8228	p.__locateSlides = function(move , start){ // OK
8229
8230		this.__updateViewList();
8231
8232		start = !this.loop ? this.slides.indexOf(this.viewSlidesList[0]) * (this[this.__dimension] + this.spacing ) : start || 0;
8233
8234		// Old method
8235		// for(var i = 0; i < this.slidesCount ; ++i){
8236		// 	var pos =  i * (this[this.__dimension] + this.spacing);
8237
8238		// 	this.slides[i].position = pos;
8239		// 	this.slides[i].$frame[0].style[this.__cssProb] =  pos + 'px';
8240		// }
8241
8242		var l = this.viewSlidesList.length , slide;
8243
8244		for(var i = 0; i !== l ; i++){
8245			var pos =  start + i * (this[this.__dimension] + this.spacing );
8246			slide = this.viewSlidesList[i];
8247
8248			this.$slideCont.append(slide.$frame);
8249			slide.wakeup(false);
8250			slide.position = pos;
8251
8252			if ( slide.selected && slide.bgvideo ) {
8253				try{
8254					slide.bgvideo.play();
8255				} catch (e) {}
8256			}
8257
8258			slide.$frame[0].style[this.__cssProb] =  pos + 'px';
8259		}
8260
8261		if(move !== false)this.controller.changeTo( this.slideList[this.index].position , false , null , null , false);
8262
8263	};
8264
8265	MSSlideController.registerView('mask' , MSMaskView);
8266})(jQuery);
8267
8268/* ================== bin-debug/js/pro/views/ParallaxMaskView.js =================== */
8269;(function($){
8270
8271	"use strict";
8272
8273	window.MSParallaxMaskView = function(options){
8274		MSMaskView.call(this , options);
8275		this.$element.removeClass('ms-basic-view').addClass('ms-parallax-mask-view');
8276
8277	};
8278
8279	MSParallaxMaskView.extend(MSMaskView);
8280	MSParallaxMaskView.parallaxAmount = 0.5;
8281
8282	var p  = MSParallaxMaskView.prototype;
8283	var _super  = MSBasicView.prototype;
8284
8285	/*-------------- METHODS --------------*/
8286
8287	p._horizUpdate = function(controller , value){
8288		_super._horizUpdate.call(this , controller , value);
8289
8290		var i = 0;
8291
8292		if(this.css3) {
8293			for(i = 0 ; i < this.slidesCount ; ++i){
8294				this.slideList[i].$element[0].style[window._jcsspfx + 'Transform'] = 'translateX('+(value - this.slideList[i].position) * MSParallaxMaskView.parallaxAmount +'px)'+ this.__translate_end;
8295			}
8296			return;
8297		}
8298
8299		for(i = 0 ; i < this.slidesCount ; ++i){
8300			this.slideList[i].$element[0].style.left = (value - this.slideList[i].position) * MSParallaxMaskView.parallaxAmount  + 'px';
8301		}
8302
8303	};
8304
8305	p._vertiUpdate = function(controller , value){
8306
8307		_super._vertiUpdate.call(this , controller , value);
8308
8309		var i = 0;
8310
8311		if(this.css3) {
8312			for(i = 0 ; i < this.slidesCount ; ++i){
8313				this.slideList[i].$element[0].style[window._jcsspfx + 'Transform'] = 'translateY('+(value - this.slideList[i].position) * MSParallaxMaskView.parallaxAmount +'px)'+ this.__translate_end;
8314			}
8315			return;
8316		}
8317
8318		for(i = 0 ; i < this.slidesCount ; ++i){
8319			this.slideList[i].$element[0].style.top = (value - this.slideList[i].position) * MSParallaxMaskView.parallaxAmount  + 'px';
8320		}
8321
8322	};
8323
8324
8325	MSSlideController.registerView('parallaxMask' , MSParallaxMaskView);
8326})(jQuery);
8327
8328/* ================== bin-debug/js/pro/views/FadeView.js =================== */
8329;(function($){
8330
8331	"use strict";
8332
8333	window.MSFadeView = function(options){
8334		MSBasicView.call(this , options);
8335		this.$element.removeClass('ms-basic-view').addClass('ms-fade-view');
8336		this.controller.renderCallback(this.__update , this);
8337	};
8338
8339	MSFadeView.extend(MSBasicView);
8340
8341	var p  = MSFadeView.prototype;
8342	var _super  = MSBasicView.prototype;
8343
8344	/*-------------- METHODS --------------*/
8345
8346	p.__update = function(controller , value){
8347		var cont_scroll = -value;
8348		var slide_pos , slide , distance;
8349
8350		for(var i = 0; i < this.slidesCount; ++i){
8351			slide = this.slideList[i];
8352			distance = -cont_scroll - slide.position;
8353			this.__updateSlides(slide , distance);
8354		}
8355	};
8356
8357	p.__updateSlides = function(slide , distance){
8358		var value =  Math.abs(distance / this[this.__dimension]);
8359		if(1 - value <= 0){
8360			slide.$element.fadeTo(0 , 0).css('visibility' , 'hidden');
8361		}else{
8362			slide.$element.fadeTo(0 , 1 - value).css('visibility' , '');
8363		}
8364	};
8365
8366	p.__locateSlides = function(move , start){
8367
8368		this.__updateViewList();
8369
8370		// Old method
8371		// for(var i = 0; i < this.slidesCount ; ++i){
8372		// 	this.slides[i].position = i * this[this.__dimension];
8373		// }
8374
8375		start = !this.loop ? this.slides.indexOf(this.viewSlidesList[0]) * (this[this.__dimension] + this.spacing ) : start || 0;
8376
8377		var l = this.viewSlidesList.length , slide;
8378
8379		for(var i = 0; i !== l ; i++){
8380			var pos =  start + i * this[this.__dimension];
8381			slide = this.viewSlidesList[i];
8382			slide.wakeup();
8383			slide.position = pos;
8384		}
8385
8386		if(move !== false)this.controller.changeTo( this.slideList[this.index].position , false , null , null , false);
8387
8388	};
8389
8390	p.__pushEnd = function(){
8391		var first_slide = this.slides.shift();
8392		var last_slide = this.slides[this.slidesCount - 2];
8393		this.slides.push(first_slide);
8394		first_slide.position = last_slide.position + this[this.__dimension];
8395	};
8396
8397	p.__pushStart = function(){
8398		var last_slide =  this.slides.pop();
8399		var first_slide = this.slides[0];
8400		this.slides.unshift(last_slide);
8401		last_slide.position = first_slide.position - this[this.__dimension];
8402	};
8403
8404	p.create = function(index){
8405		_super.create.call(this , index);
8406		this.spacing = 0;
8407		this.controller.options.minValidDist = 10;
8408	};
8409
8410	MSSlideController.registerView('fade' , MSFadeView);
8411})(jQuery);
8412
8413/* ================== bin-debug/js/pro/views/ScaleView.js =================== */
8414;(function($){
8415
8416	"use strict";
8417
8418	window.MSScaleView = function(options){
8419		MSBasicView.call(this , options);
8420		this.$element.removeClass('ms-basic-view').addClass('ms-scale-view');
8421		this.controller.renderCallback(this.__update , this);
8422	};
8423
8424	MSScaleView.extend(MSFadeView);
8425
8426	var p  = MSScaleView.prototype;
8427	var _super  = MSFadeView.prototype;
8428
8429	/*-------------- METHODS --------------*/
8430
8431	p.__updateSlides = function(slide , distance){
8432		var value =  Math.abs(distance / this[this.__dimension]),
8433			element = slide.$element[0];
8434
8435		if(1 - value <= 0){
8436			element.style.opacity = 0;
8437			element.style.visibility = 'hidden';
8438			element.style[window._jcsspfx + 'Transform'] = '';
8439		}else{
8440			element.style.opacity = 1 - value;
8441			element.style.visibility = '';
8442			element.style[window._jcsspfx + 'Transform'] = 'perspective(2000px) translateZ('+(value* (distance < 0 ? -0.5 : 0.5)) * 300+'px)';
8443		}
8444
8445	};
8446
8447	p.create = function(index){
8448		_super.create.call(this , index);
8449		this.controller.options.minValidDist = 0.03;
8450	};
8451
8452	MSSlideController.registerView('scale' , MSScaleView);
8453})(jQuery);
8454
8455/* ================== bin-debug/js/pro/views/StackView.js =================== */
8456/**
8457 * Master Slider Stack View
8458 * @package Master Slider jQuery
8459 * @author Averta
8460 */
8461
8462;(function($){
8463
8464	"use strict";
8465
8466	window.MSStackView = function(options){
8467		MSBasicView.call(this , options);
8468		this.$element.removeClass('ms-basic-view').addClass('ms-stack-view');
8469		this.controller.renderCallback(this.__update , this);
8470		this.autoUpdateZIndex = true;
8471	};
8472
8473	MSStackView.extend(MSFadeView);
8474	MSStackView._3dreq = true;
8475	MSStackView._fallback = MSFadeView;
8476
8477	var p  = MSStackView.prototype;
8478	var _super  = MSFadeView.prototype;
8479
8480	/*-------------- METHODS --------------*/
8481
8482	/**
8483	 * Updates slides z index
8484	 */
8485	p.__updateSlidesZindex = function () {
8486		var slide,
8487			l = this.viewSlidesList.length;
8488
8489		for ( var i = 0; i!==l; i++ ){
8490			slide = this.viewSlidesList[i];
8491			this.viewSlidesList[i].$element.css('z-index', l-i);
8492		}
8493
8494	};
8495
8496
8497	p.__updateSlides = function(slide , distance){
8498		var value =  Math.abs(distance / this[this.__dimension]),
8499			element = slide.$element[0];
8500
8501		if(1 - value <= 0){
8502			element.style.opacity = 1;
8503			element.style.visibility = 'hidden';
8504			element.style[window._jcsspfx + 'Transform'] = '';
8505		}else{
8506			element.style.visibility = '';
8507
8508			if ( distance < 0 ) {
8509				element.style[window._jcsspfx + 'Transform'] = 'perspective(2000px) translateZ('+ (value * -300) +'px)';
8510			} else {
8511				element.style[window._jcsspfx + 'Transform'] = this.__translate + '(' + ( -value * this[this.__dimension] ) +'px)';
8512			}
8513
8514		}
8515
8516	};
8517
8518
8519	p.create = function(index){
8520		_super.create.call(this , index);
8521		this.controller.options.minValidDist = 0.03;
8522		this.__translate = this.dir === 'h' ? 'translateX' : 'translateY';
8523	};
8524
8525
8526	MSSlideController.registerView('stack' , MSStackView);
8527})(jQuery);
8528
8529/* ================== bin-debug/js/pro/views/FocusView.js =================== */
8530/**
8531 * Master Slider Focus View
8532 * @version 1.1
8533 * @author averta
8534 * @package MS
8535 * @extends {MSFadeBasicView}
8536 */
8537
8538;(function(){
8539
8540	'use strict';
8541
8542	var perspective = 2000;
8543
8544	window.MSFocusView = function(options){
8545		MSWaveView.call(this , options);
8546		this.$element.removeClass('ms-wave-view').addClass('ms-focus-view');
8547		this.options.centerSpace = this.options.centerSpace  || 1;
8548	};
8549
8550	MSFocusView.extend(MSWaveView);
8551	MSFocusView._3dreq = true;
8552	MSFocusView._fallback = MSFadeBasicView;
8553
8554	var p = MSFocusView.prototype;
8555	var _super = MSWaveView.prototype;
8556
8557	/*-------------- METHODS --------------*/
8558
8559	p.__calcview = function(z , w){
8560		var a =  w / 2 * z / (z + perspective);
8561		return a * (z + perspective) / perspective;
8562	};
8563
8564	p.__updateSlidesHoriz = function(slide , distance){
8565		var value =  Math.abs(distance * 100 / this.__width);
8566		value = -Math.min(value , 100)* 15;
8567		slide.$element.css(window._csspfx + 'transform' , 'translateZ('+ (value + 1) +'px) rotateY(0.01deg) translateX('+ (distance < 0 ? 1 : -1) * (-this.__calcview(value, this.__width) * this.options.centerSpace )+'px)');
8568	};
8569
8570	p.__updateSlidesVertic = function(slide , distance){
8571		var value =  Math.abs(distance * 100 / this.__width);
8572		value = -Math.min(value , 100)* 15;
8573		slide.$element.css(window._csspfx + 'transform' , 'translateZ('+ (value + 1) +'px) rotateY(0.01deg) translateY('+ (distance < 0 ? 1 : -1) * (-this.__calcview(value, this.__width) * this.options.centerSpace )+'px)');
8574	};
8575
8576	M
8576SSlideController.registerView('focus' , MSFocusView);
8577
8578})();
8579
8580/* ================== bin-debug/js/pro/views/PartialWaveView.js =================== */
8581/**
8582 * Master Slider Partial Wave View
8583 * @version 1.0
8584 * @author averta
8585 * @extends {MSWaveView}
8586 */
8587
8588;(function(){
8589
8590	window.MSPartialWaveView = function(options){
8591		MSWaveView.call(this , options);
8592		this.$element.removeClass('ms-wave-view').addClass('ms-partial-wave-view');
8593	};
8594
8595	MSPartialWaveView.extend(MSWaveView);
8596	MSPartialWaveView._3dreq = true;
8597	MSPartialWaveView._fallback = MSFadeBasicView;
8598
8599	var p = MSPartialWaveView.prototype;
8600	var _super = MSWaveView.prototype;
8601
8602	/*-------------- METHODS --------------*/
8603
8604	p.__updateSlidesHoriz = function(slide , distance){
8605		var value =  Math.abs(distance * 100 / this.__width);
8606		if( slide.hasBG ){
8607			slide.$bg_img.css('opacity' , (100 -  Math.abs(distance * 120 / this.__width / 3)) / 100);
8608		}
8609		slide.$element.css(window._csspfx + 'transform' , 'translateZ('+ -value * 3 +'px) rotateY(0.01deg) translateX('+distance*0.75+'px)');
8610	};
8611
8612	p.__updateSlidesVertic = function(slide , distance){
8613		var value =  Math.abs(distance * 100 / this.__width);
8614		if( slide.hasBG ){
8615			slide.$bg_img.css('opacity' , (100 -  Math.abs(distance * 120 / this.__width / 3)) / 100);
8616		}
8617		slide.$element.css(window._csspfx + 'transform' , 'translateZ('+ -value * 3 +'px) rotateY(0.01deg) translateY('+distance*0.75+'px)');
8618	};
8619
8620	MSSlideController.registerView('partialWave' , MSPartialWaveView);
8621
8622})();
8623
8624/* ================== bin-debug/js/pro/views/BoxView.js =================== */
8625;(function($){
8626
8627    "use strict";
8628
8629    window.MSBoxView = function(options){
8630        MSBasicView.call(this , options);
8631        this.$element.removeClass('ms-basic-view').addClass('ms-box-view');
8632        this.controller.renderCallback(this.__update , this);
8633    };
8634
8635    MSBoxView.extend(MSFadeView);
8636    MSBoxView._3dreq = true;
8637
8638    var p  = MSBoxView.prototype;
8639    var _super  = MSFadeView.prototype;
8640
8641    /*-------------- METHODS --------------*/
8642
8643    p.__updateSlides = function(slide , distance){
8644        var value =  Math.abs(distance / this[this.__dimension]),
8645            element = slide.$element[0];
8646
8647        if(1 - value <= 0){
8648            //element.style.opacity = 0.5;
8649            element.style.visibility = 'hidden';
8650            element.style[window._jcsspfx + 'Transform'] = '';
8651        }else{
8652            //element.style.opacity = 0.5 + (1 - value) * 0.5;
8653            element.style.visibility = '';
8654            element.style[window._jcsspfx + 'Transform'] = 'rotate' + this._rotateDir + '('+(value* (distance < 0 ? 1 : -1)) * 90 * this._calcFactor +'deg)';
8655            element.style[window._jcsspfx + 'TransformOrigin'] = '50% 50% -' + ( slide[this.__dimension] / 2 ) + 'px' ;
8656            element.style.zIndex = Math.ceil((1 - value) * 2);
8657        }
8658    };
8659
8660    p.create = function(index){
8661        _super.create.call(this , index);
8662        this.controller.options.minValidDist = 0.03;
8663        this._rotateDir = this.options.dir === 'h' ? 'Y' : 'X';
8664        this._calcFactor = this.options.dir === 'h' ? 1 :  -1;
8665
8666    };
8667
8668    MSSlideController.registerView('box' , MSBoxView);
8669})(jQuery);
8670
8671/* ================== bin-debug/js/pro/uicontrols/BaseControl.js =================== */
8672;(function($){
8673
8674	"use strict";
8675
8676	var BaseControl = function(){
8677		this.options = {
8678			prefix:'ms-',
8679			autohide:true,
8680			overVideo:true,
8681			customClass: null
8682		};
8683	};
8684
8685	var p = BaseControl.prototype;
8686
8687	/* -------------------------------- */
8688
8689	p.slideAction = function(slide){
8690
8691	};
8692
8693	p.setup = function(){
8694		this.cont = this.options.insertTo ? $(this.options.insertTo) : this.slider.$controlsCont;
8695		if(!this.options.overVideo) this._hideOnvideoStarts();
8696
8697	};
8698
8699	p.checkHideUnder = function(){
8700		if(this.options.hideUnder){
8701			//this.slider.api.addEventListener(MSSliderEvent.RESIZE, this.onSliderResize, this);
8702			this.needsRealign = !this.options.insetTo && (this.options.align === 'left' || this.options.align === 'right') && this.options.inset === false;
8703			$(window).bind('resize', {that:this}, this.onResize);
8704			this.onResize();
8705
8706		}
8707	};
8708
8709	/**
8710	 * hide control if width of slider changes to lower that specified value [hideUnder]
8711	 * @since 1.5.7
8712	 * @protected
8713	 */
8714	p.onResize = function(event){
8715		var that = (event && event.data.that) || this;
8716		var w = window.innerWidth;
8717		if( w <= that.options.hideUnder && !that.detached ){
8718			that.hide(true);
8719			that.detached = true;
8720			that.onDetach();
8721		}else if( w >= that.options.hideUnder && that.detached ){
8722			that.detached = false;
8723			that.visible();
8724			that.onAppend();
8725		}
8726	};
8727
8728	p.create = function(){
8729		var that = this;
8730		if(this.options.autohide ){
8731
8732			this.hide(true);
8733
8734			this.slider.$controlsCont.mouseenter($.proxy(this._onMouseEnter, this))
8735									 .mouseleave($.proxy(this._onMouseLeave, this))
8736									 .mousedown($.proxy(this._onMouseDown, this));
8737
8738			if ( this.$element ) {
8739				this.$element.mouseenter($.proxy(this._onMouseEnter, this))
8740							 .mouseleave($.proxy(this._onMouseLeave, this))
8741							 .mousedown($.proxy(this._onMouseDown, this));
8742			}
8743
8744			$(document).mouseup($.proxy(this._onMouseUp, this));
8745		}
8746
8747		if ( this.options.align ) {
8748			this.$element.addClass('ms-align-' + this.options.align);
8749		}
8750
8751		// add custom class to control
8752		if ( this.options.customClass && this.$element ) {
8753			this.$element.addClass(this.options.customClass);
8754		}
8755	};
8756
8757	/**
8758	 * Mouse Enter Listener
8759	 * @since 2.2
8760	 */
8761	p._onMouseEnter = function(){
8762		if ( !this._disableAH && !this.mdown ){
8763			this.visible();
8764		}
8765
8766		this.mleave = false;
8767	};
8768
8769	/**
8770	 * Mouse Leave Listener
8771	 * @since 2.2
8772	 */
8773	p._onMouseLeave = function(){
8774		if ( !this.mdown ){
8775			this.hide();
8776		}
8777
8778		this.mleave = true;
8779	};
8780
8781	/**
8782	 * Mouse Down Listener
8783	 * @since 2.2
8784	 */
8785	p._onMouseDown = function(){
8786		this.mdown = true;
8787	};
8788
8789	/**
8790	 * Mouse Up Listener
8791	 * @since 2.2
8792	 */
8793	p._onMouseUp = function(){
8794		if ( this.mdown && this.mleave ) {
8795			this.hide();
8796		}
8797
8798		this.mdown = false;
8799	};
8800
8801	/**
8802	 * calls by the parent class [MSBaseControl] when the control element visibles [hideUnder option]
8803	 * @since 1.5.7
8804	 */
8805	p.onAppend = function(){
8806		if( this.needsRealign ){
8807			this.slider._realignControls();
8808		}
8809	};
8810
8811	/**
8812	 * calls by the parent class [MSBaseControl] when the control element visibles [hideUnder option]
8813	 * @since 1.5.7
8814	 */
8815	p.onDetach = function(){
8816		if( this.needsRealign ){
8817			this.slider._realignControls();
8818		}
8819	};
8820
8821	p._hideOnvideoStarts = function(){
8822		var that = this;
8823		this.slider.api.addEventListener(MSSliderEvent.VIDEO_PLAY , function(){
8824   			 that._disableAH = true;
8825   			 that.hide();
8826		});
8827
8828		this.slider.api.addEventListener(MSSliderEvent.VIDEO_CLOSE , function(){
8829		     that._disableAH = false;
8830   			 that.visible();
8831		});
8832	};
8833
8834	p.hide = function(fast){
8835		if(fast){
8836			this.$element.css('opacity' , 0);
8837			this.$element.css('display' , 'none');
8838		} else {
8839			clearTimeout(this.hideTo);
8840			var $element = this.$element;
8841			this.hideTo = setTimeout(function(){
8842				CTween.fadeOut($element , 400 , false);
8843			}, 20);
8844		}
8845
8846		this.$element.addClass('ms-ctrl-hide');
8847	};
8848
8849	p.visible = function(){
8850		if(this.detached) return;
8851		clearTimeout(this.hideTo);
8852		this.$element.css('display' , '');
8853		CTween.fadeIn(this.$element , 400 , false);
8854		this.$element.removeClass('ms-ctrl-hide');
8855	};
8856
8857	p.destroy = function(){
8858
8859		if(this.options && this.options.hideUnder){
8860			//this.slider.api.removeEventListener(MSSliderEvent.RESIZE, this.onResize, this);
8861			$(window).unbind('resize', this.onResize);
8862		}
8863	};
8864
8865	window.BaseControl = BaseControl;
8866
8867})(jQuery);
8868
8869/* ================== bin-debug/js/pro/uicontrols/Arrows.js =================== */
8870;(function($){
8871
8872	"use strict";
8873
8874	var MSArrows = function(options){
8875		BaseControl.call(this);
8876		$.extend(this.options , options);
8877	};
8878
8879	MSArrows.extend(BaseControl);
8880
8881	var p = MSArrows.prototype;
8882	var _super = BaseControl.prototype;
8883
8884	/* -------------------------------- */
8885
8886	p.setup = function(){
8887		var that = this;
8888
8889		this.$next = $('<div></div>')
8890					.addClass(this.options.prefix + 'nav-next')
8891					//.appendTo(this.cont)
8892					.bind('click' , function(){
8893							that.slider.api.next(true);
8894					});
8895
8896
8897		this.$prev = $('<div></div>')
8898					.addClass(this.options.prefix + 'nav-prev')
8899					//.appendTo(this.cont)
8900					.bind('click' , function(){
8901						that.slider.api.previous(true);
8902					});
8903
8904		_super.setup.call(this);
8905
8906		this.cont.append(this.$next);
8907		this.cont.append(this.$prev);
8908
8909		this.checkHideUnder(); // super method
8910	};
8911
8912	p.hide = function(fast){
8913		if(fast){
8914			this.$prev.css('opacity' , 0).css('display', 'none');
8915			this.$next.css('opacity' , 0).css('display', 'none');
8916			return;
8917		}
8918
8919		CTween.fadeOut(this.$prev , 400 , false);
8920		CTween.fadeOut(this.$next , 400 , false);
8921
8922		this.$prev.addClass('ms-ctrl-hide');
8923		this.$next.addClass('ms-ctrl-hide');
8924	};
8925
8926	p.visible = function(){
8927		if(this.detached) return;
8928		CTween.fadeIn(this.$prev , 400 );
8929		CTween.fadeIn(this.$next , 400 );
8930		this.$prev.removeClass('ms-ctrl-hide').css('display', '');
8931		this.$next.removeClass('ms-ctrl-hide').css('display', '');
8932	};
8933
8934	p.destroy = function(){
8935		_super.destroy();
8936		this.$next.remove();
8937		this.$prev.remove();
8938	};
8939
8940	window.MSArrows = MSArrows;
8941	MSSlideController.registerControl('arrows' , MSArrows);
8942})(jQuery);
8943
8944/* ================== bin-debug/js/pro/uicontrols/Thumblist.js =================== */
8945;(function($){
8946
8947	"use strict";
8948
8949	var MSThumblist = function(options){
8950		BaseControl.call(this);
8951
8952		// default options
8953		this.options.dir 	= 'h';
8954		this.options.wheel	= options.dir === 'v';
8955		this.options.arrows = false;
8956		this.options.speed  = 17;
8957		this.options.align  = null;
8958		this.options.inset = false;
8959		this.options.margin = 10;
8960		this.options.space = 10;
8961		this.options.width = 100;
8962		this.options.height = 100;
8963		this.options.type = 'thumbs'; // tabs
8964		this.options.hover = false;
8965
8966
8967		$.extend(this.options , options);
8968
8969		this.thumbs = [];
8970		this.index_count = 0;
8971
8972		this.__dimen    		= this.options.dir === 'h' ? 'width' : 'height';
8973		this.__alignsize 		= this.options.dir === 'h' ? 'height' : 'width';
8974		this.__jdimen    		= this.options.dir === 'h' ? 'outerWidth' : 'outerHeight';
8975		this.__pos				= this.options.dir === 'h' ? 'left'	 : 'top';
8976
8977		this.click_enable = true;
8978
8979	};
8980
8981	MSThumblist.extend(BaseControl);
8982
8983	var p = MSThumblist.prototype;
8984	var _super = BaseControl.prototype;
8985
8986	/* -------------------------------- */
8987
8988	p.setup = function(){
8989		this.$element = $('<div></div>')
8990						.addClass(this.options.prefix + 'thumb-list');
8991
8992		if(this.options.type === 'tabs'){
8993			this.$element.addClass(this.options.prefix + 'tabs');
8994		}
8995
8996		this.$element.addClass('ms-dir-' + this.options.dir);
8997
8998		_super.setup.call(this);
8999
9000
9001		if( this.slider.$controlsCont === this.cont ){
9002			this.$element.appendTo(this.slider.$element);
9003		}else{
9004			this.$element.appendTo(this.cont);
9005		}
9006
9007		this.$thumbscont = $('<div></div>')
9008						.addClass('ms-thumbs-cont')
9009						.appendTo(this.$element);
9010
9011		if(this.options.arrows){
9012			var that = this;
9013			this.$fwd = $('<div></div>').addClass('ms-thumblist-fwd').appendTo(this.$element).click(function(){that.controller.push(-15);});
9014			this.$bwd = $('<div></div>').addClass('ms-thumblist-bwd').appendTo(this.$element).click(function(){that.controller.push(15);});
9015		}
9016
9017		// align control
9018		if( !this.options.insetTo && this.options.align ){
9019			var align = this.options.align;
9020			if( this.options.inset ){
9021				this.$element.css(align, this.options.margin );
9022			}else if( align === 'top' ){
9023				this.$element.detach().prependTo(this.slider.$element).css({
9024					'margin-bottom': this.options.margin,
9025					'position': 'relative'
9026				});
9027			}else if( align === 'bottom' ){
9028				this.$element.css({
9029					'margin-top': this.options.margin,
9030					'position': 'relative'
9031				});
9032			}else{
9033				this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE, this.align, this);
9034				this.align();
9035			}
9036
9037			if( this.options.dir === 'v' ){
9038				this.$element.width(this.options.width);
9039			}else{
9040				this.$element.height(this.options.height);
9041			}
9042		}
9043
9044		this.checkHideUnder(); // super method
9045
9046	};
9047
9048	/**
9049	 * calls by "RESERVED_SPACE_CHANGE" realigns the control in slider
9050	 * @since 1.5.7
9051	 */
9052	p.align = function(event){
9053		if( this.detached ){
9054			return;
9055		}
9056		var align = this.options.align;
9057		var pos = this.slider.reserveSpace(align, this.options[this.__alignsize] + this.options.margin * 2);
9058		this.$element.css(align, -pos - this.options[this.__alignsize] - this.options.margin);
9059	};
9060
9061	p.slideAction = function(slide){
9062		var thumb_ele = slide.$element.find('.ms-thumb');
9063		var that = this;
9064		var thumb_frame = $('<div></div>')
9065					.addClass('ms-thumb-frame')
9066					.append(thumb_ele)
9067					.append($('<div class="ms-thumb-ol"></div>'))
9068					.bind(this.options.hover? 'hover' : 'click' , function(){that.changeSlide(thumb_frame);});
9069
9070		if( this.options.align ){
9071			thumb_frame.width(this.options.width - (this.options.dir === 'v' && this.options.type === 'tabs' ? 12 : 0))  // less arrow size 12px
9072					.height(this.options.height)
9073					.css('margin-'+(this.options.dir === 'v' ? 'bottom' : 'right'), this.options.space);
9074		}
9075
9076		thumb_frame[0].index =  this.index_count ++;
9077
9078		this.$thumbscont.append(thumb_frame);
9079
9080		// Added Fillmode support to thumblist
9081		// @since 1.6.0
9082		if( this.options.fillMode && thumb_ele.is('img') ){
9083			var aligner = new window.MSAligner(this.options.fillMode, thumb_frame, thumb_ele);
9084			thumb_ele[0].aligner = aligner;
9085			thumb_ele.one('load', function(e){
9086				var $this = $(this);
9087				$this[0].aligner.init($this.width(), $this.height());
9088				$this[0].aligner.align();
9089			}).each($.jqLoadFix);
9090		}
9091
9092		if($.browser.msie)
9093				thumb_ele.on('dragstart', function(event) { event.preventDefault(); }); // disable native dragging
9094
9095		this.thumbs.push(thumb_frame);
9096	};
9097
9098	p.create = function(){
9099		_super.create.call(this);
9100
9101		this.__translate_end	= window._css3d ? ' translateZ(0px)' : '';
9102		this.controller 	 = new Controller(0 , 0 , {
9103			//snapping	     : true,
9104			snappingMinSpeed : 2,
9105			friction		 : (100 - this.options.speed * 0.5) / 100
9106		});
9107
9108		this.controller.renderCallback(this.options.dir === 'h'? this._hMove : this._vMove , this);
9109		//this.controller.snappingCallback(this.__snapUpdate , this);
9110		//this.controller.snapCompleteCallback(this.__snapCompelet , this);
9111
9112		var that = this;
9113		this.resize_listener = function(){that.__resize();};
9114		$(window).bind('resize', this.resize_listener);
9115
9116		this.thumbSize = this.thumbs[0][this.__jdimen](true);
9117
9118		this.setupSwipe();
9119		this.__resize();
9120
9121		var that = this;
9122		if(this.options.wheel){
9123
9124			this.wheellistener = function(event){
9125				var e = window.event || event.orginalEvent || event;
9126				var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));
9127				that.controller.push(-delta*10);
9128				return false;
9129			};
9130
9131			if($.browser.mozilla) this.$element[0].addEventListener('DOMMouseScroll' , this.wheellistener);
9132			else this.$element.bind('mousewheel', this.wheellistener);
9133		}
9134
9135		this.slider.api.addEventListener(MSSliderEvent.CHANGE_START , this.update , this);
9136		this.slider.api.addEventListener(MSSliderEvent.HARD_UPDATE, this.realignThumbs, this);
9137		this.cindex =  this.slider.api.index();
9138		this.select(this.thumbs[this.cindex]);
9139
9140
9141	};
9142
9143	p._hMove = function(controller , value){
9144		this.__contPos = value;
9145		if(window._cssanim) {
9146			this.$thumbscont[0].style[window._jcsspfx + 'Transform'] = 'translateX('+-value+'px)'+ this.__translate_end;
9147			return;
9148		}
9149		this.$thumbscont[0].style.left = -value + 'px';
9150	};
9151
9152	p._vMove = function(controller , value){
9153		this.__contPos = value;
9154		if(window._cssanim) {
9155			this.$thumbscont[0].style[window._jcsspfx + 'Transform'] = 'translateY('+-value+'px)'+ this.__translate_end;
9156			return;
9157		}
9158		this.$thumbscont[0].style.top = -value + 'px';
9159	};
9160
9161	p.setupSwipe = function(){
9162		this.swipeControl = new averta.TouchSwipe(this.$element);
9163		this.swipeControl.swipeType = this.options.dir === 'h'? 'horizontal' : 'vertical';
9164
9165		var that = this;
9166		if(this.options.dir === 'h')
9167			this.swipeControl.onSwipe = function(status){that.horizSwipeMove(status);};
9168		else
9169			this.swipeControl.onSwipe = function(status){that.vertSwipeMove(status);};
9170	};
9171
9172	p.vertSwipeMove = function(status){
9173		if(this.dTouch) return;
9174		var phase = status.phase;
9175		if(phase === 'start')
9176			this.controller.stop();
9177		else if(phase === 'move')
9178			this.controller.drag(status.moveY);
9179		else if(phase === 'end' || phase === 'cancel'){
9180			var speed = Math.abs(status.distanceY / status.duration * 50/3);
9181			if(speed > 0.1){
9182				this.controller.push(-status.distanceY / status.duration * 50/3 );
9183			}else{
9184				this.click_enable = true;
9185				this.controller.cancel();
9186			}
9187		}
9188	};
9189
9190	p.horizSwipeMove = function(status){
9191		if(this.dTouch) return;
9192		var phase = status.phase;
9193		if(phase === 'start'){
9194			this.controller.stop();
9195			this.click_enable = false;
9196		}else if(phase === 'move')
9197			this.controller.drag(status.moveX);
9198		else if(phase === 'end' || phase === 'cancel'){
9199			var speed = Math.abs(status.distanceX / status.duration * 50/3);
9200			if(speed > 0.1){
9201				 this.controller.push(-status.distanceX / status.duration * 50/3 );
9202			}else {
9203				this.click_enable = true;
9204				this.controller.cancel();
9205			}
9206		}
9207	};
9208
9209	p.update = function(){
9210		var nindex = this.slider.api.index();
9211		if(this.cindex === nindex) return;
9212
9213		if(this.cindex != null)this.unselect(this.thumbs[this.cindex]);
9214		this.cindex = nindex;
9215		this.select(this.thumbs[this.cindex]);
9216
9217		if(!this.dTouch)this.updateThumbscroll();
9218	};
9219
9220	p.realignThumbs = function () {
9221		this.$element.find('.ms-thumb').each( function (index, thumb) {
9222			if ( thumb.aligner ) {
9223				thumb.aligner.align();
9224			}
9225		} );
9226	};
9227
9228	p.updateThumbscroll = function(){
9229		var thumb_size;
9230
9231		var pos = this.thumbSize * this.cindex;
9232
9233		if(this.controller.value == NaN) this.controller.value = 0;
9234
9235		if(pos -  this.controller.value < 0){
9236			this.controller.gotoSnap(this.cindex , true);
9237			return;
9238		}
9239
9240		if(pos + this.thumbSize - this.controller.value > this.$element[this.__dimen]()){
9241			var first_snap = this.cindex - Math.floor(this.$element[this.__dimen]() / this.thumbSize) + 1;
9242			this.controller.gotoSnap(first_snap , true);
9243			return;
9244		}
9245	};
9246
9247	p.changeSlide = function(thumb){
9248		if(!this.click_enable || this.cindex === thumb[0].index) return;
9249		this.slider.api.gotoSlide(thumb[0].index);
9250	};
9251
9252	p.unselect = function(ele){
9253		ele.removeClass('ms-thumb-frame-selected');
9254	};
9255
9256	p.select = function(ele){
9257		ele.addClass('ms-thumb-frame-selected');
9258	};
9259
9260	p.__resize = function(){
9261		var size = this.$element[this.__dimen]();
9262
9263		if(this.ls === size) return;
9264
9265		this.ls = size;
9266
9267		this.thumbSize = this.thumbs[0][this.__jdimen](true);
9268		var len = this.slider.api.count() * this.thumbSize;
9269		this.$thumbscont[0].style[this.__dimen] = len + 'px';
9270
9271		if(len <= size){
9272			this.dTouch = true;
9273			this.controller.stop();
9274			this.$thumbscont[0].style[this.__pos] = (size - len)*.5 + 'px';
9275			this.$thumbscont[0].style[window._jcsspfx + 'Transform'] = '';
9276		}else{
9277			this.dTouch = false;
9278			this.click_enable = true;
9279			this.$thumbscont[0].style[this.__pos] = '';
9280			this.controller._max_value = len - size;
9281			this.controller.options.snapsize = this.thumbSize;
9282			this.updateThumbscroll();
9283		}
9284
9285	};
9286
9287	p.destroy = function(){
9288		_super.destroy();
9289
9290		if(this.options.wheel){
9291			if($.browser.mozilla) this.$element[0].removeEventListener('DOMMouseScroll' , this.wheellistener);
9292			else this.$element.unbind('mousewheel', this.wheellistener);
9293			this.wheellistener = null;
9294		}
9295
9296		$(window).unbind('resize', this.resize_listener);
9297
9298		this.$element.remove();
9299
9300		this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE, this.align, this);
9301		this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START , this.update , this);
9302	};
9303
9304	window.MSThumblist = MSThumblist;
9305	MSSlideController.registerControl('thumblist' , MSThumblist);
9306
9307})(jQuery);
9308
9309/* ================== bin-debug/js/pro/uicontrols/Bullets.js =================== */
9310;(function($){
9311
9312	"use strict";
9313
9314	var MSBulltes = function(options){
9315		BaseControl.call(this);
9316
9317		this.options.dir 	= 'h';
9318		this.options.inset  = true;
9319		this.options.margin = 10;
9320		this.options.space = 10;
9321
9322
9323		$.extend(this.options , options);
9324
9325		this.bullets = [];
9326
9327	};
9328
9329	MSBulltes.extend(BaseControl);
9330
9331	var p = MSBulltes.prototype;
9332	var _super = BaseControl.prototype;
9333
9334	/* -------------------------------- */
9335
9336	p.setup = function(){
9337		_super.setup.call(this);
9338
9339		this.$element = $('<div></div>')
9340						.addClass(this.options.prefix + 'bullets')
9341						.addClass('ms-dir-' + this.options.dir)
9342						.appendTo(this.cont);
9343
9344		this.$bullet_cont = $('<div></div>')
9345						.addClass('ms-bullets-count')
9346						.appendTo(this.$element);
9347
9348		if( !this.options.insetTo && this.options.align ){
9349
9350			var align = this.options.align;
9351			if( this.options.inset ){
9352				this.$element.css(align, this.options.margin);
9353			}
9354
9355		}
9356
9357		this.checkHideUnder(); // super method
9358	};
9359
9360	p.create = function(){
9361		_super.create.call(this);
9362		var that = this;
9363
9364		this.slider.api.addEventListener(MSSliderEvent.CHANGE_START , this.update , this);
9365		this.cindex =  this.slider.api.index();
9366		for(var i = 0; i < this.slider.api.count(); ++i){
9367			var bullet = $('<div></div>').addClass('ms-bullet');
9368			bullet[0].index = i;
9369			bullet.on('click', function(){that.changeSlide(this.index);});
9370			this.$bullet_cont.append(bullet);
9371			this.bullets.push(bullet);
9372			if( this.options.dir === 'h' ) {
9373				bullet.css('margin', this.options.space/2);
9374			}else {
9375				bullet.css('margin', this.options.space);
9376			}
9377		}
9378
9379		if(this.options.dir === 'h') {
9380			this.$element.width(bullet.outerWidth(true) * this.slider.api.count());
9381		} else {
9382			this.$element.css('margin-top', -this.$element.outerHeight(true)/2);
9383		}
9384
9385		this.select(this.bullets[this.cindex]);
9386	};
9387
9388	p.update = function(){
9389		var nindex = this.slider.api.index();
9390		if(this.cindex === nindex) return;
9391
9392		if(this.cindex != null)this.unselect(this.bullets[this.cindex]);
9393		this.cindex = nindex;
9394		this.select(this.bullets[this.cindex]);
9395	};
9396
9397	p.changeSlide = function(index){
9398		if(this.cindex === index) return;
9399		this.slider.api.gotoSlide(index);
9400	};
9401
9402	p.unselect = function(ele){
9403		ele.removeClass('ms-bullet-selected');
9404	};
9405
9406	p.select = function(ele){
9407		ele.addClass('ms-bullet-selected');
9408	};
9409
9410	p.destroy = function(){
9411		_super.destroy();
9412		this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START , this.update , this);
9413		this.$element.remove();
9414	};
9415
9416	window.MSBulltes = MSBulltes;
9417
9418	MSSlideController.registerControl('bullets' , MSBulltes);
9419
9420})(jQuery);
9421
9422/* ================== bin-debug/js/pro/uicontrols/Scrollbar.js =================== */
9423;(function($){
9424
9425	"use strict";
9426
9427	var MSScrollbar = function(options){
9428		BaseControl.call(this);
9429
9430		this.options.dir 		= 'h';
9431		this.options.autohide	= true;
9432		this.options.width 		= 4;
9433		this.options.color 		= '#3D3D3D';
9434		this.options.margin		= 10;
9435
9436		$.extend(this.options , options);
9437		this.__dimen    		= this.options.dir === 'h' ? 'width' : 'height';
9438		this.__jdimen    		= this.options.dir === 'h' ? 'outerWidth' : 'outerHeight';
9439		this.__pos				= this.options.dir === 'h' ? 'left'	 : 'top';
9440		this.__translate_end	= window._css3d ? ' translateZ(0px)' : '';
9441		this.__translate_start	= this.options.dir === 'h' ? ' translateX(' : 'translateY(';
9442	};
9443
9444	MSScrollbar.extend(BaseControl);
9445
9446	var p = MSScrollbar.prototype;
9447	var _super = BaseControl.prototype;
9448
9449	/* -------------------------------- */
9450
9451	p.setup = function(){
9452
9453		this.$element = $('<div></div>')
9454						.addClass(this.options.prefix + 'sbar')
9455						.addClass('ms-dir-' + this.options.dir);
9456
9457		_super.setup.call(this);
9458
9459		if( this.slider.$controlsCont === this.cont ){
9460			this.$element.appendTo(this.slider.$element);
9461		}else{
9462			this.$element.appendTo(this.cont);
9463		}
9464
9465		this.$bar = $('<div></div>')
9466					.addClass(this.options.prefix + 'bar')
9467					.appendTo(this.$element);
9468
9469		if(this.slider.options.loop){
9470			console.log('WARNING, MSScrollbar cannot work with looped slider.');
9471			this.disable = true;
9472			this.$element.remove();
9473		}
9474
9475		/**
9476		 * align control
9477		 * @since 1.5.7
9478		 */
9479		// change width
9480		if( this.options.dir === 'v' ){
9481			this.$bar.width(this.options.width);
9482		} else {
9483			this.$bar.height(this.options.width);
9484		}
9485
9486		// change color
9487		this.$bar.css('background-color', this.options.color);
9488
9489		if( !this.options.insetTo && this.options.align ){
9490
9491			// reset old versions styles
9492			if( this.options.dir === 'v' ){
9493				this.$element.css({
9494					right:'auto',
9495					left:'auto'
9496				});
9497			} else {
9498				this.$element.css({
9499					top:'auto',
9500					bottom:'auto'
9501				});
9502			}
9503
9504			var align = this.options.align;
9505			if( this.options.inset ){
9506				this.$element.css(align, this.options.margin );
9507			}else if( align === 'top' ){
9508				this.$element.prependTo(this.slider.$element).css({
9509					'margin-bottom': this.options.margin,
9510					'position': 'relative'
9511				});
9512			}else if( align === 'bottom' ){
9513				this.$element.css({
9514					'margin-top': this.options.margin,
9515					'position': 'relative'
9516				});
9517			}else{
9518				this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE, this.align, this);
9519				this.align();
9520			}
9521		}
9522
9523		this.checkHideUnder(); // super method
9524	};
9525
9526	/**
9527	 * calls by "RESERVED_SPACE_CHGANE" realigns the control in slider
9528	 * @since 1.5.7
9529	 */
9530	p.align = function(event){
9531		if( this.detached ){
9532			return;
9533		}
9534
9535		var align = this.options.align;
9536		var pos = this.slider.reserveSpace(align, this.options.margin * 2 + this.options.width);
9537		this.$element.css(align, -pos - this.options.margin - this.options.width);
9538	};
9539
9540	p.create = function(){
9541
9542		if(this.disable) return;
9543
9544		//_super.create.call(this);
9545		var that = this;
9546
9547		this.scroller = this.slider.api.scroller;
9548
9549		this.slider.api.view.addEventListener(MSViewEvents.SCROLL , this._update , this);
9550		this.slider.api.addEventListener(MSSliderEvent.RESIZE , this._resize , this);
9551
9552		this._resize();
9553
9554		if(this.options.autohide){
9555			this.$bar.css('opacity' , '0');
9556		}
9557	};
9558
9559	p._resize = function(){
9560		this.vdimen = this.$element[this.__dimen]();
9561		this.bar_dimen = this.slider.api.view[ '__' + this.__dimen] * this.vdimen / this.scroller._max_value;
9562		this.$bar[this.__dimen](this.bar_dimen );
9563	};
9564
9565	p._update = function(){
9566		var value = this.scroller.value * (this.vdimen - this.bar_dimen) / this.scroller._max_value;
9567		if(this.lvalue === value) return;
9568		this.lvalue = value;
9569
9570		if(this.options.autohide){
9571			clearTimeout(this.hto);
9572			this.$bar.css('opacity' , '1');
9573
9574			var that = this;
9575			this.hto = setTimeout(function(){
9576				//if(!that.slider.api.view.swipeControl.touchStarted)
9577				that.$bar.css('opacity' , '0');
9578			} , 150);
9579		}
9580
9581		if(value < 0){
9582			this.$bar[0].style[this.__dimen] = this.bar_dimen + value + 'px';
9583			return;
9584		}
9585
9586		if(value > this.vdimen - this.bar_dimen)
9587			this.$bar[0].style[this.__dimen] = this.vdimen - value + 'px';
9588
9589		if(window._cssanim) {
9590			this.$bar[0].style[window._jcsspfx + 'Transform'] = this.__translate_start +value+'px)'+ this.__translate_end;
9591			return;
9592		}
9593
9594		this.$bar[0].style[this.__pos] = value + 'px';
9595
9596	};
9597
9598	p.destroy = function(){
9599		_super.destroy();
9600		this.slider.api.view.removeEventListener(MSViewEvents.SCROLL , this._update , this);
9601		this.slider.api.removeEventListener(MSSliderEvent.RESIZE , this._resize , this);
9602		this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE, this.align, this);
9603
9604		this.$element.remove();
9605	};
9606
9607	window.MSScrollbar = MSScrollbar;
9608	MSSlideController.registerControl('scrollbar' , MSScrollbar);
9609})(jQuery);
9610
9611/* ================== bin-debug/js/pro/uicontrols/Timebar.js =================== */
9612;(function($){
9613
9614	"use strict";
9615
9616	var MSTimerbar = function(options){
9617		BaseControl.call(this);
9618
9619		this.options.autohide = false;
9620		this.options.width 		= 4;
9621		this.options.color 		= '#FFFFFF';
9622		this.options.inset 		= true;
9623		this.options.margin 	= 0;
9624
9625		$.extend(this.options , options);
9626	};
9627
9628	MSTimerbar.extend(BaseControl);
9629
9630	var p = MSTimerbar.prototype;
9631	var _super = BaseControl.prototype;
9632
9633	/* -------------------------------- */
9634
9635	p.setup = function(){
9636		var that = this;
9637		_super.setup.call(this);
9638
9639		this.$element = $('<div></div>')
9640					.addClass(this.options.prefix + 'timerbar');
9641
9642		_super.setup.call(this);
9643
9644		if( this.slider.$controlsCont === this.cont ){
9645			this.$element.appendTo(this.slider.$element);
9646		}else{
9647			this.$element.appendTo(this.cont);
9648		}
9649
9650		this.$bar = $('<div></div>')
9651					.addClass('ms-time-bar')
9652					.appendTo(this.$element);
9653
9654		// change width
9655		if( this.options.dir === 'v' ){
9656			this.$bar.width(this.options.width);
9657			this.$element.width(this.options.width);
9658		} else {
9659			this.$bar.height(this.options.width);
9660			this.$element.height(this.options.width);
9661		}
9662
9663		// change color
9664		this.$bar.css('background-color', this.options.color);
9665
9666		if( !this.options.insetTo && this.options.align ){
9667
9668			this.$element.css({
9669				top:'auto',
9670				bottom:'auto'
9671			});
9672
9673			var align = this.options.align;
9674			if( this.options.inset ){
9675				this.$element.css(align, this.options.margin );
9676			}else if( align === 'top' ){
9677				this.$element.prependTo(this.slider.$element).css({
9678					'margin-bottom': this.options.margin,
9679					'position': 'relative'
9680				});
9681			}else if( align === 'bottom' ){
9682				this.$element.css({
9683					'margin-top': this.options.margin,
9684					'position': 'relative'
9685				});
9686			}else{
9687				this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE, this.align, this);
9688				this.align();
9689			}
9690		}
9691
9692		this.checkHideUnder(); // super method
9693
9694	};
9695
9696	/**
9697	 * calls by "RESERVED_SPACE_CHGANE" realigns the control in slider
9698	 * @since 1.5.7
9699	 */
9700	p.align = function(event){
9701		if( this.detached ){
9702			return;
9703		}
9704
9705		var align = this.options.align;
9706		var pos = this.slider.reserveSpace(align, this.options.margin * 2 + this.options.width);
9707		this.$element.css(align, -pos - this.options.margin - this.options.width);
9708	};
9709
9710	p.create = function(){
9711		_super.create.call(this);
9712		this.slider.api.addEventListener(MSSliderEvent.WAITING , this._update , this);
9713		this._update();
9714	};
9715
9716	p._update = function(){
9717		this.$bar[0].style.width = this.slider.api._delayProgress  + '%';
9718	};
9719
9720	p.destroy = function(){
9721		_super.destroy();
9722		this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE, this.align, this);
9723		this.slider.api.removeEventListener(MSSliderEvent.WAITING , this._update , this);
9724		this.$element.remove();
9725	};
9726
9727	window.MSTimerbar = MSTimerbar;
9728	MSSlideController.registerControl('timebar' , MSTimerbar);
9729})(jQuery);
9730
9731/* ================== bin-debug/js/pro/uicontrols/CircleTimer.js =================== */
9732;(function($){
9733
9734	"use strict";
9735
9736	var MSCircleTimer = function(options){
9737		BaseControl.call(this);
9738
9739		this.options.color 	= '#A2A2A2';
9740		this.options.stroke = 10;
9741		this.options.radius	= 4;
9742
9743		this.options.autohide = false;
9744		$.extend(this.options , options);
9745	};
9746
9747	MSCircleTimer.extend(BaseControl);
9748
9749	var p = MSCircleTimer.prototype;
9750	var _super = BaseControl.prototype;
9751
9752	/* -------------------------------- */
9753
9754	p.setup = function(){
9755		var that = this;
9756		_super.setup.call(this);
9757
9758		this.$element = $('<div></div>')
9759					.addClass(this.options.prefix + 'ctimer')
9760					.appendTo(this.cont);
9761
9762		this.$canvas = 	$('<canvas></canvas>')
9763					.addClass('ms-ctimer-canvas')
9764					.appendTo(this.$element);
9765
9766		this.$bar = $('<div></div>')
9767					.addClass('ms-ctimer-bullet')
9768					.appendTo(this.$element);
9769
9770		if(!this.$canvas[0].getContext){
9771			this.destroy();
9772			this.disable = true;
9773			return;
9774		}
9775
9776
9777		this.ctx		= this.$canvas[0].getContext('2d');
9778		this.prog		= 0;
9779
9780		this.__w = (this.options.radius + this.options.stroke/2) * 2;
9781		this.$canvas[0].width  = this.__w;
9782		this.$canvas[0].height = this.__w;
9783
9784		this.checkHideUnder(); // super method
9785	};
9786
9787	p.create = function(){
9788		if(this.disable) return;
9789		_super.create.call(this);
9790		this.slider.api.addEventListener(MSSliderEvent.WAITING , this._update , this);
9791
9792		var that = this;
9793		this.$element.click(function(){
9794			if(that.slider.api.paused)
9795				that.slider.api.resume();
9796			else
9797				that.slider.api.pause();
9798		});
9799
9800		this._update();
9801	};
9802
9803	p._update = function(){
9804		var that = this;
9805		$(this).stop(true).animate({prog:this.slider.api._delayProgress * 0.01} ,
9806					 	{duration:200 , step:function(){that._draw();}});
9807		//this.$bar[0].style.width = this.slider.api._delayProgress/100 * this.$element.width() + 'px';
9808	};
9809
9810	p._draw = function(){
9811		this.ctx.clearRect(0 , 0,  this.__w ,  this.__w);
9812		this.ctx.beginPath();
9813		this.ctx.arc(this.__w * .5 , this.__w * .5 ,this.options.radius , Math.PI * 1.5 , Math.PI * 1.5 + 2 * Math.PI * this.prog, false);
9814		this.ctx.strokeStyle = this.options.color;
9815		this.ctx.lineWidth = this.options.stroke;
9816		this.ctx.stroke();
9817	};
9818
9819	p.destroy = function(){
9820		_super.destroy();
9821		if(this.disable) return;
9822		$(this).stop(true);
9823		this.slider.api.removeEventListener(MSSliderEvent.WAITING , this._update , this);
9824		this.$element.remove();
9825	};
9826
9827	window.MSCircleTimer = MSCircleTimer;
9828		MSSlideController.registerControl('circletimer' , MSCircleTimer);
9829})(jQuery);
9830
9831/* ================== bin-debug/js/pro/uicontrols/Lightbox.js =================== */
9832;(function($){
9833
9834	"use strict";
9835
9836	window.MSLightbox = function(options){
9837		BaseControl.call(this , options);
9838
9839		this.options.autohide	= false;
9840		$.extend(this.options , options);
9841
9842		this.data_list = [];
9843	};
9844	MSLightbox.fadeDuratation = 400;
9845	MSLightbox.extend(BaseControl);
9846
9847	var p = MSLightbox.prototype;
9848	var _super = BaseControl.prototype;
9849
9850	/* -------------------------------- */
9851	p.setup = function(){
9852		_super.setup.call(this);
9853
9854		this.$element = $('<div></div>')
9855						.addClass(this.options.prefix + 'lightbox-btn')
9856						.appendTo(this.cont);
9857
9858		this.checkHideUnder(); // super method
9859	};
9860
9861	p.slideAction = function(slide){
9862		 $('<div></div>')
9863						.addClass(this.options.prefix + 'lightbox-btn')
9864						.appendTo(slide.$element)
9865						.append($(slide.$element.find('.ms-lightbox')));
9866
9867	};
9868
9869	p.create = function(){
9870		_super.create.call(this);
9871
9872	};
9873
9874
9875	MSSlideController.registerControl('lightbox' , MSLightbox);
9876})(jQuery);
9877
9878/* ================== bin-debug/js/pro/uicontrols/SlideInfo.js =================== */
9879;(function($){
9880
9881	"use strict";
9882
9883	window.MSSlideInfo = function(options){
9884		BaseControl.call(this , options);
9885
9886		this.options.autohide	= false;
9887		this.options.align  = null;
9888		this.options.inset = false;
9889		this.options.margin = 10;
9890		this.options.size = 100;
9891		this.options.dir = 'h';
9892
9893		$.extend(this.options , options);
9894
9895		this.data_list = [];
9896	};
9897	MSSlideInfo.fadeDuratation = 400;
9898	MSSlideInfo.extend(BaseControl);
9899
9900	var p = MSSlideInfo.prototype;
9901	var _super = BaseControl.prototype;
9902
9903	/* -------------------------------- */
9904	p.setup = function(){
9905		this.$element = $('<div></div>')
9906						.addClass(this.options.prefix + 'slide-info')
9907						.addClass('ms-dir-' + this.options.dir);
9908
9909		_super.setup.call(this);
9910
9911		if( this.slider.$controlsCont === this.cont ){
9912			this.$element.appendTo(this.slider.$element); // insert in outer container out of overflow hidden
9913		}else{
9914			this.$element.appendTo(this.cont);
9915		}
9916
9917		// align control
9918		if( !this.options.insetTo && this.options.align ){
9919			var align = this.options.align;
9920			if( this.options.inset ){
9921				this.$element.css(align, this.options.margin );
9922			}else if( align === 'top' ){
9923				this.$element.prependTo(this.slider.$element).css({
9924					'margin-bottom': this.options.margin,
9925					'position': 'relative'
9926				});
9927			}else if( align === 'bottom' ){
9928				this.$element.css({
9929					'margin-top': this.options.margin,
9930					'position': 'relative'
9931				});
9932			}else{
9933				this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE, this.align, this);
9934				this.align();
9935			}
9936
9937			if( this.options.dir === 'v' ){
9938				this.$element.width(this.options.size);
9939			}else{
9940				this.$element.css('min-height', this.options.size);
9941			}
9942		}
9943
9944		this.checkHideUnder(); // super method
9945	};
9946
9947	/**
9948	 * calls by "RESERVED_SPACE_CHGANE" realigns the control in slider
9949	 * @since 1.5.7
9950	 */
9951	p.align = function(event){
9952		if( this.detached ){
9953			return;
9954		}
9955		var align = this.options.align;
9956		var pos = this.slider.reserveSpace(align, this.options.size + this.options.margin * 2);
9957		this.$element.css(align, -pos - this.options.size - this.options.margin);
9958	};
9959
9960	p.slideAction = function(slide){
9961		var info_ele = $(slide.$element.find('.ms-info'));
9962		var that = this;
9963		info_ele.detach();
9964
9965		this.data_list[slide.index] = info_ele;
9966	};
9967
9968	p.create = function(){
9969		_super.create.call(this);
9970		this.slider.api.addEventListener(MSSliderEvent.CHANGE_START , this.update , this);
9971		this.cindex =  this.slider.api.index();
9972		this.switchEle(this.data_list[this.cindex]);
9973	};
9974
9975	p.update = function(){
9976		var nindex = this.slider.api.index();
9977		this.switchEle(this.data_list[nindex]);
9978		this.cindex = nindex;
9979	};
9980
9981	p.switchEle = function(ele){
9982		if(this.current_ele){
9983			var that = this;
9984
9985			if(this.current_ele[0].tween)this.current_ele[0].tween.stop(true);
9986			this.current_ele[0].tween = CTween.animate(this.current_ele , MSSlideInfo.fadeDuratation  , {opacity:0} , {complete:function(){
9987				this.detach();
9988				this[0].tween = null;
9989				ele.css('position', 'relative');
9990			} , target:this.current_ele });
9991
9992			//this.current_ele.css('position', 'absolute');
9993			ele.css('position', 'absolute');
9994		}
9995
9996		this.__show(ele);
9997	};
9998
9999	p.__show = function(ele){
10000		ele.appendTo(this.$element).css('opacity','0');///.css('position', 'relative');
10001
10002		// calculate max height
10003		if ( this.current_ele ){
10004			ele.height( Math.max( ele.height(), this.current_ele.height() ) );
10005		}
10006
10007		clearTimeout(this.tou);
10008		this.tou = setTimeout(function(){
10009			CTween.fadeIn(ele , MSSlideInfo.fadeDuratation );
10010			ele.css('height', '');
10011		}, MSSlideInfo.fadeDuratation);
10012
10013
10014		if(ele[0].tween)ele[0].tween.stop(true);
10015		this.current_ele = ele;
10016	};
10017
10018	p.destroy = function(){
10019		_super.destroy();
10020		clearTimeout(this.tou);
10021		if(this.current_ele && this.current_ele[0].tween){
10022			this.current_ele[0].tween.stop('true');
10023		}
10024		this.$element.remove();
10025		this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE, this.align, this);
10026		this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START , this.update , this);
10027	};
10028
10029	MSSlideController.registerControl('slideinfo' , MSSlideInfo);
10030})(jQuery);
10031
10032/* ================== bin-debug/js/pro/plugins/MSGallery.js =================== */
10033/**
10034 *	Master Slider, Gallery Template v1.0
10035 * 	@author: Averta Ltd.
10036 */
10037
10038;(function($){
10039
10040	window.MSGallery = function(id , slider){
10041		this.id = id;
10042		this.slider = slider;
10043
10044		this.telement = $('#'+id);
10045
10046		this.botcont = $('<div></div>').addClass('ms-gallery-botcont').appendTo(this.telement);
10047		this.thumbcont = $('<div></div>').addClass('ms-gal-thumbcont hide-thumbs').appendTo(this.botcont);
10048		this.playbtn  = $('<div></div>').addClass('ms-gal-playbtn').appendTo(this.botcont);
10049		this.thumbtoggle  = $('<div></div>').addClass('ms-gal-thumbtoggle').appendTo(this.botcont);
10050
10051		// adds required controls to slider
10052		slider.control('thumblist' , {insertTo:this.thumbcont , autohide:false , dir:'h'});
10053		slider.control('slidenum'  , {insertTo:this.botcont , autohide:false});
10054		slider.control('slideinfo' , {insertTo:this.botcont , autohide:false});
10055		slider.control('timebar'   , {insertTo:this.botcont , autohide:false});
10056		slider.control('bullets'   , {insertTo:this.botcont , autohide:false});
10057	};
10058
10059	var p = MSGallery.prototype;
10060
10061	p._init = function(){
10062		var that = this;
10063
10064		if(!this.slider.api.paused)
10065			 this.playbtn.addClass('btn-pause');
10066
10067		this.playbtn.click(function(){
10068			if(that.slider.api.paused){
10069				 that.slider.api.resume();
10070				 that.playbtn.addClass('btn-pause');
10071			}else{
10072				 that.slider.api.pause();
10073				 that.playbtn.removeClass('btn-pause');
10074			}
10075		});
10076
10077
10078		this.thumbtoggle.click(function(){
10079
10080			if(that.vthumbs){
10081				//that.hideThumbs();
10082				that.thumbtoggle.removeClass('btn-hide');
10083				that.vthumbs = false;
10084				that.thumbcont.addClass('hide-thumbs');
10085			}else{
10086				//that.showThumbs();
10087				that.thumbtoggle.addClass('btn-hide');
10088				that.thumbcont.removeClass('hide-thumbs');
10089				that.vthumbs = true;
10090			}
10091		});
10092
10093	};
10094
10095	p.setup = function(){
10096		var that = this;
10097		$(document).ready(function(){that._init();});
10098	};
10099
10100
10101})(jQuery);
10102
10103/* ================== bin-debug/js/pro/plugins/MSFlickrV2.js =================== */
10104/**
10105 * Master Slider Flickr Plugin Version 2
10106 * @version 2.0.0
10107 * @author Averta Ltd.
10108 */
10109;(function($){
10110
10111	/**
10112	 * Generate Flickr photoset url
10113	 * @param  {String} key   api key
10114	 * @param  {String} id    photoset id
10115	 * @param  {Number} count number of images
10116	 * @return {String}
10117	 */
10118	var getPhotosetURL = function(key , id , count){
10119		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=?';
10120	};
10121
10122	/**
10123	 * Generate Flickr user public images url
10124	 * @param  {String} key   api key
10125	 * @param  {String} id    user id
10126	 * @param  {Number} count number of images
10127	 * @return {String}
10128	 */
10129	var getUserPublicURL = function(key , id , count){
10130		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=?';
10131	};
10132
10133	/**
10134	 * Generates image path
10135	 * @param  {String} fid
10136	 * @param  {String} server
10137	 * @param  {String} id
10138	 * @param  {String} secret
10139	 * @param  {String} size
10140	 * @return {String}
10141	 */
10142	var getImageSource = function(fid , server , id , secret , size, data){
10143		if ( size === '_o' && data ) {
10144			return data.url_o;
10145		}
10146
10147		return 'https://farm' + fid + '.staticflickr.com/'+ server + '/' + id + '_' + secret + size + '.jpg';
10148	};
10149
10150	window.MSFlickrV2 = function(slider,options){
10151		var _options = {
10152			count			:10,
10153			type			:'photoset',
10154			/*
10155			 * s small square 75x75
10156			 * q large square 150x150
10157			 * t thumbnail, 100 on longest side
10158			 */
10159			thumbSize	:'q',
10160
10161			/*
10162			 * -	medium, 500 on longest side
10163			 * z	medium 640, 640 on longest side
10164			 * c	medium 800, 800 on longest side
10165			 * b	large, 1024 on longest side
10166			 * o	original image, either a jpg, gif or png, depending on source format
10167			 */
10168			imgSize		: 'c'
10169		};
10170
10171		this.slider = slider;
10172		this.slider.holdOn();
10173
10174		if( !options.key ){
10175			this.errMsg('Flickr API Key required. Please add it in settings.');
10176			return;
10177		}
10178
10179		$.extend(_options , options);
10180		this.options = _options;
10181
10182		var that = this;
10183
10184		if(this.options.type === 'photoset'){
10185			$.getJSON(getPhotosetURL(this.options.key , this.options.id , this.options.count) , function(data){
10186				that._photosData(data);
10187			});
10188		}else{
10189			$.getJSON(getUserPublicURL(this.options.key , this.options.id , this.options.count) , function(data){
10190				that.options.type = 'photos';
10191				that._photosData(data);
10192			});
10193		}
10194
10195		if(this.options.imgSize !== '' && this.options.imgSize !== '-')
10196			this.options.imgSize = '_' + this.options.imgSize;
10197
10198		this.options.thumbSize = '_' + this.options.thumbSize;
10199
10200		// grab slide template from slider markup
10201		this.slideTemplate = this.slider.$element.find('.ms-slide')[0].outerHTML;
10202		this.slider.$element.find('.ms-slide').remove(); // remove all slides from slider markup
10203	};
10204
10205	var p = MSFlickrV2.prototype;
10206
10207	p._photosData = function(data){
10208
10209		if(data.stat === 'fail'){
10210			this.errMsg('Flickr API ERROR#' + data.code + ': ' + data.message);
10211			return;
10212		}
10213
10214		var that = this;
10215		var getInfo = this.options.author || this.options.desc;
10216		$.each(data[this.options.type].photo, function(i,item){
10217
10218			var slide_cont = that.slideTemplate.replace(/{{[\w-]+}}/g, function(match){
10219				match = match.replace(/{{|}}/g, '');
10220				if( shortCodes[match] ) {
10221					return shortCodes[match](item, that);
10222				} else {
10223					return '{{'+match+'}}';
10224				}
10225
10226			});
10227
10228			$(slide_cont).appendTo(that.slider.$element);
10229
10230		});
10231
10232		that._initSlider();
10233	};
10234
10235	p.errMsg = function(msg){
10236		this.slider.$element.css('display', 'block');
10237		if(!this.errEle)
10238			this.errEle = $('<div style="font-family:Arial; color:red; font-size:12px; position:absolute; top:10px; left:10px"></div>').appendTo(this.slider.$loading);
10239
10240		this.errEle.html(msg);
10241	};
10242
10243	p._initSlider = function(){
10244		this.slider.release();
10245	};
10246
10247	// a list of functions that generates data from short codes
10248	var shortCodes = {
10249		'image': function(data, that){
10250			return getImageSource(data.farm , data.server , data.id , data.secret , that.options.imgSize, data);
10251		},
10252
10253		'thumb': function(data, that){
10254			return getImageSource(data.farm , data.server , data.id , data.secret , that.options.thumbSize);
10255		},
10256
10257		'title': function(data, that){
10258			return data.title;
10259		},
10260
10261		'owner-name': function(data, that){
10262			return data.ownername;
10263		},
10264
10265		'date-taken': function(data, that){
10266			return data.datetaken;
10267		},
10268
10269		'views': function(data, that){
10270			return data.views;
10271		},
10272
10273		'description': function(data, that){
10274			return data.description._content;
10275		}
10276	};
10277
10278})(jQuery);
10279
10280/* ================== bin-debug/js/pro/plugins/MSFacebookGallery.js =================== */
10281/**
10282 * Master Slider Facebook Gallery plugin
10283 * @author Averta Ltd.
10284 * @version 1.0.0
10285 */
10286;(function($){
10287
10288
10289	window.MSFacebookGallery = function(slider, options){
10290		var _options = {
10291			count			:10,
10292			type			:'photostream', // album
10293 			/*
10294 			orginal/960/720/600/480/320/130
10295 			 */
10296			thumbSize	:'320',
10297
10298			/*
10299 			orginal/960/720/600/480/320/130
10300 			 */
10301			imgSize		: 'orginal',
10302
10303			https: false,
10304            token: ''
10305		};
10306
10307		this.slider = slider;
10308		this.slider.holdOn();
10309
10310		$.extend(_options , options);
10311		this.options = _options;
10312
10313        //this.graph = this.options.https ? 'https://graph.facebook.com' : 'http://graph.facebook.com';
10314		this.graph = 'https://graph.facebook.com';
10315
10316		var that = this;
10317
10318		if(this.options.type === 'photostream'){
10319			$.getJSON(this.graph + '/' + this.options.username + '/photos/uploaded/?fields=source,name,link,images,from&limit=' + this.options.count + '&access_token=' 
10319+ this.options.token , function(data){
10320				that._photosData(data);
10321			});
10322		}else{
10323			$.getJSON(this.graph + '/' + this.options.albumId + '/photos?fields=source,name,link,images,from&limit=' + this.options.count + '&access_token=' + this.options.token , function(data){
10324				that._photosData(data);
10325			});
10326		}
10327
10328		// grab slide template from slider markup
10329		this.slideTemplate = this.slider.$element.find('.ms-slide')[0].outerHTML;
10330		this.slider.$element.find('.ms-slide').remove(); // remove all slides from slider markup
10331	};
10332
10333	var p = MSFacebookGallery.prototype;
10334
10335	p._photosData = function(content){
10336
10337		if(content.error){
10338			this.errMsg('Facebook API ERROR#' + content.error.code + '(' + content.error.type + ')' + ': ' + content.error.message);
10339			return;
10340		}
10341
10342		var that = this;
10343		var getInfo = this.options.author || this.options.desc;
10344
10345		for(var i=0,l=content.data.length;i!==l;i++){
10346
10347			var slide_cont = that.slideTemplate.replace(/{{[\w-]+}}/g, function(match){
10348				match = match.replace(/{{|}}/g, '');
10349				if( shortCodes[match] ) {
10350					return shortCodes[match](content.data[i], that);
10351				} else {
10352					return '{{'+match+'}}';
10353				}
10354
10355			});
10356
10357			$(slide_cont).appendTo(that.slider.$element);
10358		}
10359
10360		that._initSlider();
10361	};
10362
10363	p.errMsg = function(msg){
10364		this.slider.$element.css('display', 'block');
10365		if(!this.errEle)
10366			this.errEle = $('<div style="font-family:Arial; color:red; font-size:12px; position:absolute; top:10px; left:10px"></div>').appendTo(this.slider.$loading);
10367
10368		this.errEle.html(msg);
10369	};
10370
10371	p._initSlider = function(){
10372		this.slider.release();
10373	};
10374
10375	var getImageSource = function(images, size){
10376
10377		if( size === 'orginal' ) {
10378			return images[0].source;
10379		}
10380
10381		for(var i = 0, l = images.length; i !== l; i++){
10382			if( images[i].source.indexOf(size + 'x' + size) !== -1 )
10383				return images[i].source;
10384		}
10385      //  console.log(images)
10386		return images[0].source;
10387	};
10388
10389	// a list of functions that generates data from short codes
10390	var shortCodes = {
10391		'image': function(data, that){
10392
10393			return getImageSource(data.images, that.options.imgSize);
10394		},
10395
10396		'thumb': function(data, that){
10397			return getImageSource(data.images, that.options.thumbSize);
10398		},
10399
10400		'name': function(data, that){
10401			return data.name;
10402		},
10403
10404		'owner-name': function(data, that){
10405			return data.from.name;
10406		},
10407
10408		'link': function(data, that){
10409			return data.link;
10410		}
10411	};
10412
10413})(jQuery);
10414
10415/* ================== bin-debug/js/pro/plugins/MSScrollParallax.js =================== */
10416/**
10417 * Master Slider Parallax Layers Fade
10418 * @description Moves and fades layers of current slide while scrolling window.
10419 * @package MasterSlider
10420 * @author Averta
10421 * @since v1.8.0
10422 */
10423
10424(function($){
10425
10426	'use strict';
10427
10428	window.MSScrollParallax = function (slider, parallax, bgparallax, fade) {
10429		this.fade = fade;
10430		this.slider = slider;
10431		this.parallax = parallax/100;
10432		this.bgparallax = bgparallax/100;
10433
10434		slider.api.addEventListener(MSSliderEvent.INIT, this.init, this);
10435		slider.api.addEventListener(MSSliderEvent.DESTROY, this.destory, this);
10436		slider.api.addEventListener(MSSliderEvent.CHANGE_END, this.resetLayers, this);
10437		slider.api.addEventListener(MSSliderEvent.CHANGE_START, this.updateCurrentSlide, this);
10438	};
10439
10440	window.MSScrollParallax.setup = function(slider, parallax, bgparallax, fade){
10441		// disable in mobile devices
10442		if ( window._mobile ) {
10443			return;
10444		}
10445
10446		if( parallax == null ) {
10447			parallax = 50;
10448		}
10449
10450		if( bgparallax == null ){
10451			bgparallax = 40;
10452		}
10453
10454		return new MSScrollParallax(slider, parallax, bgparallax, fade);
10455	};
10456
10457	var p = window.MSScrollParallax.prototype;
10458
10459	p.init = function (e) {
10460		this.slider.$element.addClass('ms-scroll-parallax');
10461		this.sliderOffset = this.slider.$element.offset().top;
10462		this.updateCurrentSlide();
10463		// wrap layers element
10464		var slides = this.slider.api.view.slideList,
10465			slide;
10466		for(var i = 0, l = slides.length; i!==l ; i++) {
10467			slide = slides[i];
10468			if( slide.hasLayers ) {
10469				slide.layerController.$layers.wrap('<div class="ms-scroll-parallax-cont"></div>');
10470				slide.$scrollParallaxCont = slide.layerController.$layers.parent();
10471			}
10472		}
10473
10474		$(window).on('scroll', {that:this}, this.moveParallax).trigger('scroll');
10475	};
10476
10477	p.resetLayers = function (e) {
10478		if( !this.lastSlide ) {
10479			return;
10480		}
10481
10482		var layers = this.lastSlide.$scrollParallaxCont;
10483
10484		if ( window._css2d ) {
10485			if( layers ){
10486				layers[0].style[window._jcsspfx + 'Transform'] = '';
10487			}
10488
10489			if ( this.lastSlide.hasBG ) {
10490				this.lastSlide.$imgcont[0].style[window._jcsspfx + 'Transform'] = '';
10491			}
10492
10493		} else {
10494			if( layers ){
10495				layers[0].style.top = '';
10496			}
10497
10498			if ( this.lastSlide.hasBG ) {
10499				this.lastSlide.$imgcont[0].style.top = '0px';
10500			}
10501		}
10502	};
10503
10504	p.updateCurrentSlide = function (e) {
10505		this.lastSlide = this.currentSlide;
10506
10507		this.currentSlide = this.slider.api.currentSlide;
10508		this.moveParallax({data:{that:this}});
10509	};
10510
10511	p.moveParallax = function (e) {
10512		var that = e.data.that,
10513			slider = that.slider,
10514			offset = that.sliderOffset,
10515			scrollTop = $(window).scrollTop(),
10516			layers = that.currentSlide.$scrollParallaxCont,
10517			out = offset - scrollTop;
10518
10519		if( out <= 0 ) {
10520
10521			if( layers ){
10522				if ( window._css3d ) {
10523					layers[0].style[window._jcsspfx + 'Transform'] = 'translateY(' + -out * that.parallax + 'px) translateZ(0.4px)';
10524				} else if ( window._css2d ){
10525					layers[0].style[window._jcsspfx + 'Transform'] = 'translateY(' + -out * that.parallax + 'px)';
10526				} else {
10527					layers[0].style.top =  -out * that.parallax + 'px';
10528				}
10529			}
10530
10531			that.updateSlidesBG(-out * that.bgparallax + 'px', true);
10532
10533			if ( layers && that.fade ) {
10534				layers.css('opacity',  (1 - Math.min(1, -out / slider.api.height)) );
10535			}
10536
10537		} else {
10538			if( layers ){
10539				if ( window._css2d ) {
10540					layers[0].style[window._jcsspfx + 'Transform'] = '';
10541				} else {
10542					layers[0].style.top = '';
10543				}
10544			}
10545
10546			that.updateSlidesBG('0px', false);
10547
10548			if ( layers && that.fade ) {
10549				layers.css('opacity',  1 );
10550			}
10551
10552		}
10553
10554	};
10555
10556	p.updateSlidesBG = function(pos, fixed) {
10557		var slides = this.slider.api.view.slideList,
10558			position = ( fixed &&  !$.browser.msie && !$.browser.opera ? 'fixed' : '');
10559
10560		for(var i = 0, l = slides.length; i!==l ; i++) {
10561			if ( slides[i].hasBG ) {
10562				slides[i].$imgcont[0].style.position = position;
10563				slides[i].$imgcont[0].style.top = pos;
10564			}
10565
10566			if ( slides[i].$bgvideocont ){
10567				slides[i].$bgvideocont[0].style.position = position;
10568				slides[i].$bgvideocont[0].style.top = pos;
10569			}
10570		}
10571
10572	};
10573
10574	p.destory = function () {
10575		slider.api.removeEventListener(MSSliderEvent.INIT, this.init, this);
10576		slider.api.removeEventListener(MSSliderEvent.DESTROY, this.destory, this);
10577		slider.api.removeEventListener(MSSliderEvent.CHANGE_END, this.resetLayers, this);
10578		slider.api.removeEventListener(MSSliderEvent.CHANGE_START, this.updateCurrentSlide, this);
10579		$(window).off('scroll', this.moveParallax);
10580	};
10581
10582})(jQuery);
10583
10584/* ================== bin-debug/js/pro/plugins/MSKeyboardNav.js =================== */
10585/**
10586 * Keyboard navigation plugin for Master Slider.
10587 * @version  1.0.0
10588 * @author Averta
10589 * @package MasterSlider jQuery
10590 */
10591;(function($, document, window){
10592	var PId = 0;
10593
10594	// check if master slider is available
10595	if ( !window.MasterSlider ) {
10596		return;
10597	}
10598
10599	var KeyboardNav = function ( slider ) {
10600		this.slider = slider;
10601		this.PId = PId++;
10602
10603		if ( this.slider.options.keyboard ) {
10604			slider.api.addEventListener(MSSliderEvent.INIT, this.init, this);
10605		}
10606	};
10607
10608	KeyboardNav.name = 'MSKeyboardNav';
10609	var p = KeyboardNav.prototype;
10610
10611	/**
10612	 * initiate the plugin
10613	 */
10614	p.init = function (){
10615		var api = this.slider.api;
10616
10617		$(document).on('keydown.kbnav' + this.PId , function(event){
10618			var which = event.which;
10619
10620			if ( which === 37 || which === 40 ) {
10621				api.previous(true);
10622			} else if ( which === 38 || which === 39 ) {
10623				api.next(true);
10624			}
10625
10626		});
10627
10628	};
10629
10630	/**
10631	 * destroy the plugin
10632	 */
10633	p.destroy = function(){
10634		$(document).off('keydown.kbnav' + this.PId);
10635		this.slider.api.removeEventListener(MSSliderEvent.INIT, this.init, this);
10636	};
10637
10638	// install plugin to master slider
10639	MasterSlider.registerPlugin( KeyboardNav );
10640
10641})(jQuery, document, window);
10642
10643/* ================== bin-debug/js/pro/plugins/MSStartOnAppear.js =================== */
10644/**
10645 * Start on appear plugin for Master Slider.
10646 *
10647 * @description This plugin prevents slider automatically initialization and inits slider when it appears inside of the browser window.
10648 * @version  1.0.0
10649 * @author Averta
10650 * @package MasterSlider jQuery
10651 */
10652
10653;(function($, document, window){
10654	var PId = 0,
10655		$window = $(window),
10656		$doc = $(document);
10657
10658	// check if master slider is available
10659	if ( !window.MasterSlider ) {
10660		return;
10661	}
10662
10663	var StartOnAppear = function ( slider ) {
10664		this.PId = PId++;
10665		this.slider = slider;
10666		this.$slider = slider.$element;
10667
10668		if ( this.slider.options.startOnAppear ) {
10669			// hold on slider
10670			slider.holdOn();
10671			$doc.ready($.proxy(this.init, this));
10672		}
10673	};
10674
10675	StartOnAppear.name = 'MSStartOnAppear';
10676	var p = StartOnAppear.prototype;
10677
10678	/**
10679	 * initiate the plugin
10680	 */
10681	p.init = function (){
10682		var api = this.slider.api;
10683		$window.on('scroll.soa' + this.PId , $.proxy(this._onScroll, this)).trigger('scroll');
10684	};
10685
10686	p._onScroll = function () {
10687		// check slider position
10688		var vpBottom = $window.scrollTop() + $window.height(),
10689			top = this.$slider.offset().top ;
10690
10691		if ( top < vpBottom ) {
10692			$window.off('scroll.soa' + this.PId);
10693			this.slider.release();
10694		}
10695	};
10696
10697	/**
10698	 * destroy the plugin
10699	 */
10700	p.destroy = function(){};
10701
10702	// install plugin to master slider
10703	MasterSlider.registerPlugin( StartOnAppear );
10704
10705})(jQuery, document, window);
10706
10707/* ================== bin-debug/js/pro/plugins/MSFilters.js =================== */
10708/**
10709 * Master Slider Filters Plugin
10710 * This plugin adds CSS3 filters to the slides, like brightness, grayscale, sepia, ... It works in major browser and devices but in IE `opacity` only supported.
10711 *
10712 * @package Master Slider jQuery
10713 * @author Averta
10714 * @version  1.0.0a
10715 */
10716
10717;(function (document, window, jQuery){
10718
10719	var filterUnits = {
10720		'hue-rotate' 	: 'deg',
10721		'blur' 			: 'px'
10722	}, initialValues = {
10723		'opacity' 		: 1,
10724		'contrast'		: 1,
10725		'brightness'	: 1,
10726		'saturate'		: 1,
10727		'hue-rotate'	: 0,
10728		'invert'		: 0,
10729		'sepia'			: 0,
10730		'blur'			: 0,
10731		'grayscale'		: 0
10732	}
10733
10734	// check if master slider is available
10735	if ( !window.MasterSlider ) {
10736		return;
10737	}
10738
10739	var Filters = function ( slider ) {
10740		this.slider = slider;
10741
10742		if ( this.slider.options.filters ) {
10743			slider.api.addEventListener(MSSliderEvent.INIT, this.init, this);
10744		}
10745	};
10746
10747	Filters.name = 'MSFilters';
10748	var p = Filters.prototype;
10749
10750	/**
10751	 * initiate the plugin
10752	 */
10753	p.init = function (){
10754		var api = this.slider.api,
10755			view = api.view;
10756
10757		this.filters 		= this.slider.options.filters;
10758		this.slideList 		= view.slideList;
10759		this.slidesCount 	= view.slidesCount;
10760		this.dimension 		= view[view.__dimension];
10761		this.target 		= this.slider.options.filterTarget === 'slide' ? '$element' : '$bg_img';
10762		this.filterName 	= $.browser.webkit ? 'WebkitFilter' : 'filter';
10763
10764		// override controller update callback
10765		var superFun = view.controller.__renderHook.fun,
10766			superRef = view.controller.__renderHook.ref;
10767		view.controller.renderCallback( function (controller, value) {
10768			superFun.call(superRef, controller, value);
10769			this.applyEffect(value);
10770		} , this);
10771		this.applyEffect(view.controller.value);
10772
10773	};
10774
10775	/**
10776	 * Apply css effect to slides based on slide position.
10777	 * @param  {Number} value Current position of slider controller
10778	 */
10779	p.applyEffect = function (value) {
10780		var factor, slide;
10781
10782		for( var i = 0; i < this.slidesCount; ++i ) {
10783			slide = this.slideList[i];
10784			factor = Math.min(1 , Math.abs(value - slide.position) / this.dimension);
10785
10786			if ( slide[this.target] ) {
10787				if ( !$.browser.msie ) {
10788					slide[this.target][0].style[this.filterName] = this.generateStyle(factor);
10789				} else if ( this.filters.opacity != null ) {
10790					slide[this.target].opacity( 1 - this.filters.opacity * factor);
10791				}
10792			}
10793		}
10794	};
10795
10796	/**
10797	 * Generate filter style based on slide distance factor
10798	 * @param  {Number} factor
10799	 * @return {String} CSS style
10800	 */
10801	p.generateStyle = function (factor) {
10802		var style = '',
10803			unit;
10804
10805		for ( var filter in this.filters ) {
10806			unit = filterUnits[filter] || '';
10807			style += filter + '(' + ( initialValues[filter] + (this.filters[filter] - initialValues[filter]) * factor) + ') ';
10808		}
10809
10810		return style;
10811	};
10812
10813	/**
10814	 * destroy the plugin
10815	 */
10816	p.destroy = function(){
10817		this.slider.api.removeEventListener(MSSliderEvent.INIT, this.init, this);
10818	};
10819
10820	// install plugin to master slider
10821	MasterSlider.registerPlugin( Filters );
10822
10823
10824})(document, window, jQuery);
10825
10826/* ================== bin-debug/js/pro/plugins/MSScrollToAction.js =================== */
10827/**
10828 * Master Slider Scroll To Action Plugin.
10829 *
10830 * @description This plugins adds page scrolling actions to the layer actions list.
10831 * @version  1.0.0
10832 * @author Averta
10833 * @package MasterSlider jQuery
10834 */
10835
10836;(function($, document, window){
10837
10838	// check if master slider is available
10839	if ( !window.MasterSlider ) {
10840		return;
10841	}
10842
10843	var ScrollToAction = function ( slider ) {
10844		this.slider = slider;
10845		slider.api.addEventListener(MSSliderEvent.INIT, this.init, this);
10846	};
10847
10848	ScrollToAction.name = 'MSScrollToAction';
10849	var p = ScrollToAction.prototype;
10850
10851	/**
10852	 * initiate the plugin
10853	 */
10854	p.init = function (){
10855		var api = this.slider.api;
10856
10857		// define actions
10858		api.scrollToEnd = _scrollToEnd;
10859		api.scrollTo = _scrollTo;
10860	};
10861
10862	/**
10863	 * destroy the plugin
10864	 */
10865	p.destroy = function(){};
10866
10867	/**
10868	 * Scroll window to the target element in page
10869	 * @param {Number} duration animation duration (seconds)
10870	 */
10871	var _scrollTo = function ( target, duration ) {
10872		var sliderEle = this.slider.$element,
10873			target = $(target).eq(0);
10874
10875		if ( target.length === 0 ) {
10876			return;
10877		}
10878		console.log(target.offset().top, duration )
10879
10880		if( duration == null ) {
10881			duration = 1.4;
10882		}
10883
10884		$('html, body').animate({
10885			scrollTop: target.offset().top
10886		}, duration * 1000, 'easeInOutQuad');
10887	};
10888
10889	/**
10890	 * Scroll window to the bottom of slider
10891	 * @param {Number} duration animation duration (seconds)
10892	 */
10893	var _scrollToEnd = function ( duration ) {
10894		var sliderEle = this.slider.$element;
10895
10896		if( duration == null ) {
10897			duration = 1.4;
10898		}
10899
10900		$('html, body').animate({
10901			scrollTop: sliderEle.offset().top + sliderEle.outerHeight(false)
10902		}, duration * 1000, 'easeInOutQuad');
10903	}
10904
10905	// install plugin to master slider
10906	MasterSlider.registerPlugin( ScrollToAction );
10907
10908})(jQuery, document, window);;�/* /assets/widget/script/plugins/owlcarousel/viewer.min.js */�/*!
10909 * Viewer.js v1.10.0
10910 * https://fengyuanchen.github.io/viewerjs
10911 *
10912 * Copyright 2015-present Chen Fengyuan
10913 * Released under the MIT license
10914 *
10915 * Date: 2021-06-12T07:57:10.970Z
10916 */
10917;
10918!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):(a="undefined"!=typeof globalThis?globalThis:a||self).Viewer=b()
10919}(this,function(){function aJ(c,b){var a,d=Object.keys(c);
10920return Object.getOwnPropertySymbols&&(a=Object.getOwnPropertySymbols(c),b&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(c,e).enumerable
10921})),d.push.apply(d,a)),d
10922}function aC(c){for(var a=1;
10923a<arguments.length;
10924a++){var b=null!=arguments[a]?arguments[a]:{};
10925a%2?aJ(Object(b),!0).forEach(function(f){var g,d;
10926g=c,f=b[d=f],d in g?Object.defineProperty(g,d,{value:f,enumerable:!0,configurable:!0,writable:!0}):g[d]=f
10927}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(b)):aJ(Object(b)).forEach(function(d){Object.defineProperty(c,d,Object.getOwnPropertyDescriptor(b,d))
10928})
10929}return c
10930}function aF(a){return(aF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(b){return typeof b
10931}:function(b){return b&&"function"==typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b
10932})(a)
10933}function az(b,c){for(var a=0;
10934a<c.length;
10935a++){var d=c[a];
10936d.enumerable=d.enumerable||!1,d.configurable=!0,"value" in d&&(d.writable=!0),Object.defineProperty(b,d.key,d)
10937}}var au={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialViewIndex:0,inline:!1,interval:5000,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:0.1,minZoomRatio:0.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},ar="undefined"!=typeof window&&void 0!==window.document,aA=ar?window:{},aO=!(!ar||!aA.document.documentElement)&&"ontouchstart" in aA.document.documentElement,av=ar&&"PointerEvent" in aA,aH="viewer",aL="move",aq="switch",aK="zoom",aB="".concat(aH,"-active"),aI="".concat(aH,"-close"),ap="".concat(aH,"-fade"),ay="".concat(aH,"-fixed"),aN="".concat(aH,"-fullscreen"),aG="".concat(aH,"-fullscreen-exit"),an="".concat(aH,"-hide"),al="".concat(aH,"-hide-md-down"),am="".concat(aH,"-hide-sm-down"),aD="".concat(aH,"-hide-xs-down"),ak="".concat(aH,"-in"),bj="".concat(aH,"-invisible"),a0="".concat(aH,"-loading"),bi="".concat(aH,"-move"),bn="".concat(aH,"-open"),be="".concat(aH,"-show"),a2="".concat(aH,"-transition"),a7="click",bk="dblclick",a4="dragstart",bb="focusin",bh="keydown",a9="load",aT=av?"pointerdown":aO?"touchstart":"mousedown",aV=av?"pointermove":aO?"touchmove":"mousemove",ba=av?"pointerup pointercancel":aO?"touchend touchcancel":"mouseup",ax="resize",a6="transitionend",aX="wheel",aE="ready",bf="show",bm="shown",aY="viewed",aZ="rotated",bc="".concat(aH,"Action"),aS=/\s\s*/,bu=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];
10938function aP(a){return"string"==typeof a
10939}var bg=Number.isNaN||aA.isNaN;
10940function bd(a){return"number"==typeof a&&!bg(a)
10941}function a5(a){return void 0===a
10942}function a1(a){return"object"===aF(a)&&null!==a
10943}var bB=Object.prototype.hasOwnProperty;
10944function ai(b){if(!a1(b)){return !1
10945}try{var c=b.constructor,a=c.prototype;
10946return c&&a&&bB.call(a,"isPrototypeOf")
10947}catch(b){return !1
10948}}function aU(a){return"function"==typeof a
10949}function ao(c,b){if(c&&aU(b)){if(Array.isArray(c)||bd(c.length)){for(var a=c.length,d=0;
10950d<a&&!1!==b.call(c,c[d],d,c);
10951d+=1){}}else{a1(c)&&Object.keys(c).forEach(function(e){b.call(c,c[e],e,c)
10952})
10953}}return c
10954}var bq=Object.assign||function(b){for(var a=arguments.length,c=new Array(1<a?a-1:0),d=1;
10955d<a;
10956d++){c[d-1]=arguments[d]
10957}
10957return a1(b)&&0<c.length&&c.forEach(function(f){a1(f)&&Object.keys(f).forEach(function(e){b[e]=f[e]
10958})
10959}),b
10960},bl=/^(?:width|height|left|top|marginLeft|marginTop)$/;
10961function by(b,c){var a=b.style;
10962ao(c,function(d,f){bl.test(f)&&bd(d)&&(d+="px"),a[f]=d
10963})
10964}function aQ(a,b){return a&&b&&(a.classList?a.classList.contains(b):-1<a.className.indexOf(b))
10965}function bx(b,c){var a;
10966b&&c&&(bd(b.length)?ao(b,function(d){bx(d,c)
10967}):b.classList?b.classList.add(c):(a=b.className.trim())?a.indexOf(c)<0&&(b.className="".concat(a," ").concat(c)):b.className=c)
10968}function ah(a,b){a&&b&&(bd(a.length)?ao(a,function(c){ah(c,b)
10969}):a.classList?a.classList.remove(b):0<=a.className.indexOf(b)&&(a.className=a.className.replace(b,"")))
10970}function aw(b,c,a){c&&(bd(b.length)?ao(b,function(d){aw(d,c,a)
10971}):(a?bx:ah)(b,c))
10972}var ad=/([a-z\d])([A-Z])/g;
10973function bp(a){return a.replace(ad,"$1-$2").toLowerCase()
10974}function bo(a,b){return a1(a[b])?a[b]:a.dataset?a.dataset[b]:a.getAttribute("data-".concat(bp(b)))
10975}function bv(b,c,a){a1(a)?b[c]=a:b.dataset?b.dataset[c]=a:b.setAttribute("data-".concat(bp(c)),a)
10976}var ag,af,aM=(af=!1,ar&&(ag=!1,bA=function(){},a3=Object.defineProperty({},"once",{get:function(){return af=!0,ag
10977},set:function(a){ag=a
10978}}),aA.addEventListener("test",bA,a3),aA.removeEventListener("test",bA,a3)),af);
10979function ab(b,a,g,d){var f=3<arguments.length&&void 0!==d?d:{},c=g;
10980a.trim().split(aS).forEach(function(h){var i;
10981aM||(i=b.listeners)&&i[h]&&i[h][g]&&(c=i[h][g],delete i[h][g],0===Object.keys(i[h]).length&&delete i[h],0===Object.keys(i).length&&delete b.listeners),b.removeEventListener(h,c,f)
10982})
10983}function br(f,c,b,i){var g=3<arguments.length&&void 0!==i?i:{},d=b;
10984c.trim().split(aS).forEach(function(h){var a,e;
10985g.once&&!aM&&(a=f.listeners,d=function(){delete e[h][b],f.removeEventListener(h,d,g);
10986for(var k=arguments.length,l=new Array(k),j=0;
10987j<k;
10988j++){l[j]=arguments[j]
10989}b.apply(f,l)
10990},(e=void 0===a?{}:a)[h]||(e[h]={}),e[h][b]&&f.removeEventListener(h,e[h][b],g),e[h][b]=d,f.listeners=e),f.addEventListener(h,d,g)
10991})
10992}function bz(b,c,a,f){var d;
10993return aU(Event)&&aU(CustomEvent)?d=new CustomEvent(c,aC({bubbles:!0,cancelable:!0,detail:a},f)):(d=document.createEvent("CustomEvent")).initCustomEvent(c,!0,!0,a),b.dispatchEvent(d)
10994}function aa(b){var d=b.rotate,a=b.scaleX,g=b.scaleY,f=b.translateX,c=b.translateY,b=[];
10995bd(f)&&0!==f&&b.push("translateX(".concat(f,"px)")),bd(c)&&0!==c&&b.push("translateY(".concat(c,"px)")),bd(d)&&0!==d&&b.push("rotate(".concat(d,"deg)")),bd(a)&&1!==a&&b.push("scaleX(".concat(a,")")),bd(g)&&1!==g&&b.push("scaleY(".concat(g,")"));
10996b=b.length?b.join(" "):"none";
10997return{WebkitTransform:b,msTransform:b,transform:b}
10998}var a8=aA.navigator&&/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(aA.navigator.userAgent);
10999function aj(b,a,c){var f=document.createElement("img");
11000if(b.naturalWidth&&!a8){return c(b.naturalWidth,b.naturalHeight),f
11001}var d=document.body||document.documentElement;
11002return f.onload=function(){c(f.width,f.height),a8||d.removeChild(f)
11003},ao(a.inheritedAttributes,function(g){var h=b.getAttribute(g);
11004null!==h&&f.setAttribute(g,h)
11005}),f.src=b.src,a8||(f.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",d.appendChild(f)),f
11006}function bs(a){switch(a){case 2:return aD;
11007case 3:return am;
11008case 4:return al;
11009default:return""
11010}}function ae(b,c){var a=b.pageX,d=b.pageY,b={endX:a,endY:d};
11011return c?b:aC({timeStamp:Date.now(),startX:a,startY:d},b)
11012}var bw,aW={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()
11013},initBody:function(){var a=this.element.ownerDocument,b=a.body||a.documentElement;
11014this.body=b,this.scrollbarWidth=window.innerWidth-a.documentElement.clientWidth,this.initialBodyPaddingRight=b.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(b).paddingRight
11015},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}
11016},initViewer:function(){var b,c=this.options,a=this.parent;
11017c.inline&&(b={width:Math.max(a.offsetWidth,c.minWidth),height:Math.max(a.offsetHeight,c.minHeight)},this.parentData=b),!this.fulled&&b||(b=this.containerData),this.viewerData=bq({},b)
11018},renderViewer:function(){this.options.inline&&!this.fulled&&by(this.viewer,this.viewerData)
11019},initList:function(){var e=this,b=this.element,d=this.options,a=this.list,f=[];
11020a.innerHTML="",ao(this.images,function(h,g){var k,m,l=h.src,j=h.alt||(aP(k=l)?decode
11020URIComponent(k.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""),c=e.getImageURL(h);
11021(l||c)&&(k=document.createElement("li"),m=document.createElement("img"),ao(d.inheritedAttributes,function(i){var n=h.getAttribute(i);
11022null!==n&&m.setAttribute(i,n)
11023}),m.src=l||c,m.alt=j,m.setAttribute("data-original-url",c||l),k.setAttribute("data-index",g),k.setAttribute("data-viewer-action","view"),k.setAttribute("role","button"),d.keyboard&&k.setAttribute("tabindex",0),k.appendChild(m),a.appendChild(k),f.push(k))
11024}),ao(this.items=f,function(g){var c=g.firstElementChild;
11025bv(c,"filled",!0),d.loading&&bx(g,a0),br(c,a9,function(h){d.loading&&ah(g,a0),e.loadImage(h)
11026},{once:!0})
11027}),d.transition&&br(b,aY,function(){bx(a,a2)
11028},{once:!0})
11029},renderList:function(b){var c=b||this.index,a=this.items[c].offsetWidth||30,b=a+1;
11030by(this.list,bq({width:b*this.length},aa({translateX:(this.viewerData.width-a)/2-b*c})))
11031},resetList:function(){var a=this.list;
11032a.innerHTML="",ah(a,a2),by(a,aa({translateX:0}))
11033},initImage:function(a){var q,j=this,f=this.options,k=this.image,g=this.viewerData,b=this.footer.offsetHeight,o=g.width,p=Math.max(g.height-b,b),m=this.imageData||{};
11034this.imageInitializing={abort:function(){q.onload=null
11035}},q=aj(k,f,function(h,r){var d=h/r,v=o,u=p;
11036j.imageInitializing=!1,o<p*d?u=o/d:v=p*d;
11037var v=Math.min(0.9*v,h),u=Math.min(0.9*u,r),l=(o-v)/2,c=(p-u)/2,h={left:l,top:c,x:l,y:c,width:v,height:u,oldRatio:1,ratio:v/h,aspectRatio:d,naturalWidth:h,naturalHeight:r},r=bq({},h);
11038f.rotatable&&(h.rotate=m.rotate||0,r.rotate=0),f.scalable&&(h.scaleX=m.scaleX||1,h.scaleY=m.scaleY||1,r.scaleX=1,r.scaleY=1),j.imageData=h,j.initialImageData=r,a&&a()
11039})
11040},renderImage:function(b){var c,a=this,f=this.image,d=this.imageData;
11041by(f,bq({width:d.width,height:d.height,marginLeft:d.x,marginTop:d.y},aa(d))),b&&((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&aQ(f,a2)?(c=function(){a.imageRendering=!1,b()
11042},this.imageRendering={abort:function(){ab(f,a6,c)
11043}},br(f,a6,c,{once:!0})):b())
11044},resetImage:function(){var a;
11045(this.viewing||this.viewed)&&(a=this.image,this.viewing&&this.viewing.abort(),a.parentNode.removeChild(a),this.image=null)
11046}},av={bind:function(){var b=this.options,c=this.viewer,a=this.canvas,d=this.element.ownerDocument;
11047br(c,a7,this.onClick=this.click.bind(this)),br(c,a4,this.onDragStart=this.dragstart.bind(this)),br(a,aT,this.onPointerDown=this.pointerdown.bind(this)),br(d,aV,this.onPointerMove=this.pointermove.bind(this)),br(d,ba,this.onPointerUp=this.pointerup.bind(this)),br(d,bh,this.onKeyDown=this.keydown.bind(this)),br(window,ax,this.onResize=this.resize.bind(this)),b.zoomable&&b.zoomOnWheel&&br(c,aX,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),b.toggleOnDblclick&&br(a,bk,this.onDblclick=this.dblclick.bind(this))
11048},unbind:function(){var b=this.options,c=this.viewer,a=this.canvas,d=this.element.ownerDocument;
11049ab(c,a7,this.onClick),ab(c,a4,this.onDragStart),ab(a,aT,this.onPointerDown),ab(d,aV,this.onPointerMove),ab(d,ba,this.onPointerUp),ab(d,bh,this.onKeyDown),ab(window,ax,this.onResize),b.zoomable&&b.zoomOnWheel&&ab(c,aX,this.onWheel,{passive:!1,capture:!0}),b.toggleOnDblclick&&ab(a,bk,this.onDblclick)
11050}},ar={click:function(b){var c=this.options,a=this.imageData,f=b.target,d=bo(f,bc);
11051switch(d||"img"!==f.localName||"li"!==f.parentElement.localName||(d=bo(f=f.parentElement,bc)),aO&&b.isTrusted&&f===this.canvas&&clearTimeout(this.clickCanvasTimeout),d){case"mix":this.played?this.stop():c.inline?this.fulled?this.exit():this.full():this.hide();
11052break;
11053case"hide":this.hide();
11054break;
11055case"view":this.view(bo(f,"index"));
11056break;
11057case"zoom-in":this.zoom(0.1,!0);
11058break;
11059case"zoom-out":this.zoom(-0.1,!0);
11060break;
11061case"one-to-one":this.toggle();
11062break;
11063case"reset":this.reset();
11064break;
11065case"prev":this.prev(c.loop);
11066break;
11067case"play":this.play(c.fullscreen);
11068break;
11069case"next":this.next(c.loop);
11070break;
11071case"rotate-left":this.rotate(-90);
11072break;
11073case"rotate-right":this.rotate(90);
11074break;
11075case"flip-horizontal":this.scaleX(-a.scaleX||-1);
11076break;
11077case"flip-vertical":this.scaleY(-a.scaleY||-1);
11078break;
11079default:this.played&&this.stop()
11080}},dblclick:function(a){a.preventDefault(),this.viewed&&a.target===this.image&&(aO&&a.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(a))
11081},load:function(){var b=this;
11082this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);
11083var d=this.element,a=this.options,g=this.image,f=this.index,c=this.viewerData;
11084ah(g,bj),a.loading&&ah(this.canvas,a0),g.style.cssText="height:0;"+"margin-left:".concat(c.width/2,"px;")+"margin-top:".concat(c.height/2,"px;")+"max-width:none!important;position:absolute;width:0;",this.initImage(function(){aw(g,bi,a.movable),aw(g,a2,a.transition),b.renderImage(function(){b.viewed=!0,b.viewing=!1,aU(a.viewed)&&br(d,aY,a.viewed,{once:!0}),bz(d,aY,{originalImage:b.images[f],index:f,image:g},{cancelable:!1})
11085})
11086})
11087},loadImage:function(c){var f=c.target,c=f.parentNode,e=c.offsetWidth||30,d=c.offsetHeight||50,b=!!bo(f,"filled");
11088aj(f,this.options,function(g,h){var a=g/h,g=e,h=d;
11089e<d*a?b?g=d*a:h=e/a:b?h=e/a:g=d*a,by(f,bq({width:g,height:h},aa({translateX:(e-g)/2,translateY:(d-h)/2})))
11090})
11091},keydown:function(b){var c=this.options;
11092if(c.keyboard){var a=b.keyCode||b.which||b.charCode;
11093if(13===a&&this.viewer.contains(b.target)&&this.click(b),this.fulled){switch(a){case 27:this.played?this.stop():c.inline?this.fulled&&this.exit():this.hide();
11094break;
11095case 32:this.played&&this.stop();
11096break;
11097case 37:this.prev(c.loop);
11098break;
11099case 38:b.preventDefault(),this.zoom(c.zoomRatio,!0);
11100break;
11101case 39:this.next(c.loop);
11102break;
11103case 40:b.preventDefault(),this.zoom(-c.zoomRatio,!0);
11104break;
11105case 48:case 49:b.ctrlKey&&(b.preventDefault(),this.toggle())
11106}}}},dragstart:function(a){"img"===a.target.localName&&a.preventDefault()
11107},pointerdown:function(b){var c=this.options,a=this.pointers,f=b.buttons,d=b.button;
11108!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===b.type||"pointerdown"===b.type&&"mouse"===b.pointerType)&&(bd(f)&&1!==f||bd(d)&&0!==d||b.ctrlKey)||(b.preventDefault(),b.changedTouches?ao(b.changedTouches,function(e){a[e.identifier]=ae(e)
11109}):a[b.pointerId||0]=ae(b),d=!!c.movable&&aL,c.zoomOnTouch&&c.zoomable&&1<Object.keys(a).length?d=aK:c.slideOnTouch&&("touch"===b.pointerType||"touchstart"===b.type)&&this.isSwitchable()&&(d=aq),!c.transition||d!==aL&&d!==aK||ah(this.image,a2),this.action=d)
11110},pointermove:function(b){var c=this.pointers,a=this.action;
11111this.viewed&&a&&(b.preventDefault(),b.changedTouches?ao(b.changedTouches,function(d){bq(c[d.identifier]||{},ae(d,!0))
11112}):bq(c[b.pointerId||0]||{},ae(b,!0)),this.change(b))
11113},pointerup:function(b){var d,a=this,g=this.options,f=this.action,c=this.pointers;
11114b.changedTouches?ao(b.changedTouches,function(e){d=c[e.identifier],delete c[e.identifier]
11115}):(d=c[b.pointerId||0],delete c[b.pointerId||0]),f&&(b.preventDefault(),!g.transition||f!==aL&&f!==aK||bx(this.image,a2),this.action=!1,aO&&f!==aK&&d&&Date.now()-d.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),g.toggleOnDblclick&&this.viewed&&b.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){bz(a.image,bk)
11116},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){a.imageClicked=!1
11117},500)):(this.imageClicked=!1,g.backdrop&&"static"!==g.backdrop&&b.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){bz(a.canvas,a7)
11118},50)))))
11119},resize:function(){var a=this;
11120this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){a.renderImage()
11121}
11121),this.played&&(!this.options.fullscreen||!this.fulled||document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement?ao(this.player.getElementsByTagName("img"),function(b){br(b,a9,a.loadImage.bind(a),{once:!0}),bz(b,a9)
11122}):this.stop()))
11123},wheel:function(b){var c,a,d=this;
11124this.viewed&&(b.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){d.wheeling=!1
11125},50),c=Number(this.options.zoomRatio)||0.1,a=1,b.deltaY?a=0<b.deltaY?1:-1:b.wheelDelta?a=-b.wheelDelta/120:b.detail&&(a=0<b.detail?1:-1),this.zoom(-a*c,!0,b)))
11126}},bA={show:function(){var b=0<arguments.length&&void 0!==arguments[0]&&arguments[0],c=this.element,a=this.options;
11127if(a.inline||this.showing||this.isShown||this.showing){return this
11128}if(!this.ready){return this.build(),this.ready&&this.show(b),this
11129}if(aU(a.show)&&br(c,bf,a.show,{once:!0}),!1===bz(c,bf)||!this.ready){return this
11130}this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();
11131var f,d=this.viewer;
11132return ah(d,an),d.setAttribute("role","dialog"),d.setAttribute("aria-labelledby",this.title.id),d.setAttribute("aria-modal",!0),d.removeAttribute("aria-hidden"),a.transition&&!b?(f=this.shown.bind(this),this.transitioning={abort:function(){ab(d,a6,f),ah(d,ak)
11133}},bx(d,a2),d.initialOffsetWidth=d.offsetWidth,br(d,a6,f,{once:!0}),bx(d,ak)):(bx(d,ak),this.shown()),this
11134},hide:function(){var f=this,l=0<arguments.length&&void 0!==arguments[0]&&arguments[0],j=this.element,d=this.options;
11135if(d.inline||this.hiding||!this.isShown&&!this.showing){return this
11136}if(aU(d.hide)&&br(j,"hide",d.hide,{once:!0}),!1===bz(j,"hide")){return this
11137}this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();
11138function c(){ah(b,ak),f.hidden()
11139}var m,k,b=this.viewer,g=this.image;
11140return d.transition&&!l?(m=function l(a){a&&a.target===b&&(ab(b,a6,l),f.hidden())
11141},k=function(){aQ(b,a2)?(br(b,a6,m),ah(b,ak)):c()
11142},this.transitioning={abort:function(){f.viewed&&aQ(g,a2)?ab(g,a6,k):aQ(b,a2)&&ab(b,a6,m)
11143}},this.viewed&&aQ(g,a2)?(br(g,a6,k,{once:!0}),this.zoomTo(0,!1,null,!0)):k()):c(),this
11144},view:function(){var k=this,y=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex,y=Number(y)||0;
11145if(this.hiding||this.played||y<0||y>=this.length||this.viewed&&y===this.index){return this
11146}if(!this.isShown){return this.index=y,this.show()
11147}this.viewing&&this.viewing.abort();
11148var p=this.element,g=this.options,f=this.title,z=this.canvas,w=this.items[y],b=w.querySelector("img"),m=bo(b,"originalUrl"),j=b.getAttribute("alt"),v=document.createElement("img");
11149if(ao(g.inheritedAttributes,function(a){var c=b.getAttribute(a);
11150null!==c&&v.setAttribute(a,c)
11151}),v.src=m,v.alt=j,aU(g.view)&&br(p,"view",g.view,{once:!0}),!1===bz(p,"view",{originalImage:this.images[y],index:y,image:v})||!this.isShown||this.hiding||this.played){return this
11152}m=this.items[this.index];
11153ah(m,aB),m.removeAttribute("aria-selected"),bx(w,aB),w.setAttribute("aria-selected",!0),g.focus&&w.focus(),this.image=v,this.viewed=!1,this.index=y,this.imageData={},bx(v,bj),g.loading&&bx(z,a0),z.innerHTML="",z.appendChild(v),this.renderList(),f.innerHTML="";
11154function x(){var a=k.imageData,c=Array.isArray(g.title)?g.title[1]:g.title;
11155f.innerHTML=aP(a=aU(c)?c.call(k,v,a):"".concat(j," (").concat(a.naturalWidth," × ").concat(a.naturalHeight,")"))?a.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):a
11156}var q;
11157return br(p,aY,x,{once:!0}),this.viewing={abort:function(){ab(p,aY,x),v.complete?k.imageRendering?k.imageRendering.abort():k.imageInitializing&&k.imageInitializing.abort():(v.src="",ab(v,a9,q),k.timeout&&clearTimeout(k.timeout))
11158}},v.complete?this.load():(br(v,a9,q=this.load.bind(this),{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){ah(v,bj),k.timeout=!1
11159},1000)),this
11160},prev:function(){var a=this.index-1;
11161return a<0&&(a=0<arguments.length&&void 0!==arguments[0]&&arguments[0]?this.length-1:0),this.view(a),this
11162},next:function(){var a=this.length-1,b=this.index+1;
11163return this.view(b=a<b?0<arguments.length&&void 0!==arguments[0]&&arguments[0]?0:a:b),this
11164},move:function(b){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:b,a=this.imageData;
11165return this.moveTo(a5(b)?b:a.x+Number(b),a5(c)?c:a.y+Number(c)),this
11166},moveTo:function(p){var k=this,g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:p,d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,c=this.element,q=this.options,m=this.imageData;
11167if(p=Number(p),g=Number(g),this.viewed&&!this.played&&q.movable){var b=m.x,j=m.y,f=!1;
11168if(bd(p)?f=!0:p=b,bd(g)?f=!0:g=j,f){if(aU(q.move)&&br(c,"move",q.move,{once:!0}),!1===bz(c,"move",{x:p,y:g,oldX:b,oldY:j,originalEvent:d})){return this
11169}
11169m.x=p,m.y=g,m.left=p,m.top=g,this.moving=!0,this.renderImage(function(){k.moving=!1,aU(q.moved)&&br(c,"moved",q.moved,{once:!0}),bz(c,"moved",{x:p,y:g,oldX:b,oldY:j,originalEvent:d},{cancelable:!1})
11170})
11171}}return this
11172},rotate:function(a){return this.rotateTo((this.imageData.rotate||0)+Number(a)),this
11173},rotateTo:function(b){var d=this,a=this.element,g=this.options,f=this.imageData;
11174if(bd(b=Number(b))&&this.viewed&&!this.played&&g.rotatable){var c=f.rotate;
11175if(aU(g.rotate)&&br(a,"rotate",g.rotate,{once:!0}),!1===bz(a,"rotate",{degree:b,oldDegree:c})){return this
11176}f.rotate=b,this.rotating=!0,this.renderImage(function(){d.rotating=!1,aU(g.rotated)&&br(a,aZ,g.rotated,{once:!0}),bz(a,aZ,{degree:b,oldDegree:c},{cancelable:!1})
11177})
11178}return this
11179},scaleX:function(a){return this.scale(a,this.imageData.scaleY),this
11180},scaleY:function(a){return this.scale(this.imageData.scaleX,a),this
11181},scale:function(l){var j=this,f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l,d=this.element,c=this.options,m=this.imageData;
11182if(l=Number(l),f=Number(f),this.viewed&&!this.played&&c.scalable){var k=m.scaleX,b=m.scaleY,g=!1;
11183if(bd(l)?g=!0:l=k,bd(f)?g=!0:f=b,g){if(aU(c.scale)&&br(d,"scale",c.scale,{once:!0}),!1===bz(d,"scale",{scaleX:l,scaleY:f,oldScaleX:k,oldScaleY:b})){return this
11184}m.scaleX=l,m.scaleY=f,this.scaling=!0,this.renderImage(function(){j.scaling=!1,aU(c.scaled)&&br(d,"scaled",c.scaled,{once:!0}),bz(d,"scaled",{scaleX:l,scaleY:f,oldScaleX:k,oldScaleY:b},{cancelable:!1})
11185})
11186}}return this
11187},zoom:function(b){var c=1<arguments.length&&void 0!==arguments[1]&&arguments[1],a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,d=this.imageData;
11188return b=Number(b),this.zoomTo(d.width*(b=b<0?1/(1-b):1+b)/d.naturalWidth,c,a),this
11189},zoomTo:function(z){var H,E,D,L=this,A=1<arguments.length&&void 0!==arguments[1]&&arguments[1],P=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,B=3<arguments.length&&void 0!==arguments[3]&&arguments[3],I=this.element,G=this.options,N=this.pointers,x=this.imageData,M=x.x,F=x.y,J=x.width,K=x.height,q=x.naturalWidth,C=x.naturalHeight;
11190if(bd(z=Math.max(0,z))&&this.viewed&&!this.played&&(B||G.zoomable)){B||(O=Math.max(0.01,G.minZoomRatio),k=Math.min(100,G.maxZoomRatio),z=Math.min(Math.max(z,O),k));
11191var B=q*(z=P&&0.055<=G.zoomRatio&&0.95<z&&z<1.05?1:z),O=C*z,k=B-J,q=O-K,j=x.ratio;
11192if(aU(G.zoom)&&br(I,"zoom",G.zoom,{once:!0}),!1===bz(I,"zoom",{ratio:z,oldRatio:j,originalEvent:P})){return this
11193}this.zooming=!0,P?(C={left:(C=(C=this.viewer).getBoundingClientRect()).left+(window.pageXOffset-document.documentElement.clientLeft),top:C.top+(window.pageYOffset-document.documentElement.clientTop)},N=N&&Object.keys(N).length?(D=E=H=0,ao(N,function(a){var b=a.startX,a=a.startY;
11194H+=b,E+=a,D+=1
11195}),{pageX:H/=D,pageY:E/=D}):{pageX:P.pageX,pageY:P.pageY},x.x-=(N.pageX-C.left-M)/J*k,x.y-=(N.pageY-C.top-F)/K*q):(x.x-=k/2,x.y-=q/2),x.left=x.x,x.top=x.y,x.width=B,x.height=O,x.oldRatio=j,x.ratio=z,this.renderImage(function(){L.zooming=!1,aU(G.zoomed)&&br(I,"zoomed",G.zoomed,{once:!0}),bz(I,"zoomed",{ratio:z,oldRatio:j,originalEvent:P},{cancelable:!1})
11196}),A&&this.tooltip()
11197}return this
11198},play:function(){var j=this,m=0<arguments.length&&void 0!==arguments[0]&&arguments[0];
11199if(!this.isShown||this.played){return this
11200}var f=this.element,c=this.options;
11201if(aU(c.play)&&br(f,"play",c.play,{once:!0}),!1===bz(f,"play")){return this
11202}var n=this.player,k=this.loadImage.bind(this),b=[],g=0,d=0;
11203return this.played=!0,this.onLoadWhenPlay=k,m&&this.requestFullscreen(m),bx(n,be),ao(this.items,function(h,l){var a=h.querySelector("img"),o=document.createElement("img");
11204o.src=bo(a,"originalUrl"),o.alt=a.getAttribute("alt"),o.referrerPolicy=a.referrerPolicy,g+=1,bx(o,ap),aw(o,a2,c.transition),aQ(h,aB)&&(bx(o,ak),d=l),b.push(o),br(o,a9,k,{once:!0}),n.appendChild(o)
11205}),bd(c.interval)&&0<c.interval&&1<g&&function m(){j.playing=setTimeout(function(){ah(b[d],ak),bx(b[d=(d+=1)<g?d:0],ak),m()
11206},c.interval)
11207}(),this
11208},stop:function(){var c=this;
11209if(!this.played){return this
11210}var b=this.element,a=this.options;
11211if(aU(a.stop)&&br(b,"stop",a.stop,{once:!0}),!1===bz(b,"stop")){return this
11212}b=this.player;
11213return this.played=!1,clearTimeout(this.playing),ao(b.getElementsByTagName("img"),function(d){ab(d,a9,c.onLoadWhenPlay)
11214}),ah(b,be),b.innerHTML="",this.exitFullscreen(),this
11215},full:function(){var b=this,c=this.options,a=this.viewer,f=this.image,d=this.list;
11216return !this.isShown||this.played||this.fulled||!c.inline||(this.fulled=!0,this.open(),bx(this.button,aG),c.transition&&(ah(d,a2),this.viewed&&ah(f,a2)),bx(a,ay),a.setAttribute("role","dialog"),a.setAttribute("aria-labelledby",this.title.id),a.setAttribute("aria-modal",!0),a.removeAttribute("style"),by(a,{zIndex:c.zIndex}),c.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=bq({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){b.renderImage(function(){c.transition&&setTimeout(function(){bx(f,a2),bx(d,a2)
11217},0)
11218})
11219})),this
11220},exit:function(){var b=this,c=this.options,a=this.viewer,f=this.image,d=this.list;
11221return this.isShown&&!this.played&&this.fulled&&c.inline&&(this.fulled=!1,this.close(),ah(this.button,aG),c.transition&&(ah(d,a2),this.viewed&&ah(f,a2)),c.focus&&this.clearEnforceFocus(),a.removeAttribute("role"),a.removeAttribute("aria-labelledby"),a.removeAttribute("aria-modal"),ah(a,ay),by(a,{zIndex:c.zIndexInline}),this.viewerData=bq({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){b.renderImage(function(){c.transition&&setTimeout(function(){bx(f,a2),bx(d,a2)
11222},0)
11223})
11224})),this
11225},tooltip:function(){var b=this,c=this.options,a=this.tooltipBox,d=this.imageData;
11226return this.viewed&&!this.played&&c.tooltip&&(a.textContent="".concat(Math.round(100*d.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):c.transition?(this.fading&&bz(a,a6),bx(a,be),bx(a,ap),bx(a,a2),a.removeAttribute("aria-hidden"),a.initialOffsetWidth=a.offsetWidth,bx(a,ak)):(bx(a,be),a.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){c.transition?(br(a,a6,function(){ah(a,be),ah(a,ap),ah(a,a2),a.setAttribute("aria-hidden",!0),b.fading=!1
11227},{once:!0}),ah(a,ak),b.fading=!0):(ah(a,be),a.setAttribute("aria-hidden",!0)),b.tooltipping=!1
11228},1000)),this
11229},toggle:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;
11230return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0,a):this.zoomTo(1,!0,a),this
11231},reset:function(){return this.viewed&&!this.played&&(this.imageData=bq({},this.initialImageData),this.renderImage()),this
11232},update:function(){var d=this,b=this.element,a=this.options,g=this.isImg;
11233if(g&&!b.parentNode){return this.destroy()
11234}var f,c=[];
11235return ao(g?[b]:b.querySelectorAll("img"),function(e){aU(a.filter)?a.filter.call(d,e)&&
11235c.push(e):d.getImageURL(e)&&c.push(e)
11236}),c.length&&(this.images=c,this.length=c.length,this.ready?(f=[],ao(this.items,function(j,k){var h=j.querySelector("img"),j=c[k];
11237j&&h&&j.src===h.src&&j.alt===h.alt||f.push(k)
11238}),by(this.list,{width:"auto"}),this.initList(),this.isShown&&(this.length?this.viewed&&(0<=(b=f.indexOf(this.index))?(this.viewed=!1,this.view(Math.max(Math.min(this.index-b,this.length-1),0))):(bx(b=this.items[this.index],aB),b.setAttribute("aria-selected",!0))):(this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""))):this.build()),this
11239},destroy:function(){var a=this.element,b=this.options;
11240return a[aH]&&(this.destroyed=!0,this.ready?(this.played&&this.stop(),b.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):b.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),b.inline||ab(a,a7,this.onStart),a[aH]=void 0),this
11241}},a3={getImageURL:function(a){var b=this.options.url;
11242return b=aP(b)?a.getAttribute(b):aU(b)?b.call(this,a):""
11243},enforceFocus:function(){var a=this;
11244this.clearEnforceFocus(),br(document,bb,this.onFocusin=function(b){var c=a.viewer,b=b.target;
11245b===document||b===c||c.contains(b)||null!==b.getAttribute("tabindex")&&"true"===b.getAttribute("aria-modal")||c.focus()
11246})
11247},clearEnforceFocus:function(){this.onFocusin&&(ab(document,bb,this.onFocusin),this.onFocusin=null)
11248},open:function(){var a=this.body;
11249bx(a,bn),a.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px")
11250},close:function(){var a=this.body;
11251ah(a,bn),a.style.paddingRight=this.initialBodyPaddingRight
11252},shown:function(){var b=this.element,c=this.options,a=this.viewer;
11253this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,c.focus&&(a.focus(),this.enforceFocus()),aU(c.shown)&&br(b,bm,c.shown,{once:!0}),!1!==bz(b,bm)&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)
11254},hidden:function(){var b=this.element,c=this.options,a=this.viewer;
11255c.fucus&&this.clearEnforceFocus(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.close(),this.unbind(),bx(a,an),a.removeAttribute("role"),a.removeAttribute("aria-labelledby"),a.removeAttribute("aria-modal"),a.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.hiding=!1,this.destroyed||(aU(c.hidden)&&br(b,"hidden",c.hidden,{once:!0}),bz(b,"hidden",null,{cancelable:!1}))
11256},requestFullscreen:function(a){var b=this.element.ownerDocument;
11257this.fulled&&!(b.fullscreenElement||b.webkitFullscreenElement||b.mozFullScreenElement||b.msFullscreenElement)&&((b=b.documentElement).requestFullscreen?ai(a)?b.requestFullscreen(a):b.requestFullscreen():b.webkitRequestFullscreen?b.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):b.mozRequestFullScreen?b.mozRequestFullScreen():b.msRequestFullscreen&&b.msRequestFullscreen())
11258},exitFullscreen:function(){var a=this.element.ownerDocument;
11259this.fulled&&(a.fullscreenElement||a.webkitFullscreenElement||a.mozFullScreenElement||a.msFullscreenElement)&&(a.exitFullscreen?a.exitFullscreen():a.webkitExitFullscreen?a.webkitExitFullscreen():a.mozCancelFullScreen?a.mozCancelFullScreen():a.msExitFullscreen&&a.msExitFullscreen())
11260},change:function(l){var j=this.options,f=this.pointers,d=f[Object.keys(f)[0]];
11261if(d){var m,k,c=d.endX-d.startX,b=d.endY-d.startY;
11262switch(this.action){case aL:this.move(c,b,l);
11263break;
11264case aK:this.zoom((m=aC({},g=f),k=[],ao(g,function(e,a){delete m[a],ao(m,function(o){var p=Math.abs(e.startX-o.startX),h=Math.abs(e.startY-o.startY),q=Math.abs(e.endX-o.endX),o=Math.abs(e.endY-o.endY),h=Math.sqrt(p*p+h*h),o=Math.sqrt(q*q+o*o);
11265k.push((o-h)/h)
11266})
11267}),k.sort(function(a,h){return Math.abs(a)<Math.abs(h)
11268}),k[0]),!1,l);
11269break;
11270case aq:this.action="switched";
11271var g=Math.abs(c);
112721<g&&g>Math.abs(b)&&(this.pointers={},1<c?this.prev(j.loop):c<-1&&this.next(j.loop))
11273}ao(f,function(a){a.startX=a.endX,a.startY=a.endY
11274})
11275}},isSwitchable:function(){var a=this.imageData,b=this.viewerData;
11276return 1<this.length&&0<=a.x&&0<=a.y&&a.width<=b.width&&a.height<=b.height
11277}},aR=aA.Viewer,ac=(bw=-1,function(){return bw+=1
11278}),aA=function(){function b(f){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};
11279if(!function(h,i){if(!(h instanceof i)){throw new TypeError("Cannot call a class as a function")
11280}
11280}(this,b),!f||1!==f.nodeType){throw new Error("The first argument is required and must be an element.")
11281}this.element=f,this.options=bq({},au,ai(g)&&g),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.id=ac(),this.init()
11282}var a,c,d;
11283return a=b,d=[{key:"noConflict",value:function(){return window.Viewer=aR,b
11284}},{key:"setDefaults",value:function(e){bq(au,ai(e)&&e)
11285}}],(c=[{key:"init",value:function(){var h,k,g,m,l=this,j=this.element,f=this.options;
11286j[aH]||(j[aH]=this,f.focus&&!f.keyboard&&(f.focus=!1),h="img"===j.localName,k=[],ao(h?[j]:j.querySelectorAll("img"),function(e){aU(f.filter)?f.filter.call(l,e)&&k.push(e):l.getImageURL(e)&&k.push(e)
11287}),this.isImg=h,this.length=k.length,this.images=k,this.initBody(),a5(document.createElement(aH).style.transition)&&(f.transition=!1),f.inline?(g=0,m=function(){var e;
11288(g+=1)===l.length&&(l.initializing=!1,l.delaying={abort:function(){clearTimeout(e)
11289}},e=setTimeout(function(){l.delaying=!1,l.build()
11290},0))
11291},this.initializing={abort:function(){ao(k,function(e){e.complete||ab(e,a9,m)
11292})
11293}},ao(k,function(e){e.complete?m():br(e,a9,m,{once:!0})
11294})):br(j,a7,this.onStart=function(e){e=e.target;
11295l.view(l.images.indexOf(e));
11296"img"!==e.localName||aU(f.filter)&&!f.filter.call(l,e)
11297}))
11298}},{key:"build",value:function(){var B,C,w,q,j,g,z,f,v,p,y,A,x,k;
11299this.ready||(B=this.element,C=this.options,w=B.parentNode,(x=document.createElement("div")).innerHTML='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>',j=(q=x.querySelector(".".concat(aH,"-container"))).querySelector(".".concat(aH,"-title")),g=q.querySelector(".".concat(aH,"-toolbar")),z=q.querySelector(".".concat(aH,"-navbar")),k=q.querySelector(".".concat(aH,"-button")),x=q.querySelector(".".concat(aH,"-canvas")),this.parent=w,this.viewer=q,this.title=j,this.toolbar=g,this.navbar=z,this.button=k,this.canvas=x,this.footer=q.querySelector(".".concat(aH,"-footer")),this.tooltipBox=q.querySelector(".".concat(aH,"-tooltip")),this.player=q.querySelector(".".concat(aH,"-player")),this.list=q.querySelector(".".concat(aH,"-list")),q.id="".concat(aH).concat(this.id),j.id="".concat(aH,"Title").concat(this.id),bx(j,C.title?bs(Array.isArray(C.title)?C.title[0]:C.title):an),bx(z,C.navbar?bs(C.navbar):an),aw(k,an,!C.button),C.keyboard&&k.setAttribute("tabindex",0),C.backdrop&&(bx(q,"".concat(aH,"-backdrop")),C.inline||"static"===C.backdrop||bv(x,bc,"hide")),aP(C.className)&&C.className&&C.className.split(aS).forEach(function(e){bx(q,e)
11300}),C.toolbar?(f=document.createElement("ul"),v=ai(C.toolbar),p=bu.slice(0,3),y=bu.slice(7,9),A=bu.slice(9),v||bx(g,bs(C.toolbar)),ao(v?C.toolbar:bu,function(l,m){var h=v&&ai(l),s=v?bp(m):l,r=h&&!a5(l.show)?l.show:l;
11301!r||!C.zoomable&&-1!==p.indexOf(s)||!C.rotatable&&-1!==y.indexOf(s)||!C.scalable&&-1!==A.indexOf(s)||(m=h&&!a5(l.size)?l.size:l,h=h&&!a5(l.click)?l.click:l,l=document.createElement("li"),C.keyboard&&l.setAttribute("tabindex",0),l.setAttribute("role","button"),bx(l,"".concat(aH,"-").concat(s)),aU(h)||bv(l,bc,s),bd(r)&&bx(l,bs(r)),-1!==["small","large"].indexOf(m)?bx(l,"".concat(aH,"-").concat(m)):"play"===s&&bx(l,"".concat(aH,"-large")),aU(h)&&br(l,a7,h),f.appendChild(l))
11302}),g.appendChild(f)):bx(g,an),C.rotatable||(bx(x=g.querySelectorAll('li[class*="rotate"]'),bj),ao(x,function(e){g.appendChild(e)
11303})),C.inline?(bx(k,aN),by(q,{zIndex:C.zIndexInline}),"static"===window.getComputedStyle(w).position&&by(w,{position:"relative"}),w.insertBefore(q,B.nextSibling)):(bx(k,aI),bx(q,ay),bx(q,ap),bx(q,an),by(q,{zIndex:C.zIndex}),(k=(k=aP(k=C.container)?B.ownerDocument.querySelector(k):k)||this.body).appendChild(q)),C.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,aU(C.ready)&&br(B,aE,C.ready,{once:!0}),!1!==bz(B,aE)?this.ready&&C.inline&&this.view(this.index):this.ready=!1)
11304}}])&&az(a.prototype,c),d&&az(a,d),b
11305}();
11306return bq(aA.prototype,aW,av,ar,bA,a3),aA
11307});;�

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.