').addClass(options.controlsClass).appendTo(this.$element);}this._controls.$indicators=options.dotsContainer?$(options.dotsContainer):$('
').hide().addClass(options.dotsClass).appendTo(this._controls.$container);this._controls.$indicators.on('click','div',$.proxy(function(e){var index=$(e.target).parent().is(this._controls.$indicators)?$(e.target).index():$(e.target).parent().index();e.preventDefault();this.to(index,options.dotsSpeed);},this));$container=options.navContainer?$(options.navContainer):$('
').addClass(options.navContainerClass).prependTo(this._controls.$container);this._controls.$next=$('<'+options.navElement+'>');this._controls.$previous=this._controls.$next.clone();this._controls.$previous.addClass(options.navClass[0]).html(options.navText[0]).hide().prependTo($container).on('click',$.proxy(function(e){this.prev(options.navSpeed);},this));this._controls.$next.addClass(options.navClass[1]).html(options.navText[1]).hide().appendTo($container).on('click',$.proxy(function(e){this.next(options.navSpeed);},this));for(override in this._overrides){this._core[override]=$.proxy(this[override],this);}}
Navigation.prototype.destroy=function(){var handler,control,property,override;for(handler in this._handlers){this.$element.off(handler,this._handlers[handler]);}for(control in this._controls){this._controls[control].remove();}for(override in this.overides){this._core[override]=this._overrides[override];}for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}}
Navigation.prototype.update=function(){var i,j,k,options=this._core.settings,lower=this._core.clones().length/2,upper=lower+this._core.items().length,size=options.center||options.autoWidth||options.dotData?1:options.dotsEach||options.items;if(options.slideBy!=='page'){options.slideBy=Math.min(options.slideBy,options.items);}if(options.dots||options.slideBy=='page'){this._pages=[];for(i=lower,j=0,k=0;i=size||j===0){this._pages.push({start:i-lower,end:i-lower+size-1});j=0,++k;}j+=this._core.mergers(this._core.relative(i));}}}
Navigation.prototype.draw=function(){var difference,i,html='',options=this._core.settings,$items=this._core.$stage.children(),index=this._core.relative(this._core.current());if(options.nav&&!options.loop&&!options.navRewind){this._controls.$previous.toggleClass('disabled',index<=0);this._controls.$next.toggleClass('disabled',index>=this._core.maximum());}this._controls.$previous.toggle(options.nav);this._controls.$next.toggle(options.nav);if(options.dots){difference=this._pages.length-this._controls.$indicators.children().length;if(options.dotData&&difference!==0){for(i=0;i0){html=new Array(difference+1).join(this._templates[0]);this._controls.$indicators.append(html);}else if(difference<0){this._controls.$indicators.children().slice(difference).remove();}this._controls.$indicators.find('.active').removeClass('active');this._controls.$indicators.children().eq($.inArray(this.current(),this._pages)).addClass('active');}this._controls.$indicators.toggle(options.dots);}
Navigation.prototype.onTrigger=function(event){var settings=this._core.settings;event.page={index:$.inArray(this.current(),this._pages),count:this._pages.length,size:settings&&(settings.center||settings.autoWidth||settings.dotData?1:settings.dotsEach||settings.items)};}
Navigation.prototype.current=function(){var index=this._core.relative(this._core.current());return $.grep(this._pages,function(o){return o.start<=index&&o.end>=index;}).pop();}
Navigation.prototype.getPosition=function(successor){var position,length,options=this._core.settings;if(options.slideBy=='page'){position=$.inArray(this.current(),this._pages);length=this._pages.length;successor?++position:--position;position=this._pages[((position%length)+length)%length].start;}else{position=this._core.relative(this._core.current());length=this._core.items().length;successor?position+=options.slideBy:position-=options.slideBy;}return position;}
Navigation.prototype.next=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(true),speed);}
Navigation.prototype.prev=function(speed){$.proxy(this._overrides.to,this._core)(this.getPosition(false),speed);}
Navigation.prototype.to=function(position,speed,standard){var length;if(!standard){length=this._pages.length;$.proxy(this._overrides.to,this._core)(this._pages[((position%length)+length)%length].start,speed);}else{$.proxy(this._overrides.to,this._core)(position,speed);}}
$.fn.owlCarousel.Constructor.Plugins.Navigation=Navigation;})(window.Zepto||window.jQuery,window,document);;(function($,window,document,undefined){'use strict';var Hash=function(carousel){this._core=carousel;this._hashes={};this.$element=this._core.$element;this._handlers={'initialized.owl.carousel':$.proxy(function(){if(this._core.settings.startPosition=='URLHash'){$(window).trigger('hashchange.owl.navigation');}},this),'prepared.owl.carousel':$.proxy(function(e){var hash=$(e.content).find('[data-hash]').andSelf('[data-hash]').attr('data-hash');this._hashes[hash]=e.content;},this)};this._core.options=$.extend({},Hash.Defaults,this._core.options);this.$element.on(this._handlers);$(window).on('hashchange.owl.navigation',$.proxy(function(){var hash=window.location.hash.substring(1),items=this._core.$stage.children(),position=this._hashes[hash]&&items.index(this._hashes[hash])||0;if(!hash){return false;}this._core.to(position,false,true);},this));}
Hash.Defaults={URLhashListener:false}
Hash.prototype.destroy=function(){var handler,property;$(window).off('hashchange.owl.navigation');for(handler in this._handlers){this._core.$element.off(handler,this._handlers[handler]);}for(property in Object.getOwnPropertyNames(this)){typeof this[property]!='function'&&(this[property]=null);}}
$.fn.owlCarousel.Constructor.Plugins.Hash=Hash;})(window.Zepto||window.jQuery,window,document);