/*! * - v1.0.2 * author: bqworks */ ! function(a, b) { "use strict"; b.sliderpro = { modules: [], addmodule: function(a, c) { this.modules.push(a), b.extend(d.prototype, c) } }; var c = b.sliderpro.namespace = "sliderpro", d = function(a, c) { this.instance = a, this.$slider = b(this.instance), this.$slides = null, this.$slidesmask = null, this.$slidescontainer = null, this.slides = [], this.slidesorder = [], this.options = c, this.settings = {}, this.originalsettings = {}, this.originalgotoslide = null, this.selectedslideindex = 0, this.previousslideindex = 0, this.middleslideposition = 0, this.supportedanimation = null, this.vendorprefix = null, this.transitionevent = null, this.positionproperty = null, this.slidesposition = 0, this.slidewidth = 0, this.slideheight = 0, this.slidesize = 0, this.previousslidewidth = 0, this.previousslideheight = 0, this.previouswindowwidth = 0, this.previouswindowheight = 0, this.visibleoffset = 0, this.allowresize = !0, this.uniqueid = (new date).valueof(), this.breakpoints = [], this.currentbreakpoint = -1, this.shuffledindexes = [], this._init() }; d.prototype = { _init: function() { var d = this; this.settings = b.extend({}, this.defaults, this.options), this.supportedanimation = f.getsupportedanimation(), this.vendorprefix = f.getvendorprefix(), this.transitionevent = f.gettransitionevent(), this.$slider.removeclass("sp-no-js"), a.navigator.useragent.match(/(ipad|iphone|ipod)/g) && this.$slider.addclass("ios"); var e = /(msie) ([\w.]+)/, g = e.exec(a.navigator.useragent.tolowercase()); if(null !== g && this.$slider.addclass("ie ie" + parseint(g[2], 10)), this.$slidescontainer = b('
').appendto(this.$slider), this.$slidesmask = b('
').appendto(this.$slidescontainer), this.$slides = this.$slider.find(".sp-slides").appendto(this.$slidesmask), this.$slider.find(".sp-slide").appendto(this.$slides), this.settings.shuffle === !0) { var h = this.$slides.find(".sp-slide"), i = []; h.each(function(a) { d.shuffledindexes.push(a) }), this.shuffledindexes = this.shuffledindexes.sort(function() { return .5 - math.random() }), b.each(this.shuffledindexes, function(a, b) { i.push(h[b]) }), this.$slides.empty().append(i) } var j = b.sliderpro.modules; if("undefined" != typeof j) for(var k in j) { var l = j[k].substring(0, 1).tolowercase() + j[k].substring(1) + "defaults"; "undefined" != typeof this[l] && b.extend(this.settings, this[l]) } if(b.extend(this.settings, this.options), "undefined" != typeof j) for(var m in j) "undefined" != typeof this["init" + j[m]] && this["init" + j[m]](); if(this.originalsettings = b.extend({}, this.settings), this.originalgotoslide = this.gotoslide, null !== this.settings.breakpoints) { for(var n in this.settings.breakpoints) this.breakpoints.push({ size: parseint(n, 10), properties: this.settings.breakpoints[n] }); this.breakpoints = this.breakpoints.sort(function(a, b) { return a.size >= b.size ? 1 : -1 }) } this.selectedslideindex = this.settings.startslide, b(a).on("resize." + this.uniqueid + "." + c, function() { var c = b(a).width(), e = b(a).height(); d.allowresize === !1 || d.previouswindowwidth === c && d.previouswindowheight === e || (d.previouswindowwidth = c, d.previouswindowheight = e, d.allowresize = !1, settimeout(function() { d.resize(), d.allowresize = !0 }, 200)) }), this.on("update." + c, function() { d.previousslidewidth = 0, d.resize() }), this.update(), this.trigger({ type: "init" }), b.isfunction(this.settings.init) && this.settings.init.call(this, { type: "init" }) }, update: function() { var a = this; "horizontal" === this.settings.orientation ? (this.$slider.removeclass("sp-vertical").addclass("sp-horizontal"), this.$slider.css({ height: "", "max-height": "" }), this.$slides.find(".sp-slide").css("top", "")) : "vertical" === this.settings.orientation && (this.$slider.removeclass("sp-horizontal").addclass("sp-vertical"), this.$slides.find(".sp-slide").css("left", "")), this.positionproperty = "horizontal" === this.settings.orientation ? "left" : "top", this.gotoslide = this.originalgotoslide; for(var c = this.slides.length - 1; c >= 0; c--) if(0 === this.$slider.find('.sp-slide[data-index="' + c + '"]').length) { var d = this.slides[c]; d.destroy(), this.slides.splice(c, 1) } this.slidesorder.length = 0, this.$slider.find(".sp-slide").each(function(c) { var d = b(this); "undefined" == typeof d.attr("data-init") ? a._createslide(c, d) : a.slides[c].setindex(c), a.slidesorder.push(c) }), this.middleslideposition = parseint((a.slidesorder.length - 1) / 2, 10), this.settings.loop === !0 && this._updateslidesorder(), this.trigger({ type: "update" }), b.isfunction(this.settings.update) && this.settings.update.call(this, { type: "update" }) }, _createslide: function(a, c) { var d = new e(b(c), a, this.settings); this.slides.splice(a, 0, d) }, _updateslidesorder: function() { var a, c, d = b.inarray(this.selectedslideindex, this.slidesorder) - this.middleslideposition; if(0 > d) for(a = this.slidesorder.splice(d, math.abs(d)), c = a.length - 1; c >= 0; c--) this.slidesorder.unshift(a[c]); else if(d > 0) for(a = this.slidesorder.splice(0, d), c = 0; c <= a.length - 1; c++) this.slidesorder.push(a[c]) }, _updateslidesposition: function() { var a = parseint(this.$slides.find(".sp-slide").eq(this.selectedslideindex).css(this.positionproperty), 10); for(var b in this.slidesorder) { var c = this.$slides.find(".sp-slide").eq(this.slidesorder[b]); c.css(this.positionproperty, a + (b - this.middleslideposition) * (this.slidesize + this.settings.slidedistance)) } }, _resetslidesposition: function() { for(var a in this.slidesorder) { var b = this.$slides.find(".sp-slide").eq(this.slidesorder[a]); b.css(this.positionproperty, a * (this.slidesize + this.settings.slidedistance)) } var c = -parseint(this.$slides.find(".sp-slide").eq(this.selectedslideindex).css(this.positionproperty), 10) + this.visibleoffset; this._moveto(c, !0) }, resize: function() { var c = this; if(null !== this.settings.breakpoints && this.breakpoints.length > 0) if(b(a).width() > this.breakpoints[this.breakpoints.length - 1].size && -1 !== this.currentbreakpoint) this.currentbreakpoint = -1, this._setproperties(this.originalsettings, !1); else for(var d = 0, e = this.breakpoints.length; e > d; d++) if(b(a).width() <= this.breakpoints[d].size) { if(this.currentbreakpoint !== this.breakpoints[d].size) { var f = { type: "breakpointreach", size: this.breakpoints[d].size, settings: this.breakpoints[d].properties }; this.trigger(f), b.isfunction(this.settings.breakpointreach) && this.settings.breakpointreach.call(this, f), this.currentbreakpoint = this.breakpoints[d].size; var g = b.extend({}, this.originalsettings, this.breakpoints[d].properties); return void this._setproperties(g, !1) } break } this.settings.responsive === !0 ? "fullwidth" !== this.settings.forcesize && "fullwindow" !== this.settings.forcesize || "auto" !== this.settings.visiblesize && ("auto" === this.settings.visiblesize || "vertical" !== this.settings.orientation) ? this.$slider.css({ width: "100%", "max-width": this.settings.width, marginleft: "" }) : (this.$slider.css("margin", 0), this.$slider.css({ width: b(a).width(), "max-width": "", marginleft: -this.$slider.offset().left })) : this.$slider.css({ width: this.settings.width }), -1 === this.settings.aspectratio && (this.settings.aspectratio = this.settings.width / this.settings.height), this.slidewidth = this.$slider.width(), this.slideheight = "fullwindow" === this.settings.forcesize ? b(a).height() : isnan(this.settings.aspectratio) ? this.settings.height : this.slidewidth / this.settings.aspectratio, (this.previousslidewidth !== this.slidewidth || this.previousslideheight !== this.slideheight || "auto" !== this.settings.visiblesize || this.$slider.outerwidth() > this.$slider.parent().width() || this.$slider.width() !== this.$slidesmask.width()) && (this.previousslidewidth = this.slidewidth, this.previousslideheight = this.slideheight, this.slidesize = "horizontal" === this.settings.orientation ? this.slidewidth : this.slideheight, this.visibleslidessize = this.slidesize, this.visibleoffset = 0, b.each(this.slides, function(a, b) { b.setsize(c.slidewidth, c.slideheight) }), this.$slidesmask.css({ width: this.slidewidth, height: this.slideheight }), this.settings.autoheight === !0 ? settimeout(function() { c._resizeheight() }, 1) : this.$slidesmask.css(this.vendorprefix + "transition", ""), "auto" !== this.settings.visiblesize && ("horizontal" === this.settings.orientation ? ("fullwidth" === this.settings.forcesize || "fullwindow" === this.settings.forcesize ? (this.$slider.css("margin", 0), this.$slider.css({ width: b(a).width(), "max-width": "", marginleft: -this.$slider.offset().left })) : this.$slider.css({ width: this.settings.visiblesize, "max-width": "100%", marginleft: 0 }), this.$slidesmask.css("width", this.$slider.width()), this.visibleslidessize = this.$slidesmask.width(), this.visibleoffset = math.round((this.$slider.width() - this.slidewidth) / 2)) : (this.$slider.css("fullwindow" === this.settings.forcesize ? { height: b(a).height(), "max-height": "" } : { height: this.settings.visiblesize, "max-height": "100%" }), this.$slidesmask.css("height", this.$slider.height()), this.visibleslidessize = this.$slidesmask.height(), this.visibleoffset = math.round((this.$slider.height() - this.slideheight) / 2))), this._resetslidesposition(), this.trigger({ type: "sliderresize" }), b.isfunction(this.settings.sliderresize) && this.settings.sliderresize.call(this, { type: "sliderresize" })) }, _resizeheight: function() { var a = this, b = this.getslideat(this.selectedslideindex), d = b.getsize(); b.off("imagesloaded." + c), b.on("imagesloaded." + c, function(c) { if(c.index === a.selectedslideindex) { var d = b.getsize(); a._resizeheightto(d.height) } }), "loading" !== d && this._resizeheightto(d.height) }, gotoslide: function(a) { if(a !== this.selectedslideindex && "undefined" != typeof this.slides[a]) { var c = this; this.previousslideindex = this.selectedslideindex, this.selectedslideindex = a, this.$slides.find(".sp-selected").removeclass("sp-selected"), this.$slides.find(".sp-slide").eq(this.selectedslideindex).addclass("sp-selected"), this.settings.loop === !0 && (this._updateslidesorder(), this._updateslidesposition()), this.settings.autoheight === !0 && this._resizeheight(); var d = -parseint(this.$slides.find(".sp-slide").eq(this.selectedslideindex).css(this.positionproperty), 10) + this.visibleoffset; this._moveto(d, !1, function() { c.settings.loop === !0 && c._resetslidesposition(), c.trigger({ type: "gotoslidecomplete", index: a, previousindex: c.previousslideindex }), b.isfunction(c.settings.gotoslidecomplete) && c.settings.gotoslidecomplete.call(c, { type: "gotoslidecomplete", index: a, previousindex: c.previousslideindex }) }), this.trigger({ type: "gotoslide", index: a, previousindex: this.previousslideindex }), b.isfunction(this.settings.gotoslide) && this.settings.gotoslide.call(this, { type: "gotoslide", index: a, previousindex: this.previousslideindex }) } }, nextslide: function() { var a = this.selectedslideindex >= this.gettotalslides() - 1 ? 0 : this.selectedslideindex + 1; this.gotoslide(a) }, previousslide: function() { var a = this.selectedslideindex <= 0 ? this.gettotalslides() - 1 : this.selectedslideindex - 1; this.gotoslide(a) }, _moveto: function(a, b, c) { var d = this, e = {}; if(a !== this.slidesposition) if(this.slidesposition = a, "css-3d" === this.supportedanimation || "css-2d" === this.supportedanimation) { var f, g = "horizontal" === this.settings.orientation ? a : 0, h = "horizontal" === this.settings.orientation ? 0 : a; e[this.vendorprefix + "transform"] = "css-3d" === this.supportedanimation ? "translate3d(" + g + "px, " + h + "px, 0)" : "translate(" + g + "px, " + h + "px)", "undefined" != typeof b && b === !0 ? f = "" : (this.$slides.addclass("sp-animated"), f = this.vendorprefix + "transform " + this.settings.slideanimationduration / 1e3 + "s", this.$slides.on(this.transitionevent, function(a) { a.target === a.currenttarget && (d.$slides.off(d.transitionevent), d.$slides.removeclass("sp-animated"), "function" == typeof c && c()) })), e[this.vendorprefix + "transition"] = f, this.$slides.css(e) } else e["margin-" + this.positionproperty] = a, "undefined" != typeof b && b === !0 ? this.$slides.css(e) : (this.$slides.addclass("sp-animated"), this.$slides.animate(e, this.settings.slideanimationduration, function() { d.$slides.removeclass("sp-animated"), "function" == typeof c && c() })) }, _stopmovement: function() { var a = {}; if("css-3d" === this.supportedanimation || "css-2d" === this.supportedanimation) { var b = this.$slides.css(this.vendorprefix + "transform"), c = -1 !== b.indexof("matrix3d") ? "matrix3d" : "matrix", d = b.replace(c, "").match(/-?[0-9\.]+/g), e = "matrix3d" === c ? parseint(d[12], 10) : parseint(d[4], 10), f = "matrix3d" === c ? parseint(d[13], 10) : parseint(d[5], 10); a[this.vendorprefix + "transform"] = "css-3d" === this.supportedanimation ? "translate3d(" + e + "px, " + f + "px, 0)" : "translate(" + e + "px, " + f + "px)", a[this.vendorprefix + "transition"] = "", this.$slides.css(a), this.$slides.off(this.transitionevent), this.slidesposition = "horizontal" === this.settings.orientation ? e : f } else this.$slides.stop(), this.slidesposition = parseint(this.$slides.css("margin-" + this.positionproperty), 10); this.$slides.removeclass("sp-animated") }, _resizeheightto: function(a) { var b = { height: a }; "css-3d" === this.supportedanimation || "css-2d" === this.supportedanimation ? (b[this.vendorprefix + "transition"] = "height " + this.settings.heightanimationduration / 1e3 + "s", this.$slidesmask.css(b)) : this.$slidesmask.animate(b, this.settings.heightanimationduration) }, destroy: function() { this.$slider.removedata("sliderpro"), this.$slider.removeattr("style"), this.$slides.removeattr("style"), this.off("update." + c), b(a).off("resize." + this.uniqueid + "." + c); var d = b.sliderpro.modules; if("undefined" != typeof d) for(var e in d) "undefined" != typeof this["destroy" + d[e]] && this["destroy" + d[e]](); b.each(this.slides, function(a, b) { b.destroy() }), this.slides.length = 0, this.$slides.prependto(this.$slider), this.$slidescontainer.remove() }, _setproperties: function(a, b) { for(var c in a) this.settings[c] = a[c], b !== !1 && (this.originalsettings[c] = a[c]); this.update() }, on: function(a, b) { return this.$slider.on(a, b) }, off: function(a) { return this.$slider.off(a) }, trigger: function(a) { return this.$slider.triggerhandler(a) }, getslideat: function(a) { return this.slides[a] }, getselectedslide: function() { return this.selectedslideindex }, gettotalslides: function() { return this.slides.length }, defaults: { width: 500, height: 300, responsive: !0, aspectratio: -1, imagescalemode: "cover", centerimage: !0, autoheight: !1, startslide: 0, shuffle: !1, orientation: "horizontal", forcesize: "none", loop: !0, slidedistance: 10, slideanimationduration: 700, heightanimationduration: 700, visiblesize: "auto", breakpoints: null, init: function() {}, update: function() {}, sliderresize: function() {}, gotoslide: function() {}, gotoslidecomplete: function() {}, breakpointreach: function() {} } }; var e = function(a, b, c) { this.$slide = a, this.$mainimage = null, this.$imagecontainer = null, this.hasmainimage = !1, this.ismainimageloaded = !1, this.ismainimageloading = !1, this.hasimages = !1, this.areimagesloaded = !1, this.width = 0, this.height = 0, this.settings = c, this.setindex(b), this._init() }; e.prototype = { _init: function() { this.$slide.attr("data-init", !0), this.$mainimage = 0 !== this.$slide.find(".sp-image").length ? this.$slide.find(".sp-image") : null, null !== this.$mainimage && (this.hasmainimage = !0, this.$imagecontainer = b('
').prependto(this.$slide), 0 !== this.$mainimage.parent("a").length ? this.$mainimage.parent("a").appendto(this.$imagecontainer) : this.$mainimage.appendto(this.$imagecontainer)), this.hasimages = 0 !== this.$slide.find("img").length ? !0 : !1 }, setsize: function(a, b) { this.width = a, this.height = this.settings.autoheight === !0 ? "auto" : b, this.$slide.css({ width: this.width, height: this.height }), this.hasmainimage === !0 && (this.$imagecontainer.css({ width: this.width, height: this.height }), "undefined" == typeof this.$mainimage.attr("data-src") && this.resizemainimage()) }, getsize: function() { var a, b = this; if(this.hasimages === !0 && this.areimagesloaded === !1 && "undefined" == typeof this.$slide.attr("data-loading")) { this.$slide.attr("data-loading", !0); var d = f.checkimagescomplete(this.$slide, function() { b.areimagesloaded = !0, b.$slide.removeattr("data-loading"), b.trigger({ type: "imagesloaded." + c, index: b.index }) }); return "complete" === d ? (a = this.calculatesize(), { width: a.width, height: a.height }) : "loading" } return a = this.calculatesize(), { width: a.width, height: a.height } }, calculatesize: function() { var a = this.$slide.width(), c = this.$slide.height(); return this.$slide.children().each(function(d, e) { var f = b(e), g = e.getboundingclientrect(), h = f.position().top + (g.bottom - g.top), i = f.position().left + (g.right - g.left); h > c && (c = h), i > a && (a = i) }), { width: a, height: c } }, resizemainimage: function(a) { var b = this; return a === !0 && (this.ismainimageloaded = !1, this.ismainimageloading = !1), this.ismainimageloaded === !1 && this.ismainimageloading === !1 ? (this.ismainimageloading = !0, void f.checkimagescomplete(this.$mainimage, function() { b.ismainimageloaded = !0, b.ismainimageloading = !1, b.resizemainimage(), b.trigger({ type: "imagesloaded." + c, index: b.index }) })) : void(this.settings.autoheight === !0 ? this.$mainimage.css({ width: "100%", height: "auto", marginleft: "", margintop: "" }) : ("cover" === this.settings.imagescalemode ? this.$mainimage.css(this.$mainimage.width() / this.$mainimage.height() <= this.width / this.height ? { width: "100%", height: "auto" } : { width: "auto", height: "100%" }) : "contain" === this.settings.imagescalemode ? this.$mainimage.css(this.$mainimage.width() / this.$mainimage.height() >= this.width / this.height ? { width: "100%", height: "auto" } : { width: "auto", height: "100%" }) : "exact" === this.settings.imagescalemode && this.$mainimage.css({ width: "100%", height: "100%" }), this.settings.centerimage === !0 && this.$mainimage.css({ marginleft: .5 * (this.$imagecontainer.width() - this.$mainimage.width()), margintop: .5 * (this.$imagecontainer.height() - this.$mainimage.height()) }))) }, destroy: function() { this.$slide.removeattr("style"), this.$slide.removeattr("data-init"), this.$slide.removeattr("data-index"), this.$slide.removeattr("data-loaded"), this.hasmainimage === !0 && (this.$slide.find(".sp-image").removeattr("style").appendto(this.$slide), this.$slide.find(".sp-image-container").remove()) }, getindex: function() { return this.index }, setindex: function(a) { this.index = a, this.$slide.attr("data-index", this.index) }, on: function(a, b) { return this.$slide.on(a, b) }, off: function(a) { return this.$slide.off(a) }, trigger: function(a) { return this.$slide.triggerhandler(a) } }, a.sliderpro = d, a.sliderproslide = e, b.fn.sliderpro = function(a) { var c = array.prototype.slice.call(arguments, 1); return this.each(function() { if("undefined" == typeof b(this).data("sliderpro")) { var e = new d(this, a); b(this).data("sliderpro", e) } else if("undefined" != typeof a) { var f = b(this).data("sliderpro"); if("function" == typeof f[a]) f[a].apply(f, c); else if("undefined" != typeof f.settings[a]) { var g = {}; g[a] = c[0], f._setproperties(g) } else "object" == typeof a ? f._setproperties(a) : b.error(a + " does not exist in sliderpro.") } }) }; var f = { supportedanimation: null, vendorprefix: null, transitionevent: null, getsupportedanimation: function() { if(null !== this.supportedanimation) return this.supportedanimation; var a = document.body || document.documentelement, b = a.style, c = "undefined" != typeof b.transition || "undefined" != typeof b.webkittransition || "undefined" != typeof b.moztransition || "undefined" != typeof b.otransition; if(c === !0) { var d = document.createelement("div"); if(("undefined" != typeof d.style.webkitperspective || "undefined" != typeof d.style.perspective) && (this.supportedanimation = "css-3d"), "css-3d" === this.supportedanimation && "undefined" != typeof d.stylewebkitperspective) { var e = document.createelement("style"); e.textcontent = "@media (transform-3d),(-webkit-transform-3d){#test-3d{left:9px;position:absolute;height:5px;margin:0;padding:0;border:0;}}", document.getelementsbytagname("head")[0].appendchild(e), d.id = "test-3d", document.body.appendchild(d), (9 !== d.offsetleft || 5 !== d.offsetheight) && (this.supportedanimation = null), e.parentnode.removechild(e), d.parentnode.removechild(d) } null !== this.supportedanimation || "undefined" == typeof d.style["-webkit-transform"] && "undefined" == typeof d.style.transform || (this.supportedanimation = "css-2d") } else this.supportedanimation = "javascript"; return this.supportedanimation }, getvendorprefix: function() { if(null !== this.vendorprefix) return this.vendorprefix; var a = document.createelement("div"), b = ["webkit", "moz", "ms", "o"]; if("transform" in a.style) return this.vendorprefix = "", this.vendorprefix; for(var c = 0; c < b.length; c++) if(b[c] + "transform" in a.style) { this.vendorprefix = "-" + b[c].tolowercase() + "-"; break } return this.vendorprefix }, gettransitionevent: function() { if(null !== this.transitionevent) return this.transitionevent; var a = document.createelement("div"), b = { transition: "transitionend", webkittransition: "webkittransitionend", moztransition: "transitionend", otransition: "otransitionend" }; for(var c in b) if(c in a.style) { this.transitionevent = b[c]; break } return this.transitionevent }, checkimagescomplete: function(a, b) { var c = this, d = this.checkimagesstatus(a); if("loading" === d) var e = setinterval(function() { d = c.checkimagesstatus(a), "complete" === d && (clearinterval(e), "function" == typeof b && b()) }, 100); else "function" == typeof b && b(); return d }, checkimagesstatus: function(a) { var c = "complete"; return a.is("img") && a[0].complete === !1 ? c = "loading" : a.find("img").each(function() { var a = b(this)[0]; a.complete === !1 && (c = "loading") }), c } }; a.sliderproutils = f }(window, jquery), function(a, b) { "use strict"; var c = "thumbnails." + b.sliderpro.namespace, d = { $thumbnails: null, $thumbnailscontainer: null, thumbnails: [], selectedthumbnailindex: 0, thumbnailssize: 0, thumbnailscontainersize: 0, thumbnailsposition: 0, thumbnailsorientation: null, thumbnailspositionproperty: null, isthumbnailscroller: !1, initthumbnails: function() { var a = this; this.on("update." + c, b.proxy(this._thumbnailsonupdate, this)), this.on("sliderresize." + c, b.proxy(this._thumbnailsonresize, this)), this.on("gotoslide." + c, function(b) { a._gotothumbnail(b.index) }) }, _thumbnailsonupdate: function() { var a = this; if(0 === this.$slider.find(".sp-thumbnail").length && 0 === this.thumbnails.length) return void(this.isthumbnailscroller = !1); if(this.isthumbnailscroller = !0, null === this.$thumbnailscontainer && (this.$thumbnailscontainer = b('
').insertafter(this.$slidescontainer), this.$thumbnails = this.$slider.find(".sp-thumbnails").appendto(this.$thumbnailscontainer), this.settings.shuffle === !0)) { var c = this.$thumbnails.find(".sp-thumbnail"), d = []; b.each(this.shuffledindexes, function(a, e) { var f = b(c[e]); 0 !== f.parent("a").length && (f = f.parent("a")), d.push(f) }), this.$thumbnails.empty().append(d) } for(var e = this.thumbnails.length - 1; e >= 0; e--) if(0 === this.$thumbnails.find('.sp-thumbnail[data-index="' + e + '"]').length) { var f = this.thumbnails[e]; f.destroy(), this.thumbnails.splice(e, 1) } this.$thumbnails.find(".sp-thumbnail").each(function(c) { var d = b(this); "undefined" == typeof d.attr("data-init") ? a._createthumbnail(d, c) : a.thumbnails[c].setindex(c) }), this.$thumbnailscontainer.removeclass("sp-top-thumbnails sp-bottom-thumbnails sp-left-thumbnails sp-right-thumbnails"), "top" === this.settings.thumbnailsposition ? (this.$thumbnailscontainer.addclass("sp-top-thumbnails"), this.thumbnailsorientation = "horizontal") : "bottom" === this.settings.thumbnailsposition ? (this.$thumbnailscontainer.addclass("sp-bottom-thumbnails"), this.thumbnailsorientation = "horizontal") : "left" === this.settings.thumbnailsposition ? (this.$thumbnailscontainer.addclass("sp-left-thumbnails"), this.thumbnailsorientation = "vertical") : "right" === this.settings.thumbnailsposition && (this.$thumbnailscontainer.addclass("sp-right-thumbnails"), this.thumbnailsorientation = "vertical"), this.settings.thumbnailpointer === !0 ? this.$thumbnailscontainer.addclass("sp-has-pointer") : this.$thumbnailscontainer.removeclass("sp-has-pointer"), this.selectedthumbnailindex = this.selectedslideindex, this.$thumbnails.find(".sp-thumbnail-container").eq(this.selectedthumbnailindex).addclass("sp-selected-thumbnail"), this.thumbnailssize = 0, b.each(this.thumbnails, function(b, c) { c.setsize(a.settings.thumbnailwidth, a.settings.thumbnailheight), a.thumbnailssize += "horizontal" === a.thumbnailsorientation ? c.getsize().width : c.getsize().height }), "horizontal" === this.thumbnailsorientation ? (this.$thumbnails.css({ width: this.thumbnailssize, height: this.settings.thumbnailheight }), this.$thumbnailscontainer.css("height", ""), this.thumbnailspositionproperty = "left") : (this.$thumbnails.css({ width: this.settings.thumbnailwidth, height: this.thumbnailssize }), this.$thumbnailscontainer.css("width", ""), this.thumbnailspositionproperty = "top"), this.trigger({ type: "thumbnailsupdate" }), b.isfunction(this.settings.thumbnailsupdate) && this.settings.thumbnailsupdate.call(this, { type: "thumbnailsupdate" }) }, _createthumbnail: function(a, b) { var d = this, f = new e(a, this.$thumbnails, b); f.on("thumbnailclick." + c, function(a) { d.gotoslide(a.index) }), this.thumbnails.splice(b, 0, f) }, _thumbnailsonresize: function() { if(this.isthumbnailscroller !== !1) { var c, d = this; "horizontal" === this.thumbnailsorientation ? (this.thumbnailscontainersize = math.min(this.$slidesmask.width(), this.thumbnailssize), this.$thumbnailscontainer.css("width", this.thumbnailscontainersize), "fullwindow" === this.settings.forcesize && (this.$slidesmask.css("height", this.$slidesmask.height() - this.$thumbnailscontainer.outerheight(!0)), this.slideheight = this.$slidesmask.height(), b.each(this.slides, function(a, b) { b.setsize(d.slidewidth, d.slideheight) }))) : "vertical" === this.thumbnailsorientation && (this.$slidesmask.width() + this.$thumbnailscontainer.outerwidth(!0) > this.$slider.parent().width() && ("fullwidth" === this.settings.forcesize || "fullwindow" === this.settings.forcesize ? this.$slider.css("max-width", b(a).width() - this.$thumbnailscontainer.outerwidth(!0)) : this.$slider.css("max-width", this.$slider.parent().width() - this.$thumbnailscontainer.outerwidth(!0)), this.$slidesmask.css("width", this.$slider.width()), "horizontal" === this.settings.orientation ? (this.visibleoffset = math.round((this.$slider.width() - this.slidesize) / 2), this.visibleslidessize = this.$slidesmask.width()) : "vertical" === this.settings.orientation && (this.slidewidth = this.$slider.width(), b.each(this.slides, function(a, b) { b.setsize(d.slidewidth, d.slideheight) })), this._resetslidesposition()), this.thumbnailscontainersize = math.min(this.$slidesmask.height(), this.thumbnailssize), this.$thumbnailscontainer.css("height", this.thumbnailscontainersize)), c = this.thumbnailssize <= this.thumbnailscontainersize || 0 === this.$thumbnails.find(".sp-selected-thumbnail").length ? 0 : math.max(-this.thumbnails[this.selectedthumbnailindex].getposition()[this.thumbnailspositionproperty], this.thumbnailscontainersize - this.thumbnailssize), "top" === this.settings.thumbnailsposition ? this.$slider.css({ paddingtop: this.$thumbnailscontainer.outerheight(!0), paddingleft: "", paddingright: "" }) : "bottom" === this.settings.thumbnailsposition ? this.$slider.css({ paddingtop: "", paddingleft: "", paddingright: "" }) : "left" === this.settings.thumbnailsposition ? this.$slider.css({ paddingtop: "", paddingleft: this.$thumbnailscontainer.outerwidth(!0), paddingright: "" }) : "right" === this.settings.thumbnailsposition && this.$slider.css({ paddingtop: "", paddingleft: "", paddingright: this.$thumbnailscontainer.outerwidth(!0) }), this._movethumbnailsto(c, !0) } }, _gotothumbnail: function(a) { if(this.isthumbnailscroller !== !1 && "undefined" != typeof this.thumbnails[a]) { var c = this.selectedthumbnailindex, d = this.thumbnailsposition; if(this.selectedthumbnailindex = a, this.$thumbnails.find(".sp-selected-thumbnail").removeclass("sp-selected-thumbnail"), this.$thumbnails.find(".sp-thumbnail-container").eq(this.selectedthumbnailindex).addclass("sp-selected-thumbnail"), this.selectedthumbnailindex >= c) { var e = this.selectedthumbnailindex === this.thumbnails.length - 1 ? this.selectedthumbnailindex : this.selectedthumbnailindex + 1, f = this.thumbnails[e], g = "horizontal" === this.thumbnailsorientation ? f.getposition().right : f.getposition().bottom, h = -this.thumbnailsposition + this.thumbnailscontainersize; g > h && (d = this.thumbnailsposition - (g - h)) } else if(this.selectedthumbnailindex < c) { var i = 0 === this.selectedthumbnailindex ? this.selectedthumbnailindex : this.selectedthumbnailindex - 1, j = this.thumbnails[i], k = "horizontal" === this.thumbnailsorientation ? j.getposition().left : j.getposition().top; k < -this.thumbnailsposition && (d = -k) } this._movethumbnailsto(d), this.trigger({ type: "gotothumbnail" }), b.isfunction(this.settings.gotothumbnail) && this.settings.gotothumbnail.call(this, { type: "gotothumbnail" }) } }, _movethumbnailsto: function(a, c, d) { var e = this, f = {}; if(a !== this.thumbnailsposition) if(this.thumbnailsposition = a, "css-3d" === this.supportedanimation || "css-2d" === this.supportedanimation) { var g, h = "horizontal" === this.thumbnailsorientation ? a : 0, i = "horizontal" === this.thumbnailsorientation ? 0 : a; f[this.vendorprefix + "transform"] = "css-3d" === this.supportedanimation ? "translate3d(" + h + "px, " + i + "px, 0)" : "translate(" + h + "px, " + i + "px)", "undefined" != typeof c && c === !0 ? g = "" : (this.$thumbnails.addclass("sp-animated"), g = this.vendorprefix + "transform 0.7s", this.$thumbnails.on(this.transitionevent, function(a) { a.target === a.currenttarget && (e.$thumbnails.off(e.transitionevent), e.$thumbnails.removeclass("sp-animated"), "function" == typeof d && d(), e.trigger({ type: "thumbnailsmovecomplete" }), b.isfunction(e.settings.thumbnailsmovecomplete) && e.settings.thumbnailsmovecomplete.call(e, { type: "thumbnailsmovecomplete" })) })), f[this.vendorprefix + "transition"] = g, this.$thumbnails.css(f) } else f["margin-" + this.thumbnailspositionproperty] = a, "undefined" != typeof c && c === !0 ? this.$thumbnails.css(f) : this.$thumbnails.addclass("sp-animated").animate(f, 700, function() { e.$thumbnails.removeclass("sp-animated"), "function" == typeof d && d(), e.trigger({ type: "thumbnailsmovecomplete" }), b.isfunction(e.settings.thumbnailsmovecomplete) && e.settings.thumbnailsmovecomplete.call(e, { type: "thumbnailsmovecomplete" }) }) }, _stopthumbnailsmovement: function() { var a = {}; if("css-3d" === this.supportedanimation || "css-2d" === this.supportedanimation) { var b = this.$thumbnails.css(this.vendorprefix + "transform"), c = -1 !== b.indexof("matrix3d") ? "matrix3d" : "matrix", d = b.replace(c, "").match(/-?[0-9\.]+/g), e = "matrix3d" === c ? parseint(d[12], 10) : parseint(d[4], 10), f = "matrix3d" === c ? parseint(d[13], 10) : parseint(d[5], 10); a[this.vendorprefix + "transform"] = "css-3d" === this.supportedanimation ? "translate3d(" + e + "px, " + f + "px, 0)" : "translate(" + e + "px, " + f + "px)", a[this.vendorprefix + "transition"] = "", this.$thumbnails.css(a), this.$thumbnails.off(this.transitionevent), this.thumbnailsposition = "horizontal" === this.thumbnailsorientation ? parseint(d[4], 10) : parseint(d[5], 10) } else this.$thumbnails.stop(), this.thumbnailsposition = parseint(this.$thumbnails.css("margin-" + this.thumbnailspositionproperty), 10); this.$thumbnails.removeclass("sp-animated") }, destroythumbnails: function() { var d = this; this.off("update." + c), this.isthumbnailscroller !== !1 && (this.off("sliderresize." + c), this.off("gotoslide." + c), b(a).off("resize." + this.uniqueid + "." + c), this.$thumbnails.find(".sp-thumbnail").each(function() { var a = b(this), e = parseint(a.attr("data-index"), 10), f = d.thumbnails[e]; f.off("thumbnailclick." + c), f.destroy() }), this.thumbnails.length = 0, this.$thumbnails.appendto(this.$slider), this.$thumbnailscontainer.remove(), this.$slider.css({ paddingtop: "", paddingleft: "", paddingright: "" })) }, thumbnailsdefaults: { thumbnailwidth: 100, thumbnailheight: 80, thumbnailsposition: "bottom", thumbnailpointer: !1, thumbnailsupdate: function() {}, gotothumbnail: function() {}, thumbnailsmovecomplete: function() {} } }, e = function(a, b, c) { this.$thumbnail = a, this.$thumbnails = b, this.$thumbnailcontainer = null, this.width = 0, this.height = 0, this.isimageloaded = !1, this.setindex(c), this._init() }; e.prototype = { _init: function() { var a = this; this.$thumbnail.attr("data-init", !0), this.$thumbnailcontainer = b('
').appendto(this.$thumbnails), 0 !== this.$thumbnail.parent("a").length ? this.$thumbnail.parent("a").appendto(this.$thumbnailcontainer) : this.$thumbnail.appendto(this.$thumbnailcontainer), this.$thumbnailcontainer.on("click." + c, function() { a.trigger({ type: "thumbnailclick." + c, index: a.index }) }) }, setsize: function(a, b) { this.width = a, this.height = b, this.$thumbnailcontainer.css({ width: this.width, height: this.height }), this.$thumbnail.is("img") && "undefined" == typeof this.$thumbnail.attr("data-src") && this.resizeimage() }, getsize: function() { return { width: this.$thumbnailcontainer.outerwidth(!0), height: this.$thumbnailcontainer.outerheight(!0) } }, getposition: function() { return { left: this.$thumbnailcontainer.position().left + parseint(this.$thumbnailcontainer.css("marginleft"), 10), right: this.$thumbnailcontainer.position().left + parseint(this.$thumbnailcontainer.css("marginleft"), 10) + this.$thumbnailcontainer.outerwidth(), top: this.$thumbnailcontainer.position().top + parseint(this.$thumbnailcontainer.css("margintop"), 10), bottom: this.$thumbnailcontainer.position().top + parseint(this.$thumbnailcontainer.css("margintop"), 10) + this.$thumbnailcontainer.outerheight() } }, setindex: function(a) { this.index = a, this.$thumbnail.attr("data-index", this.index) }, resizeimage: function() { var a = this; if(this.isimageloaded === !1) return void sliderproutils.checkimagescomplete(this.$thumbnailcontainer, function() { a.isimageloaded = !0, a.resizeimage() }); this.$thumbnail = this.$thumbnailcontainer.find(".sp-thumbnail"); var b = this.$thumbnail.width(), c = this.$thumbnail.height(); this.$thumbnail.css(b / c <= this.width / this.height ? { width: "100%", height: "auto" } : { width: "auto", height: "100%" }), this.$thumbnail.css({ marginleft: .5 * (this.$thumbnailcontainer.width() - this.$thumbnail.width()), margintop: .5 * (this.$thumbnailcontainer.height() - this.$thumbnail.height()) }) }, destroy: function() { this.$thumbnailcontainer.off("click." + c), this.$thumbnail.removeattr("data-init"), this.$thumbnail.removeattr("data-index"), 0 !== this.$thumbnail.parent("a").length ? this.$thumbnail.parent("a").insertbefore(this.$thumbnailcontainer) : this.$thumbnail.insertbefore(this.$thumbnailcontainer), this.$thumbnailcontainer.remove() }, on: function(a, b) { return this.$thumbnailcontainer.on(a, b) }, off: function(a) { return this.$thumbnailcontainer.off(a) }, trigger: function(a) { return this.$thumbnailcontainer.triggerhandler(a) } }, b.sliderpro.addmodule("thumbnails", d) }(window, jquery), function(a, b) { "use strict"; var c = "conditionalimages." + b.sliderpro.namespace, d = { previousimagesize: null, currentimagesize: null, initconditionalimages: function() { this.currentimagesize = this.previousimagesize = "default", this.on("update." + c, b.proxy(this._conditionalimagesonupdate, this)), this.on("sliderresize." + c, b.proxy(this._conditionalimagesonresize, this)) }, _conditionalimagesonupdate: function() { b.each(this.slides, function(a, c) { var d = c.$slide; d.find("img:not([ data-default ])").each(function() { var a = b(this); "undefined" != typeof a.attr("data-src") ? a.attr("data-default", a.attr("data-src")) : a.attr("data-default", a.attr("src")) }) }) }, _conditionalimagesonresize: function() { if(this.currentimagesize = this.slidewidth <= this.settings.smallsize ? "small" : this.slidewidth <= this.settings.mediumsize ? "medium" : this.slidewidth <= this.settings.largesize ? "large" : "default", this.previousimagesize !== this.currentimagesize) { var a = this; b.each(this.slides, function(c, d) { var e = d.$slide; e.find("img").each(function() { var c = b(this), e = c.attr("data-" + a.currentimagesize); "undefined" != typeof e && ("undefined" != typeof c.attr("data-src") ? c.attr("data-src", e) : a._loadconditionalimage(c, e, function(a) { a.hasclass("sp-image") && (d.$mainimage = a, d.resizemainimage(!0)) })) }) }), this.previousimagesize = this.currentimagesize } }, _loadconditionalimage: function(a, c, d) { var e = b(new image); e.attr("class", a.attr("class")), e.attr("style", a.attr("style")), b.each(a.data(), function(a, b) { e.attr("data-" + a, b) }), "undefined" != typeof a.attr("width") && e.attr("width", a.attr("width")), "undefined" != typeof a.attr("height") && e.attr("height", a.attr("height")), "undefined" != typeof a.attr("alt") && e.attr("alt", a.attr("alt")), "undefined" != typeof a.attr("title") && e.attr("title", a.attr("title")), e.attr("src", c), e.insertafter(a), a.remove(), a = null, "function" == typeof d && d(e) }, destroyconditionalimages: function() { this.off("update." + c), this.off("sliderresize." + c) }, conditionalimagesdefaults: { smallsize: 480, mediumsize: 768, largesize: 1024 } }; b.sliderpro.addmodule("conditionalimages", d) }(window, jquery), function(a, b) { "use strict"; var c = "lazyloading." + b.sliderpro.namespace, d = { allowlazyloadingcheck: !0, initlazyloading: function() { this.on("sliderresize." + c, b.proxy(this._lazyloadingonresize, this)), this.on("gotoslide." + c, b.proxy(this._checkandloadvisibleimages, this)), this.on("thumbnailsupdate." + c + " thumbnailsmovecomplete." + c, b.proxy(this._checkandloadvisiblethumbnailimages, this)) }, _lazyloadingonresize: function() { var a = this; this.allowlazyloadingcheck !== !1 && (this.allowlazyloadingcheck = !1, this._checkandloadvisibleimages(), 0 !== this.$slider.find(".sp-thumbnail").length && this._checkandloadvisiblethumbnailimages(), settimeout(function() { a.allowlazyloadingcheck = !0 }, 500)) }, _checkandloadvisibleimages: function() { if(0 !== this.$slider.find(".sp-slide:not([ data-loaded ])").length) { var a = this, c = this.settings.loop === !0 ? this.middleslideposition : this.selectedslideindex, d = math.ceil((this.visibleslidessize - this.slidesize) / 2 / this.slidesize), e = c - d - 1 > 0 ? c - d - 1 : 0, f = c + d + 1 < this.gettotalslides() - 1 ? c + d + 1 : this.gettotalslides() - 1, g = this.slidesorder.slice(e, f + 1); b.each(g, function(c, d) { var e = a.slides[d], f = e.$slide; "undefined" == typeof f.attr("data-loaded") && (f.attr("data-loaded", !0), f.find("img[ data-src ]").each(function() { var c = b(this); a._loadimage(c, function(a) { a.hasclass("sp-image") && (e.$mainimage = a, e.resizemainimage(!0)) }) })) }) } }, _checkandloadvisiblethumbnailimages: function() { if(0 !== this.$slider.find(".sp-thumbnail-container:not([ data-loaded ])").length) { var a = this, c = this.thumbnailssize / this.thumbnails.length, d = math.floor(math.abs(this.thumbnailsposition / c)), e = math.floor((-this.thumbnailsposition + this.thumbnailscontainersize) / c), f = this.thumbnails.slice(d, e + 1); b.each(f, function(c, d) { var e = d.$thumbnailcontainer; "undefined" == typeof e.attr("data-loaded") && (e.attr("data-loaded", !0), e.find("img[ data-src ]").each(function() { var c = b(this); a._loadimage(c, function() { d.resizeimage() }) })) }) } }, _loadimage: function(a, c) { var d = b(new image); d.attr("class", a.attr("class")), d.attr("style", a.attr("style")), b.each(a.data(), function(a, b) { d.attr("data-" + a, b) }), "undefined" != typeof a.attr("width") && d.attr("width", a.attr("width")), "undefined" != typeof a.attr("height") && d.attr("height", a.attr("height")), "undefined" != typeof a.attr("alt") && d.attr("alt", a.attr("alt")), "undefined" != typeof a.attr("title") && d.attr("title", a.attr("title")), d.attr("src", a.attr("data-src")), d.removeattr("data-src"), d.insertafter(a), a.remove(), a = null, "function" == typeof c && c(d) }, destroylazyloading: function() { this.off("update." + c), this.off("gotoslide." + c), this.off("sliderresize." + c), this.off("thumbnailsupdate." + c), this.off("thumbnailsmovecomplete." + c) } }; b.sliderpro.addmodule("lazyloading", d) }(window, jquery), function(a, b) { "use strict"; var c = "retina." + b.sliderpro.namespace, d = { initretina: function() { this._isretina() !== !1 && ("undefined" != typeof this._loadimage ? this._loadimage = this._loadretinaimage : (this.on("update." + c, b.proxy(this._checkretinaimages, this)), 0 !== this.$slider.find(".sp-thumbnail").length && this.on("update.thumbnails." + c, b.proxy(this._checkretinathumbnailimages, this)))) }, _isretina: function() { return a.devicepixelratio >= 2 ? !0 : a.matchmedia && a.matchmedia("(-webkit-min-device-pixel-ratio: 2),(min-resolution: 2dppx)").matches ? !0 : !1 }, _checkretinaimages: function() { var a = this; b.each(this.slides, function(c, d) { var e = d.$slide; "undefined" == typeof e.attr("data-loaded") && (e.attr("data-loaded", !0), e.find("img").each(function() { var c = b(this); a._loadretinaimage(c, function(a) { a.hasclass("sp-image") && (d.$mainimage = a, d.resizemainimage(!0)) }) })) }) }, _checkretinathumbnailimages: function() { var a = this; this.$thumbnails.find(".sp-thumbnail-container").each(function() { var c = b(this); "undefined" == typeof c.attr("data-loaded") && (c.attr("data-loaded", !0), a._loadretinaimage(c.find("img"))) }) }, _loadretinaimage: function(a, c) { var d = !1, e = ""; if("undefined" != typeof a.attr("data-retina") && (d = !0, e = a.attr("data-retina"), a.removeattr("data-retina")), "undefined" != typeof a.attr("data-src") && (d === !1 && (e = a.attr("data-src")), a.removeattr("data-src")), "" !== e) { var f = b(new image); f.attr("class", a.attr("class")), f.attr("style", a.attr("style")), b.each(a.data(), function(a, b) { f.attr("data-" + a, b) }), "undefined" != typeof a.attr("width") && f.attr("width", a.attr("width")), "undefined" != typeof a.attr("height") && f.attr("height", a.attr("height")), "undefined" != typeof a.attr("alt") && f.attr("alt", a.attr("alt")), "undefined" != typeof a.attr("title") && f.attr("title", a.attr("title")), f.insertafter(a), a.remove(), a = null, f.attr("src", e), "function" == typeof c && c(f) } }, destroyretina: function() { this.off("update." + c), this.off("update.thumbnails." + c) } }; b.sliderpro.addmodule("retina", d) }(window, jquery), function(a, b) { "use strict"; var c = "layers." + b.sliderpro.namespace, d = { layersgotoslidereference: null, waitforlayerstimer: null, initlayers: function() { this.on("update." + c, b.proxy(this._layersonupdate, this)), this.on("sliderresize." + c, b.proxy(this._layersonresize, this)), this.on("gotoslide." + c, b.proxy(this._layersongotoslide, this)) }, _layersonupdate: function() { var a = this; b.each(this.slides, function(a, c) { var d = c.$slide; this.$slide.find(".sp-layer:not([ data-init ])").each(function() { var a = new f(b(this)); "undefined" == typeof c.layers && (c.layers = []), c.layers.push(a), b(this).hasclass("sp-static") === !1 && ("undefined" == typeof c.animatedlayers && (c.animatedlayers = []), c.animatedlayers.push(a)), b(this).appendto(d) }) }), this.settings.waitforlayers === !0 && (cleartimeout(this.waitforlayerstimer), this.waitforlayerstimer = settimeout(function() { a.layersgotoslidereference = a.gotoslide, a.gotoslide = a._layersgotoslide }, 1)) }, _layersonresize: function() { var a, c, d = this, e = this.settings.autoscalelayers; return this.settings.autoscalelayers === !1 ? void this.showlayers(this.selectedslideindex) : (-1 === this.settings.autoscalereference ? "string" == typeof this.settings.width && -1 !== this.settings.width.indexof("%") ? e = !1 : a = parseint(this.settings.width, 10) : a = this.settings.autoscalereference, c = e === !0 && this.slidewidth < a ? d.slidewidth / a : 1, b.each(this.slides, function(a, d) { "undefined" != typeof d.layers && b.each(d.layers, function(a, b) { b.scale(c) }) }), void this.showlayers(this.selectedslideindex)) }, _layersgotoslide: function(a) { var b = this, d = this.slides[this.selectedslideindex].animatedlayers; this.$slider.hasclass("sp-swiping") || "undefined" == typeof d || 0 === d.length ? this.layersgotoslidereference(a) : (this.on("hidelayerscomplete." + c, function() { b.off("hidelayerscomplete." + c), b.layersgotoslidereference(a) }), this.hidelayers(this.selectedslideindex)) }, _layersongotoslide: function() { this.previousslideindex !== this.selectedslideindex && this.hidelayers(this.previousslideindex), this.showlayers(this.selectedslideindex) }, showlayers: function(a) { var c = this, d = this.slides[a].animatedlayers, e = 0; "undefined" != typeof d && b.each(d, function(a, f) { f.isvisible() === !0 ? (e++, e === d.length && (c.trigger({ type: "showlayerscomplete", index: a }), b.isfunction(c.settings.showlayerscomplete) && c.settings.showlayerscomplete.call(c, { type: "showlayerscomplete", index: a }))) : f.show(function() { e++, e === d.length && (c.trigger({ type: "showlayerscomplete", index: a }), b.isfunction(c.settings.showlayerscomplete) && c.settings.showlayerscomplete.call(c, { type: "showlayerscomplete", index: a })) }) }) }, hidelayers: function(a) { var c = this, d = this.slides[a].animatedlayers, e = 0; "undefined" != typeof d && b.each(d, function(a, f) { f.isvisible() === !1 ? (e++, e === d.length && (c.trigger({ type: "hidelayerscomplete", index: a }), b.isfunction(c.settings.hidelayerscomplete) && c.settings.hidelayerscomplete.call(c, { type: "hidelayerscomplete", index: a }))) : f.hide(function() { e++, e === d.length && (c.trigger({ type: "hidelayerscomplete", index: a }), b.isfunction(c.settings.hidelayerscomplete) && c.settings.hidelayerscomplete.call(c, { type: "hidelayerscomplete", index: a })) }) }) }, destroylayers: function() { this.off("update." + c), this.off("resize." + c), this.off("gotoslide." + c), this.off("hidelayerscomplete." + c) }, layersdefaults: { waitforlayers: !1, autoscalelayers: !0, autoscalereference: -1, showlayerscomplete: function() {}, hidelayerscomplete: function() {} } }, e = a.sliderproslide.prototype.destroy; a.sliderproslide.prototype.destroy = function() { "undefined" != typeof this.layers && (b.each(this.layers, function(a, b) { b.destroy() }), this.layers.length = 0), "undefined" != typeof this.animatedlayers && (this.animatedlayers.length = 0), e.apply(this) }; var f = function(a) { this.$layer = a, this.visible = !1, this.styled = !1, this.data = null, this.position = null, this.horizontalproperty = null, this.verticalproperty = null, this.horizontalposition = null, this.verticalposition = null, this.scaleratio = 1, this.supportedanimation = sliderproutils.getsupportedanimation(), this.vendorprefix = sliderproutils.getvendorprefix(), this.transitionevent = sliderproutils.gettransitionevent(), this.staytimer = null, this._init() }; f.prototype = { _init: function() { this.$layer.attr("data-init", !0), this.$layer.hasclass("sp-static") ? this._setstyle() : this.$layer.css({ visibility: "hidden", display: "none" }) }, _setstyle: function() { this.styled = !0, this.$layer.css("display", ""), this.data = this.$layer.data(), "undefined" != typeof this.data.width && this.$layer.css("width", this.data.width), "undefined" != typeof this.data.height && this.$layer.css("height", this.data.height), "undefined" != typeof this.data.depth && this.$layer.css("z-index", this.data.depth), this.position = this.data.position ? this.data.position.tolowercase() : "topleft", this.horizontalproperty = -1 !== this.position.indexof("right") ? "right" : -1 !== this.position.indexof("left") ? "left" : "center", this.verticalproperty = -1 !== this.position.indexof("bottom") ? "bottom" : -1 !== this.position.indexof("top") ? "top" : "center", this._setposition(), this.scale(this.scaleratio) }, _setposition: function() { var a = this.$layer.attr("style"); this.horizontalposition = "undefined" != typeof this.data.horizontal ? this.data.horizontal : 0, this.verticalposition = "undefined" != typeof this.data.vertical ? this.data.vertical : 0, "center" === this.horizontalproperty ? (("undefined" == typeof a || "undefined" != typeof a && -1 === a.indexof("width")) && (this.$layer.css("white-space", "nowrap"), this.$layer.css("width", this.$layer.outerwidth(!0))), this.$layer.css({ marginleft: "auto", marginright: "auto", left: this.horizontalposition, right: 0 })) : this.$layer.css(this.horizontalproperty, this.horizontalposition), "center" === this.verticalproperty ? (("undefined" == typeof a || "undefined" != typeof a && -1 === a.indexof("height")) && (this.$layer.css("white-space", "nowrap"), this.$layer.css("height", this.$layer.outerheight(!0))), this.$layer.css({ margintop: "auto", marginbottom: "auto", top: this.verticalposition, bottom: 0 })) : this.$layer.css(this.verticalproperty, this.verticalposition) }, scale: function(a) { if(!this.$layer.hasclass("sp-no-scale") && (this.scaleratio = a, this.styled !== !1)) { var b = "center" === this.horizontalproperty ? "left" : this.horizontalproperty, c = "center" === this.verticalproperty ? "top" : this.verticalproperty, d = {}; d[this.vendorprefix + "transform-origin"] = this.horizontalproperty + " " + this.verticalproperty, d[this.vendorprefix + "transform"] = "scale(" + this.scaleratio + ")", "string" != typeof this.horizontalposition && (d[b] = this.horizontalposition * this.scaleratio), "string" != typeof this.verticalposition && (d[c] = this.verticalposition * this.scaleratio), "string" == typeof this.data.width && -1 !== this.data.width.indexof("%") && (d.width = (parseint(this.data.width, 10) / this.scaleratio).tostring() + "%"), "string" == typeof this.data.height && -1 !== this.data.height.indexof("%") && (d.height = (parseint(this.data.height, 10) / this.scaleratio).tostring() + "%"), this.$layer.css(d) } }, show: function(a) { if(this.visible !== !0) { this.visible = !0, this.styled === !1 && this._setstyle(); var b = this, c = "undefined" != typeof this.data.showoffset ? this.data.showoffset : 50, d = "undefined" != typeof this.data.showduration ? this.data.showduration / 1e3 : .4, e = "undefined" != typeof this.data.showdelay ? this.data.showdelay : 10, f = "undefined" != typeof b.data.stayduration ? parseint(b.data.stayduration, 10) : -1; if("javascript" === this.supportedanimation) this.$layer.stop().delay(e).css({ opacity: 0, visibility: "visible" }).animate({ opacity: 1 }, 1e3 * d, function() { -1 !== f && (b.staytimer = settimeout(function() { b.hide(), b.staytimer = null }, f)), "undefined" != typeof a && a() }); else { var g = { opacity: 0, visibility: "visible" }, h = { opacity: 1 }, i = ""; g[this.vendorprefix + "transform"] = "scale(" + this.scaleratio + ")", h[this.vendorprefix + "transform"] = "scale(" + this.scaleratio + ")", h[this.vendorprefix + "transition"] = "opacity " + d + "s", "undefined" != typeof this.data.showtransition && ("left" === this.data.showtransition ? i = c + "px, 0" : "right" === this.data.showtransition ? i = "-" + c + "px, 0" : "up" === this.data.showtransition ? i = "0, " + c + "px" : "down" === this.data.showtransition && (i = "0, -" + c + "px"), g[this.vendorprefix + "transform"] += "css-3d" === this.supportedanimation ? " translate3d(" + i + ", 0)" : " translate(" + i + ")", h[this.vendorprefix + "transform"] += "css-3d" === this.supportedanimation ? " translate3d(0, 0, 0)" : " translate(0, 0)", h[this.vendorprefix + "transition"] += ", " + this.vendorprefix + "transform " + d + "s"), this.$layer.on(this.transitionevent, function(c) { c.target === c.currenttarget && (b.$layer.off(b.transitionevent).css(b.vendorprefix + "transition", ""), -1 !== f && (b.staytimer = settimeout(function() { b.hide(), b.staytimer = null }, f)), "undefined" != typeof a && a()) }), this.$layer.css(g), settimeout(function() { b.$layer.css(h) }, e) } } }, hide: function(a) { if(this.visible !== !1) { var c = this, d = "undefined" != typeof this.data.hideoffset ? this.data.hideoffset : 50, e = "undefined" != typeof this.data.hideduration ? this.data.hideduration / 1e3 : .4, f = "undefined" != typeof this.data.hidedelay ? this.data.hidedelay : 10; if(this.visible = !1, null !== this.staytimer && cleartimeout(this.staytimer), "javascript" === this.supportedanimation) this.$layer.stop().delay(f).animate({ opacity: 0 }, 1e3 * e, function() { b(this).css("visibility", "hidden"), "undefined" != typeof a && a() }); else { var g = "", h = { opacity: 0 }; h[this.vendorprefix + "transform"] = "scale(" + this.scaleratio + ")", h[this.vendorprefix + "transition"] = "opacity " + e + "s", "undefined" != typeof this.data.hidetransition && ("left" === this.data.hidetransition ? g = "-" + d + "px, 0" : "right" === this.data.hidetransition ? g = d + "px, 0" : "up" === this.data.hidetransition ? g = "0, -" + d + "px" : "down" === this.data.hidetransition && (g = "0, " + d + "px"), h[this.vendorprefix + "transform"] += "css-3d" === this.supportedanimation ? " translate3d(" + g + ", 0)" : " translate(" + g + ")", h[this.vendorprefix + "transition"] += ", " + this.vendorprefix + "transform " + e + "s"), this.$layer.on(this.transitionevent, function(b) { b.target === b.currenttarget && (c.$layer.off(c.transitionevent).css(c.vendorprefix + "transition", ""), c.visible === !1 && c.$layer.css("visibility", "hidden"), "undefined" != typeof a && a()) }), settimeout(function() { c.$layer.css(h) }, f) } } }, isvisible: function() { return this.visible === !1 || this.$layer.is(":hidden") ? !1 : !0 }, destroy: function() { this.$layer.removeattr("style"), this.$layer.removeattr("data-init") } }, b.sliderpro.addmodule("layers", d) }(window, jquery), function(a, b) { "use strict"; var c = "fade." + b.sliderpro.namespace, d = { fadegotoslidereference: null, initfade: function() { this.on("update." + c, b.proxy(this._fadeonupdate, this)) }, _fadeonupdate: function() { this.settings.fade === !0 && (this.fadegotoslidereference = this.gotoslide, this.gotoslide = this._fadegotoslide) }, _fadegotoslide: function(a) { if(a !== this.selectedslideindex) if(this.$slider.hasclass("sp-swiping")) this.fadegotoslidereference(a); else { var c, d, e = this, f = a; b.each(this.slides, function(a, b) { var g = b.getindex(), h = b.$slide; g === f ? (h.css({ opacity: 0, left: 0, top: 0, "z-index": 20 }), c = h) : g === e.selectedslideindex ? (h.css({ opacity: 1, left: 0, top: 0, "z-index": 10 }), d = h) : h.css("visibility", "hidden") }), this.previousslideindex = this.selectedslideindex, this.selectedslideindex = a, e.settings.loop === !0 && e._updateslidesorder(), this._moveto(this.visibleoffset, !0), this.settings.fadeoutpreviousslide === !0 && this._fadeslideto(d, 0), this._fadeslideto(c, 1, function() { b.each(e.slides, function(a, b) { var c = b.$slide; c.css({ visibility: "", opacity: "", "z-index": "" }) }), e._resetslidesposition(), e.trigger({ type: "gotoslidecomplete", index: a, previousindex: e.previousslideindex }), b.isfunction(e.settings.gotoslidecomplete) && e.settings.gotoslidecomplete.call(e, { type: "gotoslidecomplete", index: a, previousindex: e.previousslideindex }) }), this.settings.autoheight === !0 && this._resizeheight(), this.trigger({ type: "gotoslide", index: a, previousindex: this.previousslideindex }), b.isfunction(this.settings.gotoslide) && this.settings.gotoslide.call(this, { type: "gotoslide", index: a, previousindex: this.previousslideindex }) } }, _fadeslideto: function(a, b, c) { var d = this; "css-3d" === this.supportedanimation || "css-2d" === this.supportedanimation ? (settimeout(function() { var c = { opacity: b }; c[d.vendorprefix + "transition"] = "opacity " + d.settings.fadeduration / 1e3 + "s", a.css(c) }, 1), a.on(this.transitionevent, function(b) { b.target === b.currenttarget && (a.off(d.transitionevent), a.css(d.vendorprefix + "transition", ""), "function" == typeof c && c()) })) : a.stop().animate({ opacity: b }, this.settings.fadeduration, function() { "function" == typeof c && c() }) }, destroyfade: function() { this.off("update." + c), null !== this.fadegotoslidereference && (this.gotoslide = this.fadegotoslidereference) }, fadedefaults: { fade: !1, fadeoutpreviousslide: !0, fadeduration: 500 } }; b.sliderpro.addmodule("fade", d) }(window, jquery), function(a, b) { "use strict"; var c = "touchswipe." + b.sliderpro.namespace, d = { istouchsupport: !1, touchstartpoint: { x: 0, y: 0 }, touchendpoint: { x: 0, y: 0 }, touchdistance: { x: 0, y: 0 }, touchstartposition: 0, istouchmoving: !1, touchswipeevents: { startevent: "", moveevent: "", endevent: "" }, inittouchswipe: function() { this.settings.touchswipe !== !1 && (this.istouchsupport = "ontouchstart" in a, this.istouchsupport === !0 ? (this.touchswipeevents.startevent = "touchstart", this.touchswipeevents.moveevent = "touchmove", this.touchswipeevents.endevent = "touchend") : (this.touchswipeevents.startevent = "mousedown", this.touchswipeevents.moveevent = "mousemove", this.touchswipeevents.endevent = "mouseup"), this.$slidesmask.on(this.touchswipeevents.startevent + "." + c, b.proxy(this._ontouchstart, this)), this.$slidesmask.on("dragstart." + c, function(a) { a.preventdefault() }), this.$slidesmask.addclass("sp-grab")) }, _ontouchstart: function(a) { if(!(b(a.target).closest(".sp-selectable").length >= 1)) { var d = this.istouchsupport ? a.originalevent.touches[0] : a.originalevent; this.istouchsupport === !1 && a.preventdefault(), b(a.target).parents(".sp-slide").find("a").one("click." + c, function(a) { a.preventdefault() }), this.touchstartpoint.x = d.pagex || d.clientx, this.touchstartpoint.y = d.pagey || d.clienty, this.touchstartposition = this.slidesposition, this.touchdistance.x = this.touchdistance.y = 0, this.$slides.hasclass("sp-animated") && (this.istouchmoving = !0, this._stopmovement(), this.touchstartposition = this.slidesposition), this.$slidesmask.on(this.touchswipeevents.moveevent + "." + c, b.proxy(this._ontouchmove, this)), b(document).on(this.touchswipeevents.endevent + "." + this.uniqueid + "." + c, b.proxy(this._ontouchend, this)), this.$slidesmask.removeclass("sp-grab").addclass("sp-grabbing"), this.$slider.addclass("sp-swiping") } }, _ontouchmove: function(a) { var b = this.istouchsupport ? a.originalevent.touches[0] : a.originalevent; this.istouchmoving = !0, this.touchendpoint.x = b.pagex || b.clientx, this.touchendpoint.y = b.pagey || b.clienty, this.touchdistance.x = this.touchendpoint.x - this.touchstartpoint.x, this.touchdistance.y = this.touchendpoint.y - this.touchstartpoint.y; var c = "horizontal" === this.settings.orientation ? this.touchdistance.x : this.touchdistance.y, d = "horizontal" === this.settings.orientation ? this.touchdistance.y : this.touchdistance.x; math.abs(c) > math.abs(d) && (a.preventdefault(), this.settings.loop === !1 && (this.slidesposition > this.touchstartposition && 0 === this.selectedslideindex || this.slidesposition < this.touchstartposition && this.selectedslideindex === this.gettotalslides() - 1) && (c = .2 * c), this._moveto(this.touchstartposition + c, !0)) }, _ontouchend: function(a) { var d = this, e = "horizontal" === this.settings.orientation ? this.touchdistance.x : this.touchdistance.y; if(this.$slidesmask.off(this.touchswipeevents.moveevent + "." + c), b(document).off(this.touchswipeevents.endevent + "." + this.uniqueid + "." + c), this.$slidesmask.removeclass("sp-grabbing").addclass("sp-grab"), (this.istouchmoving === !1 || this.istouchmoving === !0 && math.abs(this.touchdistance.x) < 10 && math.abs(this.touchdistance.y) < 10) && (b(a.target).parents(".sp-slide").find("a").off("click." + c), this.$slider.removeclass("sp-swiping")), settimeout(function() { d.$slider.removeclass("sp-swiping") }, 1), this.istouchmoving !== !1) { this.istouchmoving = !1, b(a.target).parents(".sp-slide").one("click", function(a) { a.preventdefault() }); var f = -parseint(this.$slides.find(".sp-slide").eq(this.selectedslideindex).css(this.positionproperty), 10) + this.visibleoffset; if(math.abs(e) < this.settings.touchswipethreshold) this._moveto(f); else { var g = e / (this.slidesize + this.settings.slidedistance); g = parseint(g, 10) + (g > 0 ? 1 : -1); var h = this.slidesorder[b.inarray(this.selectedslideindex, this.slidesorder) - g]; this.settings.loop === !0 ? this.gotoslide(h) : "undefined" != typeof h ? this.gotoslide(h) : this._moveto(f) } } }, destroytouchswipe: function() { this.$slidesmask.off(this.touchswipeevents.startevent + "." + c), this.$slidesmask.off(this.touchswipeevents.moveevent + "." + c), this.$slidesmask.off("dragstart." + c), b(document).off(this.touchswipeevents.endevent + "." + this.uniqueid + "." + c), this.$slidesmask.removeclass("sp-grab") }, touchswipedefaults: { touchswipe: !0, touchswipethreshold: 50 } }; b.sliderpro.addmodule("touchswipe", d) }(window, jquery), function(a, b) { "use strict"; var c = "caption." + b.sliderpro.namespace, d = { $captioncontainer: null, captioncontent: "", initcaption: function() { this.on("update." + c, b.proxy(this._captiononupdate, this)), this.on("gotoslide." + c, b.proxy(this._updatecaptioncontent, this)) }, _captiononupdate: function() { this.$captioncontainer = this.$slider.find(".sp-caption-container"), this.$slider.find(".sp-caption").length && 0 === this.$captioncontainer.length && (this.$captioncontainer = b('
').appendto(this.$slider), this._updatecaptioncontent()), this.$slides.find(".sp-caption").each(function() { b(this).css("display", "none") }) }, _updatecaptioncontent: function() { var a = this, b = this.$slider.find(".sp-slide").eq(this.selectedslideindex).find(".sp-caption"), c = 0 !== b.length ? b.html() : ""; this.settings.fadecaption === !0 ? "" !== this.captioncontent ? (0 === parsefloat(this.$captioncontainer.css("opacity"), 10) && (this.$captioncontainer.css(this.vendorprefix + "transition", ""), this.$captioncontainer.css("opacity", 1)), this._fadecaptionto(0, function() { a.captioncontent = c, "" !== c ? (a.$captioncontainer.html(a.captioncontent), a._fadecaptionto(1)) : a.$captioncontainer.empty() })) : (this.captioncontent = c, this.$captioncontainer.html(this.captioncontent), this.$captioncontainer.css("opacity", 0), this._fadecaptionto(1)) : (this.captioncontent = c, this.$captioncontainer.html(this.captioncontent)) }, _fadecaptionto: function(a, b) { var c = this; "css-3d" === this.supportedanimation || "css-2d" === this.supportedanimation ? (settimeout(function() { var b = { opacity: a }; b[c.vendorprefix + "transition"] = "opacity " + c.settings.captionfadeduration / 1e3 + "s", c.$captioncontainer.css(b) }, 1), this.$captioncontainer.on(this.transitionevent, function(a) { a.target === a.currenttarget && (c.$captioncontainer.off(c.transitionevent), c.$captioncontainer.css(c.vendorprefix + "transition", ""), "function" == typeof b && b()) })) : this.$captioncontainer.stop().animate({ opacity: a }, this.settings.captionfadeduration, function() { "function" == typeof b && b() }) }, destroycaption: function() { this.off("update." + c), this.off("gotoslide." + c), this.$captioncontainer.remove(), this.$slider.find(".sp-caption").each(function() { b(this).css("display", "") }) }, captiondefaults: { fadecaption: !0, captionfadeduration: 500 } }; b.sliderpro.addmodule("caption", d) }(window, jquery), function(a, b) { "use strict"; var c = "deeplinking." + b.sliderpro.namespace, d = { initdeeplinking: function() { var d = this, e = !0; this.on("init." + c, function() { d._gotohash(a.location.hash) }), this.on("gotoslide." + c, function(b) { e = !1, d.settings.updatehash === !0 && (a.location.hash = d.$slider.attr("id") + "/" + b.index) }), b(a).on("hashchange." + this.uniqueid + "." + c, function() { e === !0 && d._gotohash(a.location.hash), e = !0 }) }, _parsehash: function(a) { if("" !== a) { a = a.substring(1); var b = a.split("/"), c = b.pop(), d = a.slice(0, -c.tostring().length - 1); if(this.$slider.attr("id") === d) return { sliderid: d, slideid: c } } return !1 }, _gotohash: function(a) { var b = this._parsehash(a); if(b !== !1) { var c = b.slideid, d = parseint(c, 10); if(isnan(d)) { var e = this.$slider.find(".sp-slide#" + c).index(); - 1 !== e && this.gotoslide(e) } else this.gotoslide(d) } }, destroydeeplinking: function() { this.off("init." + c), this.off("gotoslide." + c), b(a).off("hashchange." + this.uniqueid + "." + c) }, deeplinkingdefaults: { updatehash: !1 } }; b.sliderpro.addmodule("deeplinking", d) }(window, jquery), function(a, b) { "use strict"; var c = "autoplay." + b.sliderpro.namespace, d = { autoplaytimer: null, istimerrunning: !1, istimerpaused: !1, initautoplay: function() { this.on("update." + c, b.proxy(this._autoplayonupdate, this)) }, _autoplayonupdate: function() { this.settings.autoplay === !0 ? (this.on("gotoslide." + c, b.proxy(this._autoplayongotoslide, this)), this.on("mouseenter." + c, b.proxy(this._autoplayonmouseenter, this)), this.on("mouseleave." + c, b.proxy(this._autoplayonmouseleave, this)), this.startautoplay()) : (this.off("gotoslide." + c), this.off("mouseenter." + c), this.off("mouseleave." + c), this.stopautoplay()) }, _autoplayongotoslide: function() { this.istimerrunning === !0 && this.stopautoplay(), this.istimerpaused === !1 && this.startautoplay() }, _autoplayonmouseenter: function() { !this.istimerrunning || "pause" !== this.settings.autoplayonhover && "stop" !== this.settings.autoplayonhover || (this.stopautoplay(), this.istimerpaused = !0) }, _autoplayonmouseleave: function() { this.settings.autoplay === !0 && this.istimerrunning === !1 && "stop" !== this.settings.autoplayonhover && (this.startautoplay(), this.istimerpaused = !1) }, startautoplay: function() { var a = this; this.istimerrunning = !0, this.autoplaytimer = settimeout(function() { "normal" === a.settings.autoplaydirection ? a.nextslide() : "backwards" === a.settings.autoplaydirection && a.previousslide() }, this.settings.autoplaydelay) }, stopautoplay: function() { this.istimerrunning = !1, cleartimeout(this.autoplaytimer) }, destroyautoplay: function() { cleartimeout(this.autoplaytimer), this.off("update." + c), this.off("gotoslide." + c), this.off("mouseenter." + c), this.off("mouseleave." + c) }, autoplaydefaults: { autoplay: !0, autoplaydelay: 5e3, autoplaydirection: "normal", autoplayonhover: "pause" } }; b.sliderpro.addmodule("autoplay", d) }(window, jquery), function(a, b) { "use strict"; var c = "keyboard." + b.sliderpro.namespace, d = { initkeyboard: function() { var a = this, d = !1; this.settings.keyboard !== !1 && (this.$slider.on("focus." + c, function() { d = !0 }), this.$slider.on("blur." + c, function() { d = !1 }), b(document).on("keydown." + this.uniqueid + "." + c, function(b) { (a.settings.keyboardonlyonfocus !== !0 || d !== !1) && (37 === b.which ? a.previousslide() : 39 === b.which ? a.nextslide() : 13 === b.which && a.$slider.find(".sp-slide").eq(a.selectedslideindex).find(".sp-image-container a")[0].click()) })) }, destroykeyboard: function() { this.$slider.off("focus." + c), this.$slider.off("blur." + c), b(document).off("keydown." + this.uniqueid + "." + c) }, keyboarddefaults: { keyboard: !0, keyboardonlyonfocus: !1 } }; b.sliderpro.addmodule("keyboard", d) }(window, jquery), function(a, b) { "use strict"; var c = "fullscreen." + b.sliderpro.namespace, d = { isfullscreen: !1, $fullscreenbutton: null, sizebeforefullscreen: {}, initfullscreen: function() { (document.fullscreenenabled || document.webkitfullscreenenabled || document.mozfullscreenenabled || document.msfullscreenenabled) && this.on("update." + c, b.proxy(this._fullscreenonupdate, this)) }, _fullscreenonupdate: function() { this.settings.fullscreen === !0 && null === this.$fullscreenbutton ? this._addfullscreen() : this.settings.fullscreen === !1 && null !== this.$fullscreenbutton && this._removefullscreen(), this.settings.fullscreen === !0 && (this.settings.fadefullscreen === !0 ? this.$fullscreenbutton.addclass("sp-fade-full-screen") : this.settings.fadefullscreen === !1 && this.$fullscreenbutton.removeclass("sp-fade-full-screen")) }, _addfullscreen: function() { this.$fullscreenbutton = b('
').appendto(this.$slider), this.$fullscreenbutton.on("click." + c, b.proxy(this._onfullscreenbuttonclick, this)), document.addeventlistener("fullscreenchange", b.proxy(this._onfullscreenchange, this)), document.addeventlistener("mozfullscreenchange", b.proxy(this._onfullscreenchange, this)), document.addeventlistener("webkitfullscreenchange", b.proxy(this._onfullscreenchange, this)), document.addeventlistener("msfullscreenchange", b.proxy(this._onfullscreenchange, this)) }, _removefullscreen: function() { null !== this.$fullscreenbutton && (this.$fullscreenbutton.off("click." + c), this.$fullscreenbutton.remove(), this.$fullscreenbutton = null, document.removeeventlistener("fullscreenchange", this._onfullscreenchange), document.removeeventlistener("mozfullscreenchange", this._onfullscreenchange), document.removeeventlistener("webkitfullscreenchange", this._onfullscreenchange), document.removeeventlistener("msfullscreenchange", this._onfullscreenchange)) }, _onfullscreenbuttonclick: function() { this.isfullscreen === !1 ? this.instance.requestfullscreen ? this.instance.requestfullscreen() : this.instance.mozrequestfullscreen ? this.instance.mozrequestfullscreen() : this.instance.webkitrequestfullscreen ? this.instance.webkitrequestfullscreen() : this.instance.msrequestfullscreen && this.instance.msrequestfullscreen() : document.exitfullscreen ? document.exitfullscreen() : document.mozcancelfullscreen ? document.mozcancelfullscreen() : document.webkitcancelfullscreen ? document.webkitcancelfullscreen() : document.msexitfullscreen && document.msexitfullscreen() }, _onfullscreenchange: function() { this.isfullscreen = document.fullscreenelement || document.webkitfullscreenelement || document.mozfullscreenelement || document.msfullscreenelement ? !0 : !1, this.isfullscreen === !0 ? (this.sizebeforefullscreen = { forcesize: this.settings.forcesize, autoheight: this.settings.autoheight }, this.$slider.addclass("sp-full-screen"), this.settings.forcesize = "fullwindow", this.settings.autoheight = !1) : (this.$slider.removeclass("sp-full-screen"), this.settings.forcesize = this.sizebeforefullscreen.forcesize, this.settings.autoheight = this.sizebeforefullscreen.autoheight), this.resize() }, destroyfullscreen: function() { this.off("update." + c), this._removefullscreen() }, fullscreendefaults: { fullscreen: !1, fadefullscreen: !0 } }; b.sliderpro.addmodule("fullscreen", d) }(window, jquery), function(a, b) { "use strict"; var c = "buttons." + b.sliderpro.namespace, d = { $buttons: null, initbuttons: function() { this.on("update." + c, b.proxy(this._buttonsonupdate, this)) }, _buttonsonupdate: function() { this.$buttons = this.$slider.find(".sp-buttons"), this.settings.buttons === !0 && this.gettotalslides() > 1 && 0 === this.$buttons.length ? this._createbuttons() : this.settings.buttons === !0 && this.gettotalslides() !== this.$buttons.find(".sp-button").length && 0 !== this.$buttons.length ? this._adjustbuttons() : (this.settings.buttons === !1 || this.gettotalslides() <= 1 && 0 !== this.$buttons.length) && this._removebuttons() }, _createbuttons: function() { var a = this; this.$buttons = b('
').appendto(this.$slider); for(var d = 0; d < this.gettotalslides(); d++) b('
').appendto(this.$buttons); this.$buttons.on("click." + c, ".sp-button", function() { a.gotoslide(b(this).index()) }), this.$buttons.find(".sp-button").eq(this.selectedslideindex).addclass("sp-selected-button"), this.on("gotoslide." + c, function(b) { a.$buttons.find(".sp-selected-button").removeclass("sp-selected-button"), a.$buttons.find(".sp-button").eq(b.index).addclass("sp-selected-button") }), this.$slider.addclass("sp-has-buttons") }, _adjustbuttons: function() { this.$buttons.empty(); for(var a = 0; a < this.gettotalslides(); a++) b('
').appendto(this.$buttons); this.$buttons.find(".sp-selected-button").removeclass("sp-selected-button"), this.$buttons.find(".sp-button").eq(this.selectedslideindex).addclass("sp-selected-button") }, _removebuttons: function() { this.$buttons.off("click." + c, ".sp-button"), this.off("gotoslide." + c), this.$buttons.remove(), this.$slider.removeclass("sp-has-buttons") }, destroybuttons: function() { this._removebuttons(), this.off("update." + c) }, buttonsdefaults: { buttons: !0 } }; b.sliderpro.addmodule("buttons", d) }(window, jquery), function(a, b) { "use strict"; var c = "arrows." + b.sliderpro.namespace, d = { $arrows: null, $previousarrow: null, $nextarrow: null, initarrows: function() { this.on("update." + c, b.proxy(this._arrowsonupdate, this)), this.on("gotoslide." + c, b.proxy(this._checkarrowsvisibility, this)) }, _arrowsonupdate: function() { var a = this; this.settings.arrows === !0 && null === this.$arrows ? (this.$arrows = b('
').appendto(this.$slidescontainer), this.$previousarrow = b('
').appendto(this.$arrows), this.$nextarrow = b('
').appendto(this.$arrows), this.$previousarrow.on("click." + c, function() { a.previousslide() }), this.$nextarrow.on("click." + c, function() { a.nextslide() }), this._checkarrowsvisibility()) : this.settings.arrows === !1 && null !== this.$arrows && this._removearrows(), this.settings.arrows === !0 && (this.settings.fadearrows === !0 ? this.$arrows.addclass("sp-fade-arrows") : this.settings.fadearrows === !1 && this.$arrows.removeclass("sp-fade-arrows")) }, _checkarrowsvisibility: function() { this.settings.arrows !== !1 && this.settings.loop !== !0 && (0 === this.selectedslideindex ? this.$previousarrow.css("display", "none") : this.$previousarrow.css("display", "block"), this.selectedslideindex === this.gettotalslides() - 1 ? this.$nextarrow.css("display", "none") : this.$nextarrow.css("display", "block")) }, _removearrows: function() { null !== this.$arrows && (this.$previousarrow.off("click." + c), this.$nextarrow.off("click." + c), this.$arrows.remove(), this.$arrows = null) }, destroyarrows: function() { this._removearrows(), this.off("update." + c), this.off("gotoslide." + c) }, arrowsdefaults: { arrows: !1, fadearrows: !0 } }; b.sliderpro.addmodule("arrows", d) }(window, jquery), function(a, b) { "use strict"; var c = "thumbnailtouchswipe." + b.sliderpro.namespace, d = { isthumbnailtouchsupport: !1, thumbnailtouchstartpoint: { x: 0, y: 0 }, thumbnailtouchendpoint: { x: 0, y: 0 }, thumbnailtouchdistance: { x: 0, y: 0 }, thumbnailtouchstartposition: 0, isthumbnailtouchmoving: !1, isthumbnailtouchswipe: !1, thumbnailtouchswipeevents: { startevent: "", moveevent: "", endevent: "" }, initthumbnailtouchswipe: function() { this.on("update." + c, b.proxy(this._thumbnailtouchswipeonupdate, this)) }, _thumbnailtouchswipeonupdate: function() { this.isthumbnailscroller !== !1 && (this.settings.thumbnailtouchswipe === !0 && this.isthumbnailtouchswipe === !1 && (this.isthumbnailtouchswipe = !0, this.isthumbnailtouchsupport = "ontouchstart" in a, this.isthumbnailtouchsupport === !0 ? (this.thumbnailtouchswipeevents.startevent = "touchstart", this.thumbnailtouchswipeevents.moveevent = "touchmove", this.thumbnailtouchswipeevents.endevent = "touchend") : (this.thumbnailtouchswipeevents.startevent = "mousedown", this.thumbnailtouchswipeevents.moveevent = "mousemove", this.thumbnailtouchswipeevents.endevent = "mouseup"), this.$thumbnails.on(this.thumbnailtouchswipeevents.startevent + "." + c, b.proxy(this._onthumbnailtouchstart, this)), this.$thumbnails.on("dragstart." + c, function(a) { a.preventdefault() }), this.$thumbnails.addclass("sp-grab")), b.each(this.thumbnails, function(a, b) { b.off("thumbnailclick") })) }, _onthumbnailtouchstart: function(a) { if(!(b(a.target).closest(".sp-selectable").length >= 1)) { var d = this.isthumbnailtouchsupport ? a.originalevent.touches[0] : a.originalevent; this.isthumbnailtouchsupport === !1 && a.preventdefault(), b(a.target).parents(".sp-thumbnail-container").find("a").one("click." + c, function(a) { a.preventdefault() }), this.thumbnailtouchstartpoint.x = d.pagex || d.clientx, this.thumbnailtouchstartpoint.y = d.pagey || d.clienty, this.thumbnailtouchstartposition = this.thumbnailsposition, this.thumbnailtouchdistance.x = this.thumbnailtouchdistance.y = 0, this.$thumbnails.hasclass("sp-animated") && (this.isthumbnailtouchmoving = !0, this._stopthumbnailsmovement(), this.thumbnailtouchstartposition = this.thumbnailsposition), this.$thumbnails.on(this.thumbnailtouchswipeevents.moveevent + "." + c, b.proxy(this._onthumbnailtouchmove, this)), b(document).on(this.thumbnailtouchswipeevents.endevent + "." + this.uniqueid + "." + c, b.proxy(this._onthumbnailtouchend, this)), this.$thumbnails.removeclass("sp-grab").addclass("sp-grabbing"), this.$thumbnailscontainer.addclass("sp-swiping") } }, _onthumbnailtouchmove: function(a) { var b = this.isthumbnailtouchsupport ? a.originalevent.touches[0] : a.originalevent; this.isthumbnailtouchmoving = !0, this.thumbnailtouchendpoint.x = b.pagex || b.clientx, this.thumbnailtouchendpoint.y = b.pagey || b.clienty, this.thumbnailtouchdistance.x = this.thumbnailtouchendpoint.x - this.thumbnailtouchstartpoint.x, this.thumbnailtouchdistance.y = this.thumbnailtouchendpoint.y - this.thumbnailtouchstartpoint.y; var c = "horizontal" === this.thumbnailsorientation ? this.thumbnailtouchdistance.x : this.thumbnailtouchdistance.y, d = "horizontal" === this.thumbnailsorientation ? this.thumbnailtouchdistance.y : this.thumbnailtouchdistance.x; if(math.abs(c) > math.abs(d)) { if(a.preventdefault(), this.thumbnailsposition >= 0) { var e = -this.thumbnailtouchstartposition; c = e + .2 * (c - e) } else if(this.thumbnailsposition <= -this.thumbnailssize + this.thumbnailscontainersize) { var f = this.thumbnailssize - this.thumbnailscontainersize + this.thumbnailtouchstartposition; c = -f + .2 * (c + f) } this._movethumbnailsto(this.thumbnailtouchstartposition + c, !0) } }, _onthumbnailtouchend: function(a) { { var d = this; "horizontal" === this.thumbnailsorientation ? this.thumbnailtouchdistance.x : this.thumbnailtouchdistance.y } if(this.$thumbnails.off(this.thumbnailtouchswipeevents.moveevent + "." + c), b(document).off(this.thumbnailtouchswipeevents.endevent + "." + this.uniqueid + "." + c), this.$thumbnails.removeclass("sp-grabbing").addclass("sp-grab"), this.isthumbnailtouchmoving === !1 || this.isthumbnailtouchmoving === !0 && math.abs(this.thumbnailtouchdistance.x) < 10 && math.abs(this.thumbnailtouchdistance.y) < 10) { var e = b(a.target).hasclass("sp-thumbnail-container") ? b(a.target) : b(a.target).parents(".sp-thumbnail-container"), f = e.index(); return void(0 !== b(a.target).parents("a").length ? (b(a.target).parents("a").off("click." + c), this.$thumbnailscontainer.removeclass("sp-swiping")) : f !== this.selectedthumbnailindex && -1 !== f && this.gotoslide(f)) } this.isthumbnailtouchmoving = !1, b(a.target).parents(".sp-thumbnail").one("click", function(a) { a.preventdefault() }), settimeout(function() { d.$thumbnailscontainer.removeclass("sp-swiping") }, 1), this.thumbnailsposition > 0 ? this._movethumbnailsto(0) : this.thumbnailsposition < this.thumbnailscontainersize - this.thumbnailssize && this._movethumbnailsto(this.thumbnailscontainersize - this.thumbnailssize), this.trigger({ type: "thumbnailsmovecomplete" }), b.isfunction(this.settings.thumbnailsmovecomplete) && this.settings.thumbnailsmovecomplete.call(this, { type: "thumbnailsmovecomplete" }) }, destroythumbnailtouchswipe: function() { this.off("update." + c), this.isthumbnailscroller !== !1 && (this.$thumbnails.off(this.thumbnailtouchswipeevents.startevent + "." + c), this.$thumbnails.off(this.thumbnailtouchswipeevents.moveevent + "." + c), this.$thumbnails.off("dragstart." + c), b(document).off(this.thumbnailtouchswipeevents.endevent + "." + this.uniqueid + "." + c), this.$thumbnails.removeclass("sp-grab")) }, thumbnailtouchswipedefaults: { thumbnailtouchswipe: !0 } }; b.sliderpro.addmodule("thumbnailtouchswipe", d) }(window, jquery), function(a, b) { "use strict"; var c = "thumbnailarrows." + b.sliderpro.namespace, d = { $thumbnailarrows: null, $previousthumbnailarrow: null, $nextthumbnailarrow: null, initthumbnailarrows: function() { var a = this; this.on("update." + c, b.proxy(this._thumbnailarrowsonupdate, this)), this.on("sliderresize." + c + " thumbnailsmovecomplete." + c, function() { a.isthumbnailscroller === !0 && a.settings.thumbnailarrows === !0 && a._checkthumbnailarrowsvisibility() }) }, _thumbnailarrowsonupdate: function() { var a = this; this.isthumbnailscroller !== !1 && (this.settings.thumbnailarrows === !0 && null === this.$thumbnailarrows ? (this.$thumbnailarrows = b('
').appendto(this.$thumbnailscontainer), this.$previousthumbnailarrow = b('
').appendto(this.$thumbnailarrows), this.$nextthumbnailarrow = b('
').appendto(this.$thumbnailarrows), this.$previousthumbnailarrow.on("click." + c, function() { var b = math.min(0, a.thumbnailsposition + a.thumbnailscontainersize); a._movethumbnailsto(b) }), this.$nextthumbnailarrow.on("click." + c, function() { var b = math.max(a.thumbnailscontainersize - a.thumbnailssize, a.thumbnailsposition - a.thumbnailscontainersize); a._movethumbnailsto(b) })) : this.settings.thumbnailarrows === !1 && null !== this.$thumbnailarrows && this._removethumbnailarrows(), this.settings.thumbnailarrows === !0 && (this.settings.fadethumbnailarrows === !0 ? this.$thumbnailarrows.addclass("sp-fade-thumbnail-arrows") : this.settings.fadethumbnailarrows === !1 && this.$thumbnailarrows.removeclass("sp-fade-thumbnail-arrows"), this._checkthumbnailarrowsvisibility())) }, _checkthumbnailarrowsvisibility: function() { 0 === this.thumbnailsposition ? this.$previousthumbnailarrow.css("display", "none") : this.$previousthumbnailarrow.css("display", "block"), this.thumbnailsposition === this.thumbnailscontainersize - this.thumbnailssize ? this.$nextthumbnailarrow.css("display", "none") : this.$nextthumbnailarrow.css("display", "block") }, _removethumbnailarrows: function() { null !== this.$thumbnailarrows && (this.$previousthumbnailarrow.off("click." + c), this.$nextthumbnailarrow.off("click." + c), this.$thumbnailarrows.remove(), this.$thumbnailarrows = null) }, destroythumbnailarrows: function() { this._removethumbnailarrows(), this.off("update." + c), this.off("sliderresize." + c), this.off("thumbnailsmovecomplete." + c) }, thumbnailarrowsdefaults: { thumbnailarrows: !1, fadethumbnailarrows: !0 } }; b.sliderpro.addmodule("thumbnailarrows", d) }(window, jquery), function(a, b) { "use strict"; var c = "video." + b.sliderpro.namespace, d = { initvideo: function() { this.on("update." + c, b.proxy(this._videoonupdate, this)), this.on("gotoslidecomplete." + c, b.proxy(this._videoongotoslidecomplete, this)) }, _videoonupdate: function() { var a = this; this.$slider.find(".sp-video").not("a, [data-init]").each(function() { var c = b(this); a._initvideo(c) }), this.$slider.find("a.sp-video").not("[data-preinit]").each(function() { var c = b(this); a._preinitvideo(c) }) }, _initvideo: function(a) { var d = this; a.attr("data-init", !0).videocontroller(), a.on("videoplay." + c, function() { "stopautoplay" === d.settings.playvideoaction && "undefined" != typeof d.stopautoplay && (d.stopautoplay(), d.settings.autoplay = !1); var c = { type: "videoplay", video: a }; d.trigger(c), b.isfunction(d.settings.videoplay) && d.settings.videoplay.call(d, c) }), a.on("videopause." + c, function() { "startautoplay" === d.settings.pausevideoaction && "undefined" != typeof d.startautoplay && (d.startautoplay(), d.settings.autoplay = !0); var c = { type: "videopause", video: a }; d.trigger(c), b.isfunction(d.settings.videopause) && d.settings.videopause.call(d, c) }), a.on("videoended." + c, function() { "startautoplay" === d.settings.endvideoaction && "undefined" != typeof d.startautoplay ? (d.startautoplay(), d.settings.autoplay = !0) : "nextslide" === d.settings.endvideoaction ? d.nextslide() : "replayvideo" === d.settings.endvideoaction && a.videocontroller("replay"); var c = { type: "videoend", video: a }; d.trigger(c), b.isfunction(d.settings.videoend) && d.settings.videoend.call(d, c) }) }, _preinitvideo: function(a) { var d = this; a.attr("data-preinit", !0), a.on("click." + c, function(c) { if(!d.$slider.hasclass("sp-swiping")) { c.preventdefault(); var e, f, g, h, i, j, k, l = a.attr("href"), m = a.children("img").attr("width"), n = a.children("img").attr("height"); - 1 !== l.indexof("youtube") || -1 !== l.indexof("youtu.be") ? f = "youtube" : -1 !== l.indexof("vimeo") && (f = "vimeo"), g = "youtube" === f ? /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/ : /http:\/\/(www\.)?vimeo.com\/(\d+)/, h = l.match(g), i = h[2], j = "youtube" === f ? "http://www.youtube.com/embed/" + i + "?enablejsapi=1&wmode=opaque" : "http://player.vimeo.com/video/" + i + "?api=1", k = l.split("?")[1], "undefined" != typeof k && (k = k.split("&"), b.each(k, function(a, b) { -1 === b.indexof(i) && (j += "&" + b) })), e = b("").attr({ src: j, width: m, height: n, "class": a.attr("class"), frameborder: 0 }).insertbefore(a), d._initvideo(e), e.videocontroller("play"), a.css("display", "none") } }) }, _videoongotoslidecomplete: function(a) { var b = this.$slides.find(".sp-slide").eq(a.previousindex).find(".sp-video[data-init]"); if(-1 !== a.previousindex && 0 !== b.length && ("stopvideo" === this.settings.leavevideoaction ? b.videocontroller("stop") : "pausevideo" === this.settings.leavevideoaction ? b.videocontroller("pause") : "removevideo" === this.settings.leavevideoaction && (0 !== b.siblings("a.sp-video").length ? (b.siblings("a.sp-video").css("display", ""), b.videocontroller("destroy"), b.remove()) : b.videocontroller("stop"))), "playvideo" === this.settings.reachvideoaction) { var d = this.$slides.find(".sp-slide").eq(a.index).find(".sp-video[data-init]"), e = this.$slides.find(".sp-slide").eq(a.index).find(".sp-video[data-preinit]"); 0 !== d.length ? d.videocontroller("play") : 0 !== e.length && e.trigger("click." + c) } }, destroyvideo: function() { this.$slider.find(".sp-video[ data-preinit ]").each(function() { var a = b(this); a.removeattr("data-preinit"), a.off("click." + c) }), this.$slider.find(".sp-video[ data-init ]").each(function() { var a = b(this); a.removeattr("data-init"), a.off("video"), a.videocontroller("destroy") }), this.off("update." + c), this.off("gotoslidecomplete." + c) }, videodefaults: { reachvideoaction: "none", leavevideoaction: "pausevideo", playvideoaction: "stopautoplay", pausevideoaction: "none", endvideoaction: "none", videoplay: function() {}, videopause: function() {}, videoend: function() {} } }; b.sliderpro.addmodule("video", d) }(window, jquery), function(a) { "use strict"; var b = window.navigator.useragent.match(/(ipad|iphone|ipod)/g) ? !0 : !1, c = function(b, c) { this.$video = a(b), this.options = c, this.settings = {}, this.player = null, this._init() }; c.prototype = { _init: function() { this.settings = a.extend({}, this.defaults, this.options); var b = this, c = a.videocontroller.players, d = this.$video.attr("id"); for(var e in c) if("undefined" != typeof c[e] && c[e].istype(this.$video)) { this.player = new c[e](this.$video); break } if(null !== this.player) { var f = ["ready", "start", "play", "pause", "ended"]; a.each(f, function(c, e) { var f = "video" + e.charat(0).touppercase() + e.slice(1); b.player.on(e, function() { b.trigger({ type: f, video: d }), a.isfunction(b.settings[f]) && b.settings[f].call(b, { type: f, video: d }) }) }) } }, play: function() { b === !0 && this.player.isstarted() === !1 || "playing" === this.player.getstate() || this.player.play() }, stop: function() { b === !0 && this.player.isstarted() === !1 || "stopped" === this.player.getstate() || this.player.stop() }, pause: function() { b === !0 && this.player.isstarted() === !1 || "paused" === this.player.getstate() || this.player.pause() }, replay: function() { (b !== !0 || this.player.isstarted() !== !1) && this.player.replay() }, on: function(a, b) { return this.$video.on(a, b) }, off: function(a) { return this.$video.off(a) }, trigger: function(a) { return this.$video.triggerhandler(a) }, destroy: function() { this.player.isstarted() === !0 && this.stop(), this.player.off("ready"), this.player.off("start"), this.player.off("play"), this.player.off("pause"), this.player.off("ended"), this.$video.removedata("videocontroller") }, defaults: { videoready: function() {}, videostart: function() {}, videoplay: function() {}, videopause: function() {}, videoended: function() {} } }, a.videocontroller = { players: {}, addplayer: function(a, b) { this.players[a] = b } }, a.fn.videocontroller = function(b) { var d = array.prototype.slice.call(arguments, 1); return this.each(function() { if("undefined" == typeof a(this).data("videocontroller")) { var e = new c(this, b); a(this).data("videocontroller", e) } else if("undefined" != typeof b) { var f = a(this).data("videocontroller"); "function" == typeof f[b] ? f[b].apply(f, d) : a.error(b + " does not exist in videocontroller.") } }) }; var d = function(b) { this.$video = b, this.player = null, this.ready = !1, this.started = !1, this.state = "", this.events = a({}), this._init() }; d.prototype = { _init: function() {}, play: function() {}, pause: function() {}, stop: function() {}, replay: function() {}, istype: function() {}, isready: function() { return this.ready }, isstarted: function() { return this.started }, getstate: function() { return this.state }, on: function(a, b) { return this.events.on(a, b) }, off: function(a) { return this.events.off(a) }, trigger: function(a) { return this.events.triggerhandler(a) } }; var e = { youtubeapiadded: !1, youtubevideos: [] }, f = function(b) { this.init = !1; var c = window.yt && window.yt.player; if("undefined" != typeof c) d.call(this, b); else if(e.youtubevideos.push({ video: b, scope: this }), e.youtubeapiadded === !1) { e.youtubeapiadded = !0; var f = document.createelement("script"); f.src = "http://www.youtube.com/player_api"; var g = document.getelementsbytagname("script")[0]; g.parentnode.insertbefore(f, g), window.onyoutubeplayerapiready = function() { a.each(e.youtubevideos, function(a, b) { d.call(b.scope, b.video) }) } } }; f.prototype = new d, f.prototype.constructor = f, a.videocontroller.addplayer("youtubevideo", f), f.istype = function(a) { if(a.is("iframe")) { var b = a.attr("src"); if(-1 !== b.indexof("youtube.com") || -1 !== b.indexof("youtu.be")) return !0 } return !1 }, f.prototype._init = function() { this.init = !0, this._setup() }, f.prototype._setup = function() { var a = this; this.player = new yt.player(this.$video[0], { events: { onready: function() { a.trigger({ type: "ready" }), a.ready = !0 }, onstatechange: function(b) { switch(b.data) { case yt.playerstate.playing: a.started === !1 && (a.started = !0, a.trigger({ type: "start" })), a.state = "playing", a.trigger({ type: "play" }); break; case yt.playerstate.paused: a.state = "paused", a.trigger({ type: "pause" }); break; case yt.playerstate.ended: a.state = "ended", a.trigger({ type: "ended" }) } } } }) }, f.prototype.play = function() { var a = this; if(this.ready === !0) this.player.playvideo(); else var b = setinterval(function() { a.ready === !0 && (clearinterval(b), a.player.playvideo()) }, 100) }, f.prototype.pause = function() { b === !0 ? this.stop() : this.player.pausevideo() }, f.prototype.stop = function() { this.player.seekto(1), this.player.stopvideo(), this.state = "stopped" }, f.prototype.replay = function() { this.player.seekto(1), this.player.playvideo() }, f.prototype.on = function(a, b) { var c = this; if(this.init === !0) d.prototype.on.call(this, a, b); else var e = setinterval(function() { c.init === !0 && (clearinterval(e), d.prototype.on.call(c, a, b)) }, 100) }; var g = { vimeoapiadded: !1, vimeovideos: [] }, h = function(b) { if(this.init = !1, "undefined" != typeof window.froogaloop) d.call(this, b); else if(g.vimeovideos.push({ video: b, scope: this }), g.vimeoapiadded === !1) { g.vimeoapiadded = !0; var c = document.createelement("script"); c.src = "http://a.vimeocdn.com/js/froogaloop2.min.js"; var e = document.getelementsbytagname("script")[0]; e.parentnode.insertbefore(c, e); var f = setinterval(function() { "undefined" != typeof window.froogaloop && (clearinterval(f), a.each(g.vimeovideos, function(a, b) { d.call(b.scope, b.video) })) }, 100) } }; h.prototype = new d, h.prototype.constructor = h, a.videocontroller.addplayer("vimeovideo", h), h.istype = function(a) { if(a.is("iframe")) { var b = a.attr("src"); if(-1 !== b.indexof("vimeo.com")) return !0 } return !1 }, h.prototype._init = function() { this.init = !0, this._setup() }, h.prototype._setup = function() { var a = this; this.player = $f(this.$video[0]), this.player.addevent("ready", function() { a.ready = !0, a.trigger({ type: "ready" }), a.player.addevent("play", function() { a.started === !1 && (a.started = !0, a.trigger({ type: "start" })), a.state = "playing", a.trigger({ type: "play" }) }), a.player.addevent("pause", function() { a.state = "paused", a.trigger({ type: "pause" }) }), a.player.addevent("finish", function() { a.state = "ended", a.trigger({ type: "ended" }) }) }) }, h.prototype.play = function() { var a = this; if(this.ready === !0) this.player.api("play"); else var b = setinterval(function() { a.ready === !0 && (clearinterval(b), a.player.api("play")) }, 100) }, h.prototype.pause = function() { this.player.api("pause") }, h.prototype.stop = function() { this.player.api("seekto", 0), this.player.api("pause"), this.state = "stopped" }, h.prototype.replay = function() { this.player.api("seekto", 0), this.player.api("play") }, h.prototype.on = function(a, b) { var c = this; if(this.init === !0) d.prototype.on.call(this, a, b); else var e = setinterval(function() { c.init === !0 && (clearinterval(e), d.prototype.on.call(c, a, b)) }, 100) }; var i = function(a) { d.call(this, a) }; i.prototype = new d, i.prototype.constructor = i, a.videocontroller.addplayer("html5video", i), i.istype = function(a) { return a.is("video") && a.hasclass("video-js") === !1 && a.hasclass("sublime") === !1 ? !0 : !1 }, i.prototype._init = function() { var a = this; this.player = this.$video[0], this.ready = !0, this.player.addeventlistener("play", function() { a.started === !1 && (a.started = !0, a.trigger({ type: "start" })), a.state = "playing", a.trigger({ type: "play" }) }), this.player.addeventlistener("pause", function() { a.state = "paused", a.trigger({ type: "pause" }) }), this.player.addeventlistener("ended", function() { a.state = "ended", a.trigger({ type: "ended" }) }) }, i.prototype.play = function() { this.player.play() }, i.prototype.pause = function() { this.player.pause() }, i.prototype.stop = function() { this.player.currenttime = 0, this.player.pause(), this.state = "stopped" }, i.prototype.replay = function() { this.player.currenttime = 0, this.player.play() }; var j = function(a) { d.call(this, a) }; j.prototype = new d, j.prototype.constructor = j, a.videocontroller.addplayer("videojsvideo", j), j.istype = function(a) { return "undefined" == typeof a.attr("data-videojs-id") && !a.hasclass("video-js") || "undefined" == typeof videojs ? !1 : !0 }, j.prototype._init = function() { var a = this, b = this.$video.attr(this.$video.hasclass("video-js") ? "id" : "data-videojs-id"); this.player = videojs(b), this.player.ready(function() { a.ready = !0, a.trigger({ type: "ready" }), a.player.on("play", function() { a.started === !1 && (a.started = !0, a.trigger({ type: "start" })), a.state = "playing", a.trigger({ type: "play" }) }), a.player.on("pause", function() { a.state = "paused", a.trigger({ type: "pause" }) }), a.player.on("ended", function() { a.state = "ended", a.trigger({ type: "ended" }) }) }) }, j.prototype.play = function() { this.player.play() }, j.prototype.pause = function() { this.player.pause() }, j.prototype.stop = function() { this.player.currenttime(0), this.player.pause(), this.state = "stopped" }, j.prototype.replay = function() { this.player.currenttime(0), this.player.play() }; var k = function(a) { d.call(this, a) }; k.prototype = new d, k.prototype.constructor = k, a.videocontroller.addplayer("sublimevideo", k), k.istype = function(a) { return a.hasclass("sublime") && "undefined" != typeof sublime ? !0 : !1 }, k.prototype._init = function() { var a = this; sublime.ready(function() { a.player = sublime.player(a.$video.attr("id")), a.ready = !0, a.trigger({ type: "ready" }), a.player.on("play", function() { a.started === !1 && (a.started = !0, a.trigger({ type: "start" })), a.state = "playing", a.trigger({ type: "play" }) }), a.player.on("pause", function() { a.state = "paused", a.trigger({ type: "pause" }) }), a.player.on("stop", function() { a.state = "stopped", a.trigger({ type: "stop" }) }), a.player.on("end", function() { a.state = "ended", a.trigger({ type: "ended" }) }) }) }, k.prototype.play = function() { this.player.play() }, k.prototype.pause = function() { this.player.pause() }, k.prototype.stop = function() { this.player.stop() }, k.prototype.replay = function() { this.player.stop(), this.player.play() }; var l = function(a) { d.call(this, a) }; l.prototype = new d, l.prototype.constructor = l, a.videocontroller.addplayer("jwplayervideo", l), l.istype = function(a) { return "undefined" == typeof a.attr("data-jwplayer-id") && !a.hasclass("jwplayer") && 0 === a.find("object[data*='jwplayer']").length || "undefined" == typeof jwplayer ? !1 : !0 }, l.prototype._init = function() { var a, b = this; this.$video.hasclass("jwplayer") ? a = this.$video.attr("id") : "undefined" != typeof this.$video.attr("data-jwplayer-id") ? a = this.$video.attr("data-jwplayer-id") : 0 !== this.$video.find("object[data*='jwplayer']").length && (a = this.$video.find("object").attr("id")), this.player = jwplayer(a), this.player.onready(function() { b.ready = !0, b.trigger({ type: "ready" }), b.player.onplay(function() { b.started === !1 && (b.started = !0, b.trigger({ type: "start" })), b.state = "playing", b.trigger({ type: "play" }) }), b.player.onpause(function() { b.state = "paused", b.trigger({ type: "pause" }) }), b.player.oncomplete(function() { b.state = "ended", b.trigger({ type: "ended" }) }) }) }, l.prototype.play = function() { this.player.play(!0) }, l.prototype.pause = function() { this.player.pause(!0) }, l.prototype.stop = function() { this.player.stop(), this.state = "stopped" }, l.prototype.replay = function() { this.player.seek(0), this.player.play(!0) } }(jquery);