! function() { "use strict"; function e(e) { e.fn.swiper = function(a) { var i; return e(this).each(function() { var e = new t(this, a); i || (i = e) }), i } } var a, t = function(e, i) { function s(e) { return math.floor(e) } function r() { y.autoplaytimeoutid = settimeout(function() { y.params.loop ? (y.fixloop(), y._slidenext(), y.emit("onautoplay", y)) : y.isend ? i.autoplaystoponlast ? y.stopautoplay() : (y._slideto(0), y.emit("onautoplay", y)) : (y._slidenext(), y.emit("onautoplay", y)) }, y.params.autoplay) } function n(e, t) { var i = a(e.target); if (!i.is(t)) if ("string" == typeof t) i = i.parents(t); else if (t.nodetype) { var s; return i.parents().each(function(e, a) { a === t && (s = t) }), s ? t : void 0 } if (0 !== i.length) return i[0] } function o(e, a) { a = a || {}; var t = window.mutationobserver || window.webkitmutationobserver, i = new t(function(e) { e.foreach(function(e) { y.onresize(!0), y.emit("onobserverupdate", y, e) }) }); i.observe(e, { attributes: "undefined" == typeof a.attributes || a.attributes, childlist: "undefined" == typeof a.childlist || a.childlist, characterdata: "undefined" == typeof a.characterdata || a.characterdata }), y.observers.push(i) } function l(e) { e.originalevent && (e = e.originalevent); var a = e.keycode || e.charcode; if (!y.params.allowswipetonext && (y.ishorizontal() && 39 === a || !y.ishorizontal() && 40 === a)) return !1; if (!y.params.allowswipetoprev && (y.ishorizontal() && 37 === a || !y.ishorizontal() && 38 === a)) return !1; if (!(e.shiftkey || e.altkey || e.ctrlkey || e.metakey || document.activeelement && document.activeelement.nodename && ("input" === document.activeelement.nodename.tolowercase() || "textarea" === document.activeelement.nodename.tolowercase()))) { if (37 === a || 39 === a || 38 === a || 40 === a) { var t = !1; if (y.container.parents(".swiper-slide").length > 0 && 0 === y.container.parents(".swiper-slide-active").length) return; var i = { left: window.pagexoffset, top: window.pageyoffset }, s = window.innerwidth, r = window.innerheight, n = y.container.offset(); y.rtl && (n.left = n.left - y.container[0].scrollleft); for (var o = [ [n.left, n.top], [n.left + y.width, n.top], [n.left, n.top + y.height], [n.left + y.width, n.top + y.height] ], l = 0; l < o.length; l++) { var d = o[l]; d[0] >= i.left && d[0] <= i.left + s && d[1] >= i.top && d[1] <= i.top + r && (t = !0) } if (!t) return } y.ishorizontal() ? ((37 === a || 39 === a) && (e.preventdefault ? e.preventdefault() : e.returnvalue = !1), (39 === a && !y.rtl || 37 === a && y.rtl) && y.slidenext(), (37 === a && !y.rtl || 39 === a && y.rtl) && y.slideprev()) : ((38 === a || 40 === a) && (e.preventdefault ? e.preventdefault() : e.returnvalue = !1), 40 === a && y.slidenext(), 38 === a && y.slideprev()) } } function d(e) { e.originalevent && (e = e.originalevent); var a = y.mousewheel.event, t = 0, i = y.rtl ? -1 : 1; if ("mousewheel" === a) if (y.params.mousewheelforcetoaxis) if (y.ishorizontal()) { if (!(math.abs(e.wheeldeltax) > math.abs(e.wheeldeltay))) return; t = e.wheeldeltax * i } else { if (!(math.abs(e.wheeldeltay) > math.abs(e.wheeldeltax))) return; t = e.wheeldeltay } else t = math.abs(e.wheeldeltax) > math.abs(e.wheeldeltay) ? -e.wheeldeltax * i : -e.wheeldeltay; else if ("dommousescroll" === a) t = -e.detail; else if ("wheel" === a) if (y.params.mousewheelforcetoaxis) if (y.ishorizontal()) { if (!(math.abs(e.deltax) > math.abs(e.deltay))) return; t = -e.deltax * i } else { if (!(math.abs(e.deltay) > math.abs(e.deltax))) return; t = -e.deltay } else t = math.abs(e.deltax) > math.abs(e.deltay) ? -e.deltax * i : -e.deltay; if (0 !== t) { if (y.params.mousewheelinvert && (t = -t), y.params.freemode) { var s = y.getwrappertranslate() + t * y.params.mousewheelsensitivity, r = y.isbeginning, n = y.isend; if (s >= y.mintranslate() && (s = y.mintranslate()), s <= y.maxtranslate() && (s = y.maxtranslate()), y.setwrappertransition(0), y.setwrappertranslate(s), y.updateprogress(), y.updateactiveindex(), (!r && y.isbeginning || !n && y.isend) && y.updateclasses(), y.params.freemodesticky ? (cleartimeout(y.mousewheel.timeout), y.mousewheel.timeout = settimeout(function() { y.slidereset() }, 300)) : y.params.lazyloading && y.lazy && y.lazy.load(), 0 === s || s === y.maxtranslate()) return } else { if ((new window.date).gettime() - y.mousewheel.lastscrolltime > 60) if (0 > t) if (y.isend && !y.params.loop || y.animating) { if (y.params.mousewheelreleaseonedges) return !0 } else y.slidenext(); else if (y.isbeginning && !y.params.loop || y.animating) { if (y.params.mousewheelreleaseonedges) return !0 } else y.slideprev(); y.mousewheel.lastscrolltime = (new window.date).gettime() } return y.params.autoplay && y.stopautoplay(), e.preventdefault ? e.preventdefault() : e.returnvalue = !1, !1 } } function p(e, t) { e = a(e); var i, s, r, n = y.rtl ? -1 : 1; i = e.attr("data-swiper-parallax") || "0", s = e.attr("data-swiper-parallax-x"), r = e.attr("data-swiper-parallax-y"), s || r ? (s = s || "0", r = r || "0") : y.ishorizontal() ? (s = i, r = "0") : (r = i, s = "0"), s = s.indexof("%") >= 0 ? parseint(s, 10) * t * n + "%" : s * t * n + "px", r = r.indexof("%") >= 0 ? parseint(r, 10) * t + "%" : r * t + "px", e.transform("translate3d(" + s + ", " + r + ",0px)") } function c(e) { return 0 !== e.indexof("on") && (e = e[0] !== e[0].touppercase() ? "on" + e[0].touppercase() + e.substring(1) : "on" + e), e } if (!(this instanceof t)) return new t(e, i); var u = { direction: "horizontal", toucheventstarget: "container", initialslide: 0, speed: 300, autoplay: !1, autoplaydisableoninteraction: !0, autoplaystoponlast: !1, iosedgeswipedetection: !1, iosedgeswipethreshold: 20, freemode: !1, freemodemomentum: !0, freemodemomentumratio: 1, freemodemomentumbounce: !0, freemodemomentumbounceratio: 1, freemodesticky: !1, freemodeminimumvelocity: .02, autoheight: !1, setwrappersize: !1, virtualtranslate: !1, effect: "slide", coverflow: { rotate: 50, stretch: 0, depth: 100, modifier: 1, slideshadows: !0 }, flip: { slideshadows: !0, limitrotation: !0 }, cube: { slideshadows: !0, shadow: !0, shadowoffset: 20, shadowscale: .94 }, fade: { crossfade: !1 }, parallax: !1, scrollbar: null, scrollbarhide: !0, scrollbardraggable: !1, scrollbarsnaponrelease: !1, keyboardcontrol: !1, mousewheelcontrol: !1, mousewheelreleaseonedges: !1, mousewheelinvert: !1, mousewheelforcetoaxis: !1, mousewheelsensitivity: 1, hashnav: !1, breakpoints: void 0, spacebetween: 0, slidesperview: 1, slidespercolumn: 1, slidespercolumnfill: "column", slidespergroup: 1, centeredslides: !1, slidesoffsetbefore: 0, slidesoffsetafter: 0, roundlengths: !1, touchratio: 1, touchangle: 45, simulatetouch: !0, shortswipes: !0, longswipes: !0, longswipesratio: .5, longswipesms: 300, followfinger: !0, onlyexternal: !1, threshold: 0, touchmovestoppropagation: !0, uniquenavelements: !0, pagination: null, paginationelement: "span", paginationclickable: !1, paginationhide: !1, paginationbulletrender: null, paginationprogressrender: null, paginationfractionrender: null, paginationcustomrender: null, paginationtype: "bullets", resistance: !0, resistanceratio: .85, nextbutton: null, prevbutton: null, watchslidesprogress: !1, watchslidesvisibility: !1, grabcursor: !1, preventclicks: !0, preventclickspropagation: !0, slidetoclickedslide: !1, lazyloading: !1, lazyloadinginprevnext: !1, lazyloadinginprevnextamount: 1, lazyloadingontransitionstart: !1, preloadimages: !0, updateonimagesready: !0, loop: !1, loopadditionalslides: 0, loopedslides: null, control: void 0, controlinverse: !1, controlby: "slide", allowswipetoprev: !0, allowswipetonext: !0, swipehandler: null, noswiping: !0, noswipingclass: "swiper-no-swiping", slideclass: "swiper-slide", slideactiveclass: "swiper-slide-active", slidevisibleclass: "swiper-slide-visible", slideduplicateclass: "swiper-slide-duplicate", slidenextclass: "swiper-slide-next", slideprevclass: "swiper-slide-prev", wrapperclass: "swiper-wrapper", bulletclass: "swiper-pagination-bullet", bulletactiveclass: "swiper-pagination-bullet-active", buttondisabledclass: "swiper-button-disabled", paginationcurrentclass: "swiper-pagination-current", paginationtotalclass: "swiper-pagination-total", paginationhiddenclass: "swiper-pagination-hidden", paginationprogressbarclass: "swiper-pagination-progressbar", observer: !1, observeparents: !1, a11y: !1, prevslidemessage: "previous slide", nextslidemessage: "next slide", firstslidemessage: "this is the first slide", lastslidemessage: "this is the last slide", paginationbulletmessage: "go to slide {{index}}", runcallbacksoninit: !0 }, m = i && i.virtualtranslate; i = i || {}; var h = {}; for (var f in i) if ("object" != typeof i[f] || null === i[f] || i[f].nodetype || i[f] === window || i[f] === document || "undefined" != typeof dom7 && i[f] instanceof dom7 || "undefined" != typeof jquery && i[f] instanceof jquery) h[f] = i[f]; else { h[f] = {}; for (var g in i[f]) h[f][g] = i[f][g] } for (var v in u) if ("undefined" == typeof i[v]) i[v] = u[v]; else if ("object" == typeof i[v]) for (var w in u[v])"undefined" == typeof i[v][w] && (i[v][w] = u[v][w]); var y = this; if (y.params = i, y.originalparams = h, y.classnames = [], "undefined" != typeof a && "undefined" != typeof dom7 && (a = dom7), ("undefined" != typeof a || (a = "undefined" == typeof dom7 ? window.dom7 || window.zepto || window.jquery : dom7)) && (y.$ = a, y.currentbreakpoint = void 0, y.getactivebreakpoint = function() { if (!y.params.breakpoints) return !1; var e, a = !1, t = []; for (e in y.params.breakpoints) y.params.breakpoints.hasownproperty(e) && t.push(e); t.sort(function(e, a) { return parseint(e, 10) > parseint(a, 10) }); for (var i = 0; i < t.length; i++) e = t[i], e >= window.innerwidth && !a && (a = e); return a || "max" }, y.setbreakpoint = function() { var e = y.getactivebreakpoint(); if (e && y.currentbreakpoint !== e) { var a = e in y.params.breakpoints ? y.params.breakpoints[e] : y.originalparams, t = y.params.loop && a.slidesperview !== y.params.slidesperview; for (var i in a) y.params[i] = a[i]; y.currentbreakpoint = e, t && y.destroyloop && y.reloop(!0) } }, y.params.breakpoints && y.setbreakpoint(), y.container = a(e), 0 !== y.container.length)) { if (y.container.length > 1) { var t = []; return y.container.each(function() { t.push(new t(this, i)) }), t } y.container[0].swiper = y, y.container.data("swiper", y), y.classnames.push("swiper-container-" + y.params.direction), y.params.freemode && y.classnames.push("swiper-container-free-mode"), y.support.flexbox || (y.classnames.push("swiper-container-no-flexbox"), y.params.slidespercolumn = 1), y.params.autoheight && y.classnames.push("swiper-container-autoheight"), (y.params.parallax || y.params.watchslidesvisibility) && (y.params.watchslidesprogress = !0), ["cube", "coverflow", "flip"].indexof(y.params.effect) >= 0 && (y.support.transforms3d ? (y.params.watchslidesprogress = !0, y.classnames.push("swiper-container-3d")) : y.params.effect = "slide"), "slide" !== y.params.effect && y.classnames.push("swiper-container-" + y.params.effect), "cube" === y.params.effect && (y.params.resistanceratio = 0, y.params.slidesperview = 1, y.params.slidespercolumn = 1, y.params.slidespergroup = 1, y.params.centeredslides = !1, y.params.spacebetween = 0, y.params.virtualtranslate = !0, y.params.setwrappersize = !1), ("fade" === y.params.effect || "flip" === y.params.effect) && (y.params.slidesperview = 1, y.params.slidespercolumn = 1, y.params.slidespergroup = 1, y.params.watchslidesprogress = !0, y.params.spacebetween = 0, y.params.setwrappersize = !1, "undefined" == typeof m && (y.params.virtualtranslate = !0)), y.params.grabcursor && y.support.touch && (y.params.grabcursor = !1), y.wrapper = y.container.children("." + y.params.wrapperclass), y.params.pagination && (y.paginationcontainer = a(y.params.pagination), y.params.uniquenavelements && "string" == typeof y.params.pagination && y.paginationcontainer.length > 1 && 1 === y.container.find(y.params.pagination).length && (y.paginationcontainer = y.container.find(y.params.pagination)), "bullets" === y.params.paginationtype && y.params.paginationclickable ? y.paginationcontainer.addclass("swiper-pagination-clickable") : y.params.paginationclickable = !1, y.paginationcontainer.addclass("swiper-pagination-" + y.params.paginationtype)), (y.params.nextbutton || y.params.prevbutton) && (y.params.nextbutton && (y.nextbutton = a(y.params.nextbutton), y.params.uniquenavelements && "string" == typeof y.params.nextbutton && y.nextbutton.length > 1 && 1 === y.container.find(y.params.nextbutton).length && (y.nextbutton = y.container.find(y.params.nextbutton))), y.params.prevbutton && (y.prevbutton = a(y.params.prevbutton), y.params.uniquenavelements && "string" == typeof y.params.prevbutton && y.prevbutton.length > 1 && 1 === y.container.find(y.params.prevbutton).length && (y.prevbutton = y.container.find(y.params.prevbutton)))), y.ishorizontal = function() { return "horizontal" === y.params.direction }, y.rtl = y.ishorizontal() && ("rtl" === y.container[0].dir.tolowercase() || "rtl" === y.container.css("direction")), y.rtl && y.classnames.push("swiper-container-rtl"), y.rtl && (y.wrongrtl = "-webkit-box" === y.wrapper.css("display")), y.params.slidespercolumn > 1 && y.classnames.push("swiper-container-multirow"), y.device.android && y.classnames.push("swiper-container-android"), y.container.addclass(y.classnames.join(" ")), y.translate = 0, y.progress = 0, y.velocity = 0, y.lockswipetonext = function() { y.params.allowswipetonext = !1 }, y.lockswipetoprev = function() { y.params.allowswipetoprev = !1 }, y.lockswipes = function() { y.params.allowswipetonext = y.params.allowswipetoprev = !1 }, y.unlockswipetonext = function() { y.params.allowswipetonext = !0 }, y.unlockswipetoprev = function() { y.params.allowswipetoprev = !0 }, y.unlockswipes = function() { y.params.allowswipetonext = y.params.allowswipetoprev = !0 }, y.params.grabcursor && (y.container[0].style.cursor = "move", y.container[0].style.cursor = "-webkit-grab", y.container[0].style.cursor = "-moz-grab", y.container[0].style.cursor = "grab"), y.imagestoload = [], y.imagesloaded = 0, y.loadimage = function(e, a, t, i, s) { function r() { s && s() } var n; e.complete && i ? r() : a ? (n = new window.image, n.onload = r, n.onerror = r, t && (n.srcset = t), a && (n.src = a)) : r() }, y.preloadimages = function() { function e() { "undefined" != typeof y && null !== y && (void 0 !== y.imagesloaded && y.imagesloaded++, y.imagesloaded === y.imagestoload.length && (y.params.updateonimagesready && y.update(), y.emit("onimagesready", y))) } y.imagestoload = y.container.find("img"); for (var a = 0; a < y.imagestoload.length; a++) y.loadimage(y.imagestoload[a], y.imagestoload[a].currentsrc || y.imagestoload[a].getattribute("src"), y.imagestoload[a].srcset || y.imagestoload[a].getattribute("srcset"), !0, e) }, y.autoplaytimeoutid = void 0, y.autoplaying = !1, y.autoplaypaused = !1, y.startautoplay = function() { return "undefined" == typeof y.autoplaytimeoutid && ( !! y.params.autoplay && (!y.autoplaying && (y.autoplaying = !0, y.emit("onautoplaystart", y), void r()))) }, y.stopautoplay = function(e) { y.autoplaytimeoutid && (y.autoplaytimeoutid && cleartimeout(y.autoplaytimeoutid), y.autoplaying = !1, y.autoplaytimeoutid = void 0, y.emit("onautoplaystop", y)) }, y.pauseautoplay = function(e) { y.autoplaypaused || (y.autoplaytimeoutid && cleartimeout(y.autoplaytimeoutid), y.autoplaypaused = !0, 0 === e ? (y.autoplaypaused = !1, r()) : y.wrapper.transitionend(function() { y && (y.autoplaypaused = !1, y.autoplaying ? r() : y.stopautoplay()) })) }, y.mintranslate = function() { return -y.snapgrid[0] }, y.maxtranslate = function() { return -y.snapgrid[y.snapgrid.length - 1] }, y.updateautoheight = function() { var e = y.slides.eq(y.activeindex)[0]; if ("undefined" != typeof e) { var a = e.offsetheight; a && y.wrapper.css("height", a + "px") } }, y.updatecontainersize = function() { var e, a; e = "undefined" != typeof y.params.width ? y.params.width : y.container[0].clientwidth, a = "undefined" != typeof y.params.height ? y.params.height : y.container[0].clientheight, 0 === e && y.ishorizontal() || 0 === a && !y.ishorizontal() || (e = e - parseint(y.container.css("padding-left"), 10) - parseint(y.container.css("padding-right"), 10), a = a - parseint(y.container.css("padding-top"), 10) - parseint(y.container.css("padding-bottom"), 10), y.width = e, y.height = a, y.size = y.ishorizontal() ? y.width : y.height) }, y.updateslidessize = function() { y.slides = y.wrapper.children("." + y.params.slideclass), y.snapgrid = [], y.slidesgrid = [], y.slidessizesgrid = []; var e, a = y.params.spacebetween, t = -y.params.slidesoffsetbefore, i = 0, r = 0; if ("undefined" != typeof y.size) { "string" == typeof a && a.indexof("%") >= 0 && (a = parsefloat(a.replace("%", "")) / 100 * y.size), y.virtualsize = -a, y.rtl ? y.slides.css({ marginleft: "", margintop: "" }) : y.slides.css({ marginright: "", marginbottom: "" }); var n; y.params.slidespercolumn > 1 && (n = math.floor(y.slides.length / y.params.slidespercolumn) === y.slides.length / y.params.slidespercolumn ? y.slides.length : math.ceil(y.slides.length / y.params.slidespercolumn) * y.params.slidespercolumn, "auto" !== y.params.slidesperview && "row" === y.params.slidespercolumnfill && (n = math.max(n, y.params.slidesperview * y.params.slidespercolumn))); var o, l = y.params.slidespercolumn, d = n / l, p = d - (y.params.slidespercolumn * d - y.slides.length); for (e = 0; e < y.slides.length; e++) { o = 0; var c = y.slides.eq(e); if (y.params.slidespercolumn > 1) { var u, m, h; "column" === y.params.slidespercolumnfill ? (m = math.floor(e / l), h = e - m * l, (m > p || m === p && h === l - 1) && ++h >= l && (h = 0, m++), u = m + h * n / l, c.css({ "-webkit-box-ordinal-group": u, "-moz-box-ordinal-group": u, "-ms-flex-order": u, "-webkit-order": u, order: u })) : (h = math.floor(e / d), m = e - h * d), c.css({ "margin-top": 0 !== h && y.params.spacebetween && y.params.spacebetween + "px" }).attr("data-swiper-column", m).attr("data-swiper-row", h) } "none" !== c.css("display") && ("auto" === y.params.slidesperview ? (o = y.ishorizontal() ? c.outerwidth(!0) : c.outerheight(!0), y.params.roundlengths && (o = s(o))) : (o = (y.size - (y.params.slidesperview - 1) * a) / y.params.slidesperview, y.params.roundlengths && (o = s(o)), y.ishorizontal() ? y.slides[e].style.width = o + "px" : y.slides[e].style.height = o + "px"), y.slides[e].swiperslidesize = o, y.slidessizesgrid.push(o), y.params.centeredslides ? (t = t + o / 2 + i / 2 + a, 0 === e && (t = t - y.size / 2 - a), math.abs(t) < .001 && (t = 0), r % y.params.slidespergroup === 0 && y.snapgrid.push(t), y.slidesgrid.push(t)) : (r % y.params.slidespergroup === 0 && y.snapgrid.push(t), y.slidesgrid.push(t), t = t + o + a), y.virtualsize += o + a, i = o, r++) } y.virtualsize = math.max(y.virtualsize, y.size) + y.params.slidesoffsetafter; var f; if (y.rtl && y.wrongrtl && ("slide" === y.params.effect || "coverflow" === y.params.effect) && y.wrapper.css({ width: y.virtualsize + y.params.spacebetween + "px" }), (!y.support.flexbox || y.params.setwrappersize) && (y.ishorizontal() ? y.wrapper.css({ width: y.virtualsize + y.params.spacebetween + "px" }) : y.wrapper.css({ height: y.virtualsize + y.params.spacebetween + "px" })), y.params.slidespercolumn > 1 && (y.virtualsize = (o + y.params.spacebetween) * n, y.virtualsize = math.ceil(y.virtualsize / y.params.slidespercolumn) - y.params.spacebetween, y.wrapper.css({ width: y.virtualsize + y.params.spacebetween + "px" }), y.params.centeredslides)) { for (f = [], e = 0; e < y.snapgrid.length; e++) y.snapgrid[e] < y.virtualsize + y.snapgrid[0] && f.push(y.snapgrid[e]); y.snapgrid = f } if (!y.params.centeredslides) { for (f = [], e = 0; e < y.snapgrid.length; e++) y.snapgrid[e] <= y.virtualsize - y.size && f.push(y.snapgrid[e]); y.snapgrid = f, math.floor(y.virtualsize - y.size) - math.floor(y.snapgrid[y.snapgrid.length - 1]) > 1 && y.snapgrid.push(y.virtualsize - y.size) } 0 === y.snapgrid.length && (y.snapgrid = [0]), 0 !== y.params.spacebetween && (y.ishorizontal() ? y.rtl ? y.slides.css({ marginleft: a + "px" }) : y.slides.css({ marginright: a + "px" }) : y.slides.css({ marginbottom: a + "px" })), y.params.watchslidesprogress && y.updateslidesoffset() } }, y.updateslidesoffset = function() { for (var e = 0; e < y.slides.length; e++) y.slides[e].swiperslideoffset = y.ishorizontal() ? y.slides[e].offsetleft : y.slides[e].offsettop }, y.updateslidesprogress = function(e) { if ("undefined" == typeof e && (e = y.translate || 0), 0 !== y.slides.length) { "undefined" == typeof y.slides[0].swiperslideoffset && y.updateslidesoffset(); var a = -e; y.rtl && (a = e), y.slides.removeclass(y.params.slidevisibleclass); for (var t = 0; t < y.slides.length; t++) { var i = y.slides[t], s = (a - i.swiperslideoffset) / (i.swiperslidesize + y.params.spacebetween); if (y.params.watchslidesvisibility) { var r = -(a - i.swiperslideoffset), n = r + y.slidessizesgrid[t], o = r >= 0 && r < y.size || n > 0 && n <= y.size || 0 >= r && n >= y.size; o && y.slides.eq(t).addclass(y.params.slidevisibleclass) } i.progress = y.rtl ? -s : s } } }, y.updateprogress = function(e) { "undefined" == typeof e && (e = y.translate || 0); var a = y.maxtranslate() - y.mintranslate(), t = y.isbeginning, i = y.isend; 0 === a ? (y.progress = 0, y.isbeginning = y.isend = !0) : (y.progress = (e - y.mintranslate()) / a, y.isbeginning = y.progress <= 0, y.isend = y.progress >= 1), y.isbeginning && !t && y.emit("onreachbeginning", y), y.isend && !i && y.emit("onreachend", y), y.params.watchslidesprogress && y.updateslidesprogress(e), y.emit("onprogress", y, y.progress) }, y.updateactiveindex = function() { var e, a, t, i = y.rtl ? y.translate : -y.translate; for (a = 0; a < y.slidesgrid.length; a++)"undefined" != typeof y.slidesgrid[a + 1] ? i >= y.slidesgrid[a] && i < y.slidesgrid[a + 1] - (y.slidesgrid[a + 1] - y.slidesgrid[a]) / 2 ? e = a : i >= y.slidesgrid[a] && i < y.slidesgrid[a + 1] && (e = a + 1) : i >= y.slidesgrid[a] && (e = a); (0 > e || "undefined" == typeof e) && (e = 0), t = math.floor(e / y.params.slidespergroup), t >= y.snapgrid.length && (t = y.snapgrid.length - 1), e !== y.activeindex && (y.snapindex = t, y.previousindex = y.activeindex, y.activeindex = e, y.updateclasses()) }, y.updateclasses = function() { y.slides.removeclass(y.params.slideactiveclass + " " + y.params.slidenextclass + " " + y.params.slideprevclass); var e = y.slides.eq(y.activeindex); e.addclass(y.params.slideactiveclass); var t = e.next("." + y.params.slideclass).addclass(y.params.slidenextclass); y.params.loop && 0 === t.length && y.slides.eq(0).addclass(y.params.slidenextclass); var i = e.prev("." + y.params.slideclass).addclass(y.params.slideprevclass); if (y.params.loop && 0 === i.length && y.slides.eq(-1).addclass(y.params.slideprevclass), y.paginationcontainer && y.paginationcontainer.length > 0) { var s, r = y.params.loop ? math.ceil((y.slides.length - 2 * y.loopedslides) / y.params.slidespergroup) : y.snapgrid.length; if (y.params.loop ? (s = math.ceil((y.activeindex - y.loopedslides) / y.params.slidespergroup), s > y.slides.length - 1 - 2 * y.loopedslides && (s -= y.slides.length - 2 * y.loopedslides), s > r - 1 && (s -= r), 0 > s && "bullets" !== y.params.paginationtype && (s = r + s)) : s = "undefined" != typeof y.snapindex ? y.snapindex : y.activeindex || 0, "bullets" === y.params.paginationtype && y.bullets && y.bullets.length > 0 && (y.bullets.removeclass(y.params.bulletactiveclass), y.paginationcontainer.length > 1 ? y.bullets.each(function() { a(this).index() === s && a(this).addclass(y.params.bulletactiveclass) }) : y.bullets.eq(s).addclass(y.params.bulletactiveclass)), "fraction" === y.params.paginationtype && (y.paginationcontainer.find("." + y.params.paginationcurrentclass).text(s + 1), y.paginationcontainer.find("." + y.params.paginationtotalclass).text(r)), "progress" === y.params.paginationtype) { var n = (s + 1) / r, o = n, l = 1; y.ishorizontal() || (l = n, o = 1), y.paginationcontainer.find("." + y.params.paginationprogressbarclass).transform("translate3d(0,0,0) scalex(" + o + ") scaley(" + l + ")").transition(y.params.speed) } "custom" === y.params.paginationtype && y.params.paginationcustomrender && (y.paginationcontainer.html(y.params.paginationcustomrender(y, s + 1, r)), y.emit("onpaginationrendered", y, y.paginationcontainer[0])) } y.params.loop || (y.params.prevbutton && y.prevbutton && y.prevbutton.length > 0 && (y.isbeginning ? (y.prevbutton.addclass(y.params.buttondisabledclass), y.params.a11y && y.a11y && y.a11y.disable(y.prevbutton)) : (y.prevbutton.removeclass(y.params.buttondisabledclass), y.params.a11y && y.a11y && y.a11y.enable(y.prevbutton))), y.params.nextbutton && y.nextbutton && y.nextbutton.length > 0 && (y.isend ? (y.nextbutton.addclass(y.params.buttondisabledclass), y.params.a11y && y.a11y && y.a11y.disable(y.nextbutton)) : (y.nextbutton.removeclass(y.params.buttondisabledclass), y.params.a11y && y.a11y && y.a11y.enable(y.nextbutton)))) }, y.updatepagination = function() { if (y.params.pagination && y.paginationcontainer && y.paginationcontainer.length > 0) { var e = ""; if ("bullets" === y.params.paginationtype) { for (var a = y.params.loop ? math.ceil((y.slides.length - 2 * y.loopedslides) / y.params.slidespergroup) : y.snapgrid.length, t = 0; a > t; t++) e += y.params.paginationbulletrender ? y.params.paginationbulletrender(t, y.params.bulletclass) : "<" + y.params.paginationelement + ' class="' + y.params.bulletclass + '">"; y.paginationcontainer.html(e), y.bullets = y.paginationcontainer.find("." + y.params.bulletclass), y.params.paginationclickable && y.params.a11y && y.a11y && y.a11y.initpagination() } "fraction" === y.params.paginationtype && (e = y.params.paginationfractionrender ? y.params.paginationfractionrender(y, y.params.paginationcurrentclass, y.params.paginationtotalclass) : ' / ', y.paginationcontainer.html(e)), "progress" === y.params.paginationtype && (e = y.params.paginationprogressrender ? y.params.paginationprogressrender(y, y.params.paginationprogressbarclass) : '', y.paginationcontainer.html(e)), "custom" !== y.params.paginationtype && y.emit("onpaginationrendered", y, y.paginationcontainer[0]) } }, y.update = function(e) { function a() { i = math.min(math.max(y.translate, y.maxtranslate()), y.mintranslate()), y.setwrappertranslate(i), y.updateactiveindex(), y.updateclasses() } if (y.updatecontainersize(), y.updateslidessize(), y.updateprogress(), y.updatepagination(), y.updateclasses(), y.params.scrollbar && y.scrollbar && y.scrollbar.set(), e) { var t, i; y.controller && y.controller.spline && (y.controller.spline = void 0), y.params.freemode ? (a(), y.params.autoheight && y.updateautoheight()) : (t = ("auto" === y.params.slidesperview || y.params.slidesperview > 1) && y.isend && !y.params.centeredslides ? y.slideto(y.slides.length - 1, 0, !1, !0) : y.slideto(y.activeindex, 0, !1, !0), t || a()) } else y.params.autoheight && y.updateautoheight() }, y.onresize = function(e) { y.params.breakpoints && y.setbreakpoint(); var a = y.params.allowswipetoprev, t = y.params.allowswipetonext; y.params.allowswipetoprev = y.params.allowswipetonext = !0, y.updatecontainersize(), y.updateslidessize(), ("auto" === y.params.slidesperview || y.params.freemode || e) && y.updatepagination(), y.params.scrollbar && y.scrollbar && y.scrollbar.set(), y.controller && y.controller.spline && (y.controller.spline = void 0); var i = !1; if (y.params.freemode) { var s = math.min(math.max(y.translate, y.maxtranslate()), y.mintranslate()); y.setwrappertranslate(s), y.updateactiveindex(), y.updateclasses(), y.params.autoheight && y.updateautoheight() } else y.updateclasses(), i = ("auto" === y.params.slidesperview || y.params.slidesperview > 1) && y.isend && !y.params.centeredslides ? y.slideto(y.slides.length - 1, 0, !1, !0) : y.slideto(y.activeindex, 0, !1, !0); y.params.lazyloading && !i && y.lazy && y.lazy.load(), y.params.allowswipetoprev = a, y.params.allowswipetonext = t }; var b = ["mousedown", "mousemove", "mouseup"]; window.navigator.pointerenabled ? b = ["pointerdown", "pointermove", "pointerup"] : window.navigator.mspointerenabled && (b = ["mspointerdown", "mspointermove", "mspointerup"]), y.touchevents = { start: y.support.touch || !y.params.simulatetouch ? "touchstart" : b[0], move: y.support.touch || !y.params.simulatetouch ? "touchmove" : b[1], end: y.support.touch || !y.params.simulatetouch ? "touchend" : b[2] }, (window.navigator.pointerenabled || window.navigator.mspointerenabled) && ("container" === y.params.toucheventstarget ? y.container : y.wrapper).addclass("swiper-wp8-" + y.params.direction), y.initevents = function(e) { var a = e ? "off" : "on", t = e ? "removeeventlistener" : "addeventlistener", s = "container" === y.params.toucheventstarget ? y.container[0] : y.wrapper[0], r = y.support.touch ? s : document, n = !! y.params.nested; y.browser.ie ? (s[t](y.touchevents.start, y.ontouchstart, !1), r[t](y.touchevents.move, y.ontouchmove, n), r[t](y.touchevents.end, y.ontouchend, !1)) : (y.support.touch && (s[t](y.touchevents.start, y.ontouchstart, !1), s[t](y.touchevents.move, y.ontouchmove, n), s[t](y.touchevents.end, y.ontouchend, !1)), !i.simulatetouch || y.device.ios || y.device.android || (s[t]("mousedown", y.ontouchstart, !1), document[t]("mousemove", y.ontouchmove, n), document[t]("mouseup", y.ontouchend, !1))), window[t]("resize", y.onresize), y.params.nextbutton && y.nextbutton && y.nextbutton.length > 0 && (y.nextbutton[a]("click", y.onclicknext), y.params.a11y && y.a11y && y.nextbutton[a]("keydown", y.a11y.onenterkey)), y.params.prevbutton && y.prevbutton && y.prevbutton.length > 0 && (y.prevbutton[a]("click", y.onclickprev), y.params.a11y && y.a11y && y.prevbutton[a]("keydown", y.a11y.onenterkey)), y.params.pagination && y.params.paginationclickable && (y.paginationcontainer[a]("click", "." + y.params.bulletclass, y.onclickindex), y.params.a11y && y.a11y && y.paginationcontainer[a]("keydown", "." + y.params.bulletclass, y.a11y.onenterkey)), (y.params.preventclicks || y.params.preventclickspropagation) && s[t]("click", y.preventclicks, !0) }, y.attachevents = function() { y.initevents() }, y.detachevents = function() { y.initevents(!0) }, y.allowclick = !0, y.preventclicks = function(e) { y.allowclick || (y.params.preventclicks && e.preventdefault(), y.params.preventclickspropagation && y.animating && (e.stoppropagation(), e.stopimmediatepropagation())) }, y.onclicknext = function(e) { e.preventdefault(), (!y.isend || y.params.loop) && y.slidenext() }, y.onclickprev = function(e) { e.preventdefault(), (!y.isbeginning || y.params.loop) && y.slideprev() }, y.onclickindex = function(e) { e.preventdefault(); var t = a(this).index() * y.params.slidespergroup; y.params.loop && (t += y.loopedslides), y.slideto(t) }, y.updateclickedslide = function(e) { var t = n(e, "." + y.params.slideclass), i = !1; if (t) for (var s = 0; s < y.slides.length; s++) y.slides[s] === t && (i = !0); if (!t || !i) return y.clickedslide = void 0, void(y.clickedindex = void 0); if (y.clickedslide = t, y.clickedindex = a(t).index(), y.params.slidetoclickedslide && void 0 !== y.clickedindex && y.clickedindex !== y.activeindex) { var r, o = y.clickedindex; if (y.params.loop) { if (y.animating) return; r = a(y.clickedslide).attr("data-swiper-slide-index"), y.params.centeredslides ? o < y.loopedslides - y.params.slidesperview / 2 || o > y.slides.length - y.loopedslides + y.params.slidesperview / 2 ? (y.fixloop(), o = y.wrapper.children("." + y.params.slideclass + '[data-swiper-slide-index="' + r + '"]:not(.swiper-slide-duplicate)').eq(0).index(), settimeout(function() { y.slideto(o) }, 0)) : y.slideto(o) : o > y.slides.length - y.params.slidesperview ? (y.fixloop(), o = y.wrapper.children("." + y.params.slideclass + '[data-swiper-slide-index="' + r + '"]:not(.swiper-slide-duplicate)').eq(0).index(), settimeout(function() { y.slideto(o) }, 0)) : y.slideto(o) } else y.slideto(o) } }; var x, c, s, z, m, p, k, i, e, d, b = "input, select, textarea, button", l = date.now(), h = []; y.animating = !1, y.touches = { startx: 0, starty: 0, currentx: 0, currenty: 0, diff: 0 }; var a, g; if (y.ontouchstart = function(e) { if (e.originalevent && (e = e.originalevent), a = "touchstart" === e.type, a || !("which" in e) || 3 !== e.which) { if (y.params.noswiping && n(e, "." + y.params.noswipingclass)) return void(y.allowclick = !0); if (!y.params.swipehandler || n(e, y.params.swipehandler)) { var t = y.touches.currentx = "touchstart" === e.type ? e.targettouches[0].pagex : e.pagex, i = y.touches.currenty = "touchstart" === e.type ? e.targettouches[0].pagey : e.pagey; if (!(y.device.ios && y.params.iosedgeswipedetection && t <= y.params.iosedgeswipethreshold)) { if (x = !0, c = !1, s = !0, m = void 0, g = void 0, y.touches.startx = t, y.touches.starty = i, z = date.now(), y.allowclick = !0, y.updatecontainersize(), y.swipedirection = void 0, y.params.threshold > 0 && (i = !1), "touchstart" !== e.type) { var s = !0; a(e.target).is(b) && (s = !1), document.activeelement && a(document.activeelement).is(b) && document.activeelement.blur(), s && e.preventdefault() } y.emit("ontouchstart", y, e) } } } }, y.ontouchmove = function(e) { if (e.originalevent && (e = e.originalevent), !a || "mousemove" !== e.type) { if (e.preventedbynestedswiper) return y.touches.startx = "touchmove" === e.type ? e.targettouches[0].pagex : e.pagex, void(y.touches.starty = "touchmove" === e.type ? e.targettouches[0].pagey : e.pagey); if (y.params.onlyexternal) return y.allowclick = !1, void(x && (y.touches.startx = y.touches.currentx = "touchmove" === e.type ? e.targettouches[0].pagex : e.pagex, y.touches.starty = y.touches.currenty = "touchmove" === e.type ? e.targettouches[0].pagey : e.pagey, z = date.now())); if (a && document.activeelement && e.target === document.activeelement && a(e.target).is(b)) return c = !0, void(y.allowclick = !1); if (s && y.emit("ontouchmove", y, e), !(e.targettouches && e.targettouches.length > 1)) { if (y.touches.currentx = "touchmove" === e.type ? e.targettouches[0].pagex : e.pagex, y.touches.currenty = "touchmove" === e.type ? e.targettouches[0].pagey : e.pagey, "undefined" == typeof m) { var t = 180 * math.atan2(math.abs(y.touches.currenty - y.touches.starty), math.abs(y.touches.currentx - y.touches.startx)) / math.pi; m = y.ishorizontal() ? t > y.params.touchangle : 90 - t > y.params.touchangle } if (m && y.emit("ontouchmoveopposite", y, e), "undefined" == typeof g && y.browser.ietouch && (y.touches.currentx !== y.touches.startx || y.touches.currenty !== y.touches.starty) && (g = !0), x) { if (m) return void(x = !1); if (g || !y.browser.ietouch) { y.allowclick = !1, y.emit("onslidermove", y, e), e.preventdefault(), y.params.touchmovestoppropagation && !y.params.nested && e.stoppropagation(), c || (i.loop && y.fixloop(), k = y.getwrappertranslate(), y.setwrappertransition(0), y.animating && y.wrapper.trigger("webkittransitionend transitionend otransitionend mstransitionend mstransitionend"), y.params.autoplay && y.autoplaying && (y.params.autoplaydisableoninteraction ? y.stopautoplay() : y.pauseautoplay()), d = !1, y.params.grabcursor && (y.container[0].style.cursor = "move", y.container[0].style.cursor = "-webkit-grabbing", y.container[0].style.cursor = "-moz-grabbin", y.container[0].style.cursor = "grabbing")), c = !0; var s = y.touches.diff = y.ishorizontal() ? y.touches.currentx - y.touches.startx : y.touches.currenty - y.touches.starty; s *= y.params.touchratio, y.rtl && (s = -s), y.swipedirection = s > 0 ? "prev" : "next", p = s + k; var r = !0; if (s > 0 && p > y.mintranslate() ? (r = !1, y.params.resistance && (p = y.mintranslate() - 1 + math.pow(-y.mintranslate() + k + s, y.params.resistanceratio))) : 0 > s && p < y.maxtranslate() && (r = !1, y.params.resistance && (p = y.maxtranslate() + 1 - math.pow(y.maxtranslate() - k - s, y.params.resistanceratio))), r && (e.preventedbynestedswiper = !0), !y.params.allowswipetonext && "next" === y.swipedirection && k > p && (p = k), !y.params.allowswipetoprev && "prev" === y.swipedirection && p > k && (p = k), y.params.followfinger) { if (y.params.threshold > 0) { if (!(math.abs(s) > y.params.threshold || i)) return void(p = k); if (!i) return i = !0, y.touches.startx = y.touches.currentx, y.touches.starty = y.touches.currenty, p = k, void(y.touches.diff = y.ishorizontal() ? y.touches.currentx - y.touches.startx : y.touches.currenty - y.touches.starty) }(y.params.freemode || y.params.watchslidesprogress) && y.updateactiveindex(), y.params.freemode && (0 === h.length && h.push({ position: y.touches[y.ishorizontal() ? "startx" : "starty"], time: z }), h.push({ position: y.touches[y.ishorizontal() ? "currentx" : "currenty"], time: (new window.date).gettime() })), y.updateprogress(p), y.setwrappertranslate(p) } } } } } }, y.ontouchend = function(e) { if (e.originalevent && (e = e.originalevent), s && y.emit("ontouchend", y, e), s = !1, x) { y.params.grabcursor && c && x && (y.container[0].style.cursor = "move", y.container[0].style.cursor = "-webkit-grab", y.container[0].style.cursor = "-moz-grab", y.container[0].style.cursor = "grab"); var t = date.now(), i = t - z; if (y.allowclick && (y.updateclickedslide(e), y.emit("ontap", y, e), 300 > i && t - l > 300 && (e && cleartimeout(e), e = settimeout(function() { y && (y.params.paginationhide && y.paginationcontainer.length > 0 && !a(e.target).hasclass(y.params.bulletclass) && y.paginationcontainer.toggleclass(y.params.paginationhiddenclass), y.emit("onclick", y, e)) }, 300)), 300 > i && 300 > t - l && (e && cleartimeout(e), y.emit("ondoubletap", y, e))), l = date.now(), settimeout(function() { y && (y.allowclick = !0) }, 0), !x || !c || !y.swipedirection || 0 === y.touches.diff || p === k) return void(x = c = !1); x = c = !1; var s; if (s = y.params.followfinger ? y.rtl ? y.translate : -y.translate : -p, y.params.freemode) { if (s < -y.mintranslate()) return void y.slideto(y.activeindex); if (s > -y.maxtranslate()) return void(y.slides.length < y.snapgrid.length ? y.slideto(y.snapgrid.length - 1) : y.slideto(y.slides.length - 1)); if (y.params.freemodemomentum) { if (h.length > 1) { var r = h.pop(), n = h.pop(), o = r.position - n.position, l = r.time - n.time; y.velocity = o / l, y.velocity = y.velocity / 2, math.abs(y.velocity) < y.params.freemodeminimumvelocity && (y.velocity = 0), (l > 150 || (new window.date).gettime() - r.time > 300) && (y.velocity = 0) } else y.velocity = 0; h.length = 0; var d = 1e3 * y.params.freemodemomentumratio, p = y.velocity * d, c = y.translate + p; y.rtl && (c = -c); var u, m = !1, h = 20 * math.abs(y.velocity) * y.params.freemodemomentumbounceratio; if (c < y.maxtranslate()) y.params.freemodemomentumbounce ? (c + y.maxtranslate() < -h && (c = y.maxtranslate() - h), u = y.maxtranslate(), m = !0, d = !0) : c = y.maxtranslate(); else if (c > y.mintranslate()) y.params.freemodemomentumbounce ? (c - y.mintranslate() > h && (c = y.mintranslate() + h), u = y.mintranslate(), m = !0, d = !0) : c = y.mintranslate(); else if (y.params.freemodesticky) { var f, g = 0; for (g = 0; g < y.snapgrid.length; g += 1) if (y.snapgrid[g] > -c) { f = g; break } c = math.abs(y.snapgrid[f] - c) < math.abs(y.snapgrid[f - 1] - c) || "next" === y.swipedirection ? y.snapgrid[f] : y.snapgrid[f - 1], y.rtl || (c = -c) } if (0 !== y.velocity) d = y.rtl ? math.abs((-c - y.translate) / y.velocity) : math.abs((c - y.translate) / y.velocity); else if (y.params.freemodesticky) return void y.slidereset(); y.params.freemodemomentumbounce && m ? (y.updateprogress(u), y.setwrappertransition(d), y.setwrappertranslate(c), y.ontransitionstart(), y.animating = !0, y.wrapper.transitionend(function() { y && d && (y.emit("onmomentumbounce", y), y.setwrappertransition(y.params.speed), y.setwrappertranslate(u), y.wrapper.transitionend(function() { y && y.ontransitionend() })) })) : y.velocity ? (y.updateprogress(c), y.setwrappertransition(d), y.setwrappertranslate(c), y.ontransitionstart(), y.animating || (y.animating = !0, y.wrapper.transitionend(function() { y && y.ontransitionend() }))) : y.updateprogress(c), y.updateactiveindex() } return void((!y.params.freemodemomentum || i >= y.params.longswipesms) && (y.updateprogress(), y.updateactiveindex())) } var v, w = 0, t = y.slidessizesgrid[0]; for (v = 0; v < y.slidesgrid.length; v += y.params.slidespergroup)"undefined" != typeof y.slidesgrid[v + y.params.slidespergroup] ? s >= y.slidesgrid[v] && s < y.slidesgrid[v + y.params.slidespergroup] && (w = v, t = y.slidesgrid[v + y.params.slidespergroup] - y.slidesgrid[v]) : s >= y.slidesgrid[v] && (w = v, t = y.slidesgrid[y.slidesgrid.length - 1] - y.slidesgrid[y.slidesgrid.length - 2]); var b = (s - y.slidesgrid[w]) / t; if (i > y.params.longswipesms) { if (!y.params.longswipes) return void y.slideto(y.activeindex); "next" === y.swipedirection && (b >= y.params.longswipesratio ? y.slideto(w + y.params.slidespergroup) : y.slideto(w)), "prev" === y.swipedirection && (b > 1 - y.params.longswipesratio ? y.slideto(w + y.params.slidespergroup) : y.slideto(w)) } else { if (!y.params.shortswipes) return void y.slideto(y.activeindex); "next" === y.swipedirection && y.slideto(w + y.params.slidespergroup), "prev" === y.swipedirection && y.slideto(w) } } }, y._slideto = function(e, a) { return y.slideto(e, a, !0, !0) }, y.slideto = function(e, a, t, i) { "undefined" == typeof t && (t = !0), "undefined" == typeof e && (e = 0), 0 > e && (e = 0), y.snapindex = math.floor(e / y.params.slidespergroup), y.snapindex >= y.snapgrid.length && (y.snapindex = y.snapgrid.length - 1); var s = -y.snapgrid[y.snapindex]; y.params.autoplay && y.autoplaying && (i || !y.params.autoplaydisableoninteraction ? y.pauseautoplay(a) : y.stopautoplay()), y.updateprogress(s); for (var r = 0; r < y.slidesgrid.length; r++) - math.floor(100 * s) >= math.floor(100 * y.slidesgrid[r]) && (e = r); return !(!y.params.allowswipetonext && s < y.translate && s < y.mintranslate()) && (!(!y.params.allowswipetoprev && s > y.translate && s > y.maxtranslate() && (y.activeindex || 0) !== e) && ("undefined" == typeof a && (a = y.params.speed), y.previousindex = y.activeindex || 0, y.activeindex = e, y.rtl && -s === y.translate || !y.rtl && s === y.translate ? (y.params.autoheight && y.updateautoheight(), y.updateclasses(), "slide" !== y.params.effect && y.setwrappertranslate(s), !1) : (y.updateclasses(), y.ontransitionstart(t), 0 === a ? (y.setwrappertranslate(s), y.setwrappertransition(0), y.ontransitionend(t)) : (y.setwrappertranslate(s), y.setwrappertransition(a), y.animating || (y.animating = !0, y.wrapper.transitionend(function() { y && y.ontransitionend(t) }))), !0))) }, y.ontransitionstart = function(e) { "undefined" == typeof e && (e = !0), y.params.autoheight && y.updateautoheight(), y.lazy && y.lazy.ontransitionstart(), e && (y.emit("ontransitionstart", y), y.activeindex !== y.previousindex && (y.emit("onslidechangestart", y), y.activeindex > y.previousindex ? y.emit("onslidenextstart", y) : y.emit("onslideprevstart", y))) }, y.ontransitionend = function(e) { y.animating = !1, y.setwrappertransition(0), "undefined" == typeof e && (e = !0), y.lazy && y.lazy.ontransitionend(), e && (y.emit("ontransitionend", y), y.activeindex !== y.previousindex && (y.emit("onslidechangeend", y), y.activeindex > y.previousindex ? y.emit("onslidenextend", y) : y.emit("onslideprevend", y))), y.params.hashnav && y.hashnav && y.hashnav.sethash() }, y.slidenext = function(e, a, t) { return y.params.loop ? !y.animating && (y.fixloop(), y.container[0].clientleft, y.slideto(y.activeindex + y.params.slidespergroup, a, e, t)) : y.slideto(y.activeindex + y.params.slidespergroup, a, e, t) }, y._slidenext = function(e) { return y.slidenext(!0, e, !0) }, y.slideprev = function(e, a, t) { return y.params.loop ? !y.animating && (y.fixloop(), y.container[0].clientleft, y.slideto(y.activeindex - 1, a, e, t)) : y.slideto(y.activeindex - 1, a, e, t) }, y._slideprev = function(e) { return y.slideprev(!0, e, !0) }, y.slidereset = function(e, a, t) { return y.slideto(y.activeindex, a, e) }, y.setwrappertransition = function(e, a) { y.wrapper.transition(e), "slide" !== y.params.effect && y.effects[y.params.effect] && y.effects[y.params.effect].settransition(e), y.params.parallax && y.parallax && y.parallax.settransition(e), y.params.scrollbar && y.scrollbar && y.scrollbar.settransition(e), y.params.control && y.controller && y.controller.settransition(e, a), y.emit("onsettransition", y, e) }, y.setwrappertranslate = function(e, a, t) { var i = 0, r = 0, n = 0; y.ishorizontal() ? i = y.rtl ? -e : e : r = e, y.params.roundlengths && (i = s(i), r = s(r)), y.params.virtualtranslate || (y.support.transforms3d ? y.wrapper.transform("translate3d(" + i + "px, " + r + "px, " + n + "px)") : y.wrapper.transform("translate(" + i + "px, " + r + "px)")), y.translate = y.ishorizontal() ? i : r; var o, l = y.maxtranslate() - y.mintranslate(); o = 0 === l ? 0 : (e - y.mintranslate()) / l, o !== y.progress && y.updateprogress(e), a && y.updateactiveindex(), "slide" !== y.params.effect && y.effects[y.params.effect] && y.effects[y.params.effect].settranslate(y.translate), y.params.parallax && y.parallax && y.parallax.settranslate(y.translate), y.params.scrollbar && y.scrollbar && y.scrollbar.settranslate(y.translate), y.params.control && y.controller && y.controller.settranslate(y.translate, t), y.emit("onsettranslate", y, y.translate) }, y.gettranslate = function(e, a) { var t, i, s, r; return "undefined" == typeof a && (a = "x"), y.params.virtualtranslate ? y.rtl ? -y.translate : y.translate : (s = window.getcomputedstyle(e, null), window.webkitcssmatrix ? (i = s.transform || s.webkittransform, i.split(",").length > 6 && (i = i.split(", ").map(function(e) { return e.replace(",", ".") }).join(", ")), r = new window.webkitcssmatrix("none" === i ? "" : i)) : (r = s.moztransform || s.otransform || s.mstransform || s.mstransform || s.transform || s.getpropertyvalue("transform").replace("translate(", "matrix(1, 0, 0, 1,"), t = r.tostring().split(",")), "x" === a && (i = window.webkitcssmatrix ? r.m41 : 16 === t.length ? parsefloat(t[12]) : parsefloat(t[4])), "y" === a && (i = window.webkitcssmatrix ? r.m42 : 16 === t.length ? parsefloat(t[13]) : parsefloat(t[5])), y.rtl && i && (i = -i), i || 0) }, y.getwrappertranslate = function(e) { return "undefined" == typeof e && (e = y.ishorizontal() ? "x" : "y"), y.gettranslate(y.wrapper[0], e) }, y.observers = [], y.initobservers = function() { if (y.params.observeparents) for (var e = y.container.parents(), a = 0; a < e.length; a++) o(e[a]); o(y.container[0], { childlist: !1 }), o(y.wrapper[0], { attributes: !1 }) }, y.disconnectobservers = function() { for (var e = 0; e < y.observers.length; e++) y.observers[e].disconnect(); y.observers = [] }, y.createloop = function() { y.wrapper.children("." + y.params.slideclass + "." + y.params.slideduplicateclass).remove(); var e = y.wrapper.children("." + y.params.slideclass); "auto" !== y.params.slidesperview || y.params.loopedslides || (y.params.loopedslides = e.length), y.loopedslides = parseint(y.params.loopedslides || y.params.slidesperview, 10), y.loopedslides = y.loopedslides + y.params.loopadditionalslides, y.loopedslides > e.length && (y.loopedslides = e.length); var t, i = [], s = []; for (e.each(function(t, r) { var n = a(this); t < y.loopedslides && s.push(r), t < e.length && t >= e.length - y.loopedslides && i.push(r), n.attr("data-swiper-slide-index", t) }), t = 0; t < s.length; t++) y.wrapper.append(a(s[t].clonenode(!0)).addclass(y.params.slideduplicateclass)); for (t = i.length - 1; t >= 0; t--) y.wrapper.prepend(a(i[t].clonenode(!0)).addclass(y.params.slideduplicateclass)) }, y.destroyloop = function() { y.wrapper.children("." + y.params.slideclass + "." + y.params.slideduplicateclass).remove(), y.slides.removeattr("data-swiper-slide-index") }, y.reloop = function(e) { var a = y.activeindex - y.loopedslides; y.destroyloop(), y.createloop(), y.updateslidessize(), e && y.slideto(a + y.loopedslides, 0, !1) }, y.fixloop = function() { var e; y.activeindex < y.loopedslides ? (e = y.slides.length - 3 * y.loopedslides + y.activeindex, e += y.loopedslides, y.slideto(e, 0, !1, !0)) : ("auto" === y.params.slidesperview && y.activeindex >= 2 * y.loopedslides || y.activeindex > y.slides.length - 2 * y.params.slidesperview) && (e = -y.slides.length + y.activeindex + y.loopedslides, e += y.loopedslides, y.slideto(e, 0, !1, !0)) }, y.appendslide = function(e) { if (y.params.loop && y.destroyloop(), "object" == typeof e && e.length) for (var a = 0; a < e.length; a++) e[a] && y.wrapper.append(e[a]); else y.wrapper.append(e); y.params.loop && y.createloop(), y.params.observer && y.support.observer || y.update(!0) }, y.prependslide = function(e) { y.params.loop && y.destroyloop(); var a = y.activeindex + 1; if ("object" == typeof e && e.length) { for (var t = 0; t < e.length; t++) e[t] && y.wrapper.prepend(e[t]); a = y.activeindex + e.length } else y.wrapper.prepend(e); y.params.loop && y.createloop(), y.params.observer && y.support.observer || y.update(!0), y.slideto(a, 0, !1) }, y.removeslide = function(e) { y.params.loop && (y.destroyloop(), y.slides = y.wrapper.children("." + y.params.slideclass)); var a, t = y.activeindex; if ("object" == typeof e && e.length) { for (var i = 0; i < e.length; i++) a = e[i], y.slides[a] && y.slides.eq(a).remove(), t > a && t--; t = math.max(t, 0) } else a = e, y.slides[a] && y.slides.eq(a).remove(), t > a && t--, t = math.max(t, 0); y.params.loop && y.createloop(), y.params.observer && y.support.observer || y.update(!0), y.params.loop ? y.slideto(t + y.loopedslides, 0, !1) : y.slideto(t, 0, !1) }, y.removeallslides = function() { for (var e = [], a = 0; a < y.slides.length; a++) e.push(a); y.removeslide(e) }, y.effects = { fade: { settranslate: function() { for (var e = 0; e < y.slides.length; e++) { var a = y.slides.eq(e), t = a[0].swiperslideoffset, i = -t; y.params.virtualtranslate || (i -= y.translate); var s = 0; y.ishorizontal() || (s = i, i = 0); var r = y.params.fade.crossfade ? math.max(1 - math.abs(a[0].progress), 0) : 1 + math.min(math.max(a[0].progress, -1), 0); a.css({ opacity: r }).transform("translate3d(" + i + "px, " + s + "px, 0px)") } }, settransition: function(e) { if (y.slides.transition(e), y.params.virtualtranslate && 0 !== e) { var a = !1; y.slides.transitionend(function() { if (!a && y) { a = !0, y.animating = !1; for (var e = ["webkittransitionend", "transitionend", "otransitionend", "mstransitionend", "mstransitionend"], t = 0; t < e.length; t++) y.wrapper.trigger(e[t]) } }) } } }, flip: { settranslate: function() { for (var e = 0; e < y.slides.length; e++) { var t = y.slides.eq(e), i = t[0].progress; y.params.flip.limitrotation && (i = math.max(math.min(t[0].progress, 1), -1)); var s = t[0].swiperslideoffset, r = -180 * i, n = r, o = 0, l = -s, d = 0; if (y.ishorizontal() ? y.rtl && (n = -n) : (d = l, l = 0, o = -n, n = 0), t[0].style.zindex = -math.abs(math.round(i)) + y.slides.length, y.params.flip.slideshadows) { var p = y.ishorizontal() ? t.find(".swiper-slide-shadow-left") : t.find(".swiper-slide-shadow-top"), c = y.ishorizontal() ? t.find(".swiper-slide-shadow-right") : t.find(".swiper-slide-shadow-bottom"); 0 === p.length && (p = a('
'), t.append(p)), 0 === c.length && (c = a('
'), t.append(c)), p.length && (p[0].style.opacity = math.max(-i, 0)), c.length && (c[0].style.opacity = math.max(i, 0)) } t.transform("translate3d(" + l + "px, " + d + "px, 0px) rotatex(" + o + "deg) rotatey(" + n + "deg)") } }, settransition: function(e) { if (y.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), y.params.virtualtranslate && 0 !== e) { var t = !1; y.slides.eq(y.activeindex).transitionend(function() { if (!t && y && a(this).hasclass(y.params.slideactiveclass)) { t = !0, y.animating = !1; for (var e = ["webkittransitionend", "transitionend", "otransitionend", "mstransitionend", "mstransitionend"], i = 0; i < e.length; i++) y.wrapper.trigger(e[i]) } }) } } }, cube: { settranslate: function() { var e, t = 0; y.params.cube.shadow && (y.ishorizontal() ? (e = y.wrapper.find(".swiper-cube-shadow"), 0 === e.length && (e = a('
'), y.wrapper.append(e)), e.css({ height: y.width + "px" })) : (e = y.container.find(".swiper-cube-shadow"), 0 === e.length && (e = a('
'), y.container.append(e)))); for (var i = 0; i < y.slides.length; i++) { var s = y.slides.eq(i), r = 90 * i, n = math.floor(r / 360); y.rtl && (r = -r, n = math.floor(-r / 360)); var o = math.max(math.min(s[0].progress, 1), -1), l = 0, d = 0, p = 0; i % 4 === 0 ? (l = 4 * -n * y.size, p = 0) : (i - 1) % 4 === 0 ? (l = 0, p = 4 * -n * y.size) : (i - 2) % 4 === 0 ? (l = y.size + 4 * n * y.size, p = y.size) : (i - 3) % 4 === 0 && (l = -y.size, p = 3 * y.size + 4 * y.size * n), y.rtl && (l = -l), y.ishorizontal() || (d = l, l = 0); var c = "rotatex(" + (y.ishorizontal() ? 0 : -r) + "deg) rotatey(" + (y.ishorizontal() ? r : 0) + "deg) translate3d(" + l + "px, " + d + "px, " + p + "px)"; if (1 >= o && o > -1 && (t = 90 * i + 90 * o, y.rtl && (t = 90 * -i - 90 * o)), s.transform(c), y.params.cube.slideshadows) { var u = y.ishorizontal() ? s.find(".swiper-slide-shadow-left") : s.find(".swiper-slide-shadow-top"), m = y.ishorizontal() ? s.find(".swiper-slide-shadow-right") : s.find(".swiper-slide-shadow-bottom"); 0 === u.length && (u = a('
'), s.append(u)), 0 === m.length && (m = a('
'), s.append(m)), u.length && (u[0].style.opacity = math.max(-o, 0)), m.length && (m[0].style.opacity = math.max(o, 0)) } } if (y.wrapper.css({ "-webkit-transform-origin": "50% 50% -" + y.size / 2 + "px", "-moz-transform-origin": "50% 50% -" + y.size / 2 + "px", "-ms-transform-origin": "50% 50% -" + y.size / 2 + "px", "transform-origin": "50% 50% -" + y.size / 2 + "px" }), y.params.cube.shadow) if (y.ishorizontal()) e.transform("translate3d(0px, " + (y.width / 2 + y.params.cube.shadowoffset) + "px, " + -y.width / 2 + "px) rotatex(90deg) rotatez(0deg) scale(" + y.params.cube.shadowscale + ")"); else { var h = math.abs(t) - 90 * math.floor(math.abs(t) / 90), f = 1.5 - (math.sin(2 * h * math.pi / 360) / 2 + math.cos(2 * h * math.pi / 360) / 2), g = y.params.cube.shadowscale, v = y.params.cube.shadowscale / f, w = y.params.cube.shadowoffset; e.transform("scale3d(" + g + ", 1, " + v + ") translate3d(0px, " + (y.height / 2 + w) + "px, " + -y.height / 2 / v + "px) rotatex(-90deg)") } var t = y.issafari || y.isuiwebview ? -y.size / 2 : 0; y.wrapper.transform("translate3d(0px,0," + t + "px) rotatex(" + (y.ishorizontal() ? 0 : t) + "deg) rotatey(" + (y.ishorizontal() ? -t : 0) + "deg)") }, settransition: function(e) { y.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), y.params.cube.shadow && !y.ishorizontal() && y.container.find(".swiper-cube-shadow").transition(e) } }, coverflow: { settranslate: function() { for (var e = y.translate, t = y.ishorizontal() ? -e + y.width / 2 : -e + y.height / 2, i = y.ishorizontal() ? y.params.coverflow.rotate : -y.params.coverflow.rotate, s = y.params.coverflow.depth, r = 0, n = y.slides.length; n > r; r++) { var o = y.slides.eq(r), l = y.slidessizesgrid[r], d = o[0].swiperslideoffset, p = (t - d - l / 2) / l * y.params.coverflow.modifier, c = y.ishorizontal() ? i * p : 0, u = y.ishorizontal() ? 0 : i * p, m = -s * math.abs(p), h = y.ishorizontal() ? 0 : y.params.coverflow.stretch * p, f = y.ishorizontal() ? y.params.coverflow.stretch * p : 0; math.abs(f) < .001 && (f = 0), math.abs(h) < .001 && (h = 0), math.abs(m) < .001 && (m = 0), math.abs(c) < .001 && (c = 0), math.abs(u) < .001 && (u = 0); var g = "translate3d(" + f + "px," + h + "px," + m + "px) rotatex(" + u + "deg) rotatey(" + c + "deg)"; if (o.transform(g), o[0].style.zindex = -math.abs(math.round(p)) + 1, y.params.coverflow.slideshadows) { var v = y.ishorizontal() ? o.find(".swiper-slide-shadow-left") : o.find(".swiper-slide-shadow-top"), w = y.ishorizontal() ? o.find(".swiper-slide-shadow-right") : o.find(".swiper-slide-shadow-bottom"); 0 === v.length && (v = a('
'), o.append(v)), 0 === w.length && (w = a('
'), o.append(w)), v.length && (v[0].style.opacity = p > 0 ? p : 0), w.length && (w[0].style.opacity = -p > 0 ? -p : 0) } } if (y.browser.ie) { var t = y.wrapper[0].style; t.perspectiveorigin = t + "px 50%" } }, settransition: function(e) { y.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e) } } }, y.lazy = { initialimageloaded: !1, loadimageinslide: function(e, t) { if ("undefined" != typeof e && ("undefined" == typeof t && (t = !0), 0 !== y.slides.length)) { var i = y.slides.eq(e), s = i.find(".swiper-lazy:not(.swiper-lazy-loaded):not(.swiper-lazy-loading)"); !i.hasclass("swiper-lazy") || i.hasclass("swiper-lazy-loaded") || i.hasclass("swiper-lazy-loading") || (s = s.add(i[0])), 0 !== s.length && s.each(function() { var e = a(this); e.addclass("swiper-lazy-loading"); var s = e.attr("data-background"), r = e.attr("data-src"), n = e.attr("data-srcset"); y.loadimage(e[0], r || s, n, !1, function() { if (s ? (e.css("background-image", 'url("' + s + '")'), e.removeattr("data-background")) : (n && (e.attr("srcset", n), e.removeattr("data-srcset")), r && (e.attr("src", r), e.removeattr("data-src"))), e.addclass("swiper-lazy-loaded").removeclass("swiper-lazy-loading"), i.find(".swiper-lazy-preloader, .preloader").remove(), y.params.loop && t) { var a = i.attr("data-swiper-slide-index"); if (i.hasclass(y.params.slideduplicateclass)) { var o = y.wrapper.children('[data-swiper-slide-index="' + a + '"]:not(.' + y.params.slideduplicateclass + ")"); y.lazy.loadimageinslide(o.index(), !1) } else { var l = y.wrapper.children("." + y.params.slideduplicateclass + '[data-swiper-slide-index="' + a + '"]'); y.lazy.loadimageinslide(l.index(), !1) } } y.emit("onlazyimageready", y, i[0], e[0]) }), y.emit("onlazyimageload", y, i[0], e[0]) }) } }, load: function() { var e; if (y.params.watchslidesvisibility) y.wrapper.children("." + y.params.slidevisibleclass).each(function() { y.lazy.loadimageinslide(a(this).index()) }); else if (y.params.slidesperview > 1) for (e = y.activeindex; e < y.activeindex + y.params.slidesperview; e++) y.slides[e] && y.lazy.loadimageinslide(e); else y.lazy.loadimageinslide(y.activeindex); if (y.params.lazyloadinginprevnext) if (y.params.slidesperview > 1 || y.params.lazyloadinginprevnextamount && y.params.lazyloadinginprevnextamount > 1) { var t = y.params.lazyloadinginprevnextamount, i = y.params.slidesperview, s = math.min(y.activeindex + i + math.max(t, i), y.slides.length), r = math.max(y.activeindex - math.max(i, t), 0); for (e = y.activeindex + y.params.slidesperview; s > e; e++) y.slides[e] && y.lazy.loadimageinslide(e); for (e = r; e < y.activeindex; e++) y.slides[e] && y.lazy.loadimageinslide(e) } else { var n = y.wrapper.children("." + y.params.slidenextclass); n.length > 0 && y.lazy.loadimageinslide(n.index()); var o = y.wrapper.children("." + y.params.slideprevclass); o.length > 0 && y.lazy.loadimageinslide(o.index()) } }, ontransitionstart: function() { y.params.lazyloading && (y.params.lazyloadingontransitionstart || !y.params.lazyloadingontransitionstart && !y.lazy.initialimageloaded) && y.lazy.load() }, ontransitionend: function() { y.params.lazyloading && !y.params.lazyloadingontransitionstart && y.lazy.load() } }, y.scrollbar = { istouched: !1, setdragposition: function(e) { var a = y.scrollbar, t = y.ishorizontal() ? "touchstart" === e.type || "touchmove" === e.type ? e.targettouches[0].pagex : e.pagex || e.clientx : "touchstart" === e.type || "touchmove" === e.type ? e.targettouches[0].pagey : e.pagey || e.clienty, i = t - a.track.offset()[y.ishorizontal() ? "left" : "top"] - a.dragsize / 2, s = -y.mintranslate() * a.movedivider, r = -y.maxtranslate() * a.movedivider; s > i ? i = s : i > r && (i = r), i = -i / a.movedivider, y.updateprogress(i), y.setwrappertranslate(i, !0) }, dragstart: function(e) { var a = y.scrollbar; a.istouched = !0, e.preventdefault(), e.stoppropagation(), a.setdragposition(e), cleartimeout(a.dragtimeout), a.track.transition(0), y.params.scrollbarhide && a.track.css("opacity", 1), y.wrapper.transition(100), a.drag.transition(100), y.emit("onscrollbardragstart", y) }, dragmove: function(e) { var a = y.scrollbar; a.istouched && (e.preventdefault ? e.preventdefault() : e.returnvalue = !1, a.setdragposition(e), y.wrapper.transition(0), a.track.transition(0), a.drag.transition(0), y.emit("onscrollbardragmove", y)) }, dragend: function(e) { var a = y.scrollbar; a.istouched && (a.istouched = !1, y.params.scrollbarhide && (cleartimeout(a.dragtimeout), a.dragtimeout = settimeout(function() { a.track.css("opacity", 0), a.track.transition(400) }, 1e3)), y.emit("onscrollbardragend", y), y.params.scrollbarsnaponrelease && y.slidereset()) }, enabledraggable: function() { var e = y.scrollbar, t = y.support.touch ? e.track : document; a(e.track).on(y.touchevents.start, e.dragstart), a(t).on(y.touchevents.move, e.dragmove), a(t).on(y.touchevents.end, e.dragend) }, disabledraggable: function() { var e = y.scrollbar, t = y.support.touch ? e.track : document; a(e.track).off(y.touchevents.start, e.dragstart), a(t).off(y.touchevents.move, e.dragmove), a(t).off(y.touchevents.end, e.dragend) }, set: function() { if (y.params.scrollbar) { var e = y.scrollbar; e.track = a(y.params.scrollbar), y.params.uniquenavelements && "string" == typeof y.params.scrollbar && e.track.length > 1 && 1 === y.container.find(y.params.scrollbar).length && (e.track = y.container.find(y.params.scrollbar)), e.drag = e.track.find(".swiper-scrollbar-drag"), 0 === e.drag.length && (e.drag = a('
'), e.track.append(e.drag)), e.drag[0].style.width = "", e.drag[0].style.height = "", e.tracksize = y.ishorizontal() ? e.track[0].offsetwidth : e.track[0].offsetheight, e.divider = y.size / y.virtualsize, e.movedivider = e.divider * (e.tracksize / y.size), e.dragsize = e.tracksize * e.divider, y.ishorizontal() ? e.drag[0].style.width = e.dragsize + "px" : e.drag[0].style.height = e.dragsize + "px", e.divider >= 1 ? e.track[0].style.display = "none" : e.track[0].style.display = "", y.params.scrollbarhide && (e.track[0].style.opacity = 0) } }, settranslate: function() { if (y.params.scrollbar) { var e, a = y.scrollbar, t = (y.translate || 0, a.dragsize); e = (a.tracksize - a.dragsize) * y.progress, y.rtl && y.ishorizontal() ? (e = -e, e > 0 ? (t = a.dragsize - e, e = 0) : -e + a.dragsize > a.tracksize && (t = a.tracksize + e)) : 0 > e ? (t = a.dragsize + e, e = 0) : e + a.dragsize > a.tracksize && (t = a.tracksize - e), y.ishorizontal() ? (y.support.transforms3d ? a.drag.transform("translate3d(" + e + "px, 0, 0)") : a.drag.transform("translatex(" + e + "px)"), a.drag[0].style.width = t + "px") : (y.support.transforms3d ? a.drag.transform("translate3d(0px, " + e + "px, 0)") : a.drag.transform("translatey(" + e + "px)"), a.drag[0].style.height = t + "px"), y.params.scrollbarhide && (cleartimeout(a.timeout), a.track[0].style.opacity = 1, a.timeout = settimeout(function() { a.track[0].style.opacity = 0, a.track.transition(400) }, 1e3)) } }, settransition: function(e) { y.params.scrollbar && y.scrollbar.drag.transition(e) } }, y.controller = { linearspline: function(e, a) { this.x = e, this.y = a, this.lastindex = e.length - 1; var t, i; this.x.length, this.interpolate = function(e) { return e ? (i = s(this.x, e), t = i - 1, (e - this.x[t]) * (this.y[i] - this.y[t]) / (this.x[i] - this.x[t]) + this.y[t]) : 0 }; var s = function() { var e, a, t; return function(i, s) { for (a = -1, e = i.length; e - a > 1;) i[t = e + a >> 1] <= s ? a = t : e = t; return e } }() }, getinterpolatefunction: function(e) { y.controller.spline || (y.controller.spline = y.params.loop ? new y.controller.linearspline(y.slidesgrid, e.slidesgrid) : new y.controller.linearspline(y.snapgrid, e.snapgrid)) }, settranslate: function(e, a) { function i(a) { e = a.rtl && "horizontal" === a.params.direction ? -y.translate : y.translate, "slide" === y.params.controlby && (y.controller.getinterpolatefunction(a), r = -y.controller.spline.interpolate(-e)), r && "container" !== y.params.controlby || (s = (a.maxtranslate() - a.mintranslate()) / (y.maxtranslate() - y.mintranslate()), r = (e - y.mintranslate()) * s + a.mintranslate()), y.params.controlinverse && (r = a.maxtranslate() - r), a.updateprogress(r), a.setwrappertranslate(r, !1, y), a.updateactiveindex() } var s, r, n = y.params.control; if (y.isarray(n)) for (var o = 0; o < n.length; o++) n[o] !== a && n[o] instanceof t && i(n[o]); else n instanceof t && a !== n && i(n) }, settransition: function(e, a) { function i(a) { a.setwrappertransition(e, y), 0 !== e && (a.ontransitionstart(), a.wrapper.transitionend(function() { r && (a.params.loop && "slide" === y.params.controlby && a.fixloop(), a.ontransitionend()) })) } var s, r = y.params.control; if (y.isarray(r)) for (s = 0; s < r.length; s++) r[s] !== a && r[s] instanceof t && i(r[s]); else r instanceof t && a !== r && i(r) } }, y.hashnav = { init: function() { if (y.params.hashnav) { y.hashnav.initialized = !0; var e = document.location.hash.replace("#", ""); if (e) for (var a = 0, t = 0, i = y.slides.length; i > t; t++) { var s = y.slides.eq(t), r = s.attr("data-hash"); if (r === e && !s.hasclass(y.params.slideduplicateclass)) { var n = s.index(); y.slideto(n, a, y.params.runcallbacksoninit, !0) } } } }, sethash: function() { y.hashnav.initialized && y.params.hashnav && (document.location.hash = y.slides.eq(y.activeindex).attr("data-hash") || "") } }, y.disablekeyboardcontrol = function() { y.params.keyboardcontrol = !1, a(document).off("keydown", l) }, y.enablekeyboardcontrol = function() { y.params.keyboardcontrol = !0, a(document).on("keydown", l) }, y.mousewheel = { event: !1, lastscrolltime: (new window.date).gettime() }, y.params.mousewheelcontrol) { try { new window.wheelevent("wheel"), y.mousewheel.event = "wheel" } catch (o) { (window.wheelevent || y.container[0] && "wheel" in y.container[0]) && (y.mousewheel.event = "wheel") }!y.mousewheel.event && window.wheelevent, y.mousewheel.event || void 0 === document.onmousewheel || (y.mousewheel.event = "mousewheel"), y.mousewheel.event || (y.mousewheel.event = "dommousescroll") } y.disablemousewheelcontrol = function() { return !!y.mousewheel.event && (y.container.off(y.mousewheel.event, d), !0) }, y.enablemousewheelcontrol = function() { return !!y.mousewheel.event && (y.container.on(y.mousewheel.event, d), !0) }, y.parallax = { settranslate: function() { y.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() { p(this, y.progress) }), y.slides.each(function() { var e = a(this); e.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() { var a = math.min(math.max(e[0].progress, -1), 1); p(this, a) }) }) }, settransition: function(e) { "undefined" == typeof e && (e = y.params.speed), y.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() { var t = a(this), i = parseint(t.attr("data-swiper-parallax-duration"), 10) || e; 0 === e && (i = 0), t.transition(i) }) } }, y._plugins = []; for (var n in y.plugins) { var $ = y.plugins[n](y, y.params[n]); $ && y._plugins.push($) } return y.callplugins = function(e) { for (var a = 0; a < y._plugins.length; a++) e in y._plugins[a] && y._plugins[a][e](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]) }, y.emittereventlisteners = {}, y.emit = function(e) { y.params[e] && y.params[e](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); var a; if (y.emittereventlisteners[e]) for (a = 0; a < y.emittereventlisteners[e].length; a++) y.emittereventlisteners[e][a](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); y.callplugins && y.callplugins(e, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]) }, y.on = function(e, a) { return e = c(e), y.emittereventlisteners[e] || (y.emittereventlisteners[e] = []), y.emittereventlisteners[e].push(a), y }, y.off = function(e, a) { var t; if (e = c(e), "undefined" == typeof a) return y.emittereventlisteners[e] = [], y; if (y.emittereventlisteners[e] && 0 !== y.emittereventlisteners[e].length) { for (t = 0; t < y.emittereventlisteners[e].length; t++) y.emittereventlisteners[e][t] === a && y.emittereventlisteners[e].splice(t, 1); return y } }, y.once = function(e, a) { e = c(e); var t = function() { a(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]), y.off(e, t) }; return y.on(e, t), y }, y.a11y = { makefocusable: function(e) { return e.attr("tabindex", "0"), e }, addrole: function(e, a) { return e.attr("role", a), e }, addlabel: function(e, a) { return e.attr("aria-label", a), e }, disable: function(e) { return e.attr("aria-disabled", !0), e }, enable: function(e) { return e.attr("aria-disabled", !1), e }, onenterkey: function(e) { 13 === e.keycode && (a(e.target).is(y.params.nextbutton) ? (y.onclicknext(e), y.isend ? y.a11y.notify(y.params.lastslidemessage) : y.a11y.notify(y.params.nextslidemessage)) : a(e.target).is(y.params.prevbutton) && (y.onclickprev(e), y.isbeginning ? y.a11y.notify(y.params.firstslidemessage) : y.a11y.notify(y.params.prevslidemessage)), a(e.target).is("." + y.params.bulletclass) && a(e.target)[0].click()) }, liveregion: a(''), notify: function(e) { var a = y.a11y.liveregion; 0 !== a.length && (a.html(""), a.html(e)) }, init: function() { y.params.nextbutton && y.nextbutton && y.nextbutton.length > 0 && (y.a11y.makefocusable(y.nextbutton), y.a11y.addrole(y.nextbutton, "button"), y.a11y.addlabel(y.nextbutton, y.params.nextslidemessage)), y.params.prevbutton && y.prevbutton && y.prevbutton.length > 0 && (y.a11y.makefocusable(y.prevbutton), y.a11y.addrole(y.prevbutton, "button"), y.a11y.addlabel(y.prevbutton, y.params.prevslidemessage)), a(y.container).append(y.a11y.liveregion) }, initpagination: function() { y.params.pagination && y.params.paginationclickable && y.bullets && y.bullets.length && y.bullets.each(function() { var e = a(this); y.a11y.makefocusable(e), y.a11y.addrole(e, "button"), y.a11y.addlabel(e, y.params.paginationbulletmessage.replace(/{{index}}/, e.index() + 1)) }) }, destroy: function() { y.a11y.liveregion && y.a11y.liveregion.length > 0 && y.a11y.liveregion.remove() } }, y.init = function() { y.params.loop && y.createloop(), y.updatecontainersize(), y.updateslidessize(), y.updatepagination(), y.params.scrollbar && y.scrollbar && (y.scrollbar.set(), y.params.scrollbardraggable && y.scrollbar.enabledraggable()), "slide" !== y.params.effect && y.effects[y.params.effect] && (y.params.loop || y.updateprogress(), y.effects[y.params.effect].settranslate()), y.params.loop ? y.slideto(y.params.initialslide + y.loopedslides, 0, y.params.runcallbacksoninit) : (y.slideto(y.params.initialslide, 0, y.params.runcallbacksoninit), 0 === y.params.initialslide && (y.parallax && y.params.parallax && y.parallax.settranslate(), y.lazy && y.params.lazyloading && (y.lazy.load(), y.lazy.initialimageloaded = !0))), y.attachevents(), y.params.observer && y.support.observer && y.initobservers(), y.params.preloadimages && !y.params.lazyloading && y.preloadimages(), y.params.autoplay && y.startautoplay(), y.params.keyboardcontrol && y.enablekeyboardcontrol && y.enablekeyboardcontrol(), y.params.mousewheelcontrol && y.enablemousewheelcontrol && y.enablemousewheelcontrol(), y.params.hashnav && y.hashnav && y.hashnav.init(), y.params.a11y && y.a11y && y.a11y.init(), y.emit("oninit", y) }, y.cleanupstyles = function() { y.container.removeclass(y.classnames.join(" ")).removeattr("style"), y.wrapper.removeattr("style"), y.slides && y.slides.length && y.slides.removeclass([y.params.slidevisibleclass, y.params.slideactiveclass, y.params.slidenextclass, y.params.slideprevclass].join(" ")).removeattr("style").removeattr("data-swiper-column").removeattr("data-swiper-row"), y.paginationcontainer && y.paginationcontainer.length && y.paginationcontainer.removeclass(y.params.paginationhiddenclass), y.bullets && y.bullets.length && y.bullets.removeclass(y.params.bulletactiveclass), y.params.prevbutton && a(y.params.prevbutton).removeclass(y.params.buttondisabledclass), y.params.nextbutton && a(y.params.nextbutton).removeclass(y.params.buttondisabledclass), y.params.scrollbar && y.scrollbar && (y.scrollbar.track && y.scrollbar.track.length && y.scrollbar.track.removeattr("style"), y.scrollbar.drag && y.scrollbar.drag.length && y.scrollbar.drag.removeattr("style")) }, y.destroy = function(e, a) { y.detachevents(), y.stopautoplay(), y.params.scrollbar && y.scrollbar && y.params.scrollbardraggable && y.scrollbar.disabledraggable(), y.params.loop && y.destroyloop(), a && y.cleanupstyles(), y.disconnectobservers(), y.params.keyboardcontrol && y.disablekeyboardcontrol && y.disablekeyboardcontrol(), y.params.mousewheelcontrol && y.disablemousewheelcontrol && y.disablemousewheelcontrol(), y.params.a11y && y.a11y && y.a11y.destroy(), y.emit("ondestroy"), e !== !1 && (y = null) }, y.init(), y } }; t.prototype = { issafari: function() { var e = navigator.useragent.tolowercase(); return e.indexof("safari") >= 0 && e.indexof("chrome") < 0 && e.indexof("android") < 0 }(), isuiwebview: /(iphone|ipod|ipad).*applewebkit(?!.*safari)/i.test(navigator.useragent), isarray: function(e) { return "[object array]" === object.prototype.tostring.apply(e) }, browser: { ie: window.navigator.pointerenabled || window.navigator.mspointerenabled, ietouch: window.navigator.mspointerenabled && window.navigator.msmaxtouchpoints > 1 || window.navigator.pointerenabled && window.navigator.maxtouchpoints > 1 }, device: function() { var e = navigator.useragent, a = e.match(/(android);?[\s\/]+([\d.]+)?/), t = e.match(/(ipad).*os\s([\d_]+)/), i = e.match(/(ipod)(.*os\s([\d_]+))?/), s = !t && e.match(/(iphone\sos)\s([\d_]+)/); return { ios: t || s || i, android: a } }(), support: { touch: window.modernizr && modernizr.touch === !0 || function() { return !!("ontouchstart" in window || window.documenttouch && document instanceof documenttouch) }(), transforms3d: window.modernizr && modernizr.csstransforms3d === !0 || function() { var e = document.createelement("div").style; return "webkitperspective" in e || "mozperspective" in e || "operspective" in e || "msperspective" in e || "perspective" in e }(), flexbox: function() { for (var e = document.createelement("div").style, a = "alignitems webkitalignitems webkitboxalign msflexalign mozboxalign webkitflexdirection msflexdirection mozboxdirection mozboxorient webkitboxdirection webkitboxorient".split(" "), t = 0; t < a.length; t++) if (a[t] in e) return !0 }(), observer: function() { return "mutationobserver" in window || "webkitmutationobserver" in window }() }, plugins: {} }; for (var i = ["jquery", "zepto", "dom7"], s = 0; s < i.length; s++) window[i[s]] && e(window[i[s]]); var r; r = "undefined" == typeof dom7 ? window.dom7 || window.zepto || window.jquery : dom7, r && ("transitionend" in r.fn || (r.fn.transitionend = function(e) { function a(r) { if (r.target === this) for (e.call(this, r), t = 0; t < i.length; t++) s.off(i[t], a) } var t, i = ["webkittransitionend", "transitionend", "otransitionend", "mstransitionend", "mstransitionend"], s = this; if (e) for (t = 0; t < i.length; t++) s.on(i[t], a); return this }), "transform" in r.fn || (r.fn.transform = function(e) { for (var a = 0; a < this.length; a++) { var t = this[a].style; t.webkittransform = t.mstransform = t.mstransform = t.moztransform = t.otransform = t.transform = e } return this }), "transition" in r.fn || (r.fn.transition = function(e) { "string" != typeof e && (e += "ms"); for (var a = 0; a < this.length; a++) { var t = this[a].style; t.webkittransitionduration = t.mstransitionduration = t.mstransitionduration = t.moztransitionduration = t.otransitionduration = t.transitionduration = e } return this })), window.swiper = t }(), "undefined" != typeof module ? module.exports = window.swiper : "function" == typeof define && define.amd && define([], function() { "use strict"; return window.swiper }), window.countdown = function() { window.requestanimframe = function() { return window.requestanimationframe || window.webkitrequestanimationframe || window.mozrequestanimationframe || function(e) { window.settimeout(e, 1e3 / 60) } }(); var e = { launchtimestamp: 0, currenttimestamp: 0, countdowntimer: null, timestampgap: 0, countdowndata: {}, paused: !1, settings: { reload: !1, showdate: !0, timezoneoffset: null, launchtime: "", remote: { url: "locale" }, containerclass: ".countdown-thumb", daysclass: ".countdown-days", hoursclass: ".countdown-hours", minsclass: ".countdown-mins", secsclass: ".countdown-sec", timetplclass: ".time-tpl", onfinish: function() {}, onready: function() {}, beyondoneday: function() {}, alreadyend: function() {} }, init: function(e) { var a = this, t = $.extend(a.settings, e); this.$container = $(t.containerclass), this.showtype = t.showtype || this.$container.data("show") || "block", "block" === this.showtype ? (this.$days = this.$container.find(t.daysclass), this.$hours = this.$container.find(t.hoursclass), this.$mins = this.$container.find(t.minsclass), this.$secs = this.$container.find(t.secsclass)) : "inline" === this.showtype && (this.$tpl = this.$container.find(t.timetplclass)); var i = t.launchtime || this.$container.data("countdown-launch-time"); this.launchtime = i; var s = new date(i); t.timezoneoffset && s.sethours(s.gethours() + t.timezoneoffset), this.launchtimestamp = s.gettime(); var r = t.reload || this.$container.data("countdown-reload"); return r && (a.reload = !0), cleartimeout(a.countdowntimer), a.currenttime(function(e) { if (e) { a.currenttimestamp = e, a.remotetimestamp = e; var t = new date, i = a.gettimegap(a.remotetimestamp, a.launchtimestamp); a.devicetimestamp = t.gettime(), a.timestampgap = a.remotetimestamp - a.devicetimestamp, a.remotetimestamp <= a.launchtimestamp ? !a.settings.showdate && i.days > 0 ? a.settings.beyondoneday.call(a) : requestanimframe(function() { a.run.call(a), a.settings.onready.call(a) }) : a.settings.alreadyend.call(a) } }), a }, run: function() { var e, a = this, t = new date, i = t.gettime(), s = i + a.timestampgap, r = a.launchtimestamp; if (r - s >= 0 && !this.paused) { if (e = this.gettimegap(s, r), e.sec != a.countdowndata.sec || e.mins != a.countdowndata.mins) { if ("inline" === this.showtype && this.$tpl.length > 0) { var n = this.$tpl.data("time-tpl") || ""; e.days > 0 && a.settings.showdate && (n = this.$tpl.data("date-tpl") + " : " + n), n = n.replace("{days}", e.days).replace("{hours}", this.numtostr(e.hours)).replace("{mins}", this.numtostr(e.mins)).replace("{secs}", this.numtostr(e.sec)), 1 == e.days && (n = n.replace("days", "day")), this.$tpl.html(n) } else "block" === this.showtype && (a.settings.showdate && a.$days.text(this.numtostr(e.days)), a.$hours.text(this.numtostr(e.hours)), a.$mins.text(this.numtostr(e.mins)), a.$secs.text(this.numtostr(e.sec))); a.countdowndata = e } requestanimframe(a.run.bind(a)) } else console.log("finished"), a.reload && window.location.reload(), a.settings.onfinish.call(a) }, pause: function() { this.paused = !0 }, restore: function() { this.paused = !1, requestanimframe(this.run.bind(this)) }, numtostr: function(e) { return (e < 10 ? "0" : "") + e }, gettimegap: function(e, a) { var t = (a - e) / 1e3, i = { days: math.floor(t / 60 / 60 / 24), hours: math.floor(t / 60 / 60) % 24, mins: math.floor(t / 60) % 60, sec: math.floor(t) % 60 }; return i.days = i.days > 0 ? i.days : 0, i.hours = i.hours > 0 ? i.hours : 0, i.mins = i.mins > 0 ? i.mins : 0, i.sec = i.sec > 0 ? i.sec : 0, i }, currenttime: function(a) { var t = e.settings, i = t.remote; if (!i.url || "locale" === i.url) { var s = new date; return console.log("computer time (locale):", s), a(s.gettime()) } var r = (new date).gettime(); $.ajax({ url: i.url + "×tamp=" + r, type: "get" }).done(function(e, t, i) { var s = i.getresponseheader("date"); console.log("server time:", s), a(new date(s).gettime()) }).fail(function() { var e = new date; console.log("computer time (locale):", e), a(e.gettime()) }) }, updatalaunchtime: function(e) { var a = new date(e).gettime(); this.launchtimestamp != a && (this.launchtimestamp = a, console.log("launch time is unpdated")) } }; return function(a) { return e.init(a) } }(), $(function() { function e(e) { this.el = e.el, this.videolist = this.el.find("video"), this.videoload = !1, this.videohover = !1, this.handlehover(), this.bindclick(), this.bannervideoplay() } function a() { var e = $(".swiper-slide-countdown .banner-logo"), a = $(".swiper-slide-countdown .banner-title"), t = $(".swiper-slide-countdown .banner-desc"), i = $(".swiper-slide-countdown .countdown-thumb"); new countdown({ // remote: { // url: dui.api._helper.getapi("currenttime") + "?lang=en" // }, alreadyend: function() { e.fadeout(), a.fadein(), t.fadein() }, onfinish: function() { e.fadeout(), a.fadein(), t.fadein(), settimeout(function() { i.fadeout(1e3) }, 500) }, onready: function() { e.fadeout(), a.fadein(), t.fadein(), settimeout(function() { i.fadein(1e3) }, 500) }, beyondoneday: function() { e.fadein(), a.fadeout(), t.fadein() } }) } e.prototype = { videoplay: function() { var e = this.videolist, a = $(".current-active").find("a").children("video"), t = $(".current-active").find("a").children(".video-mask"); if (e && e.length > 0) for (var i = 0; i < e.length; i++) isnan(e[i].duration) || e[i].pause(); a && a[0] && t.length > 0 && a.hasclass("hover-active") && (t.addclass("active"), !isnan(a[0].duration) && this.videoload ? (a[0].currenttime = 0, a[0].play()) : (a[0].play(), this.videoload = !0)) }, bannervideoplay: function() { var e = $(".product-grid-video"); if (e.length > 0) for (var a = 0; a < e.length; a++) e[a].classname.indexof("grid-video-hover") == -1 && e[a] && e[a].play(); $(".product-grid-video-content").on("mouseenter", function() { var e = $(this).find(".product-grid-video"), a = $(this).find(".product-video-mask"); e.hasclass("grid-video-hover") && e.length > 0 && e[0] && (a.hide(), e[0].play()) }), $(".product-grid-video-content").on("mouseleave", function() { var e = $(this).find(".product-grid-video"), a = $(this).find(".product-video-mask"); e[0] && !isnan(e[0].duration) && e.hasclass("grid-video-hover") && e.length > 0 && (a.show(), e[0].currenttime = 0, e[0].pause()) }) }, hidemask: function() { var e = $(".current-active").next().find("a").children("video"), a = $(".current-active").next().find("a").children(".video-mask"), t = $(".current-active").prev().find("a").children("video"), i = $(".current-active").prev().find("a").children(".video-mask"); e && e[0] && isnan(e[0].duration) && "function" == typeof e[0].load && e[0].load(), t && t[0] && isnan(t[0].duration) && "function" == typeof t[0].load && t[0].load(), e && e[0] && a.length > 0 && !a.hasclass("active") && a.addclass("active"), t && t[0] && i.length > 0 && i.addclass("active") }, handlehover: function() { function e(e) { var a = document.getelementbyid("slide-grid-container"), t = document.documentelement.scrolltop || document.body.scrolltop, i = e.clientx, s = e.clienty + t, r = a.offsetleft, n = a.offsettop, o = a.offsetleft + a.offsetwidth, l = a.offsettop + a.offsetheight, d = i <= r || i >= o || s <= n || s >= l; return !!d || (e.clienty < 0 || e.clienty > document.documentelement.clientheight) } var a = this.el.parent(".slide-grid-container"); a.on("mouseenter", function() { var e = $(".current-active").find("a").children("video"), a = $(".current-active").find("a").children(".video-mask"); e.length > 0 && e[0] && e.hasclass("hover-active") && a.length > 0 && (this.videohover && !isnan(e[0].duration) ? (a.addclass("active"), e[0].currenttime = 0, e[0].play()) : (a.addclass("active"), e[0].play(), this.videohover = !0)) }), a.on("mouseleave", function(a) { var t = function() { return /windows|win32/i.test(navigator.useragent) }(), i = !0, s = navigator.useragent.indexof("chrome") > -1; t && s && (i = e(a)); var r = $(".current-active").find("a").children("video"), n = $(".current-active").find("a").children(".video-mask"); i && r.length > 0 && r[0] && r.hasclass("hover-active") && n.length > 0 && (n.removeclass("active"), isnan(r[0].duration) || r[0].pause()) }) }, bindclick: function() { var e = this.el.find("li"); e.on("click", function() { if ($(this).find("video").hasclass("hover-active")) { var e = $(this).find("video"), a = $(this).find(".video-mask"); e[0] && !isnan(e[0].duration) && a.length > 0 && (a.removeclass("active"), e[0].currenttime = 0, e[0].pause()) } }) } }; var t = { $list: null, $listitems: null, listlength: 0, hasinitial: !1, fitpattern: !1, init: function() { this.$list = $(".homepage-banner .swiper-scroller-list"); var e = this.$list.find(".swiper-scroller-item"); return this.listlength = e.length, !(this.listlength < 3) && (3 == this.listlength && (this.fitpattern = !0), this.$list.prepend(e.eq(this.listlength - 1)), this.fitpattern ? this.$list.prepend(e.eq(this.listlength - 2).clone()) : this.$list.prepend(e.eq(this.listlength - 2)), this.$list.prepend(e.eq(this.listlength - 3).clone()), this.$list.removeclass("hidden"), this.bind(), this.bindcookietip(), void(this.hasinitial = !0)) }, bind: function() { var e = this; this.$list.delegate(".swiper-scroller-item a", "click", function() { var a = $(this).parent("li").index(); 2 == a || 1 == a ? (e.scrolldown(), "function" == typeof ga && ga("send", "event", "pc-homepage", "click", "widget-up")) : 4 != a && 5 != a || (e.scrollup(), "function" == typeof ga && ga("send", "event", "pc-homepage", "click", "widget-down")); var t = e.$list.find(".swiper-scroller-item").eq(3).data("index"); n.slideto(t) }) }, scrolldown: function() { var e = this.$list.find(".swiper-scroller-item"), a = e.length - 2; this.fitpattern && (a -= 1); var t = e.eq(a).clone(); this.$list.prepend(t), e.last().remove() }, scrollup: function() { var e = this.$list.find(".swiper-scroller-item"), a = this.fitpattern ? 2 : 1, t = e.eq(a).clone(); this.$list.append(t), e.first().remove() }, scrollto: function(e) { if (!this.hasinitial) return !1; e > this.listlength ? e %= this.listlength : 0 == e && (e = this.listlength); var a = this.$list.find(".swiper-scroller-item").eq(3).data("index"); if (a == e) return !1; var t = a + 1, i = a - 1; 1 == a ? i = this.listlength : a == this.listlength && (t = 1), e == i ? this.scrolldown() : e == t && this.scrollup() }, bindcookietip: function() { // var e = $("#cookie-tip"), // a = (dui.config.region || dui.cookie.get("country") || "unknow").tolowercase(), // t = dui.config.continentcountries, // i = dui.cookie.get("read_cookie_tips"), // s = dui.config.domain || ".dji.com"; // e.length && t.eu[a] && !i && ($("body").addclass("display-tips"), $("#cookie-tip-click").click(function() { // $("body").removeclass("display-tips"), dui.cookie.set("read_cookie_tips", "yes", { // domain: s, // path: "/", // expires: 180 // }) // })) } }; t.init(); var i = 3e3, s = $(".homepage-banner .swiper-slide-countdown"), r = $(".banner-swiper-slide").eq(0).find(".banner-video"); (s.length > 0 || r.length > 0) && (i = !1); var n = new swiper(".homepage-banner .swiper-container", { loop: !0, autoplay: i, keyboardcontrol: !0, effect: "fade", speed: 100, simulatetouch: !1, prevbutton: ".swiper-control-pre .control-btn", nextbutton: ".swiper-control-next .control-btn", onslidechangeend: function(e) { t.scrollto(e.activeindex) } }), o = s.find("video"); o.length > 0 && window.addeventlistener("pageshow", function() { o[0].paused && !isnan(o[0].duration) && o[0].play() }); var l = !1; $(window).on("visibilitychange", function() { document.hidden ? n.autoplaying && (l = !0, n.stopautoplay()) : l && (l = !1, n.startautoplay()) }); var d = $(".top-slide-grid-item"), p = $(".slide-grid-container ul.slide-grid-list"), c = p.find(".slide-grid-item").eq(1).find("a").children("video"); if (d.length <= 0) { var u = p.find(".slide-grid-item"), m = math.floor(math.random() * u.length); u.eq(m).insertafter(u.eq(0)), p.addclass("initialized") } else p.addclass("initialized"); var h = new e({ el: p }); p.find(".slide-grid-item").eq(1).addclass("current-active"), $(".slide-grid-container .control-btn").click(function(e) { e.preventdefault(); var a = p.find(".slide-grid-item"), t = a.first(), i = a.last(); p.find(".slide-grid-item").removeclass("current-active"), $(this).hasclass("control-btn-left") ? (p.prepend(i), p.find(".slide-grid-item").eq(1).addclass("current-active"), h.videoplay(), h.hidemask()) : (p.append(t), p.find(".slide-grid-item").eq(1).addclass("current-active"), h.videoplay(), h.hidemask()) }), c && c[0] && isnan(c[0].duration) && "function" == typeof c[0].load && c[0].load(), h.hidemask(), $(".swiper-slide-countdown").length && a() });