;(function ( $, window, document, undefined ) { var defaults={items:3,loop:false,center:false,mousedrag:true,touchdrag:true,pulldrag:true,freedrag:false,margin:0,stagepadding:0,merge:false,mergefit:true,autowidth:false,autoheight:false,startposition:0,urlhashlistener:false,nav:false,navrewind:true,navtext:["prev","next"],slideby:1,dots:true,dotseach:false,dotdata:false,lazyload:false,lazycontent:false,autoplay:false,autoplaytimeout:5000,autoplayhoverpause:false,smartspeed:250,fluidspeed:false,autoplayspeed:false,navspeed:false,dotsspeed:false,dragendspeed:false,responsive:{},responsiverefreshrate:200,responsivebaseelement:window,responsiveclass:false,video:false,videoheight:false,videowidth:false,animateout:false,animatein:false,fallbackeasing:"swing",callbacks:false,info:false,nesteditemselector:false,itemelement:"div",stageelement:"div",themeclass:"owl-theme",baseclass:"owl-carousel",itemclass:"owl-item",centerclass:"center",activeclass:"active",navcontainerclass:"owl-nav",navclass:["owl-prev","owl-next"],controlsclass:"owl-controls",dotclass:"owl-dot",dotsclass:"owl-dots",autoheightclass:"owl-height"};var dom={el:null,$el:null,stage:null,$stage:null,ostage:null,$ostage:null,$items:null,$oitems:null,$citems:null,$cc:null,$navprev:null,$navnext:null,$page:null,$nav:null,$content:null};var width={el:0,stage:0,item:0,prevwindow:0,clonelast:0};var num={items:0,oitems:0,citems:0,active:0,merged:[],nav:[],allpages:0};var pos={start:0,max:0,maxvalue:0,prev:0,current:0,currentabs:0,currentpage:0,stage:0,items:[],lscurrent:0};var drag={start:0,startx:0,starty:0,current:0,currentx:0,currenty:0,offsetx:0,offsety:0,distance:null,starttime:0,endtime:0,updatedx:0,targetel:null};var speed={ondragend:300,nav:300,css2speed:0};var state={istouch:false,isscrolling:false,isswiping:false,direction:false,inmotion:false,autoplay:false,lazycontent:false};var e={_ondragstart:null,_ondragmove:null,_ondragend:null,_transitionend:null,_resizer:null,_responsivecall:null,_gotoloop:null,_checkvisibile:null,_autoplay:null,_pause:null,_play:null,_stop:null};function owl(element,options){element.owlcarousel={"name":"owl carousel","author":"bartosz wojciechowski","version":"2.0.0-beta.1.8","released":"03.05.2014"};this.options=$.extend({},defaults,options);this._options=$.extend({},defaults,options);this.dom=$.extend({},dom);this.width=$.extend({},width);this.num=$.extend({},num);this.pos=$.extend({},pos);this.drag=$.extend({},drag);this.speed=$.extend({},speed);this.state=$.extend({},state);this.e=$.extend({},e);this.dom.el=element;this.dom.$el=$(element);this.init()}; owl.prototype.init=function(){this.firecallback('oninitbefore');if(!this.dom.$el.hasclass(this.options.baseclass)){this.dom.$el.addclass(this.options.baseclass)}if(!this.dom.$el.hasclass(this.options.themeclass)){this.dom.$el.addclass(this.options.themeclass)}if(this.options.rtl){this.dom.$el.addclass('owl-rtl')}this.browsersupport();this.sortoptions();this.setresponsiveoptions();if(this.options.autowidth&&this.state.imagesloaded!==true){var imgs=this.dom.$el.find('img');if(imgs.length){this.preloadautowidthimages(imgs);return false}}this.width.prevwindow=this.windowwidth();this.createstage();this.fetchcontent();this.eventscall();this.addcustomevents();this.internalevents();this.dom.$el.addclass('owl-loading');this.refresh(true);this.dom.$el.removeclass('owl-loading').addclass('owl-loaded');this.firecallback('oninitafter')};owl.prototype.sortoptions=function(){var resopt=this.options.responsive;this.responsivesorted={};var keys=[],i,j,k;for(i in resopt){keys.push(i)}keys=keys.sort(function(a,b){return a-b});for(j=0;jthis.options.items){this.options.slideby=this.options.items}if(this.options.loop&&this.num.oitems=this.options.items*3){this.state.lazycontent=true}else{this.state.lazycontent=false}if(this.state.lazycontent){this.pos.currentabs=this.options.items;this.dom.$content.remove()}else{this.createnormalstructure()}};owl.prototype.createnormalstructure=function(){for(var i=0;i-1){type='youtube'}else if(id[3].indexof('vimeo')>-1){type='vimeo'}id=id[6]}else{throw new error('missing video link.');}item.data('owl-item').videotype=type;item.data('owl-item').videoid=id;item.data('owl-item').videowidth=width;item.data('owl-item').videoheight=height;info={type:type,id:id};var dimensions=width&&height?'style="width:'+width+'px;height:'+height+'px;"':'';videoel.wrap('
');this.createvideotn(videoel,info)};owl.prototype.createvideotn=function(videoel,info){var tnlink,icon,height;var customtn=videoel.find('img');var srctype='src';var lazyclass='';var that=this;if(this.options.lazyload){srctype='data-src';lazyclass='owl-lazy'}if(customtn.length){addthumbnail(customtn.attr(srctype));customtn.remove();return false}function addthumbnail(tnpath){icon='
';if(that.options.lazyload){tnlink='
'}else{tnlink='
'}videoel.after(tnlink);videoel.after(icon)}if(info.type==='youtube'){var path="http://img.youtube.com/vi/"+info.id+"/hqdefault.jpg";addthumbnail(path)}else if(info.type==='vimeo'){$.ajax({type:'get',url:'http://vimeo.com/api/v2/video/'+info.id+'.json',jsonp:'callback',datatype:'jsonp',success:function(data){var path=data[0].thumbnail_large;addthumbnail(path);if(that.options.loop){that.updateitemstate()}}})}};owl.prototype.stopvideo=function(){this.firecallback('onvideostop');var item=this.dom.$items.eq(this.state.videoplayindex);item.find('.owl-video-frame').remove();item.removeclass('owl-video-playing');this.state.videoplay=false};owl.prototype.playvideo=function(ev){this.firecallback('onvideoplay');if(this.state.videoplay){this.stopvideo()}var videolink,videowrap,target=$(ev.target||ev.srcelement),item=target.closest('.'+this.options.itemclass);var videotype=item.data('owl-item').videotype,id=item.data('owl-item').videoid,width=item.data('owl-item').videowidth||math.floor(item.data('owl-item').width-this.options.margin),height=item.data('owl-item').videoheight||this.dom.$stage.height();if(videotype==='youtube'){videolink=""}else if(videotype==='vimeo'){videolink=''}item.addclass('owl-video-playing');this.state.videoplay=true;this.state.videoplayindex=item.data('owl-item').indexabs;videowrap=$('
'+videolink+'
');target.after(videowrap)};owl.prototype.loopclone=function(){if(!this.options.loop||this.state.lazycontent||this.num.oitemsthis.options.items){mergenumber=this.options.items}this.num.merged.push(parseint(mergenumber));this.width.mergestage+=this.width.item*this.num.merged[i]}else{this.num.merged.push(1)}if(this.options.loop){if(i>=this.num.citems/2&&i',stagex+view)))||(this.op(outsideview,'<',stagex)&&this.op(outsideview,'>',stagex+view))){this.num.active++;if(this.options.freedrag&&!foundcurrent){foundcurrent=true;this.pos.current=item.data('owl-item').index;this.pos.currentabs=item.data('owl-item').indexabs}item.data('owl-item').active=true;item.data('owl-item').current=true;item.addclass(this.options.activeclass);if(!this.options.lazyload){item.data('owl-item').loaded=true}if(this.options.loop&&(this.options.lazyload||this.options.center)){this.updatecloneditemsstate(item.data('owl-item').index)}}}};owl.prototype.updatecloneditemsstate=function(activeindex){var center,$el,i;if(this.options.center){center=this.dom.$items.eq(this.pos.currentabs).data('owl-item').index}for(i=0;ithis.pos.currentabs){this.pos.lccurrent-=this.options.items-this.pos.currentabs;this.state.lcdirection='left'}this.pos.lccurrent=jumpto!==0?jumpto:this.pos.lccurrent;if(this.pos.lccurrent>=this.dom.$content.length){this.pos.lccurrent=this.pos.lccurrent-this.dom.$content.length}else if(this.pos.lccurrent<-this.dom.$content.length+1){this.pos.lccurrent=this.pos.lccurrent+this.dom.$content.length}if(this.options.startposition>0){this.pos.lccurrent=this.options.startposition;this._options.startposition=this.options.startposition=0}this.pos.lccurrentabs=this.pos.lccurrent<0?this.pos.lccurrent+this.dom.$content.length:this.pos.lccurrent};owl.prototype.updatelazycontent=function(update){if(this.pos.lccurrent===undefined){this.pos.lccurrent=0;this.pos.current=this.pos.currentabs=this.options.items}if(!update){this.updatelazyposition()}var i,j,item,contentpos,content,freshitem,freshdata;if(this.state.lcdirection!==false){for(i=0;i=this.dom.$content.length){contentpos=contentpos-this.dom.$content.length}if(contentpos<-this.dom.$content.length){contentpos=contentpos+this.dom.$content.length}content=this.dom.$content.eq(contentpos);freshitem=this.dom.$items.eq(j);freshdata=freshitem.data('owl-item');if(freshdata.active===false||this.pos.gotolazycontent!==0||update===true){freshitem.empty();freshitem.append(content.clone(true,true));freshdata.active=true;freshdata.current=true;if(!this.options.lazyload){freshdata.loaded=true}else{freshdata.loaded=false}}}this.pos.gotolazycontent=0;this.pos.current=this.pos.currentabs=this.options.items;this.setspeed(0);this.animstage(this.pos.items[this.options.items])};owl.prototype.eventscall=function(){this.e._ondragstart=function(e){this.ondragstart(e)}.bind(this);this.e._ondragmove=function(e){this.ondragmove(e)}.bind(this);this.e._ondragend=function(e){this.ondragend(e)}.bind(this);this.e._transitionend=function(e){this.transitionend(e)}.bind(this);this.e._resizer=function(){this.responsivetimer()}.bind(this);this.e._responsivecall=function(){this.responsive()}.bind(this);this.e._preventclick=function(e){this.preventclick(e)}.bind(this);this.e._gotohash=function(){this.gotohash()}.bind(this);this.e._gotopage=function(e){this.gotopage(e)}.bind(this);this.e._ap=function(){this.autoplay()}.bind(this);this.e._play=function(){this.play()}.bind(this);this.e._pause=function(){this.pause()}.bind(this);this.e._playvideo=function(e){this.playvideo(e)}.bind(this);this.e._navnext=function(e){if($(e.target).hasclass('disabled')){return false}e.preventdefault();this.next()}.bind(this);this.e._navprev=function(e){if($(e.target).hasclass('disabled')){return false}e.preventdefault();this.prev()}.bind(this)};owl.prototype.responsivetimer=function(){if(this.windowwidth()===this.width.prevwindow){return false}window.clearinterval(this.e._autoplay);window.cleartimeout(this.resizetimer);this.resizetimer=window.settimeout(this.e._responsivecall,this.options.responsiverefreshrate);this.width.prevwindow=this.windowwidth()};owl.prototype.internalevents=function(){var istouch=istouchsupport();var istouchie=istouchsupportie();if(istouch&&!istouchie){this.dragtype=['touchstart','touchmove','touchend','touchcancel']}else if(istouch&&istouchie){this.dragtype=['mspointerdown','mspointermove','mspointerup','mspointercancel']}else{this.dragtype=['mousedown','mousemove','mouseup']}if((istouch||istouchie)&&this.options.touchdrag){this.on(document,this.dragtype[3],this.e._ondragend)}else{this.dom.$stage.on('dragstart',function(){return false});if(this.options.mousedrag){this.dom.stage.onselectstart=function(){return false}}else{this.dom.$el.addclass('owl-text-select-on')}}this.dom.$stage.on(this.dragtype[2],'.owl-video-play-icon',this.e._playvideo);if(this.options.urlhashlistener){this.on(window,'hashchange',this.e._gotohash,false)}if(this.options.autoplayhoverpause){var that=this;this.dom.$stage.on('mouseover',this.e._pause);this.dom.$stage.on('mouseleave',this.e._ap)}if(this.transitionendvendor){this.on(this.dom.stage,this.transitionendvendor,this.e._transitionend,false)}if(this.options.responsive!==false){this.on(window,'resize',this.e._resizer,false)}this.updateevents()};owl.prototype.updateevents=function(){if(this.options.touchdrag&&(this.dragtype[0]==='touchstart'||this.dragtype[0]==='mspointerdown')){this.on(this.dom.stage,this.dragtype[0],this.e._ondragstart,false)}else if(this.options.mousedrag&&this.dragtype[0]==='mousedown'){this.on(this.dom.stage,this.dragtype[0],this.e._ondragstart,false)}else{this.off(this.dom.stage,this.dragtype[0],this.e._ondragstart)}};owl.prototype.ondragstart=function(event){var ev=event.originalevent||event||window.event;if(ev.which===3){return false}if(this.dragtype[0]==='mousedown'){this.dom.$stage.addclass('owl-grab')}this.firecallback('ontouchstart');this.drag.starttime=new date().gettime();this.setspeed(0);this.state.istouch=true;this.state.isscrolling=false;this.state.isswiping=false;this.drag.distance=0;var istouchevent=ev.type==='touchstart';var pagex=istouchevent?event.targettouches[0].pagex:(ev.pagex||ev.clientx);var pagey=istouchevent?event.targettouches[0].pagey:(ev.pagey||ev.clienty);this.drag.offsetx=this.dom.$stage.position().left-this.options.stagepadding;this.drag.offsety=this.dom.$stage.position().top;if(this.options.rtl){this.drag.offsetx=this.dom.$stage.position().left+this.width.stage-this.width.el+this.options.margin}if(this.state.inmotion&&this.support3d){var animatedpos=this.gettransformproperty();this.drag.offsetx=animatedpos;this.animstage(animatedpos)}else if(this.state.inmotion&&!this.support3d){this.state.inmotion=false;return false}this.drag.startx=pagex-this.drag.offsetx;this.drag.starty=pagey-this.drag.offsety;this.drag.start=pagex-this.drag.startx;this.drag.targetel=ev.target||ev.srcelement;this.drag.updatedx=this.drag.start;this.on(document,this.dragtype[1],this.e._ondragmove,false);this.on(document,this.dragtype[2],this.e._ondragend,false)};owl.prototype.ondragmove=function(event){if(!this.state.istouch){return}if(this.state.isscrolling){return}var neighbouritemwidth=0;var ev=event.originalevent||event||window.event;var istouchevent=ev.type=='touchmove';var pagex=istouchevent?ev.targettouches[0].pagex:(ev.pagex||ev.clientx);var pagey=istouchevent?ev.targettouches[0].pagey:(ev.pagey||ev.clienty);this.drag.currentx=pagex-this.drag.startx;this.drag.currenty=pagey-this.drag.starty;this.drag.distance=this.drag.currentx-this.drag.offsetx;if(this.drag.distance<0){this.state.direction=this.options.rtl?'right':'left'}else if(this.drag.distance>0){this.state.direction=this.options.rtl?'left':'right'}if(this.options.loop){if(this.op(this.drag.currentx,'>',this.pos.minvalue)&&this.state.direction==='right'){this.drag.currentx-=this.pos.loop}else if(this.op(this.drag.currentx,'<',this.pos.maxvalue)&&this.state.direction==='left'){this.drag.currentx+=this.pos.loop}}else{var minvalue=this.options.rtl?this.pos.maxvalue:this.pos.minvalue;var maxvalue=this.options.rtl?this.pos.minvalue:this.pos.maxvalue;var pull=this.options.pulldrag?this.drag.distance/5:0;this.drag.currentx=math.max(math.min(this.drag.currentx,minvalue+pull),maxvalue+pull)}if((this.drag.distance>8||this.drag.distance<-8)){if(ev.preventdefault!==undefined){ev.preventdefault()}else{ev.returnvalue=false}this.state.isswiping=true}this.drag.updatedx=this.drag.currentx;if((this.drag.currenty>16||this.drag.currenty<-16)&&this.state.isswiping===false){this.state.isscrolling=true;this.drag.updatedx=this.drag.start}this.animstage(this.drag.updatedx)};owl.prototype.ondragend=function(event){if(!this.state.istouch){return}if(this.dragtype[0]==='mousedown'){this.dom.$stage.removeclass('owl-grab')}this.firecallback('ontouchend');this.state.istouch=false;this.state.isscrolling=false;this.state.isswiping=false;if(this.drag.distance===0&&this.state.inmotion!==true){this.state.inmotion=false;return false}this.drag.endtime=new date().gettime();var comparetimes=this.drag.endtime-this.drag.starttime;var distanceabs=math.abs(this.drag.distance);if(distanceabs>3||comparetimes>300){this.removeclick(this.drag.targetel)}var closest=this.closest(this.drag.updatedx);this.setspeed(this.options.dragendspeed,false,true);this.animstage(this.pos.items[closest]);if(!this.options.pulldrag&&this.drag.updatedx===this.pos.items[closest]){this.transitionend()}this.drag.distance=0;this.off(document,this.dragtype[1],this.e._ondragmove);this.off(document,this.dragtype[2],this.e._ondragend)};owl.prototype.removeclick=function(target){this.drag.targetel=target;this.on(target,'click',this.e._preventclick,false)};owl.prototype.preventclick=function(ev){if(ev.preventdefault){ev.preventdefault()}else{ev.returnvalue=false}if(ev.stoppropagation){ev.stoppropagation()}this.off(this.drag.targetel,'click',this.e._preventclick,false)};owl.prototype.gettransformproperty=function(){var transform=window.getcomputedstyle(this.dom.stage,null).getpropertyvalue(this.vendorname+'transform');transform=transform.replace(/matrix(3d)?\(|\)/g,'').split(',');var matrix3d=transform.length===16;return matrix3d!==true?transform[4]:transform[12]};owl.prototype.closest=function(x){var newx=0,pull=30;if(!this.options.freedrag){for(var i=0;ithis.pos.items[i]-pull&&x',this.pos.items[i+1||this.pos.items[i]-this.width.el])){newx=this.state.direction==='left'?i+1:i}}}if(!this.options.loop){if(this.op(x,'>',this.pos.minvalue)){newx=x=this.pos.min}else if(this.op(x,'<',this.pos.maxvalue)){newx=x=this.pos.max}}if(!this.options.freedrag){this.pos.currentabs=newx;this.pos.current=this.dom.$items.eq(newx).data('owl-item').index}else{this.updateitemstate();return x}return newx};owl.prototype.animstage=function(pos){if(this.speed.current!==0&&this.pos.currentabs!==this.pos.min){this.firecallback('ontransitionstart');this.state.inmotion=true}var posx=this.pos.stage=pos,style=this.dom.stage.style;if(this.support3d){translate='translate3d('+posx+'px,0px, 0px)';style[this.transformvendor]=translate}else if(this.state.istouch){style.left=posx+'px'}else{this.dom.$stage.animate({left:posx},this.speed.css2speed,this.options.fallbackeasing,function(){if(this.state.inmotion){this.transitionend()}}.bind(this))}this.onchange()};owl.prototype.updateposition=function(pos){if(this.num.oitems===0){return false}if(pos===undefined){return false}var nextpos=pos;this.pos.prev=this.pos.currentabs;if(this.state.revert){this.pos.current=this.dom.$items.eq(nextpos).data('owl-item').index;this.pos.currentabs=nextpos;return}if(!this.options.loop){if(this.options.navrewind){nextpos=nextpos>this.pos.max?this.pos.min:(nextpos<0?this.pos.max:nextpos)}else{nextpos=nextpos>this.pos.max?this.pos.max:(nextpos<=0?0:nextpos)}}else{nextpos=nextpos>=this.num.oitems?this.num.oitems-1:nextpos}this.pos.current=this.dom.$oitems.eq(nextpos).data('owl-item').index;this.pos.currentabs=this.dom.$oitems.eq(nextpos).data('owl-item').indexabs};owl.prototype.setspeed=function(speed,pos,drag){var s=speed,nextpos=pos;if((s===false&&s!==0&&drag!==true)||s===undefined){var diff=math.abs(nextpos-this.pos.prev);diff=diff===0?1:diff;if(diff>6){diff=6}s=diff*this.options.smartspeed}if(s===false&&drag===true){s=this.options.smartspeed}if(s===0){s=0}if(this.support3d){var style=this.dom.stage.style;style.webkittransitionduration=style.mstransitionduration=style.mstransitionduration=style.moztransitionduration=style.otransitionduration=style.transitionduration=(s/1000)+'s'}else{this.speed.css2speed=s}this.speed.current=s;return s};owl.prototype.jumpto=function(pos,update){if(this.state.lazycontent){this.pos.gotolazycontent=pos}this.updateposition(pos);this.setspeed(0);this.animstage(this.pos.items[this.pos.currentabs]);if(update!==true){this.updateitemstate()}};owl.prototype.goto=function(pos,speed){if(this.state.lazycontent&&this.state.inmotion){return false}this.updateposition(pos);if(this.state.animate){speed=0}this.setspeed(speed,this.pos.currentabs);if(this.state.animate){this.animate()}this.animstage(this.pos.items[this.pos.currentabs])};owl.prototype.next=function(optionalspeed){var s=optionalspeed||this.options.navspeed;if(this.options.loop&&!this.state.lazycontent){this.gotoloop(this.options.slideby,s)}else{this.goto(this.pos.current+this.options.slideby,s)}};owl.prototype.prev=function(optionalspeed){var s=optionalspeed||this.options.navspeed;if(this.options.loop&&!this.state.lazycontent){this.gotoloop(-this.options.slideby,s)}else{this.goto(this.pos.current-this.options.slideby,s)}};owl.prototype.gotoloop=function(distance,speed){var revert=this.pos.currentabs,prevposition=this.pos.currentabs,newposition=this.pos.currentabs+distance,direction=prevposition-newposition<0?true:false;this.state.revert=true;if(newposition<1&&direction===false){this.state.bypass=true;revert=this.num.items-(this.options.items-prevposition)-this.options.items;this.jumpto(revert,true)}else if(newposition>=this.num.items-this.options.items&&direction===true){this.state.bypass=true;revert=prevposition-this.num.oitems;this.jumpto(revert,true)}window.cleartimeout(this.e._gotoloop);this.e._gotoloop=window.settimeout(function(){this.state.bypass=false;this.goto(revert+distance,speed);this.state.revert=false}.bind(this),30)};owl.prototype.initposition=function(init){if(!this.dom.$oitems||!init||this.state.lazycontent){return false}var pos=this.options.startposition;if(this.options.startposition==='urlhash'){pos=this.options.startposition=this.hashposition()}else if(typeof this.options.startposition!==number&&!this.options.center){this.options.startposition=0}this.dom.ostage.scrollleft=0;this.jumpto(pos,true)};owl.prototype.gotohash=function(){var pos=this.hashposition();if(pos===false){pos=0}this.dom.ostage.scrollleft=0;this.goto(pos,this.options.navspeed)};owl.prototype.hashposition=function(){var hash=window.location.hash.substring(1),hashpos;if(hash===""){return false}for(var i=0;i=this.pos.max){window.clearinterval(this.e._autoplay);this.goto(0)}else{this.next(this.options.autoplayspeed)}this.state.autoplay=true};owl.prototype.stop=function(){this._options.autoplay=this.options.autoplay=false;this.state.autoplay=false;window.clearinterval(this.e._autoplay)};owl.prototype.pause=function(){window.clearinterval(this.e._autoplay)};owl.prototype.transitionend=function(event){if(event!==undefined){event.stoppropagation();var eventtarget=event.target||event.srcelement||event.originaltarget;if(eventtarget!==this.dom.stage){return false}}this.state.inmotion=false;this.updateitemstate();this.autoplay();this.firecallback('ontransitionend')};owl.prototype.iselwidthchanged=function(){var newelwidth=this.dom.$el.width()-this.options.stagepadding,prevelwidth=this.width.el+this.options.margin;return newelwidth!==prevelwidth};owl.prototype.windowwidth=function(){if(this.options.responsivebaseelement!==window){this.width.window=$(this.options.responsivebaseelement).width()}else if(window.innerwidth){this.width.window=window.innerwidth}else if(document.documentelement&&document.documentelement.clientwidth){this.width.window=document.documentelement.clientwidth}return this.width.window};owl.prototype.controls=function(){var cc=document.createelement('div');cc.classname=this.options.controlsclass;this.dom.$el.append(cc);this.dom.$cc=$(cc)};owl.prototype.updatecontrols=function(){if(this.dom.$cc===null&&(this.options.nav||this.options.dots)){this.controls()}if(this.dom.$nav===null&&this.options.nav){this.createnavigation(this.dom.$cc[0])}if(this.dom.$page===null&&this.options.dots){this.createdots(this.dom.$cc[0])}if(this.dom.$nav!==null){if(this.options.nav){this.dom.$nav.show();this.updatenavigation()}else{this.dom.$nav.hide()}}if(this.dom.$page!==null){if(this.options.dots){this.dom.$page.show();this.updatedots()}else{this.dom.$page.hide()}}};owl.prototype.createnavigation=function(cc){var nav=document.createelement('div');nav.classname=this.options.navcontainerclass;cc.appendchild(nav);var navprev=document.createelement('div'),navnext=document.createelement('div');navprev.classname=this.options.navclass[0];navnext.classname=this.options.navclass[1];nav.appendchild(navprev);nav.appendchild(navnext);this.dom.$nav=$(nav);this.dom.$navprev=$(navprev).html(this.options.navtext[0]);this.dom.$navnext=$(navnext).html(this.options.navtext[1]);this.dom.$nav.on(this.dragtype[2],'.'+this.options.navclass[0],this.e._navprev);this.dom.$nav.on(this.dragtype[2],'.'+this.options.navclass[1],this.e._navnext)};owl.prototype.createdots=function(cc){var page=document.createelement('div');page.classname=this.options.dotsclass;cc.appendchild(page);this.dom.$page=$(page);var that=this;this.dom.$page.on(this.dragtype[2],'.'+this.options.dotclass,gotopage);function gotopage(e){e.preventdefault();var page=$(this).data('page');that.goto(page,that.options.dotsspeed)}this.rebuilddots()};owl.prototype.rebuilddots=function(){if(this.dom.$page===null){return false}var each,dot,span,counter=0,last=0,i,page=0,roundpages=0;each=this.options.dotseach||this.options.items;if(this.options.center||this.options.dotdata){each=1}this.dom.$page.html('');for(i=0;i=each||counter===0){dot=document.createelement('div');dot.classname=this.options.dotclass;span=document.createelement('span');dot.appendchild(span);var $dot=$(dot);if(this.options.dotdata){$dot.html(this.dom.$oitems.eq(i).data('owl-item').dot)}$dot.data('page',page);$dot.data('gotopage',roundpages);this.dom.$page.append(dot);counter=0;roundpages++}this.dom.$oitems.eq(i).data('owl-item').page=roundpages-1;counter+=this.num.nav[i];page++}if(!this.options.loop&&!this.options.center){for(var j=this.num.nav.length-1;j>=0;j--){last+=this.num.nav[j];this.dom.$oitems.eq(j).data('owl-item').page=roundpages-1;if(last>=each){break}}}this.num.allpages=roundpages-1};owl.prototype.updatedots=function(){var dots=this.dom.$page.children();var itemindex=this.dom.$oitems.eq(this.pos.current).data('owl-item').page;for(var i=0;i=this.pos.max){this.dom.$navnext.addclass('disabled')}}};owl.prototype.insertcontent=function(content){this.dom.$stage.empty();this.fetchcontent(content);this.refresh()};owl.prototype.additem=function(content,pos){pos=pos||0;if(this.state.lazycontent){this.dom.$content=this.dom.$content.add($(content));this.updateitemstate(true)}else{var item=this.fillitem(content);if(this.dom.$oitems.length===0){this.dom.$stage.append(item)}else{var it=this.dom.$oitems.eq(pos);if(pos!==-1){it.before(item)}else{it.after(item)}}this.refresh()}};owl.prototype.removeitem=function(pos){if(this.state.lazycontent){this.dom.$content.splice(pos,1);this.updateitemstate(true)}else{this.dom.$oitems.eq(pos).remove();this.refresh()}};owl.prototype.addcustomevents=function(){this.e.next=function(e,s){this.next(s)}.bind(this);this.e.prev=function(e,s){this.prev(s)}.bind(this);this.e.goto=function(e,p,s){this.goto(p,s)}.bind(this);this.e.jumpto=function(e,p){this.jumpto(p)}.bind(this);this.e.additem=function(e,c,p){this.additem(c,p)}.bind(this);this.e.removeitem=function(e,p){this.removeitem(p)}.bind(this);this.e.refresh=function(e){this.refresh()}.bind(this);this.e.destroy=function(e){this.destroy()}.bind(this);this.e.autoheight=function(e){this.autoheight(true)}.bind(this);this.e.stop=function(){this.stop()}.bind(this);this.e.play=function(e,t,s){this.play(t,s)}.bind(this);this.e.insertcontent=function(e,d){this.insertcontent(d)}.bind(this);this.dom.$el.on('next.owl',this.e.next);this.dom.$el.on('prev.owl',this.e.prev);this.dom.$el.on('goto.owl',this.e.goto);this.dom.$el.on('jumpto.owl',this.e.jumpto);this.dom.$el.on('additem.owl',this.e.additem);this.dom.$el.on('removeitem.owl',this.e.removeitem);this.dom.$el.on('destroy.owl',this.e.destroy);this.dom.$el.on('refresh.owl',this.e.refresh);this.dom.$el.on('autoheight.owl',this.e.autoheight);this.dom.$el.on('play.owl',this.e.play);this.dom.$el.on('stop.owl',this.e.stop);this.dom.$el.on('stopvideo.owl',this.e.stop);this.dom.$el.on('insertcontent.owl',this.e.insertcontent)};owl.prototype.on=function(element,event,listener,capture){if(element.addeventlistener){element.addeventlistener(event,listener,capture)}else if(element.attachevent){element.attachevent('on'+event,listener)}};owl.prototype.off=function(element,event,listener,capture){if(element.removeeventlistener){element.removeeventlistener(event,listener,capture)}else if(element.detachevent){element.detachevent('on'+event,listener)}};owl.prototype.firecallback=function(event,data){if(!this.options.callbacks){return}if(this.dom.el.dispatchevent){var evt=document.createevent('customevent');evt.initcustomevent(event,true,true,data);return this.dom.el.dispatchevent(evt)}else if(!this.dom.el.dispatchevent){return this.dom.$el.trigger(event)}};owl.prototype.watchvisibility=function(){if(!iselvisible(this.dom.el)){this.dom.$el.addclass('owl-hidden');window.clearinterval(this.e._checkvisibile);this.e._checkvisibile=window.setinterval(checkvisible.bind(this),500)}function iselvisible(el){return el.offsetwidth>0&&el.offsetheight>0}function checkvisible(){if(iselvisible(this.dom.el)){this.dom.$el.removeclass('owl-hidden');this.refresh();window.clearinterval(this.e._checkvisibile)}}};owl.prototype.onchange=function(){if(!this.state.istouch&&!this.state.bypass&&!this.state.responsive){if(this.options.nav||this.options.dots){this.updatecontrols()}this.autoheight();this.firecallback('onchangestate')}if(!this.state.istouch&&!this.state.bypass){this.storeinfo();if(this.state.videoplay){this.stopvideo()}}};owl.prototype.storeinfo=function(){var currentposition=this.state.lazycontent?this.pos.lccurrentabs||0:this.pos.current;var allitems=this.state.lazycontent?this.dom.$content.length-1:this.num.oitems;this.info={items:this.options.items,allitems:allitems,currentposition:currentposition,currentpage:this.pos.currentpage,allpages:this.num.allpages,autoplay:this.state.autoplay,windowwidth:this.width.window,elwidth:this.width.el,breakpoint:this.num.breakpoint};if(typeof this.options.info==='function'){this.options.info.apply(this,[this.info,this.dom.el])}};owl.prototype.autoheight=function(callback){if(this.options.autoheight!==true&&callback!==true){return false}if(!this.dom.$ostage.hasclass(this.options.autoheightclass)){this.dom.$ostage.addclass(this.options.autoheightclass)}var loaded=this.dom.$items.eq(this.pos.currentabs);var stage=this.dom.$ostage;var iterations=0;var isloaded=window.setinterval(function(){iterations+=1;if(loaded.data('owl-item').loaded){stage.height(loaded.height()+'px');clearinterval(isloaded)}else if(iterations===500){clearinterval(isloaded)}},100)};owl.prototype.preloadautowidthimages=function(imgs){var loaded=0;var that=this;imgs.each(function(i,el){var $el=$(el);var img=new image();img.onload=function(){loaded++;$el.attr('src',img.src);$el.css('opacity',1); if(loaded>=imgs.length){that.state.imagesloaded=true;that.init()}} img.src=$el.attr('src')||$el.attr('data-src')||$el.attr('data-src-retina')})};owl.prototype.lazyload=function(){var attr=isretina()?'data-src-retina':'data-src';var src,img,i;for(i=0;ib:a':return rtl?ab;case'>=':return rtl?a<=b:a>=b;case'<=':return rtl?a>=b:a<=b;default:break}};owl.prototype.browsersupport=function(){this.support3d=isperspective();if(this.support3d){this.transformvendor=istransform();var endvendors=['transitionend','webkittransitionend','transitionend','otransitionend'];this.transitionendvendor=endvendors[istransition()];this.vendorname=this.transformvendor.replace(/transform/i,'');this.vendorname=this.vendorname!==''?'-'+this.vendorname.tolowercase()+'-':''}this.state.orientation=window.orientation};function isstylesupported(array){var p,s,fake=document.createelement('div'),list=array;for(p in list){s=list[p];if(typeof fake.style[s]!=='undefined'){fake=null;return[s,p]}}return[false]}function istransition(){return isstylesupported(['transition','webkittransition','moztransition','otransition'])[1]}function istransform(){return isstylesupported(['transform','webkittransform','moztransform','otransform','mstransform'])[0]}function isperspective(){return isstylesupported(['perspective','webkitperspective','mozperspective','operspective','msperspective'])[0]}function istouchsupport(){return'ontouchstart'in window||!!(navigator.msmaxtouchpoints)}function istouchsupportie(){return window.navigator.mspointerenabled}function isretina(){return window.devicepixelratio>1}$.fn.owlcarousel=function(options){return this.each(function(){if(!$(this).data('owlcarousel')){$(this).data('owlcarousel',new owl(this,options))}})}})(window.zepto||window.jquery,window,document);if(!function.prototype.bind){function.prototype.bind=function(othis){if(typeof this!=='function'){throw new typeerror('function.prototype.bind - what is trying to be bound is not callable');}var aargs=array.prototype.slice.call(arguments,1),ftobind=this,fnop=function(){},fbound=function(){return ftobind.apply(this instanceof fnop&&othis?this:othis,aargs.concat(array.prototype.slice.call(arguments)))};fnop.prototype=this.prototype;fbound.prototype=new fnop();return fbound}; }