/* * swiper 2.7.0 * mobile touch slider and framework with hardware accelerated transitions * * http://www.idangero.us/sliders/swiper/ * * copyright 2010-2014, vladimir kharlampidi * the idangero.us * http://www.idangero.us/ * * licensed under gpl & mit * * released on: august 30, 2014 */ var swiper = function (a, b) { "use strict"; function c(a, b) { return document.queryselectorall ? (b || document).queryselectorall(a) : jquery(a, b) } function d(a) { return "[object array]" === object.prototype.tostring.apply(a) ? !0 : !1 } function e() { var a = f - i; return b.freemode && (a = f - i), b.slidesperview > c.slides.length && !b.centeredslides && (a = 0), 0 > a && (a = 0), a } function f() { function a(a) { var c = new image; c.onload = function () { "undefined" != typeof c && null !== c && (void 0 !== c.imagesloaded && c.imagesloaded++, c.imagesloaded === c.imagestoload.length && (c.reinit(), b.onimagesready && c.firecallback(b.onimagesready, c))) }, c.src = a } var d = c.h.addeventlistener, e = "wrapper" === b.eventtarget ? c.wrapper : c.container; if (c.browser.ie10 || c.browser.ie11 ? (d(e, c.touchevents.touchstart, p), d(document, c.touchevents.touchmove, q), d(document, c.touchevents.touchend, r)) : (c.support.touch && (d(e, "touchstart", p), d(e, "touchmove", q), d(e, "touchend", r)), b.simulatetouch && (d(e, "mousedown", p), d(document, "mousemove", q), d(document, "mouseup", r))), b.autoresize && d(window, "resize", c.resizefix), g(), c._wheelevent = !1, b.mousewheelcontrol) { if (void 0 !== document.onmousewheel && (c._wheelevent = "mousewheel"), !c._wheelevent) try { new wheelevent("wheel"), c._wheelevent = "wheel" } catch (f) { } c._wheelevent || (c._wheelevent = "dommousescroll"), c._wheelevent && d(c.container, c._wheelevent, j) } if (b.keyboardcontrol && d(document, "keydown", i), b.updateonimagesready) { c.imagestoload = c("img", c.container); for (var h = 0; h < c.imagestoload.length; h++) a(c.imagestoload[h].getattribute("src")) } } function g() { var a, d = c.h.addeventlistener; if (b.preventlinks) { var e = c("a", c.container); for (a = 0; a < e.length; a++) d(e[a], "click", n) } if (b.releaseformelements) { var f = c("input, textarea, select", c.container); for (a = 0; a < f.length; a++) d(f[a], c.touchevents.touchstart, o, !0) } if (b.onslideclick) for (a = 0; a < c.slides.length; a++) d(c.slides[a], "click", k); if (b.onslidetouch) for (a = 0; a < c.slides.length; a++) d(c.slides[a], c.touchevents.touchstart, l) } function h() { var a, d = c.h.removeeventlistener; if (b.onslideclick) for (a = 0; a < c.slides.length; a++) d(c.slides[a], "click", k); if (b.onslidetouch) for (a = 0; a < c.slides.length; a++) d(c.slides[a], c.touchevents.touchstart, l); if (b.releaseformelements) { var e = c("input, textarea, select", c.container); for (a = 0; a < e.length; a++) d(e[a], c.touchevents.touchstart, o, !0) } if (b.preventlinks) { var f = c("a", c.container); for (a = 0; a < f.length; a++) d(f[a], "click", n) } } function i(a) { var b = a.keycode || a.charcode; if (!(a.shiftkey || a.altkey || a.ctrlkey || a.metakey)) { if (37 === b || 39 === b || 38 === b || 40 === b) { for (var c = !1, d = c.h.getoffset(c.container), e = c.h.windowscroll().left, f = c.h.windowscroll().top, g = c.h.windowwidth(), h = c.h.windowheight(), i = [[d.left, d.top], [d.left + c.width, d.top], [d.left, d.top + c.height], [d.left + c.width, d.top + c.height]], j = 0; j < i.length; j++) { var k = i[j]; k[0] >= e && k[0] <= e + g && k[1] >= f && k[1] <= f + h && (c = !0) } if (!c) return } m ? ((37 === b || 39 === b) && (a.preventdefault ? a.preventdefault() : a.returnvalue = !1), 39 === b && c.swipenext(), 37 === b && c.swipeprev()) : ((38 === b || 40 === b) && (a.preventdefault ? a.preventdefault() : a.returnvalue = !1), 40 === b && c.swipenext(), 38 === b && c.swipeprev()) } } function j(a) { var c = c._wheelevent, d = 0; if (a.detail) d = -a.detail; else if ("mousewheel" === c) if (b.mousewheelcontrolforcetoaxis) if (m) { if (!(math.abs(a.wheeldeltax) > math.abs(a.wheeldeltay))) return; d = a.wheeldeltax } else { if (!(math.abs(a.wheeldeltay) > math.abs(a.wheeldeltax))) return; d = a.wheeldeltay } else d = a.wheeldelta; else if ("dommousescroll" === c) d = -a.detail; else if ("wheel" === c) if (b.mousewheelcontrolforcetoaxis) if (m) { if (!(math.abs(a.deltax) > math.abs(a.deltay))) return; d = -a.deltax } else { if (!(math.abs(a.deltay) > math.abs(a.deltax))) return; d = -a.deltay } else d = math.abs(a.deltax) > math.abs(a.deltay) ? -a.deltax : -a.deltay; if (b.freemode) { var f = c.getwrappertranslate() + d; if (f > 0 && (f = 0), f < -e() && (f = -e()), c.setwrappertransition(0), c.setwrappertranslate(f), c.updateactiveslide(f), 0 === f || f === -e()) return } else (new date).gettime() - u > 60 && (0 > d ? c.swipenext() : c.swipeprev()), u = (new date).gettime(); return b.autoplay && c.stopautoplay(!0), a.preventdefault ? a.preventdefault() : a.returnvalue = !1, !1 } function k(a) { c.allowslideclick && (m(a), c.firecallback(b.onslideclick, c, a)) } function l(a) { m(a), c.firecallback(b.onslidetouch, c, a) } function m(a) { if (a.currenttarget) c.clickedslide = a.currenttarget; else { var c = a.srcelement; do { if (c.classname.indexof(b.slideclass) > -1) break; c = c.parentnode } while (c); c.clickedslide = c } c.clickedslideindex = c.slides.indexof(c.clickedslide), c.clickedslideloopindex = c.clickedslideindex - (c.loopedslides || 0) } function n(a) { return c.allowlinks ? void 0 : (a.preventdefault ? a.preventdefault() : a.returnvalue = !1, b.preventlinkspropagation && "stoppropagation" in a && a.stoppropagation(), !1) } function o(a) { return a.stoppropagation ? a.stoppropagation() : a.returnvalue = !1, !1 } function p(a) { if (b.preventlinks && (c.allowlinks = !0), c.istouched || b.onlyexternal) return !1; var c = a.target || a.srcelement; document.activeelement && document.activeelement !== c && document.activeelement.blur(); var d = "input select textarea".split(" "); if (b.noswiping && c && s(c)) return !1; if ($ = !1, c.istouched = !0, z = "touchstart" === a.type, !z && "which" in a && 3 === a.which) return !1; if (!z || 1 === a.targettouches.length) { c.callplugins("ontouchstartbegin"), !z && !c.isandroid && d.indexof(c.tagname.tolowercase()) < 0 && (a.preventdefault ? a.preventdefault() : a.returnvalue = !1); var e = z ? a.targettouches[0].pagex : a.pagex || a.clientx, f = z ? a.targettouches[0].pagey : a.pagey || a.clienty; c.touches.startx = c.touches.currentx = e, c.touches.starty = c.touches.currenty = f, c.touches.start = c.touches.current = m ? e : f, c.setwrappertransition(0), c.positions.start = c.positions.current = c.getwrappertranslate(), c.setwrappertranslate(c.positions.start), c.times.start = (new date).gettime(), h = void 0, b.movestartthreshold > 0 && (w = !1), b.ontouchstart && c.firecallback(b.ontouchstart, c, a), c.callplugins("ontouchstartend") } } function q(a) { if (c.istouched && !b.onlyexternal && (!z || "mousemove" !== a.type)) { var c = z ? a.targettouches[0].pagex : a.pagex || a.clientx, d = z ? a.targettouches[0].pagey : a.pagey || a.clienty; if ("undefined" == typeof h && m && (h = !!(h || math.abs(d - c.touches.starty) > math.abs(c - c.touches.startx))), "undefined" != typeof h || m || (h = !!(h || math.abs(d - c.touches.starty) < math.abs(c - c.touches.startx))), h) return void(c.istouched = !1); if (m) { if (!b.swipetonext && c < c.touches.startx || !b.swipetoprev && c > c.touches.startx) return } else if (!b.swipetonext && d < c.touches.starty || !b.swipetoprev && d > c.touches.starty) return; if (a.assignedtoswiper) return void(c.istouched = !1); if (a.assignedtoswiper = !0, b.preventlinks && (c.allowlinks = !1), b.onslideclick && (c.allowslideclick = !1), b.autoplay && c.stopautoplay(!0), !z || 1 === a.touches.length) { if (c.ismoved || (c.callplugins("ontouchmovestart"), b.loop && (c.fixloop(), c.positions.start = c.getwrappertranslate()), b.ontouchmovestart && c.firecallback(b.ontouchmovestart, c)), c.ismoved = !0, a.preventdefault ? a.preventdefault() : a.returnvalue = !1, c.touches.current = m ? c : d, c.positions.current = (c.touches.current - c.touches.start) * b.touchratio + c.positions.start, c.positions.current > 0 && b.onresistancebefore && c.firecallback(b.onresistancebefore, c, c.positions.current), c.positions.current < -e() && b.onresistanceafter && c.firecallback(b.onresistanceafter, c, math.abs(c.positions.current + e())), b.resistance && "100%" !== b.resistance) { var f; if (c.positions.current > 0 && (f = 1 - c.positions.current / i / 2, c.positions.current = .5 > f ? i / 2 : c.positions.current * f), c.positions.current < -e()) { var g = (c.touches.current - c.touches.start) * b.touchratio + (e() + c.positions.start); f = (i + g) / i; var h = c.positions.current - g * (1 - f) / 2, i = -e() - i / 2; c.positions.current = i > h || 0 >= f ? i : h } } if (b.resistance && "100%" === b.resistance && (c.positions.current > 0 && (!b.freemode || b.freemodefluid) && (c.positions.current = 0), c.positions.current < -e() && (!b.freemode || b.freemodefluid) && (c.positions.current = -e())), !b.followfinger) return; if (b.movestartthreshold) if (math.abs(c.touches.current - c.touches.start) > b.movestartthreshold || w) { if (!w) return w = !0, void(c.touches.start = c.touches.current); c.setwrappertranslate(c.positions.current) } else c.positions.current = c.positions.start; else c.setwrappertranslate(c.positions.current); return (b.freemode || b.watchactiveindex) && c.updateactiveslide(c.positions.current), b.grabcursor && (c.container.style.cursor = "move", c.container.style.cursor = "grabbing", c.container.style.cursor = "-moz-grabbin", c.container.style.cursor = "-webkit-grabbing"), x || (x = c.touches.current), y || (y = (new date).gettime()), c.velocity = (c.touches.current - x) / ((new date).gettime() - y) / 2, math.abs(c.touches.current - x) < 2 && (c.velocity = 0), x = c.touches.current, y = (new date).gettime(), c.callplugins("ontouchmoveend"), b.ontouchmove && c.firecallback(b.ontouchmove, c, a), !1 } } } function r(a) { if (h && c.swipereset(), !b.onlyexternal && c.istouched) { c.istouched = !1, b.grabcursor && (c.container.style.cursor = "move", c.container.style.cursor = "grab", c.container.style.cursor = "-moz-grab", c.container.style.cursor = "-webkit-grab"), c.positions.current || 0 === c.positions.current || (c.positions.current = c.positions.start), b.followfinger && c.setwrappertranslate(c.positions.current), c.times.end = (new date).gettime(), c.touches.diff = c.touches.current - c.touches.start, c.touches.abs = math.abs(c.touches.diff), c.positions.diff = c.positions.current - c.positions.start, c.positions.abs = math.abs(c.positions.diff); var c = c.positions.diff, d = c.positions.abs, f = c.times.end - c.times.start; 5 > d && 300 > f && c.allowlinks === !1 && (b.freemode || 0 === d || c.swipereset(), b.preventlinks && (c.allowlinks = !0), b.onslideclick && (c.allowslideclick = !0)), settimeout(function () { "undefined" != typeof c && null !== c && (b.preventlinks && (c.allowlinks = !0), b.onslideclick && (c.allowslideclick = !0)) }, 100); var g = e(); if (!c.ismoved && b.freemode) return c.ismoved = !1, b.ontouchend && c.firecallback(b.ontouchend, c, a), void c.callplugins("ontouchend"); if (!c.ismoved || c.positions.current > 0 || c.positions.current < -g) return c.swipereset(), b.ontouchend && c.firecallback(b.ontouchend, c, a), void c.callplugins("ontouchend"); if (c.ismoved = !1, b.freemode) { if (b.freemodefluid) { var h, i = 1e3 * b.momentumratio, j = c.velocity * i, k = c.positions.current + j, l = !1, m = 20 * math.abs(c.velocity) * b.momentumbounceratio; -g > k && (b.momentumbounce && c.support.transitions ? (-m > k + g && (k = -g - m), h = -g, l = !0, $ = !0) : k = -g), k > 0 && (b.momentumbounce && c.support.transitions ? (k > m && (k = m), h = 0, l = !0, $ = !0) : k = 0), 0 !== c.velocity && (i = math.abs((k - c.positions.current) / c.velocity)), c.setwrappertranslate(k), c.setwrappertransition(i), b.momentumbounce && l && c.wrappertransitionend(function () { $ && (b.onmomentumbounce && c.firecallback(b.onmomentumbounce, c), c.callplugins("onmomentumbounce"), c.setwrappertranslate(h), c.setwrappertransition(300)) }), c.updateactiveslide(k) } return (!b.freemodefluid || f >= 300) && c.updateactiveslide(c.positions.current), b.ontouchend && c.firecallback(b.ontouchend, c, a), void c.callplugins("ontouchend") } g = 0 > c ? "tonext" : "toprev", "tonext" === g && 300 >= f && (30 > d || !b.shortswipes ? c.swipereset() : c.swipenext(!0)), "toprev" === g && 300 >= f && (30 > d || !b.shortswipes ? c.swipereset() : c.swipeprev(!0)); var n = 0; if ("auto" === b.slidesperview) { for (var o, p = math.abs(c.getwrappertranslate()), q = 0, r = 0; r < c.slides.length; r++) if (o = m ? c.slides[r].getwidth(!0, b.roundlengths) : c.slides[r].getheight(!0, b.roundlengths), q += o, q > p) { n = o; break } n > i && (n = i) } else n = e * b.slidesperview; "tonext" === g && f > 300 && (d >= n * b.longswipesratio ? c.swipenext(!0) : c.swipereset()), "toprev" === g && f > 300 && (d >= n * b.longswipesratio ? c.swipeprev(!0) : c.swipereset()), b.ontouchend && c.firecallback(b.ontouchend, c, a), c.callplugins("ontouchend") } } function s(a) { var c = !1; do a.classname.indexof(b.noswipingclass) > -1 && (c = !0), a = a.parentelement; while (!c && a.parentelement && -1 === a.classname.indexof(b.wrapperclass)); return !c && a.classname.indexof(b.wrapperclass) > -1 && a.classname.indexof(b.noswipingclass) > -1 && (c = !0), c } function t(a, b) { var c, d = document.createelement("div"); return d.innerhtml = b, c = d.firstchild, c.classname += " " + a, c.outerhtml } function u(a, c, d) { function e() { var f = +new date, l = f - g; h += i * l / (1e3 / 60), k = "tonext" === j ? h > a : a > h, k ? (c.setwrappertranslate(math.ceil(h)), c._domanimating = !0, window.settimeout(function () { e() }, 1e3 / 60)) : (b.onslidechangeend && ("to" === c ? d.runcallbacks === !0 && c.firecallback(b.onslidechangeend, c, j) : c.firecallback(b.onslidechangeend, c, j)), c.setwrappertranslate(a), c._domanimating = !1) } var f = "to" === c && d.speed >= 0 ? d.speed : b.speed, g = +new date; if (c.support.transitions || !b.domanimation) c.setwrappertranslate(a), c.setwrappertransition(f); else { var h = c.getwrappertranslate(), i = math.ceil((a - h) / f * (1e3 / 60)), j = h > a ? "tonext" : "toprev", k = "tonext" === j ? h > a : a > h; if (c._domanimating) return; e() } c.updateactiveslide(a), b.onslidenext && "next" === c && c.firecallback(b.onslidenext, c, a), b.onslideprev && "prev" === c && c.firecallback(b.onslideprev, c, a), b.onslidereset && "reset" === c && c.firecallback(b.onslidereset, c, a), ("next" === c || "prev" === c || "to" === c && d.runcallbacks === !0) && v(c) } function v(a) { if (c.callplugins("onslidechangestart"), b.onslidechangestart) if (b.queuestartcallbacks && c.support.transitions) { if (c._queuestartcallbacks) return; c._queuestartcallbacks = !0, c.firecallback(b.onslidechangestart, c, a), c.wrappertransitionend(function () { c._queuestartcallbacks = !1 }) } else c.firecallback(b.onslidechangestart, c, a); if (b.onslidechangeend) if (c.support.transitions) if (b.queueendcallbacks) { if (c._queueendcallbacks) return; c._queueendcallbacks = !0, c.wrappertransitionend(function (c) { c.firecallback(b.onslidechangeend, c, a) }) } else c.wrappertransitionend(function (c) { c.firecallback(b.onslidechangeend, c, a) }); else b.domanimation || settimeout(function () { c.firecallback(b.onslidechangeend, c, a) }, 10) } function w() { var a = c.paginationbuttons; if (a) for (var b = 0; b < a.length; b++) c.h.removeeventlistener(a[b], "click", y) } function x() { var a = c.paginationbuttons; if (a) for (var b = 0; b < a.length; b++) c.h.addeventlistener(a[b], "click", y) } function y(a) { for (var c, d = a.target || a.srcelement, e = c.paginationbuttons, f = 0; f < e.length; f++) d === e[f] && (c = f); b.autoplay && c.stopautoplay(!0), c.swipeto(c) } function z() { _ = settimeout(function () { b.loop ? (c.fixloop(), c.swipenext(!0)) : c.swipenext(!0) || (b.autoplaystoponlast ? (cleartimeout(_), _ = void 0) : c.swipeto(0)), c.wrappertransitionend(function () { "undefined" != typeof _ && z() }) }, b.autoplay) } function a() { c.calcslides(), b.loader.slides.length > 0 && 0 === c.slides.length && c.loadslides(), b.loop && c.createloop(), c.init(), f(), b.pagination && c.createpagination(!0), b.loop || b.initialslide > 0 ? c.swipeto(b.initialslide, 0, !1) : c.updateactiveslide(0), b.autoplay && c.startautoplay(), c.centerindex = c.activeindex, b.onswipercreated && c.firecallback(b.onswipercreated, c), c.callplugins("onswipercreated") } if (!document.body.outerhtml && document.body.__definegetter__ && htmlelement) { var b = htmlelement.prototype; b.__definegetter__ && b.__definegetter__("outerhtml", function () { return (new xmlserializer).serializetostring(this) }) } if (window.getcomputedstyle || (window.getcomputedstyle = function (a) { return this.el = a, this.getpropertyvalue = function (b) { var c = /(\-([a-z]){1})/g; return "float" === b && (b = "stylefloat"), c.test(b) && (b = b.replace(c, function () { return arguments[2].touppercase() })), a.currentstyle[b] ? a.currentstyle[b] : null }, this }), array.prototype.indexof || (array.prototype.indexof = function (a, b) { for (var c = b || 0, d = this.length; d > c; c++) if (this[c] === a) return c; return -1 }), (document.queryselectorall || window.jquery) && "undefined" != typeof a && (a.nodetype || 0 !== c(a).length)) { var c = this; c.touches = { start: 0, startx: 0, starty: 0, current: 0, currentx: 0, currenty: 0, diff: 0, abs: 0 }, c.positions = {start: 0, abs: 0, diff: 0, current: 0}, c.times = { start: 0, end: 0 }, c.id = (new date).gettime(), c.container = a.nodetype ? a : c(a)[0], c.istouched = !1, c.ismoved = !1, c.activeindex = 0, c.centerindex = 0, c.activeloaderindex = 0, c.activeloopindex = 0, c.previousindex = null, c.velocity = 0, c.snapgrid = [], c.slidesgrid = [], c.imagestoload = [], c.imagesloaded = 0, c.wrapperleft = 0, c.wrapperright = 0, c.wrappertop = 0, c.wrapperbottom = 0, c.isandroid = navigator.useragent.tolowercase().indexof("android") >= 0; var d, e, f, g, h, i, j = { eventtarget: "wrapper", mode: "horizontal", touchratio: 1, speed: 300, freemode: !1, freemodefluid: !1, momentumratio: 1, momentumbounce: !0, momentumbounceratio: 1, slidesperview: 1, slidespergroup: 1, slidesperviewfit: !0, simulatetouch: !0, followfinger: !0, shortswipes: !0, longswipesratio: .5, movestartthreshold: !1, onlyexternal: !1, createpagination: !0, pagination: !1, paginationelement: "span", paginationclickable: !1, paginationasrange: !0, resistance: !0, scrollcontainer: !1, preventlinks: !0, preventlinkspropagation: !1, noswiping: !1, noswipingclass: "swiper-no-swiping", initialslide: 0, keyboardcontrol: !1, mousewheelcontrol: !1, mousewheelcontrolforcetoaxis: !1, usecss3transforms: !0, autoplay: !1, autoplaydisableoninteraction: !0, autoplaystoponlast: !1, loop: !1, loopadditionalslides: 0, roundlengths: !1, calculateheight: !1, csswidthandheight: !1, updateonimagesready: !0, releaseformelements: !0, watchactiveindex: !1, visibilityfullfit: !1, offsetpxbefore: 0, offsetpxafter: 0, offsetslidesbefore: 0, offsetslidesafter: 0, centeredslides: !1, queuestartcallbacks: !1, queueendcallbacks: !1, autoresize: !0, resizereinit: !1, domanimation: !0, loader: {slides: [], slideshtmltype: "inner", surroundgroups: 1, logic: "reload", loadallslides: !1}, swipetoprev: !0, swipetonext: !0, slideelement: "div", slideclass: "swiper-slide", slideactiveclass: "swiper-slide-active", slidevisibleclass: "swiper-slide-visible", slideduplicateclass: "swiper-slide-duplicate", wrapperclass: "swiper-wrapper", paginationelementclass: "swiper-pagination-switch", paginationactiveclass: "swiper-active-switch", paginationvisibleclass: "swiper-visible-switch" }; b = b || {}; for (var k in j) if (k in b && "object" == typeof b[k]) for (var l in j[k]) l in b[k] || (b[k][l] = j[k][l]); else k in b || (b[k] = j[k]); c.params = b, b.scrollcontainer && (b.freemode = !0, b.freemodefluid = !0), b.loop && (b.resistance = "100%"); var m = "horizontal" === b.mode, n = ["mousedown", "mousemove", "mouseup"]; c.browser.ie10 && (n = ["mspointerdown", "mspointermove", "mspointerup"]), c.browser.ie11 && (n = ["pointerdown", "pointermove", "pointerup"]), c.touchevents = { touchstart: c.support.touch || !b.simulatetouch ? "touchstart" : n[0], touchmove: c.support.touch || !b.simulatetouch ? "touchmove" : n[1], touchend: c.support.touch || !b.simulatetouch ? "touchend" : n[2] }; for (var o = c.container.childnodes.length - 1; o >= 0; o--) if (c.container.childnodes[o].classname) for (var p = c.container.childnodes[o].classname.split(/\s+/), q = 0; q < p.length; q++) p[q] === b.wrapperclass && (d = c.container.childnodes[o]); c.wrapper = d, c._extendswiperslide = function (a) { return a.append = function () { return b.loop ? a.insertafter(c.slides.length - c.loopedslides) : (c.wrapper.appendchild(a), c.reinit()), a }, a.prepend = function () { return b.loop ? (c.wrapper.insertbefore(a, c.slides[c.loopedslides]), c.removeloopedslides(), c.calcslides(), c.createloop()) : c.wrapper.insertbefore(a, c.wrapper.firstchild), c.reinit(), a }, a.insertafter = function (c) { if ("undefined" == typeof c) return !1; var d; return b.loop ? (d = c.slides[c + 1 + c.loopedslides], d ? c.wrapper.insertbefore(a, d) : c.wrapper.appendchild(a), c.removeloopedslides(), c.calcslides(), c.createloop()) : (d = c.slides[c + 1], c.wrapper.insertbefore(a, d)), c.reinit(), a }, a.clone = function () { return c._extendswiperslide(a.clonenode(!0)) }, a.remove = function () { c.wrapper.removechild(a), c.reinit() }, a.html = function (b) { return "undefined" == typeof b ? a.innerhtml : (a.innerhtml = b, a) }, a.index = function () { for (var b, c = c.slides.length - 1; c >= 0; c--) a === c.slides[c] && (b = c); return b }, a.isactive = function () { return a.index() === c.activeindex ? !0 : !1 }, a.swiperslidedatastorage || (a.swiperslidedatastorage = {}), a.getdata = function (b) { return a.swiperslidedatastorage[b] }, a.setdata = function (b, c) { return a.swiperslidedatastorage[b] = c, a }, a.data = function (b, c) { return "undefined" == typeof c ? a.getattribute("data-" + b) : (a.setattribute("data-" + b, c), a) }, a.getwidth = function (b, c) { return c.h.getwidth(a, b, c) }, a.getheight = function (b, c) { return c.h.getheight(a, b, c) }, a.getoffset = function () { return c.h.getoffset(a) }, a }, c.calcslides = function (a) { var c = c.slides ? c.slides.length : !1; c.slides = [], c.displayslides = []; for (var d = 0; d < c.wrapper.childnodes.length; d++) if (c.wrapper.childnodes[d].classname) for (var e = c.wrapper.childnodes[d].classname, f = e.split(/\s+/), i = 0; i < f.length; i++) f[i] === b.slideclass && c.slides.push(c.wrapper.childnodes[d]); for (d = c.slides.length - 1; d >= 0; d--) c._extendswiperslide(c.slides[d]); c !== !1 && (c !== c.slides.length || a) && (h(), g(), c.updateactiveslide(), c.params.pagination && c.createpagination(), c.callplugins("numberofslideschanged")) }, c.createslide = function (a, c, d) { c = c || c.params.slideclass, d = d || b.slideelement; var e = document.createelement(d); return e.innerhtml = a || "", e.classname = c, c._extendswiperslide(e) }, c.appendslide = function (a, b, c) { return a ? a.nodetype ? c._extendswiperslide(a).append() : c.createslide(a, b, c).append() : void 0 }, c.prependslide = function (a, b, c) { return a ? a.nodetype ? c._extendswiperslide(a).prepend() : c.createslide(a, b, c).prepend() : void 0 }, c.insertslideafter = function (a, b, c, d) { return "undefined" == typeof a ? !1 : b.nodetype ? c._extendswiperslide(b).insertafter(a) : c.createslide(b, c, d).insertafter(a) }, c.removeslide = function (a) { if (c.slides[a]) { if (b.loop) { if (!c.slides[a + c.loopedslides]) return !1; c.slides[a + c.loopedslides].remove(), c.removeloopedslides(), c.calcslides(), c.createloop() } else c.slides[a].remove(); return !0 } return !1 }, c.removelastslide = function () { return c.slides.length > 0 ? (b.loop ? (c.slides[c.slides.length - 1 - c.loopedslides].remove(), c.removeloopedslides(), c.calcslides(), c.createloop()) : c.slides[c.slides.length - 1].remove(), !0) : !1 }, c.removeallslides = function () { for (var a = c.slides.length - 1; a >= 0; a--) c.slides[a].remove() }, c.getslide = function (a) { return c.slides[a] }, c.getlastslide = function () { return c.slides[c.slides.length - 1] }, c.getfirstslide = function () { return c.slides[0] }, c.activeslide = function () { return c.slides[c.activeindex] }, c.firecallback = function () { var a = arguments[0]; if ("[object array]" === object.prototype.tostring.call(a)) for (var c = 0; c < a.length; c++) "function" == typeof a[c] && a[c](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); else "[object string]" === object.prototype.tostring.call(a) ? b["on" + a] && c.firecallback(b["on" + a], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]) : a(arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]) }, c.addcallback = function (a, b) { var c, e = this; return e.params["on" + a] ? d(this.params["on" + a]) ? this.params["on" + a].push(b) : "function" == typeof this.params["on" + a] ? (c = this.params["on" + a], this.params["on" + a] = [], this.params["on" + a].push(c), this.params["on" + a].push(b)) : void 0 : (this.params["on" + a] = [], this.params["on" + a].push(b)) }, c.removecallbacks = function (a) { c.params["on" + a] && (c.params["on" + a] = null) }; var r = []; for (var s in c.plugins) if (b[s]) { var t = c.plugins[s](c, b[s]); t && r.push(t) } c.callplugins = function (a, b) { b || (b = {}); for (var c = 0; c < r.length; c++) a in r[c] && r[c][a](b) }, !c.browser.ie10 && !c.browser.ie11 || b.onlyexternal || c.wrapper.classlist.add("swiper-wp8-" + (m ? "horizontal" : "vertical")), b.freemode && (c.container.classname += " swiper-free-mode"), c.initialized = !1, c.init = function (a, c) { var d = c.h.getwidth(c.container, !1, b.roundlengths), e = c.h.getheight(c.container, !1, b.roundlengths); if (d !== c.width || e !== c.height || a) { c.width = d, c.height = e; var f, g, h, i, j, k, l; i = m ? d : e; var m = c.wrapper; if (a && c.calcslides(c), "auto" === b.slidesperview) { var n = 0, o = 0; b.slidesoffset > 0 && (m.style.paddingleft = "", m.style.paddingright = "", m.style.paddingtop = "", m.style.paddingbottom = ""), m.style.width = "", m.style.height = "", b.offsetpxbefore > 0 && (m ? c.wrapperleft = b.offsetpxbefore : c.wrappertop = b.offsetpxbefore), b.offsetpxafter > 0 && (m ? c.wrapperright = b.offsetpxafter : c.wrapperbottom = b.offsetpxafter), b.centeredslides && (m ? (c.wrapperleft = (i - this.slides[0].getwidth(!0, b.roundlengths)) / 2, c.wrapperright = (i - c.slides[c.slides.length - 1].getwidth(!0, b.roundlengths)) / 2) : (c.wrappertop = (i - c.slides[0].getheight(!0, b.roundlengths)) / 2, c.wrapperbottom = (i - c.slides[c.slides.length - 1].getheight(!0, b.roundlengths)) / 2)), m ? (c.wrapperleft >= 0 && (m.style.paddingleft = c.wrapperleft + "px"), c.wrapperright >= 0 && (m.style.paddingright = c.wrapperright + "px")) : (c.wrappertop >= 0 && (m.style.paddingtop = c.wrappertop + "px"), c.wrapperbottom >= 0 && (m.style.paddingbottom = c.wrapperbottom + "px")), k = 0; var p = 0; for (c.snapgrid = [], c.slidesgrid = [], h = 0, l = 0; l < c.slides.length; l++) { f = c.slides[l].getwidth(!0, b.roundlengths), g = c.slides[l].getheight(!0, b.roundlengths), b.calculateheight && (h = math.max(h, g)); var q = m ? f : g; if (b.centeredslides) { var r = l === c.slides.length - 1 ? 0 : c.slides[l + 1].getwidth(!0, b.roundlengths), s = l === c.slides.length - 1 ? 0 : c.slides[l + 1].getheight(!0, b.roundlengths), t = m ? r : s; if (q > i) { if (b.slidesperviewfit) c.snapgrid.push(k + c.wrapperleft), c.snapgrid.push(k + q - i + c.wrapperleft); else for (var u = 0; u <= math.floor(q / (i + c.wrapperleft)); u++) c.snapgrid.push(0 === u ? k + c.wrapperleft : k + c.wrapperleft + i * u); c.slidesgrid.push(k + c.wrapperleft) } else c.snapgrid.push(p), c.slidesgrid.push(p); p += q / 2 + t / 2 } else { if (q > i) if (b.slidesperviewfit) c.snapgrid.push(k), c.snapgrid.push(k + q - i); else if (0 !== i) for (var v = 0; v <= math.floor(q / i); v++) c.snapgrid.push(k + i * v); else c.snapgrid.push(k); else c.snapgrid.push(k); c.slidesgrid.push(k) } k += q, n += f, o += g } b.calculateheight && (c.height = h), m ? (f = n + c.wrapperright + c.wrapperleft, m.style.width = n + "px", m.style.height = c.height + "px") : (f = o + c.wrappertop + c.wrapperbottom, m.style.width = c.width + "px", m.style.height = o + "px") } else if (b.scrollcontainer) m.style.width = "", m.style.height = "", i = c.slides[0].getwidth(!0, b.roundlengths), j = c.slides[0].getheight(!0, b.roundlengths), f = m ? i : j, m.style.width = i + "px", m.style.height = j + "px", e = m ? i : j; else { if (b.calculateheight) { for (h = 0, j = 0, m || (c.container.style.height = ""), m.style.height = "", l = 0; l < c.slides.length; l++) c.slides[l].style.height = "", h = math.max(c.slides[l].getheight(!0), h), m || (j += c.slides[l].getheight(!0)); g = h, c.height = g, m ? j = g : (i = g, c.container.style.height = i + "px") } else g = m ? c.height : c.height / b.slidesperview, b.roundlengths && (g = math.ceil(g)), j = m ? c.height : c.slides.length * g; for (f = m ? c.width / b.slidesperview : c.width, b.roundlengths && (f = math.ceil(f)), i = m ? c.slides.length * f : c.width, e = m ? f : g, b.offsetslidesbefore > 0 && (m ? c.wrapperleft = e * b.offsetslidesbefore : c.wrappertop = e * b.offsetslidesbefore), b.offsetslidesafter > 0 && (m ? c.wrapperright = e * b.offsetslidesafter : c.wrapperbottom = e * b.offsetslidesafter), b.offsetpxbefore > 0 && (m ? c.wrapperleft = b.offsetpxbefore : c.wrappertop = b.offsetpxbefore), b.offsetpxafter > 0 && (m ? c.wrapperright = b.offsetpxafter : c.wrapperbottom = b.offsetpxafter), b.centeredslides && (m ? (c.wrapperleft = (i - e) / 2, c.wrapperright = (i - e) / 2) : (c.wrappertop = (i - e) / 2, c.wrapperbottom = (i - e) / 2)), m ? (c.wrapperleft > 0 && (m.style.paddingleft = c.wrapperleft + "px"), c.wrapperright > 0 && (m.style.paddingright = c.wrapperright + "px")) : (c.wrappertop > 0 && (m.style.paddingtop = c.wrappertop + "px"), c.wrapperbottom > 0 && (m.style.paddingbottom = c.wrapperbottom + "px")), f = m ? i + c.wrapperright + c.wrapperleft : j + c.wrappertop + c.wrapperbottom, parsefloat(i) > 0 && (!b.csswidthandheight || "height" === b.csswidthandheight) && (m.style.width = i + "px"), parsefloat(j) > 0 && (!b.csswidthandheight || "width" === b.csswidthandheight) && (m.style.height = j + "px"), k = 0, c.snapgrid = [], c.slidesgrid = [], l = 0; l < c.slides.length; l++) c.snapgrid.push(k), c.slidesgrid.push(k), k += e, parsefloat(f) > 0 && (!b.csswidthandheight || "height" === b.csswidthandheight) && (c.slides[l].style.width = f + "px"), parsefloat(g) > 0 && (!b.csswidthandheight || "width" === b.csswidthandheight) && (c.slides[l].style.height = g + "px") } c.initialized ? (c.callplugins("oninit"), b.oninit && c.firecallback(b.oninit, c)) : (c.callplugins("onfirstinit"), b.onfirstinit && c.firecallback(b.onfirstinit, c)), c.initialized = !0 } }, c.reinit = function (a) { c.init(!0, a) }, c.resizefix = function (a) { c.callplugins("beforeresizefix"), c.init(b.resizereinit || a), b.freemode ? c.getwrappertranslate() < -e() && (c.setwrappertransition(0), c.setwrappertranslate(-e())) : (c.swipeto(b.loop ? c.activeloopindex : c.activeindex, 0, !1), b.autoplay && (c.support.transitions && "undefined" != typeof _ ? "undefined" != typeof _ && (cleartimeout(_), _ = void 0, c.startautoplay()) : "undefined" != typeof ab && (clearinterval(ab), ab = void 0, c.startautoplay()))), c.callplugins("afterresizefix") }, c.destroy = function () { var a = c.h.removeeventlistener, c = "wrapper" === b.eventtarget ? c.wrapper : c.container; c.browser.ie10 || c.browser.ie11 ? (a(c, c.touchevents.touchstart, p), a(document, c.touchevents.touchmove, q), a(document, c.touchevents.touchend, r)) : (c.support.touch && (a(c, "touchstart", p), a(c, "touchmove", q), a(c, "touchend", r)), b.simulatetouch && (a(c, "mousedown", p), a(document, "mousemove", q), a(document, "mouseup", r))), b.autoresize && a(window, "resize", c.resizefix), h(), b.paginationclickable && w(), b.mousewheelcontrol && c._wheelevent && a(c.container, c._wheelevent, j), b.keyboardcontrol && a(document, "keydown", i), b.autoplay && c.stopautoplay(), c.callplugins("ondestroy"), c = null }, c.disablekeyboardcontrol = function () { b.keyboardcontrol = !1, c.h.removeeventlistener(document, "keydown", i) }, c.enablekeyboardcontrol = function () { b.keyboardcontrol = !0, c.h.addeventlistener(document, "keydown", i) }; var u = (new date).gettime(); if (c.disablemousewheelcontrol = function () { return c._wheelevent ? (b.mousewheelcontrol = !1, c.h.removeeventlistener(c.container, c._wheelevent, j), !0) : !1 }, c.enablemousewheelcontrol = function () { return c._wheelevent ? (b.mousewheelcontrol = !0, c.h.addeventlistener(c.container, c._wheelevent, j), !0) : !1 }, b.grabcursor) { var v = c.container.style; v.cursor = "move", v.cursor = "grab", v.cursor = "-moz-grab", v.cursor = "-webkit-grab" } c.allowslideclick = !0, c.allowlinks = !0; var w, x, y, z = !1, $ = !0; c.swipenext = function (a) { !a && b.loop && c.fixloop(), !a && b.autoplay && c.stopautoplay(!0), c.callplugins("onswipenext"); var c = c.getwrappertranslate(), d = c; if ("auto" === b.slidesperview) { for (var f = 0; f < c.snapgrid.length; f++) if (-c >= c.snapgrid[f] && -c < c.snapgrid[f + 1]) { d = -c.snapgrid[f + 1]; break } } else { var g = e * b.slidespergroup; d = -(math.floor(math.abs(c) / math.floor(g)) * g + g) } return d < -e() && (d = -e()), d === c ? !1 : (u(d, "next"), !0) }, c.swipeprev = function (a) { !a && b.loop && c.fixloop(), !a && b.autoplay && c.stopautoplay(!0), c.callplugins("onswipeprev"); var c, d = math.ceil(c.getwrappertranslate()); if ("auto" === b.slidesperview) { c = 0; for (var e = 1; e < c.snapgrid.length; e++) { if (-d === c.snapgrid[e]) { c = -c.snapgrid[e - 1]; break } if (-d > c.snapgrid[e] && -d < c.snapgrid[e + 1]) { c = -c.snapgrid[e]; break } } } else { var f = e * b.slidespergroup; c = -(math.ceil(-d / f) - 1) * f } return c > 0 && (c = 0), c === d ? !1 : (u(c, "prev"), !0) }, c.swipereset = function () { c.callplugins("onswipereset"); { var a, c = c.getwrappertranslate(), d = e * b.slidespergroup; -e() } if ("auto" === b.slidesperview) { a = 0; for (var f = 0; f < c.snapgrid.length; f++) { if (-c === c.snapgrid[f]) return; if (-c >= c.snapgrid[f] && -c < c.snapgrid[f + 1]) { a = c.positions.diff > 0 ? -c.snapgrid[f + 1] : -c.snapgrid[f]; break } } -c >= c.snapgrid[c.snapgrid.length - 1] && (a = -c.snapgrid[c.snapgrid.length - 1]), c <= -e() && (a = -e()) } else a = 0 > c ? math.round(c / d) * d : 0, c <= -e() && (a = -e()); return b.scrollcontainer && (a = 0 > c ? c : 0), a < -e() && (a = -e()), b.scrollcontainer && i > e && (a = 0), a === c ? !1 : (u(a, "reset"), !0) }, c.swipeto = function (a, c, d) { a = parseint(a, 10), c.callplugins("onswipeto", {index: a, speed: c}), b.loop && (a += c.loopedslides); var f = c.getwrappertranslate(); if (!(a > c.slides.length - 1 || 0 > a)) { var g; return g = "auto" === b.slidesperview ? -c.slidesgrid[a] : -a * e, g < -e() && (g = -e()), g === f ? !1 : (d = d === !1 ? !1 : !0, u(g, "to", { index: a, speed: c, runcallbacks: d }), !0) } }, c._queuestartcallbacks = !1, c._queueendcallbacks = !1, c.updateactiveslide = function (a) { if (c.initialized && 0 !== c.slides.length) { c.previousindex = c.activeindex, "undefined" == typeof a && (a = c.getwrappertranslate()), a > 0 && (a = 0); var c; if ("auto" === b.slidesperview) { if (c.activeindex = c.slidesgrid.indexof(-a), c.activeindex < 0) { for (c = 0; c < c.slidesgrid.length - 1 && !(-a > c.slidesgrid[c] && -a < c.slidesgrid[c + 1]); c++) ; var d = math.abs(c.slidesgrid[c] + a), e = math.abs(c.slidesgrid[c + 1] + a); c.activeindex = e >= d ? c : c + 1 } } else c.activeindex = math[b.visibilityfullfit ? "ceil" : "round"](-a / e); if (c.activeindex === c.slides.length && (c.activeindex = c.slides.length - 1), c.activeindex < 0 && (c.activeindex = 0), c.slides[c.activeindex]) { if (c.calcvisibleslides(a), c.support.classlist) { var f; for (c = 0; c < c.slides.length; c++) f = c.slides[c], f.classlist.remove(b.slideactiveclass), c.visibleslides.indexof(f) >= 0 ? f.classlist.add(b.slidevisibleclass) : f.classlist.remove(b.slidevisibleclass); c.slides[c.activeindex].classlist.add(b.slideactiveclass) } else { var g = new regexp("\\s*" + b.slideactiveclass), h = new regexp("\\s*" + b.slidevisibleclass); for (c = 0; c < c.slides.length; c++) c.slides[c].classname = c.slides[c].classname.replace(g, "").replace(h, ""), c.visibleslides.indexof(c.slides[c]) >= 0 && (c.slides[c].classname += " " + b.slidevisibleclass); c.slides[c.activeindex].classname += " " + b.slideactiveclass } if (b.loop) { var i = c.loopedslides; c.activeloopindex = c.activeindex - i, c.activeloopindex >= c.slides.length - 2 * i && (c.activeloopindex = c.slides.length - 2 * i - c.activeloopindex), c.activeloopindex < 0 && (c.activeloopindex = c.slides.length - 2 * i + c.activeloopindex), c.activeloopindex < 0 && (c.activeloopindex = 0) } else c.activeloopindex = c.activeindex; b.pagination && c.updatepagination(a) } } }, c.createpagination = function (a) { if (b.paginationclickable && c.paginationbuttons && w(), c.paginationcontainer = b.pagination.nodetype ? b.pagination : c(b.pagination)[0], b.createpagination) { var d = "", e = c.slides.length, f = e; b.loop && (f -= 2 * c.loopedslides); for (var g = 0; f > g; g++) d += "<" + b.paginationelement + ' class="' + b.paginationelementclass + '">"; c.paginationcontainer.innerhtml = d } c.paginationbuttons = c("." + b.paginationelementclass, c.paginationcontainer), a || c.updatepagination(), c.callplugins("oncreatepagination"), b.paginationclickable && x() }, c.updatepagination = function (a) { if (b.pagination && !(c.slides.length < 1)) { var d = c("." + b.paginationactiveclass, c.paginationcontainer); if (d) { var e = c.paginationbuttons; if (0 !== e.length) { for (var f = 0; f < e.length; f++) e[f].classname = b.paginationelementclass; var g = b.loop ? c.loopedslides : 0; if (b.paginationasrange) { c.visibleslides || c.calcvisibleslides(a); var h, i = []; for (h = 0; h < c.visibleslides.length; h++) { var j = c.slides.indexof(c.visibleslides[h]) - g; b.loop && 0 > j && (j = c.slides.length - 2 * c.loopedslides + j), b.loop && j >= c.slides.length - 2 * c.loopedslides && (j = c.slides.length - 2 * c.loopedslides - j, j = math.abs(j)), i.push(j) } for (h = 0; h < i.length; h++) e[i[h]] && (e[i[h]].classname += " " + b.paginationvisibleclass); b.loop ? void 0 !== e[c.activeloopindex] && (e[c.activeloopindex].classname += " " + b.paginationactiveclass) : e[c.activeindex].classname += " " + b.paginationactiveclass } else b.loop ? e[c.activeloopindex] && (e[c.activeloopindex].classname += " " + b.paginationactiveclass + " " + b.paginationvisibleclass) : e[c.activeindex].classname += " " + b.paginationactiveclass + " " + b.paginationvisibleclass } } } }, c.calcvisibleslides = function (a) { var c = [], d = 0, e = 0, f = 0; m && c.wrapperleft > 0 && (a += c.wrapperleft), !m && c.wrappertop > 0 && (a += c.wrappertop); for (var g = 0; g < c.slides.length; g++) { d += e, e = "auto" === b.slidesperview ? m ? c.h.getwidth(c.slides[g], !0, b.roundlengths) : c.h.getheight(c.slides[g], !0, b.roundlengths) : e, f = d + e; var h = !1; b.visibilityfullfit ? (d >= -a && -a + i >= f && (h = !0), -a >= d && f >= -a + i && (h = !0)) : (f > -a && -a + i >= f && (h = !0), d >= -a && -a + i > d && (h = !0), -a > d && f > -a + i && (h = !0)), h && c.push(c.slides[g]) } 0 === c.length && (c = [c.slides[c.activeindex]]), c.visibleslides = c }; var _, ab; c.startautoplay = function () { if (c.support.transitions) { if ("undefined" != typeof _) return !1; if (!b.autoplay) return; c.callplugins("onautoplaystart"), b.onautoplaystart && c.firecallback(b.onautoplaystart, c), z() } else { if ("undefined" != typeof ab) return !1; if (!b.autoplay) return; c.callplugins("onautoplaystart"), b.onautoplaystart && c.firecallback(b.onautoplaystart, c), ab = setinterval(function () { b.loop ? (c.fixloop(), c.swipenext(!0)) : c.swipenext(!0) || (b.autoplaystoponlast ? (clearinterval(ab), ab = void 0) : c.swipeto(0)) }, b.autoplay) } }, c.stopautoplay = function (a) { if (c.support.transitions) { if (!_) return; _ && cleartimeout(_), _ = void 0, a && !b.autoplaydisableoninteraction && c.wrappertransitionend(function () { z() }), c.callplugins("onautoplaystop"), b.onautoplaystop && c.firecallback(b.onautoplaystop, c) } else ab && clearinterval(ab), ab = void 0, c.callplugins("onautoplaystop"), b.onautoplaystop && c.firecallback(b.onautoplaystop, c) }, c.loopcreated = !1, c.removeloopedslides = function () { if (c.loopcreated) for (var a = 0; a < c.slides.length; a++) c.slides[a].getdata("looped") === !0 && c.wrapper.removechild(c.slides[a]) }, c.createloop = function () { if (0 !== c.slides.length) { c.loopedslides = "auto" === b.slidesperview ? b.loopedslides || 1 : b.slidesperview + b.loopadditionalslides, c.loopedslides > c.slides.length && (c.loopedslides = c.slides.length); var a, c = "", d = "", e = "", f = c.slides.length, g = math.floor(c.loopedslides / f), h = c.loopedslides % f; for (a = 0; g * f > a; a++) { var i = a; if (a >= f) { var j = math.floor(a / f); i = a - f * j } e += c.slides[i].outerhtml } for (a = 0; h > a; a++) d += t(b.slideduplicateclass, c.slides[a].outerhtml); for (a = f - h; f > a; a++) c += t(b.slideduplicateclass, c.slides[a].outerhtml); var k = c + e + d.innerhtml + e + d; for (d.innerhtml = k, c.loopcreated = !0, c.calcslides(), a = 0; a < c.slides.length; a++) (a < c.loopedslides || a >= c.slides.length - c.loopedslides) && c.slides[a].setdata("looped", !0); c.callplugins("oncreateloop") } }, c.fixloop = function () { var a; c.activeindex < c.loopedslides ? (a = c.slides.length - 3 * c.loopedslides + c.activeindex, c.swipeto(a, 0, !1)) : ("auto" === b.slidesperview && c.activeindex >= 2 * c.loopedslides || c.activeindex > c.slides.length - 2 * b.slidesperview) && (a = -c.slides.length + c.activeindex + c.loopedslides, c.swipeto(a, 0, !1)) }, c.loadslides = function () { var a = ""; c.activeloaderindex = 0; for (var c = b.loader.slides, d = b.loader.loadallslides ? c.length : b.slidesperview * (1 + b.loader.surroundgroups), e = 0; d > e; e++) a += "outer" === b.loader.slideshtmltype ? c[e] : "<" + b.slideelement + ' class="' + b.slideclass + '" data-swiperindex="' + e + '">' + c[e] + ""; c.wrapper.innerhtml = a, c.calcslides(!0), b.loader.loadallslides || c.wrappertransitionend(c.reloadslides, !0) }, c.reloadslides = function () { var a = b.loader.slides, c = parseint(c.activeslide().data("swiperindex"), 10); if (!(0 > c || c > a.length - 1)) { c.activeloaderindex = c; var d = math.max(0, c - b.slidesperview * b.loader.surroundgroups), e = math.min(c + b.slidesperview * (1 + b.loader.surroundgroups) - 1, a.length - 1); if (c > 0) { var f = -e * (c - d); c.setwrappertranslate(f), c.setwrappertransition(0) } var g; if ("reload" === b.loader.logic) { c.wrapper.innerhtml = ""; var h = ""; for (g = d; e >= g; g++) h += "outer" === b.loader.slideshtmltype ? a[g] : "<" + b.slideelement + ' class="' + b.slideclass + '" data-swiperindex="' + g + '">' + a[g] + ""; c.wrapper.innerhtml = h } else { var i = 1e3, j = 0; for (g = 0; g < c.slides.length; g++) { var k = c.slides[g].data("swiperindex"); d > k || k > e ? c.wrapper.removechild(c.slides[g]) : (i = math.min(k, i), j = math.max(k, j)) } for (g = d; e >= g; g++) { var l; i > g && (l = document.createelement(b.slideelement), l.classname = b.slideclass, l.setattribute("data-swiperindex", g), l.innerhtml = a[g], c.wrapper.insertbefore(l, c.wrapper.firstchild)), g > j && (l = document.createelement(b.slideelement), l.classname = b.slideclass, l.setattribute("data-swiperindex", g), l.innerhtml = a[g], c.wrapper.appendchild(l)) } } c.reinit(!0) } }, a() } }; swiper.prototype = { plugins: {}, wrappertransitionend: function (a, b) { "use strict"; function c(h) { if (h.target === f && (a(e), e.params.queueendcallbacks && (e._queueendcallbacks = !1), !b)) for (d = 0; d < g.length; d++) e.h.removeeventlistener(f, g[d], c) } var d, e = this, f = e.wrapper, g = ["webkittransitionend", "transitionend", "otransitionend", "mstransitionend", "mstransitionend"]; if (a) for (d = 0; d < g.length; d++) e.h.addeventlistener(f, g[d], c) }, getwrappertranslate: function (a) { "use strict"; var b, c, d, e, f = this.wrapper; return "undefined" == typeof a && (a = "horizontal" === this.params.mode ? "x" : "y"), this.support.transforms && this.params.usecss3transforms ? (d = window.getcomputedstyle(f, null), window.webkitcssmatrix ? e = new webkitcssmatrix("none" === d.webkittransform ? "" : d.webkittransform) : (e = d.moztransform || d.otransform || d.mstransform || d.mstransform || d.transform || d.getpropertyvalue("transform").replace("translate(", "matrix(1, 0, 0, 1,"), b = e.tostring().split(",")), "x" === a && (c = window.webkitcssmatrix ? e.m41 : parsefloat(16 === b.length ? b[12] : b[4])), "y" === a && (c = window.webkitcssmatrix ? e.m42 : parsefloat(16 === b.length ? b[13] : b[5]))) : ("x" === a && (c = parsefloat(f.style.left, 10) || 0), "y" === a && (c = parsefloat(f.style.top, 10) || 0)), c || 0 }, setwrappertranslate: function (a, b, c) { "use strict"; var d, e = this.wrapper.style, f = {x: 0, y: 0, z: 0}; 3 === arguments.length ? (f.x = a, f.y = b, f.z = c) : ("undefined" == typeof b && (b = "horizontal" === this.params.mode ? "x" : "y"), f[b] = a), this.support.transforms && this.params.usecss3transforms ? (d = this.support.transforms3d ? "translate3d(" + f.x + "px, " + f.y + "px, " + f.z + "px)" : "translate(" + f.x + "px, " + f.y + "px)", e.webkittransform = e.mstransform = e.mstransform = e.moztransform = e.otransform = e.transform = d) : (e.left = f.x + "px", e.top = f.y + "px"), this.callplugins("onsetwrappertransform", f), this.params.onsetwrappertransform && this.firecallback(this.params.onsetwrappertransform, this, f) }, setwrappertransition: function (a) { "use strict"; var b = this.wrapper.style; b.webkittransitionduration = b.mstransitionduration = b.mstransitionduration = b.moztransitionduration = b.otransitionduration = b.transitionduration = a / 1e3 + "s", this.callplugins("onsetwrappertransition", {duration: a}), this.params.onsetwrappertransition && this.firecallback(this.params.onsetwrappertransition, this, a) }, h: { getwidth: function (a, b, c) { "use strict"; var d = window.getcomputedstyle(a, null).getpropertyvalue("width"), e = parsefloat(d); return (isnan(e) || d.indexof("%") > 0 || 0 > e) && (e = a.offsetwidth - parsefloat(window.getcomputedstyle(a, null).getpropertyvalue("padding-left")) - parsefloat(window.getcomputedstyle(a, null).getpropertyvalue("padding-right"))), b && (e += parsefloat(window.getcomputedstyle(a, null).getpropertyvalue("padding-left")) + parsefloat(window.getcomputedstyle(a, null).getpropertyvalue("padding-right"))), c ? math.ceil(e) : e }, getheight: function (a, b, c) { "use strict"; if (b) return a.offsetheight; var d = window.getcomputedstyle(a, null).getpropertyvalue("height"), e = parsefloat(d); return (isnan(e) || d.indexof("%") > 0 || 0 > e) && (e = a.offsetheight - parsefloat(window.getcomputedstyle(a, null).getpropertyvalue("padding-top")) - parsefloat(window.getcomputedstyle(a, null).getpropertyvalue("padding-bottom"))), b && (e += parsefloat(window.getcomputedstyle(a, null).getpropertyvalue("padding-top")) + parsefloat(window.getcomputedstyle(a, null).getpropertyvalue("padding-bottom"))), c ? math.ceil(e) : e }, getoffset: function (a) { "use strict"; var b = a.getboundingclientrect(), c = document.body, d = a.clienttop || c.clienttop || 0, e = a.clientleft || c.clientleft || 0, f = window.pageyoffset || a.scrolltop, g = window.pagexoffset || a.scrollleft; return document.documentelement && !window.pageyoffset && (f = document.documentelement.scrolltop, g = document.documentelement.scrollleft), { top: b.top + f - d, left: b.left + g - e } }, windowwidth: function () { "use strict"; return window.innerwidth ? window.innerwidth : document.documentelement && document.documentelement.clientwidth ? document.documentelement.clientwidth : void 0 }, windowheight: function () { "use strict"; return window.innerheight ? window.innerheight : document.documentelement && document.documentelement.clientheight ? document.documentelement.clientheight : void 0 }, windowscroll: function () { "use strict"; return "undefined" != typeof pageyoffset ? { left: window.pagexoffset, top: window.pageyoffset } : document.documentelement ? { left: document.documentelement.scrollleft, top: document.documentelement.scrolltop } : void 0 }, addeventlistener: function (a, b, c, d) { "use strict"; "undefined" == typeof d && (d = !1), a.addeventlistener ? a.addeventlistener(b, c, d) : a.attachevent && a.attachevent("on" + b, c) }, removeeventlistener: function (a, b, c, d) { "use strict"; "undefined" == typeof d && (d = !1), a.removeeventlistener ? a.removeeventlistener(b, c, d) : a.detachevent && a.detachevent("on" + b, c) } }, settransform: function (a, b) { "use strict"; var c = a.style; c.webkittransform = c.mstransform = c.mstransform = c.moztransform = c.otransform = c.transform = b }, settranslate: function (a, b) { "use strict"; var c = a.style, d = {x: b.x || 0, y: b.y || 0, z: b.z || 0}, e = this.support.transforms3d ? "translate3d(" + d.x + "px," + d.y + "px," + d.z + "px)" : "translate(" + d.x + "px," + d.y + "px)"; c.webkittransform = c.mstransform = c.mstransform = c.moztransform = c.otransform = c.transform = e, this.support.transforms || (c.left = d.x + "px", c.top = d.y + "px") }, settransition: function (a, b) { "use strict"; var c = a.style; c.webkittransitionduration = c.mstransitionduration = c.mstransitionduration = c.moztransitionduration = c.otransitionduration = c.transitionduration = b + "ms" }, support: { touch: window.modernizr && modernizr.touch === !0 || function () { "use strict"; return !!("ontouchstart" in window || window.documenttouch && document instanceof documenttouch) }(), transforms3d: window.modernizr && modernizr.csstransforms3d === !0 || function () { "use strict"; var a = document.createelement("div").style; return "webkitperspective" in a || "mozperspective" in a || "operspective" in a || "msperspective" in a || "perspective" in a }(), transforms: window.modernizr && modernizr.csstransforms === !0 || function () { "use strict"; var a = document.createelement("div").style; return "transform" in a || "webkittransform" in a || "moztransform" in a || "mstransform" in a || "mstransform" in a || "otransform" in a }(), transitions: window.modernizr && modernizr.csstransitions === !0 || function () { "use strict"; var a = document.createelement("div").style; return "transition" in a || "webkittransition" in a || "moztransition" in a || "mstransition" in a || "mstransition" in a || "otransition" in a }(), classlist: function () { "use strict"; var a = document.createelement("div"); return "classlist" in a }() }, browser: { ie8: function () { "use strict"; var a = -1; if ("microsoft internet explorer" === navigator.appname) { var b = navigator.useragent, c = new regexp(/msie ([0-9]{1,}[\.0-9]{0,})/); null !== c.exec(b) && (a = parsefloat(regexp.$1)) } return -1 !== a && 9 > a }(), ie10: window.navigator.mspointerenabled, ie11: window.navigator.pointerenabled } }, (window.jquery || window.zepto) && !function (a) { "use strict"; a.fn.swiper = function (b) { var c; return this.each(function (d) { var e = a(this); if (!e.data("swiper")) { var f = new swiper(e[0], b); d || (c = f), e.data("swiper", f) } }), c } }(window.jquery || window.zepto), "undefined" != typeof module && (module.exports = swiper), "function" == typeof define && define.amd && define([], function () { "use strict"; return swiper });