/* owl.carousel2.thumbs - v0.1.8 | (c) 2016 @gijsroge | mit license | https://github.com/gijsroge/owlcarousel2-thumbs */ !function(f,g,h,i){var j=function(a){this.owl=a,this._thumbcontent=[],this._identifier=0,this.owl_currentitem=this.owl.options.startposition,this.$element=this.owl.$element,this._handlers={"prepared.owl.carousel":f.proxy(function(d){if(!d.namespace||!this.owl.options.thumbs||this.owl.options.thumbimage||this.owl.options.thumbsprerendered||this.owl.options.thumbimage){if(d.namespace&&this.owl.options.thumbs&&this.owl.options.thumbimage){var e=f(d.content).find("img");this._thumbcontent.push(e)}}else{f(d.content).find("[data-thumb]").attr("data-thumb")!==i&&this._thumbcontent.push(f(d.content).find("[data-thumb]").attr("data-thumb"))}},this),"initialized.owl.carousel":f.proxy(function(b){b.namespace&&this.owl.options.thumbs&&(this.render(),this.listen(),this._identifier=this.owl.$element.data("slider-id"),this.setactive())},this),"changed.owl.carousel":f.proxy(function(b){b.namespace&&"position"===b.property.name&&this.owl.options.thumbs&&(this._identifier=this.owl.$element.data("slider-id"),this.setactive())},this)},this.owl.options=f.extend({},j.defaults,this.owl.options),this.owl.$element.on(this._handlers)};j.defaults={thumbs:!0,thumbimage:!1,thumbcontainerclass:"owl-thumbs",thumbitemclass:"owl-thumb-item",movethumbsinside:!1},j.prototype.listen=function(){var a=this.owl.options;a.thumbsprerendered&&(this._thumbcontent._thumbcontainer=f("."+a.thumbcontainerclass)),f(this._thumbcontent._thumbcontainer).on("click",this._thumbcontent._thumbcontainer.children(),f.proxy(function(b){this._identifier=f(b.target).closest("."+a.thumbcontainerclass).data("slider-id");var e=f(b.target).parent().is(this._thumbcontent._thumbcontainer)?f(b.target).index():f(b.target).closest("."+a.thumbitemclass).index();a.thumbsprerendered?f("[data-slider-id="+this._identifier+"]").trigger("to.owl.carousel",[e,a.dotsspeed,!0]):this.owl.to(e,a.dotsspeed),b.preventdefault()},this))},j.prototype.render=function(){var a=this.owl.options;a.thumbsprerendered?(this._thumbcontent._thumbcontainer=f("."+a.thumbcontainerclass),a.movethumbsinside&&this._thumbcontent._thumbcontainer.appendto(this.$element)):this._thumbcontent._thumbcontainer=f("
").addclass(a.thumbcontainerclass).appendto(this.$element);var d;if(a.thumbimage){for(d=0;d')}}else{for(d=0;d"+this._thumbcontent[d]+"")}}},j.prototype.setactive=function(){this.owl_currentitem=this.owl._current-this.owl._clones.length/2,this.owl_currentitem===this.owl._items.length&&(this.owl_currentitem=0);var a=this.owl.options,d=a.thumbsprerendered?f("."+a.thumbcontainerclass+'[data-slider-id="'+this._identifier+'"]'):this._thumbcontent._thumbcontainer;d.children().filter(".active").removeclass("active"),d.children().eq(this.owl_currentitem).addclass("active")},j.prototype.destroy=function(){var c,d;for(c in this._handlers){this.owl.$element.off(c,this._handlers[c])}for(d in object.getownpropertynames(this)){"function"!=typeof this[d]&&(this[d]=null)}},f.fn.owlcarousel.constructor.plugins.thumbs=j}(window.zepto||window.jquery,window,document);