function rem(e) { var t = $("
"); t.css({ position: "absolute", left: -9999, top: e + "rem" }), t.appendto("body"); var n = t.position().top; return t.remove(), n } function issmalldevice() { return $(window).width() < 1200 } function display(e) { var t = this; t.canvas = e, t.context = void 0, t.framerate = 30, t.numframes = 0, t.paused = !0, t.nextredraw = 0, t.scale = 1, t.listeners = {}, t.draw = { continuous: !1, info: !1 }, t.info = { fps: 0, lastframetime: 0, runningframetime: 0 }, t.frames_for_menu_to_ramin_visible = 3 * t.framerate, t.triggered_initial_mouseover = !1, t.logo = {}, t.init = function() { return t.canvas.getcontext ? (t.context = t.canvas.getcontext("2d"), t.context.scale(t.scale, t.scale), t.calculate_scale(), t.canvas.onmousedown = function(e) { return t.fireevent("mousedown", e), !1 }, t.canvas.onmouseup = function(e) { return t.fireevent("mouseup", e), !1 }, t.canvas.onmouseover = function(e) { t.fireevent("mouseover", e) }, t.canvas.onmousemove = function(e) { t.fireevent("mousemove", e) }, window.requestanimframe = window.requestanimationframe || window.webkitrequestanimationframe || window.mozrequestanimationframe || window.orequestanimationframe || window.msrequestanimationframe, t.addlistener("draw", t), t.addlistener("afterdraw", t), t.addlistener("newframe", t), t.main(), void t.setupstats()) : void t.error("no context") }, t.calculate_scale = function() { t.width = t.canvas.width / t.scale, t.height = t.canvas.height / t.scale }, t.addlistener = function(e, n) { t.listeners[e] || (t.listeners[e] = []), t.listeners[e].push(n) }, t.fireevent = function(e, n) { if (t.listeners[e] && t.listeners[e].length > 0) for (var i = "on" + e.substr(0, 1).touppercase() + e.substr(1), o = 0; o < t.listeners[e].length; o++) t.listeners[e][o][i] && t.listeners[e][o][i].call(t.listeners[e][o], n, t) }, t.main = function() { t.paused || t.nextframe(), window.requestanimframe ? window.requestanimframe(function() { t.main() }) : t.nextredraw = settimeout(function() { t.main() }, 1e3 / t.framerate) }, t.nextframe = function() { t.fireevent("newframe"), t.fireevent("beforeupdate"), t.fireevent("update"), t.fireevent("afterupdate"), t.fireevent("beforedraw"), t.fireevent("draw"), t.fireevent("afterdraw") }, t.error = function(e) { t.fireevent("error", { text: e }) }, t.getfps = function() { return (1e3 / t.info.runningframetime).tofixed(1) }, t.ondraw = function() { t.tick() }, t.onafterdraw = function() { t.draw.info && this.stats.end() }, t.drawstats = function() {}, t.onnewframe = function() { if (t.draw.info && this.stats.begin(), t.numframes > t.frames_for_menu_to_ramin_visible && !t.triggered_initial_mouseover) { var e = $.event("mousemove"); t.canvas.onmousemove(e), t.triggered_initial_mouseover = !0 } t.draw.continuous || t.clear() }, t.drawline = function(e, n) { t.context.beginpath(), t.context.moveto(e.x, e.y), t.context.lineto(n.x, n.y), t.context.stroke() }, t.drawtext = function(e, n, i) { t.context.filltext(e, n.x, n.y, i) }, t.drawcircle = function(e, n) { t.context.beginpath(), t.context.arc(e.x, e.y, n, 0, 2 * math.pi), t.context.closepath(), t.context.fill() }, t.fillstyle = function(e) { t.context.fillstyle = e }, t.strokestyle = function(e) { t.context.strokestyle = e }, t.tick = function() { if (t.numframes++, t.info.lastframetime) { var e = (new date).gettime(), n = e - t.info.lastframetime; t.info.runningframetime = .8 * t.info.runningframetime + .2 * n, t.info.lastframetime = e } else t.info.lastframetime = (new date).gettime() }, t.setupstats = function() { return t.draw.info ? (this.stats = new stats, this.stats.domelement.style.position = "absolute", this.stats.domelement.style.bottom = "0px", this.stats.domelement.style.right = "0px", void document.body.appendchild(this.stats.domelement)) : !1 }, t.clear = function() { t.context.clearrect(0, 0, t.width, t.height) }, t.start = function() { t.paused = !1 }, t.stop = function() { t.paused = !0 }, t.togglepause = function() { t.paused = !t.paused }, t.unpause = t.start, t.pause = t.stop, t.step = function() { t.stop(), t.nextframe() }, t.drawconsensyslogo = function() { var e = t.canvas.width / 2 - t.consensys_logo.width / 2, n = t.canvas.height / 2 - t.consensys_logo.height / 2; t.context.drawimage(t.consensys_logo, e, n, 150, 150) } } function particle(e, t) { this.position = e, this.velocity = t, this.acceleration = new vector(0, 0), this.ttl = -1, this.lived = 0, this.isfixed = 0, this.fillstyle = "rgba(255,255,255,0.6)", //闄堝織鍚� this.radius = 1 + 2 * math.random(), this.connects = 0, this.radius >= 2.5 && (this.connects = 1), this.radius < 2.5 && (this.fillstyle = "#abd1ff", this.ttl = 1), this.radius = 2 } function particleemitter(e, t) { this.position = e, this.velocity = t, this.size = 8, this.particlelife = -1, this.spread = .3, this.emissionrate = .08, this.moveto = function(e) { this.position = e }, this.addparticle = function() { var e = new particle(this.position.copy(), vector.fromangle(this.velocity.getangle() + this.spread - math.random() * this.spread * 2, this.velocity.getmagnitude())); return e }, this.tostring = function() { var e = [this.position.tostring(), this.velocity.tostring(), this.size, this.particlelife, this.spread.tofixed(2), this.emissionrate]; return "e" + e.join(":") } } function particlesystem() { var e = this; e.display = null, e.maxparticles = 400, e.starttime = 0, e.draw = { objects: !1, accelerations: !1, velocities: !1, particles: !0 }, e.particles = [], e.emitters = [], e.fields = [], e.listeners = {}, e.elapsed = 0, e.lastemitter = 0, e.mousecoords = new point(0, 0), e.mousefieldstrength = -140, e.mousefield, e.lines = { enabled: !0, min_particle_life: 0 }, e.mindist = 60, e.thresholddist = 0, e.maxlines = 20, e.bounds_threshold = 30, e.buttons = null, e.menu_particles = [], e.init = function(t) { return e.display = t, t.addlistener("draw", e), t.addlistener("afterdraw", e), t.addlistener("beforeupdate", e), t.addlistener("update", e), t.addlistener("mouseup", e), t.addlistener("mousedown", e), t.addlistener("mousemove", e), e }, e.addlistener = function(t, n) { e.listeners[t] || (e.listeners[t] = []), e.listeners[t].push(n) }, e.fireevent = function(t, n) { if (e.listeners[t] && e.listeners[t].length > 0) for (var i = "on" + t.substr(0, 1).touppercase() + t.substr(1), o = 0; o < e.listeners[t].length; o++) e.listeners[t][o][i] && e.listeners[t][o][i].call(e.listeners[t][o], n, e) }, e.addemitter = function(t, n) { var i = new particleemitter(t, n); e.emitters.push(i), e.fireevent("newobject", { particletarget: i }) }, e.removeemitter = function(t) { typeof t.constructor !== number && (t = e.emitters.indexof(t)); var n = e.emitters.splice(t, 1); n && e.fireevent("deleteobject", { particletarget: n }) }, e.addfield = function(t, n) { var i = new field(t, n); e.fields.push(i), e.fireevent("newobject", { particletarget: i }) }, e.removefield = function(t) { typeof t.constructor !== number && (t = e.fields.indexof(t)); var n = e.fields.splice(t, 1); n && e.fireevent("deleteobject", { particletarget: n }) }, e.onbeforeupdate = function(t, n) { e.draw.accelerations && e.drawaccelerations(n), e.draw.velocities && e.drawvelocities(n) }, e.onupdate = function(t, n) { e.elapsed++, e.addnewparticles(), e.plotparticles(n) }, e.ondraw = function(t, n) { e.draw.particles && e.drawparticles(n), e.draw.objects && (e.drawfields(n), e.drawemitters(n)) }, e.onafterdraw = function(e, t) { t.draw.info }, e.onmousedown = function(t) { var n = e.getobjectatpoint(e.mousecoords); e.selected && (t.particletarget = e.selected, e.fireevent("objectblur", t), e.selected = void 0), n ? (e.clicked = n, t.particletarget = n, e.fireevent("objectmousedown")) : (e.mousefield = new field(e.mousecoords, e.mousefieldstrength), e.mousefield.size = 0, e.fields.push(e.mousefield)) }, e.onmouseup = function(t) { var n = e.getobjectatpoint(e.mousecoords); e.mousefield ? (e.removefield(e.mousefield), e.mousefield = void 0) : e.clicked && (t.particletarget = e.clicked, n === e.clicked && (e.clicked.moved ? e.fireevent("objectfinishmove", t) : (e.selected = e.clicked, e.fireevent("objectclick", t), e.fireevent("objectfocus", t)), delete e.clicked.moved, e.clicked = void 0)) }, e.onmousemove = function(t, n) { if (e.mousecoords = new point(t.offsetx || t.layerx - n.canvas.offsetleft, t.offsety || t.layery - n.canvas.offsettop), e.mousefield) e.mousefield.moveto(e.mousecoords); else if (e.clicked) e.clicked.moved = !0, e.clicked.moveto(e.mousecoords); else { var i = e.getobjectatpoint(e.mousecoords); e.objectmouseover !== i && (e.objectmouseover ? (t.particletarget = e.objectmouseover, e.fireevent("objectmouseout", t), e.objectmouseover = void 0) : (t.particletarget = i, e.fireevent("objectmousein", t), e.objectmouseover = i)) } }, e.addnewparticles = function() { if (e.particles.length < e.maxparticles) for (var t, n = 0; t = e.emitters[n]; n++) { var i = t.emissionrate; if (1 > i) { if (!(e.display.numframes % 10 <= 10 * i)) continue; i = 1 } for (var o = 0; i > o; o++) e.particles.push(t.addparticle()) } }, e.plotparticles = function(t) { for (var n, i = e.bounds_threshold, o = t.width + i, r = t.height + i, a = e.particles, s = e.fields, l = []; n = a.pop();) { if (n.ttl > 0) { if (++n.lived >= n.ttl) continue } else n.lived++; n.isfixed || (n.submittofields(s), n.move()); var c = n.position, u = ({ x: t.canvas.width / t.scale / 2, y: t.canvas.height / t.scale / 2 }, { top: t.logo.position.top + t.logo.height / 2, left: t.logo.position.left + t.logo.width / 2 }), d = (t.logo.width - 10) / 2, p = math.pow(c.x - u.left, 2) + math.pow(c.y - u.top, 2), f = t.canvas.width / t.scale / 2; if (f * f >= p) { var h = p / (f * f); n.radius = 2 - 1 * (1 - h) } var m = math.pow(c.x - u.left, 2) + math.pow(c.y - u.top, 2) <= d * d; m || c.x < -i || c.x > o || c.y < -i || c.y > r || l.push(n) } if (e.particles = l, !e.lines.enabled) return !0; for (var g = 0; g < e.particles.length; g++) if (c = e.particles[g], c.connects && !(c.lived < e.lines.min_particle_life)) for (var v = 0, y = g + 1; y < e.particles.length && (p2 = e.particles[y], !p2.connects || p2.lived < e.lines.min_particle_life || (v += e.distance(t, c, p2), !(v >= e.maxlines))); y++); }, e.distance = function(t, n, i) { if (n.menu_particle && i.menu_particle) return 0; var o, r = n.position.x - i.position.x, a = n.position.y - i.position.y, s = t.context; if (o = math.sqrt(r * r + a * a), o <= e.mindist && o > e.thresholddist) { s.beginpath(); var l = 1.2 - o / e.mindist; return (n.anchor_particle && i.menu_particle || i.anchor_particle && n.menu_particle) && (l = 1), s.strokestyle = "rgba(255,255,255," + 0.6 + ")", //闄堝織鍚� s.moveto(n.position.x, n.position.y), s.lineto(i.position.x, i.position.y), s.stroke(), s.closepath(), 1 } return 0 }, e.drawparticles = function(t) { for (var n, i = -1; n = e.particles[++i];) n.draw(t) }, e.drawaccelerations = function(t) { t.strokestyle("white"), t.context.beginpath(); for (var n = 0, i = e.particles.length; i > n; n++) { var o = e.particles[n]; t.context.moveto(o.position.x, o.position.y), t.context.lineto(o.position.x + o.acceleration.x, o.position.y + o.acceleration.y) } t.context.stroke() }, e.drawvelocities = function(t) { t.strokestyle("blue"), t.context.beginpath(); for (var n = 0, i = e.particles.length; i > n; n++) { var o = e.particles[n]; t.context.moveto(o.position.x, o.position.y), t.context.lineto(o.position.x + o.velocity.x, o.position.y + o.velocity.y) } t.context.stroke() }, e.drawfields = function(t) { for (var n = 0, i = e.fields.length; i > n; n++) e.drawcircularobject(t, e.fields[n]) }, e.drawemitters = function(t) { for (var n = 0, i = e.emitters.length; i > n; n++) e.drawcircularobject(t, e.emitters[n]) }, e.drawcircularobject = function(e, t) { var n = t.size >> 1, i = e.context.createlineargradient(t.position.x - n, t.position.y - n, t.position.x + n, t.position.y + n); i.addcolorstop(0, t.drawcolor || t.constructor.drawcolor), i.addcolorstop(1, t.drawcolor2 || t.constructor.drawcolor2), e.fillstyle(i), e.drawcircle(t.position, n) }, e.getobjectatpoint = function(t) { for (var n = 0; n < e.emitters.length; n++) { var i = e.emitters[n]; if (t.withinbounds(i.position, i.size)) return i } for (var n = 0; n < e.fields.length; n++) { var o = e.fields[n]; if (t.withinbounds(o.position, o.size)) return o } }, e.initmenuparticles = function() { var t = { x: e.display.canvas.width / 2, y: e.display.canvas.height / 2 }, n = 160, i = new particle(new point(t.x, t.y - n), new vector(0, 0)); i.setasmenuanchortype(), i.menu_name = "vision", e.particles.push(i), e.menu_particles.push(i); var i = new particle(new point(t.x - n, t.y - n), new vector(0, 0)); i.setasmenuanchortype(), i.menu_name = "blog", e.particles.push(i), e.menu_particles.push(i); var i = new particle(new point(t.x - n, t.y), new vector(0, 0)); i.setasmenuanchortype(), i.menu_name = "mission", e.particles.push(i), e.menu_particles.push(i); var i = new particle(new point(t.x - n, t.y + n), new vector(0, 0)); i.setasmenuanchortype(), i.menu_name = "company", e.particles.push(i), e.menu_particles.push(i); var i = new particle(new point(t.x, t.y + n), new vector(0, 0)); i.setasmenuanchortype(), i.menu_name = "projects", e.particles.push(i), e.menu_particles.push(i); var i = new particle(new point(t.x + n, t.y + n), new vector(0, 0)); i.setasmenuanchortype(), i.menu_name = "team", e.particles.push(i), e.menu_particles.push(i); var i = new particle(new point(t.x + n, t.y), new vector(0, 0)); i.setasmenuanchortype(), i.menu_name = "contact", e.particles.push(i), e.menu_particles.push(i); var i = new particle(new point(t.x + n, t.y - n), new vector(0, 0)); i.setasmenuanchortype(), i.menu_name = "ethereum", e.particles.push(i), e.menu_particles.push(i) }, e.getparticlecount = function() { return e.particles.length }, e.getemittercount = function() { return e.emitters.length }, e.getfieldcount = function() { return e.fields.length }, e.tostring = function() { for (var t = 1, n = [e.maxparticles, e.draw.objects ? 1 : 0, e.draw.accelerations ? 1 : 0, e.draw.velocities ? 1 : 0, e.draw.particles ? 1 : 0], i = 0; i < e.emitters.length; i++) n.push(e.emitters[i].tostring()); for (var i = 0; i < e.fields.length; i++) n.push(e.fields[i].tostring()); return "sv" + t + "(" + n.join("|") + ")" }, e.fromstring = function(t) { var n = { sv1: e.loadstatev1 }, i = t.match(/^([^(]+)\((.*)\)$/); i && 3 == i.length && n[i[1]] && n[i[1]](i[2]) }, e.loadstatev1 = function(t) { var n = t.split("|"); e.maxparticles = parseint(n.shift()), e.draw.objects = "1" === n.shift() ? !0 : !1, e.draw.accelerations = "1" === n.shift() ? !0 : !1, e.draw.velocities = "1" === n.shift() ? !0 : !1, e.draw.particles = "1" === n.shift() ? !0 : !1, e.emitters = [], e.fields = []; for (; objectstring = n.shift();) "e" == objectstring.charat(0) ? e.emitters.push(particleemitter.fromstring(objectstring)) : e.fields.push(field.fromstring(objectstring)) } } function field(e, t) { this.position = e, this.size = 8, this.setmass(t) } function vector(e, t) { this.x = e || 0, this.y = t || 0 } function addemittersandfields(e) { var t = e.display; t.logo.width = $("#blachole").width(), t.logo.height = $("#blachole").height(), t.logo.position = $("#blachole").position(), issmalldevice() ? (e.maxparticles = math.round($(window).width() / 5), e.maxparticles > 150 && (e.maxparticles = 150), e.addemitter(new point(rem(3.2), t.canvas.height / t.scale - rem(30.1)), new vector(1, 0)), e.addemitter(new point(rem(3.2), t.canvas.height / t.scale - rem(22.1)), new vector(1, 0)), e.addemitter(new point(rem(3.2), t.canvas.height / t.scale - rem(16.5)), new vector(1, 0)), e.addemitter(new point(0, 0), new vector(.5, 1)), e.addemitter(new point(rem(3), t.canvas.height / t.scale - rem(4)), new vector(1, -.3))) : (e.maxparticles = 400, e.addemitter(new point(rem(10), rem(14)), new vector(1, .5)), e.addemitter(new point(rem(49), rem(32)), new vector(1, .5)), e.addemitter(new point(rem(9.5), rem(24)), new vector(1, .5)), e.addemitter(new point(rem(9.5), rem(32)), new vector(1, .5)), e.addemitter(new point(rem(10), rem(42)), new vector(1, .5)), e.addemitter(new point(rem(29), rem(14)), new vector(1, .5)), e.addemitter(new point(rem(10), t.canvas.height / t.scale - rem(10)), new vector(1, -.1))); var n = 1 * math.sqrt(t.canvas.width / t.scale / 2 * (t.canvas.width / t.scale / 2) + t.canvas.height / t.scale / 2 * (t.canvas.height / t.scale / 2)), i = { top: t.logo.position.top + t.logo.height / 2, left: t.logo.position.left + t.logo.width / 2 }; e.addfield(new point(i.left, i.top), 2 * n), issmalldevice() ? (e.addfield(new point(t.canvas.width / t.scale - rem(2.4), t.canvas.height / t.scale - rem(2.4)), -n / 10), e.addfield(new point(t.canvas.width / t.scale, 2 * (t.canvas.height / t.scale) / 3), -n / 10)) : (e.addfield(new point(t.canvas.width / t.scale - rem(12), t.canvas.height / t.scale - rem(12)), -n / 10), e.addfield(new point(t.canvas.width / t.scale / 2, 120), n / 5)) } void 0 === jquery.migratemute && (jquery.migratemute = !0), function(e, t, n) { function i(n) { var i = t.console; r[n] || (r[n] = !0, e.migratewarnings.push(n), i && i.warn && !e.migratemute && (i.warn("jqmigrate: " + n), e.migratetrace && i.trace && i.trace())) } function o(t, o, r, a) { if (object.defineproperty) try { return object.defineproperty(t, o, { configurable: !0, enumerable: !0, get: function() { return i(a), r }, set: function(e) { i(a), r = e } }), n } catch (s) {} e._definepropertybroken = !0, t[o] = r } var r = {}; e.migratewarnings = [], !e.migratemute && t.console && t.console.log && t.console.log("jqmigrate: logging is active"), e.migratetrace === n && (e.migratetrace = !0), e.migratereset = function() { r = {}, e.migratewarnings.length = 0 }, "backcompat" === document.compatmode && i("jquery is not compatible with quirks mode"); var a = e("", { size: 1 }).attr("size") && e.attrfn, s = e.attr, l = e.attrhooks.value && e.attrhooks.value.get || function() { return null }, c = e.attrhooks.value && e.attrhooks.value.set || function() { return n }, u = /^(?:input|button)$/i, d = /^[238]$/, p = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, f = /^(?:checked|selected)$/i; o(e, "attrfn", a || {}, "jquery.attrfn is deprecated"), e.attr = function(t, o, r, l) { var c = o.tolowercase(), h = t && t.nodetype; return l && (4 > s.length && i("jquery.fn.attr( props, pass ) is deprecated"), t && !d.test(h) && (a ? o in a : e.isfunction(e.fn[o]))) ? e(t)[o](r) : ("type" === o && r !== n && u.test(t.nodename) && t.parentnode && i("can't change the 'type' of an input or button in ie 6/7/8"), !e.attrhooks[c] && p.test(c) && (e.attrhooks[c] = { get: function(t, i) { var o, r = e.prop(t, i); return r === !0 || "boolean" != typeof r && (o = t.getattributenode(i)) && o.nodevalue !== !1 ? i.tolowercase() : n }, set: function(t, n, i) { var o; return n === !1 ? e.removeattr(t, i) : (o = e.propfix[i] || i, o in t && (t[o] = !0), t.setattribute(i, i.tolowercase())), i } }, f.test(c) && i("jquery.fn.attr('" + c + "') may use property instead of attribute")), s.call(e, t, o, r)) }, e.attrhooks.value = { get: function(e, t) { var n = (e.nodename || "").tolowercase(); return "button" === n ? l.apply(this, arguments) : ("input" !== n && "option" !== n && i("jquery.fn.attr('value') no longer gets properties"), t in e ? e.value : null) }, set: function(e, t) { var o = (e.nodename || "").tolowercase(); return "button" === o ? c.apply(this, arguments) : ("input" !== o && "option" !== o && i("jquery.fn.attr('value', val) no longer sets properties"), e.value = t, n) } }; var h, m, g = e.fn.init, v = e.parsejson, y = /^([^<]*)(<[\w\w]+>)([^>]*)$/; e.fn.init = function(t, n, o) { var r; return t && "string" == typeof t && !e.isplainobject(n) && (r = y.exec(e.trim(t))) && r[0] && ("<" !== t.charat(0) && i("$(html) html strings must start with '<' character"), r[3] && i("$(html) html text after last tag is ignored"), "#" === r[0].charat(0) && (i("html string cannot start with a '#' character"), e.error("jqmigrate: invalid selector string (xss)")), n && n.context && (n = n.context), e.parsehtml) ? g.call(this, e.parsehtml(r[2], n, !0), n, o) : g.apply(this, arguments) }, e.fn.init.prototype = e.fn, e.parsejson = function(e) { return e || null === e ? v.apply(this, arguments) : (i("jquery.parsejson requires a valid json string"), null) }, e.uamatch = function(e) { e = e.tolowercase(); var t = /(chrome)[ \/]([\w.]+)/.exec(e) || /(webkit)[ \/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e) || /(msie) ([\w.]+)/.exec(e) || 0 > e.indexof("compatible") && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e) || []; return { browser: t[1] || "", version: t[2] || "0" } }, e.browser || (h = e.uamatch(navigator.useragent), m = {}, h.browser && (m[h.browser] = !0, m.version = h.version), m.chrome ? m.webkit = !0 : m.webkit && (m.safari = !0), e.browser = m), o(e, "browser", e.browser, "jquery.browser is deprecated"), e.sub = function() { function t(e, n) { return new t.fn.init(e, n) } e.extend(!0, t, this), t.superclass = this, t.fn = t.prototype = this(), t.fn.constructor = t, t.sub = this.sub, t.fn.init = function(i, o) { return o && o instanceof e && !(o instanceof t) && (o = t(o)), e.fn.init.call(this, i, o, n) }, t.fn.init.prototype = t.fn; var n = t(document); return i("jquery.sub() is deprecated"), t }, e.ajaxsetup({ converters: { "text json": e.parsejson } }); var w = e.fn.data; e.fn.data = function(t) { var o, r, a = this[0]; return !a || "events" !== t || 1 !== arguments.length || (o = e.data(a, t), r = e._data(a, t), o !== n && o !== r || r === n) ? w.apply(this, arguments) : (i("use of jquery.fn.data('events') is deprecated"), r) }; var b = /\/(java|ecma)script/i, x = e.fn.andself || e.fn.addback; e.fn.andself = function() { return i("jquery.fn.andself() replaced by jquery.fn.addback()"), x.apply(this, arguments) }, e.clean || (e.clean = function(t, o, r, a) { o = o || document, o = !o.nodetype && o[0] || o, o = o.ownerdocument || o, i("jquery.clean() is deprecated"); var s, l, c, u, d = []; if (e.merge(d, e.buildfragment(t, o).childnodes), r) for (c = function(e) { return !e.type || b.test(e.type) ? a ? a.push(e.parentnode ? e.parentnode.removechild(e) : e) : r.appendchild(e) : n }, s = 0; null != (l = d[s]); s++) e.nodename(l, "script") && c(l) || (r.appendchild(l), l.getelementsbytagname !== n && (u = e.grep(e.merge([], l.getelementsbytagname("script")), c), d.splice.apply(d, [s + 1, 0].concat(u)), s += u.length)); return d }); var s = e.event.add, c = e.event.remove, t = e.event.trigger, e = e.fn.toggle, _ = e.fn.live, i = e.fn.die, p = "ajaxstart|ajaxstop|ajaxsend|ajaxcomplete|ajaxerror|ajaxsuccess", k = regexp("\\b(?:" + p + ")\\b"), m = /(?:^|\s)hover(\.\s+|)\b/, h = function(t) { return "string" != typeof t || e.event.special.hover ? t : (m.test(t) && i("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"), t && t.replace(m, "mouseenter$1 mouseleave$1")) }; e.event.props && "attrchange" !== e.event.props[0] && e.event.props.unshift("attrchange", "attrname", "relatednode", "srcelement"), e.event.dispatch && o(e.event, "handle", e.event.dispatch, "jquery.event.handle is undocumented and deprecated"), e.event.add = function(e, t, n, o, r) { e !== document && k.test(t) && i("ajax events should be attached to document: " + t), s.call(this, e, h(t || ""), n, o, r) }, e.event.remove = function(e, t, n, i, o) { c.call(this, e, h(t) || "", n, i, o) }, e.fn.error = function() { var e = array.prototype.slice.call(arguments, 0); return i("jquery.fn.error() is deprecated"), e.splice(0, 0, "error"), arguments.length ? this.bind.apply(this, e) : (this.triggerhandler.apply(this, e), this) }, e.fn.toggle = function(t, n) { if (!e.isfunction(t) || !e.isfunction(n)) return e.apply(this, arguments); i("jquery.fn.toggle(handler, handler...) is deprecated"); var o = arguments, r = t.guid || e.guid++, a = 0, s = function(n) { var i = (e._data(this, "lasttoggle" + t.guid) || 0) % a; return e._data(this, "lasttoggle" + t.guid, i + 1), n.preventdefault(), o[i].apply(this, arguments) || !1 }; for (s.guid = r; o.length > a;) o[a++].guid = r; return this.click(s) }, e.fn.live = function(t, n, o) { return i("jquery.fn.live() is deprecated"), _ ? _.apply(this, arguments) : (e(this.context).on(t, this.selector, n, o), this) }, e.fn.die = function(t, n) { return i("jquery.fn.die() is deprecated"), i ? i.apply(this, arguments) : (e(this.context).off(t, this.selector || "**", n), this) }, e.event.trigger = function(e, t, n, o) { return n || k.test(e) || i("global events are undocumented and deprecated"), t.call(this, e, t, n || document, o) }, e.each(p.split("|"), function(t, n) { e.event.special[n] = { setup: function() { var t = this; return t !== document && (e.event.add(document, n + "." + e.guid, function() { e.event.trigger(n, null, t, !0) }), e._data(this, n, e.guid++)), !1 }, teardown: function() { return this !== document && e.event.remove(document, n + "." + e._data(this, n)), !1 } } }) }(jquery, window), jquery.easing.jswing = jquery.easing.swing, jquery.extend(jquery.easing, { def: "easeoutquad", swing: function(e, t, n, i, o) { return jquery.easing[jquery.easing.def](e, t, n, i, o) }, easeinquad: function(e, t, n, i, o) { return i * (t /= o) * t + n }, easeoutquad: function(e, t, n, i, o) { return -i * (t /= o) * (t - 2) + n }, easeinoutquad: function(e, t, n, i, o) { return (t /= o / 2) < 1 ? i / 2 * t * t + n : -i / 2 * (--t * (t - 2) - 1) + n }, easeincubic: function(e, t, n, i, o) { return i * (t /= o) * t * t + n }, easeoutcubic: function(e, t, n, i, o) { return i * ((t = t / o - 1) * t * t + 1) + n }, easeinoutcubic: function(e, t, n, i, o) { return (t /= o / 2) < 1 ? i / 2 * t * t * t + n : i / 2 * ((t -= 2) * t * t + 2) + n }, easeinquart: function(e, t, n, i, o) { return i * (t /= o) * t * t * t + n }, easeoutquart: function(e, t, n, i, o) { return -i * ((t = t / o - 1) * t * t * t - 1) + n }, easeinoutquart: function(e, t, n, i, o) { return (t /= o / 2) < 1 ? i / 2 * t * t * t * t + n : -i / 2 * ((t -= 2) * t * t * t - 2) + n }, easeinquint: function(e, t, n, i, o) { return i * (t /= o) * t * t * t * t + n }, easeoutquint: function(e, t, n, i, o) { return i * ((t = t / o - 1) * t * t * t * t + 1) + n }, easeinoutquint: function(e, t, n, i, o) { return (t /= o / 2) < 1 ? i / 2 * t * t * t * t * t + n : i / 2 * ((t -= 2) * t * t * t * t + 2) + n }, easeinsine: function(e, t, n, i, o) { return -i * math.cos(t / o * (math.pi / 2)) + i + n }, easeoutsine: function(e, t, n, i, o) { return i * math.sin(t / o * (math.pi / 2)) + n }, easeinoutsine: function(e, t, n, i, o) { return -i / 2 * (math.cos(math.pi * t / o) - 1) + n }, easeinexpo: function(e, t, n, i, o) { return 0 == t ? n : i * math.pow(2, 10 * (t / o - 1)) + n }, easeoutexpo: function(e, t, n, i, o) { return t == o ? n + i : i * (-math.pow(2, -10 * t / o) + 1) + n }, easeinoutexpo: function(e, t, n, i, o) { return 0 == t ? n : t == o ? n + i : (t /= o / 2) < 1 ? i / 2 * math.pow(2, 10 * (t - 1)) + n : i / 2 * (-math.pow(2, -10 * --t) + 2) + n }, easeincirc: function(e, t, n, i, o) { return -i * (math.sqrt(1 - (t /= o) * t) - 1) + n }, easeoutcirc: function(e, t, n, i, o) { return i * math.sqrt(1 - (t = t / o - 1) * t) + n }, easeinoutcirc: function(e, t, n, i, o) { return (t /= o / 2) < 1 ? -i / 2 * (math.sqrt(1 - t * t) - 1) + n : i / 2 * (math.sqrt(1 - (t -= 2) * t) + 1) + n }, easeinelastic: function(e, t, n, i, o) { var r = 1.70158, a = 0, s = i; if (0 == t) return n; if (1 == (t /= o)) return n + i; if (a || (a = .3 * o), s < math.abs(i)) { s = i; var r = a / 4 } else var r = a / (2 * math.pi) * math.asin(i / s); return -(s * math.pow(2, 10 * (t -= 1)) * math.sin(2 * (t * o - r) * math.pi / a)) + n }, easeoutelastic: function(e, t, n, i, o) { var r = 1.70158, a = 0, s = i; if (0 == t) return n; if (1 == (t /= o)) return n + i; if (a || (a = .3 * o), s < math.abs(i)) { s = i; var r = a / 4 } else var r = a / (2 * math.pi) * math.asin(i / s); return s * math.pow(2, -10 * t) * math.sin(2 * (t * o - r) * math.pi / a) + i + n }, easeinoutelastic: function(e, t, n, i, o) { var r = 1.70158, a = 0, s = i; if (0 == t) return n; if (2 == (t /= o / 2)) return n + i; if (a || (a = .3 * o * 1.5), s < math.abs(i)) { s = i; var r = a / 4 } else var r = a / (2 * math.pi) * math.asin(i / s); return 1 > t ? -.5 * s * math.pow(2, 10 * (t -= 1)) * math.sin(2 * (t * o - r) * math.pi / a) + n : s * math.pow(2, -10 * (t -= 1)) * math.sin(2 * (t * o - r) * math.pi / a) * .5 + i + n }, easeinback: function(e, t, n, i, o, r) { return void 0 == r && (r = 1.70158), i * (t /= o) * t * ((r + 1) * t - r) + n }, easeoutback: function(e, t, n, i, o, r) { return void 0 == r && (r = 1.70158), i * ((t = t / o - 1) * t * ((r + 1) * t + r) + 1) + n }, easeinoutback: function(e, t, n, i, o, r) { return void 0 == r && (r = 1.70158), (t /= o / 2) < 1 ? i / 2 * t * t * (((r *= 1.525) + 1) * t - r) + n : i / 2 * ((t -= 2) * t * (((r *= 1.525) + 1) * t + r) + 2) + n }, easeinbounce: function(e, t, n, i, o) { return i - jquery.easing.easeoutbounce(e, o - t, 0, i, o) + n }, easeoutbounce: function(e, t, n, i, o) { return (t /= o) < 1 / 2.75 ? 7.5625 * i * t * t + n : 2 / 2.75 > t ? i * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + n : 2.5 / 2.75 > t ? i * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + n : i * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + n }, easeinoutbounce: function(e, t, n, i, o) { return o / 2 > t ? .5 * jquery.easing.easeinbounce(e, 2 * t, 0, i, o) + n : .5 * jquery.easing.easeoutbounce(e, 2 * t - o, 0, i, o) + .5 * i + n } }), "object" != typeof json && (json = {}), function() { "use strict"; function f(e) { return 10 > e ? "0" + e : e } function quote(e) { return escapable.lastindex = 0, escapable.test(e) ? '"' + e.replace(escapable, function(e) { var t = meta[e]; return "string" == typeof t ? t : "\\u" + ("0000" + e.charcodeat(0).tostring(16)).slice(-4) }) + '"' : '"' + e + '"' } function str(e, t) { var n, i, o, r, a, s = gap, l = t[e]; switch (l && "object" == typeof l && "function" == typeof l.tojson && (l = l.tojson(e)), "function" == typeof rep && (l = rep.call(t, e, l)), typeof l) { case "string": return quote(l); case "number": return isfinite(l) ? string(l) : "null"; case "boolean": case "null": return string(l); case "object": if (!l) return "null"; if (gap += indent, a = [], "[object array]" === object.prototype.tostring.apply(l)) { for (r = l.length, n = 0; r > n; n += 1) a[n] = str(n, l) || "null"; return o = 0 === a.length ? "[]" : gap ? "[\n" + gap + a.join(",\n" + gap) + "\n" + s + "]" : "[" + a.join(",") + "]", gap = s, o } if (rep && "object" == typeof rep) for (r = rep.length, n = 0; r > n; n += 1) "string" == typeof rep[n] && (i = rep[n], o = str(i, l), o && a.push(quote(i) + (gap ? ": " : ":") + o)); else for (i in l) object.prototype.hasownproperty.call(l, i) && (o = str(i, l), o && a.push(quote(i) + (gap ? ": " : ":") + o)); return o = 0 === a.length ? "{}" : gap ? "{\n" + gap + a.join(",\n" + gap) + "\n" + s + "}" : "{" + a.join(",") + "}", gap = s, o } } "function" != typeof date.prototype.tojson && (date.prototype.tojson = function() { return isfinite(this.valueof()) ? this.getutcfullyear() + "-" + f(this.getutcmonth() + 1) + "-" + f(this.getutcdate()) + "t" + f(this.getutchours()) + ":" + f(this.getutcminutes()) + ":" + f(this.getutcseconds()) + "z" : null }, string.prototype.tojson = number.prototype.tojson = boolean.prototype.tojson = function() { return this.valueof() }); var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta = { "\b": "\\b", " ": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, rep; "function" != typeof json.stringify && (json.stringify = function(e, t, n) { var i; if (gap = "", indent = "", "number" == typeof n) for (i = 0; n > i; i += 1) indent += " "; else "string" == typeof n && (indent = n); if (rep = t, !t || "function" == typeof t || "object" == typeof t && "number" == typeof t.length) return str("", { "": e }); throw new error("json.stringify") }), "function" != typeof json.parse && (json.parse = function(text, reviver) { function walk(e, t) { var n, i, o = e[t]; if (o && "object" == typeof o) for (n in o) object.prototype.hasownproperty.call(o, n) && (i = walk(o, n), void 0 !== i ? o[n] = i : delete o[n]); return reviver.call(e, t, o) } var j; if (text = string(text), cx.lastindex = 0, cx.test(text) && (text = text.replace(cx, function(e) { return "\\u" + ("0000" + e.charcodeat(0).tostring(16)).slice(-4) })), /^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fa-f]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[ee][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return j = eval("(" + text + ")"), "function" == typeof reviver ? walk({ "": j }, "") : j; throw new syntaxerror("json.parse") }) }(), function(e, t) { "use strict"; var n = e.history = e.history || {}, i = e.jquery; if ("undefined" != typeof n.adapter) throw new error("history.js adapter has already been loaded..."); n.adapter = { bind: function(e, t, n) { i(e).bind(t, n) }, trigger: function(e, t, n) { i(e).trigger(t, n) }, extracteventdata: function(e, n, i) { var o = n && n.originalevent && n.originalevent[e] || i && i[e] || t; return o }, ondomload: function(e) { i(e) } }, "undefined" != typeof n.init && n.init() }(window), function(e) { "use strict"; var t = e.document, n = e.settimeout || n, i = e.cleartimeout || i, o = e.setinterval || o, r = e.history = e.history || {}; if ("undefined" != typeof r.inithtml4) throw new error("history.js html4 support has already been loaded..."); r.inithtml4 = function() { return "undefined" != typeof r.inithtml4.initialized ? !1 : (r.inithtml4.initialized = !0, r.enabled = !0, r.savedhashes = [], r.islasthash = function(e) { var t, n = r.gethashbyindex(); return t = e === n }, r.ishashequal = function(e, t) { return e = encodeuricomponent(e).replace(/%25/g, "%"), t = encodeuricomponent(t).replace(/%25/g, "%"), e === t }, r.savehash = function(e) { return r.islasthash(e) ? !1 : (r.savedhashes.push(e), !0) }, r.gethashbyindex = function(e) { var t = null; return t = "undefined" == typeof e ? r.savedhashes[r.savedhashes.length - 1] : 0 > e ? r.savedhashes[r.savedhashes.length + e] : r.savedhashes[e] }, r.discardedhashes = {}, r.discardedstates = {}, r.discardstate = function(e, t, n) { var i, o = r.gethashbystate(e); return i = { discardedstate: e, backstate: n, forwardstate: t }, r.discardedstates[o] = i, !0 }, r.discardhash = function(e, t, n) { var i = { discardedhash: e, backstate: n, forwardstate: t }; return r.discardedhashes[e] = i, !0 }, r.discardedstate = function(e) { var t, n = r.gethashbystate(e); return t = r.discardedstates[n] || !1 }, r.discardedhash = function(e) { var t = r.discardedhashes[e] || !1; return t }, r.recyclestate = function(e) { var t = r.gethashbystate(e); return r.discardedstate(e) && delete r.discardedstates[t], !0 }, r.emulated.hashchange && (r.hashchangeinit = function() { r.checkerfunction = null; var n, i, a, s, l = "", c = boolean(r.gethash()); return r.isinternetexplorer() ? (n = "historyjs-iframe", i = t.createelement("iframe"), i.setattribute("id", n), i.setattribute("src", "#"), i.style.display = "none", t.body.appendchild(i), i.contentwindow.document.open(), i.contentwindow.document.close(), a = "", s = !1, r.checkerfunction = function() { if (s) return !1; s = !0; var t = r.gethash(), n = r.gethash(i.contentwindow.document); return t !== l ? (l = t, n !== t && (a = n = t, i.contentwindow.document.open(), i.contentwindow.document.close(), i.contentwindow.document.location.hash = r.escapehash(t)), r.adapter.trigger(e, "hashchange")) : n !== a && (a = n, c && "" === n ? r.back() : r.sethash(n, !1)), s = !1, !0 }) : r.checkerfunction = function() { var t = r.gethash() || ""; return t !== l && (l = t, r.adapter.trigger(e, "hashchange")), !0 }, r.intervallist.push(o(r.checkerfunction, r.options.hashchangeinterval)), !0 }, r.adapter.ondomload(r.hashchangeinit)), r.emulated.pushstate && (r.onhashchange = function(t) { var n, i = t && t.newurl || r.getlocationhref(), o = r.gethashbyurl(i), a = null, s = null; return r.islasthash(o) ? (r.busy(!1), !1) : (r.doublecheckcomplete(), r.savehash(o), o && r.istraditionalanchor(o) ? (r.adapter.trigger(e, "anchorchange"), r.busy(!1), !1) : (a = r.extractstate(r.getfullurl(o || r.getlocationhref()), !0), r.islastsavedstate(a) ? (r.busy(!1), !1) : (s = r.gethashbystate(a), n = r.discardedstate(a), n ? (r.gethashbyindex(-2) === r.gethashbystate(n.forwardstate) ? r.back(!1) : r.forward(!1), !1) : (r.pushstate(a.data, a.title, encodeuri(a.url), !1), !0)))) }, r.adapter.bind(e, "hashchange", r.onhashchange), r.pushstate = function(t, n, i, o) { if (i = encodeuri(i).replace(/%25/g, "%"), r.gethashbyurl(i)) throw new error("history.js does not support states with fragment-identifiers (hashes/anchors)."); if (o !== !1 && r.busy()) return r.pushqueue({ scope: r, callback: r.pushstate, args: arguments, queue: o }), !1; r.busy(!0); var a = r.createstateobject(t, n, i), s = r.gethashbystate(a), l = r.getstate(!1), c = r.gethashbystate(l), u = r.gethash(), d = r.expectedstateid == a.id; return r.storestate(a), r.expectedstateid = a.id, r.recyclestate(a), r.settitle(a), s === c ? (r.busy(!1), !1) : (r.savestate(a), d || r.adapter.trigger(e, "statechange"), !r.ishashequal(s, u) && !r.ishashequal(s, r.getshorturl(r.getlocationhref())) && r.sethash(s, !1), r.busy(!1), !0) }, r.replacestate = function(t, n, i, o) { if (i = encodeuri(i).replace(/%25/g, "%"), r.gethashbyurl(i)) throw new error("history.js does not support states with fragment-identifiers (hashes/anchors)."); if (o !== !1 && r.busy()) return r.pushqueue({ scope: r, callback: r.replacestate, args: arguments, queue: o }), !1; r.busy(!0); var a = r.createstateobject(t, n, i), s = r.gethashbystate(a), l = r.getstate(!1), c = r.gethashbystate(l), u = r.getstatebyindex(-2); return r.discardstate(l, a, u), s === c ? (r.storestate(a), r.expectedstateid = a.id, r.recyclestate(a), r.settitle(a), r.savestate(a), r.adapter.trigger(e, "statechange"), r.busy(!1)) : r.pushstate(a.data, a.title, a.url, !1), !0 }), r.emulated.pushstate && r.gethash() && !r.emulated.hashchange && r.adapter.ondomload(function() { r.adapter.trigger(e, "hashchange") }), void 0) }, "undefined" != typeof r.init && r.init() }(window), function(e, t) { "use strict"; var n = e.console || t, i = e.document, o = e.navigator, r = !1, a = e.settimeout, s = e.cleartimeout, l = e.setinterval, c = e.clearinterval, u = e.json, d = e.alert, p = e.history = e.history || {}, f = e.history; try { r = e.sessionstorage, r.setitem("test", "1"), r.removeitem("test") } catch (h) { r = !1 } if (u.stringify = u.stringify || u.encode, u.parse = u.parse || u.decode, "undefined" != typeof p.init) throw new error("history.js core has already been loaded..."); p.init = function() { return "undefined" == typeof p.adapter ? !1 : ("undefined" != typeof p.initcore && p.initcore(), "undefined" != typeof p.inithtml4 && p.inithtml4(), !0) }, p.initcore = function() { if ("undefined" != typeof p.initcore.initialized) return !1; if (p.initcore.initialized = !0, p.options = p.options || {}, p.options.hashchangeinterval = p.options.hashchangeinterval || 100, p.options.safaripollinterval = p.options.safaripollinterval || 500, p.options.doublecheckinterval = p.options.doublecheckinterval || 500, p.options.disablesuid = p.options.disablesuid || !1, p.options.storeinterval = p.options.storeinterval || 1e3, p.options.busydelay = p.options.busydelay || 250, p.options.debug = p.options.debug || !1, p.options.initialtitle = p.options.initialtitle || i.title, p.options.html4mode = p.options.html4mode || !1, p.options.delayinit = p.options.delayinit || !1, p.intervallist = [], p.clearallintervals = function() { var e, t = p.intervallist; if ("undefined" != typeof t && null !== t) { for (e = 0; e < t.length; e++) c(t[e]); p.intervallist = null } }, p.debug = function() { (p.options.debug || !1) && p.log.apply(p, arguments) }, p.log = function() { var e, t, o, r, a, s = "undefined" != typeof n && "undefined" != typeof n.log && "undefined" != typeof n.log.apply, l = i.getelementbyid("log"); for (s ? (r = array.prototype.slice.call(arguments), e = r.shift(), "undefined" != typeof n.debug ? n.debug.apply(n, [e, r]) : n.log.apply(n, [e, r])) : e = "\n" + arguments[0] + "\n", t = 1, o = arguments.length; o > t; ++t) { if (a = arguments[t], "object" == typeof a && "undefined" != typeof u) try { a = u.stringify(a) } catch (c) {} e += "\n" + a + "\n" } return l ? (l.value += e + "\n-----\n", l.scrolltop = l.scrollheight - l.clientheight) : s || d(e), !0 }, p.getinternetexplorermajorversion = function() { var e = p.getinternetexplorermajorversion.cached = "undefined" != typeof p.getinternetexplorermajorversion.cached ? p.getinternetexplorermajorversion.cached : function() { for (var e = 3, t = i.createelement("div"), n = t.getelementsbytagname("i"); (t.innerhtml = "") && n[0];); return e > 4 ? e : !1 }(); return e }, p.isinternetexplorer = function() { var e = p.isinternetexplorer.cached = "undefined" != typeof p.isinternetexplorer.cached ? p.isinternetexplorer.cached : boolean(p.getinternetexplorermajorversion()); return e }, p.emulated = p.options.html4mode ? { pushstate: !0, hashchange: !0 } : { pushstate: !boolean(e.history && e.history.pushstate && e.history.replacestate && !/ mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(o.useragent) && !/applewebkit\/5([0-2]|3[0-2])/i.test(o.useragent)), hashchange: boolean(!("onhashchange" in e || "onhashchange" in i) || p.isinternetexplorer() && p.getinternetexplorermajorversion() < 8) }, p.enabled = !p.emulated.pushstate, p.bugs = { sethash: boolean(!p.emulated.pushstate && "apple computer, inc." === o.vendor && /applewebkit\/5([0-2]|3[0-3])/.test(o.useragent)), safaripoll: boolean(!p.emulated.pushstate && "apple computer, inc." === o.vendor && /applewebkit\/5([0-2]|3[0-3])/.test(o.useragent)), iedoublecheck: boolean(p.isinternetexplorer() && p.getinternetexplorermajorversion() < 8), hashescape: boolean(p.isinternetexplorer() && p.getinternetexplorermajorversion() < 7) }, p.isemptyobject = function(e) { for (var t in e) if (e.hasownproperty(t)) return !1; return !0 }, p.cloneobject = function(e) { var t, n; return e ? (t = u.stringify(e), n = u.parse(t)) : n = {}, n }, p.getrooturl = function() { var e = i.location.protocol + "//" + (i.location.hostname || i.location.host); return i.location.port && (e += ":" + i.location.port), e += "/" }, p.getbasehref = function() { var e = i.getelementsbytagname("base"), t = null, n = ""; return 1 === e.length && (t = e[0], n = t.href.replace(/[^\/]+$/, "")), n = n.replace(/\/+$/, ""), n && (n += "/"), n }, p.getbaseurl = function() { var e = p.getbasehref() || p.getbasepageurl() || p.getrooturl(); return e }, p.getpageurl = function() { var e, t = p.getstate(!1, !1), n = (t || {}).url || p.getlocationhref(); return e = n.replace(/\/+$/, "").replace(/[^\/]+$/, function(e) { return /\./.test(e) ? e : e + "/" }) }, p.getbasepageurl = function() { var e = p.getlocationhref().replace(/[#\?].*/, "").replace(/[^\/]+$/, function(e) { return /[^\/]$/.test(e) ? "" : e }).replace(/\/+$/, "") + "/"; return e }, p.getfullurl = function(e, t) { var n = e, i = e.substring(0, 1); return t = "undefined" == typeof t ? !0 : t, /[a-z]+\:\/\//.test(e) || (n = "/" === i ? p.getrooturl() + e.replace(/^\/+/, "") : "#" === i ? p.getpageurl().replace(/#.*/, "") + e : "?" === i ? p.getpageurl().replace(/[\?#].*/, "") + e : t ? p.getbaseurl() + e.replace(/^(\.\/)+/, "") : p.getbasepageurl() + e.replace(/^(\.\/)+/, "")), n.replace(/\#$/, "") }, p.getshorturl = function(e) { var t = e, n = p.getbaseurl(), i = p.getrooturl(); return p.emulated.pushstate && (t = t.replace(n, "")), t = t.replace(i, "/"), p.istraditionalanchor(t) && (t = "./" + t), t = t.replace(/^(\.\/)+/g, "./").replace(/\#$/, "") }, p.getlocationhref = function(e) { return e = e || i, e.url === e.location.href ? e.location.href : e.location.href === decodeuricomponent(e.url) ? e.url : e.location.hash && decodeuricomponent(e.location.href.replace(/^[^#]+/, "")) === e.location.hash ? e.location.href : -1 == e.url.indexof("#") && -1 != e.location.href.indexof("#") ? e.location.href : e.url || e.location.href }, p.store = {}, p.idtostate = p.idtostate || {}, p.statetoid = p.statetoid || {}, p.urltoid = p.urltoid || {}, p.storedstates = p.storedstates || [], p.savedstates = p.savedstates || [], p.normalizestore = function() { p.store.idtostate = p.store.idtostate || {}, p.store.urltoid = p.store.urltoid || {}, p.store.statetoid = p.store.statetoid || {} }, p.getstate = function(e, t) { "undefined" == typeof e && (e = !0), "undefined" == typeof t && (t = !0); var n = p.getlastsavedstate(); return !n && t && (n = p.createstateobject()), e && (n = p.cloneobject(n), n.url = n.cleanurl || n.url), n }, p.getidbystate = function(e) { var t, n = p.extractid(e.url); if (!n) if (t = p.getstatestring(e), "undefined" != typeof p.statetoid[t]) n = p.statetoid[t]; else if ("undefined" != typeof p.store.statetoid[t]) n = p.store.statetoid[t]; else { for (; n = (new date).gettime() + string(math.random()).replace(/\d/g, ""), "undefined" != typeof p.idtostate[n] || "undefined" != typeof p.store.idtostate[n];); p.statetoid[t] = n, p.idtostate[n] = e } return n }, p.normalizestate = function(e) { var t, n; return e && "object" == typeof e || (e = {}), "undefined" != typeof e.normalized ? e : (e.data && "object" == typeof e.data || (e.data = {}), t = {}, t.normalized = !0, t.title = e.title || "", t.url = p.getfullurl(e.url ? e.url : p.getlocationhref()), t.hash = p.getshorturl(t.url), t.data = p.cloneobject(e.data), t.id = p.getidbystate(t), t.cleanurl = t.url.replace(/\??\&_suid.*/, ""), t.url = t.cleanurl, n = !p.isemptyobject(t.data), (t.title || n) && p.options.disablesuid !== !0 && (t.hash = p.getshorturl(t.url).replace(/\??\&_suid.*/, ""), /\?/.test(t.hash) || (t.hash += "?"), t.hash += "&_suid=" + t.id), t.hashedurl = p.getfullurl(t.hash), (p.emulated.pushstate || p.bugs.safaripoll) && p.hasurlduplicate(t) && (t.url = t.hashedurl), t) }, p.createstateobject = function(e, t, n) { var i = { data: e, title: t, url: n }; return i = p.normalizestate(i) }, p.getstatebyid = function(e) { e = string(e); var n = p.idtostate[e] || p.store.idtostate[e] || t; return n }, p.getstatestring = function(e) { var t, n, i; return t = p.normalizestate(e), n = { data: t.data, title: e.title, url: e.url }, i = u.stringify(n) }, p.getstateid = function(e) { var t, n; return t = p.normalizestate(e), n = t.id }, p.gethashbystate = function(e) { var t, n; return t = p.normalizestate(e), n = t.hash }, p.extractid = function(e) { var t, n, i, o; return o = -1 != e.indexof("#") ? e.split("#")[0] : e, n = /(.*)\&_suid=([0-9]+)$/.exec(o), i = n ? n[1] || e : e, t = n ? string(n[2] || "") : "", t || !1 }, p.istraditionalanchor = function(e) { var t = !/[\/\?\.]/.test(e); return t }, p.extractstate = function(e, t) { var n, i, o = null; return t = t || !1, n = p.extractid(e), n && (o = p.getstatebyid(n)), o || (i = p.getfullurl(e), n = p.getidbyurl(i) || !1, n && (o = p.getstatebyid(n)), !o && t && !p.istraditionalanchor(e) && (o = p.createstateobject(null, null, i))), o }, p.getidbyurl = function(e) { var n = p.urltoid[e] || p.store.urltoid[e] || t; return n }, p.getlastsavedstate = function() { return p.savedstates[p.savedstates.length - 1] || t }, p.getlaststoredstate = function() { return p.storedstates[p.storedstates.length - 1] || t }, p.hasurlduplicate = function(e) { var t, n = !1; return t = p.extractstate(e.url), n = t && t.id !== e.id }, p.storestate = function(e) { return p.urltoid[e.url] = e.id, p.storedstates.push(p.cloneobject(e)), e }, p.islastsavedstate = function(e) { var t, n, i, o = !1; return p.savedstates.length && (t = e.id, n = p.getlastsavedstate(), i = n.id, o = t === i), o }, p.savestate = function(e) { return p.islastsavedstate(e) ? !1 : (p.savedstates.push(p.cloneobject(e)), !0) }, p.getstatebyindex = function(e) { var t = null; return t = "undefined" == typeof e ? p.savedstates[p.savedstates.length - 1] : 0 > e ? p.savedstates[p.savedstates.length + e] : p.savedstates[e] }, p.getcurrentindex = function() { var e = null; return e = p.savedstates.length < 1 ? 0 : p.savedstates.length - 1 }, p.gethash = function(e) { var t, n = p.getlocationhref(e); return t = p.gethashbyurl(n) }, p.unescapehash = function(e) { var t = p.normalizehash(e); return t = decodeuricomponent(t) }, p.normalizehash = function(e) { var t = e.replace(/[^#]*#/, "").replace(/#.*/, ""); return t }, p.sethash = function(e, t) { var n, o; return t !== !1 && p.busy() ? (p.pushqueue({ scope: p, callback: p.sethash, args: arguments, queue: t }), !1) : (p.busy(!0), n = p.extractstate(e, !0), n && !p.emulated.pushstate ? p.pushstate(n.data, n.title, n.url, !1) : p.gethash() !== e && (p.bugs.sethash ? (o = p.getpageurl(), p.pushstate(null, null, o + "#" + e, !1)) : i.location.hash = e), p) }, p.escapehash = function(t) { var n = p.normalizehash(t); return n = e.encodeuricomponent(n), p.bugs.hashescape || (n = n.replace(/\%21/g, "!").replace(/\%26/g, "&").replace(/\%3d/g, "=").replace(/\%3f/g, "?")), n }, p.gethashbyurl = function(e) { var t = string(e).replace(/([^#]*)#?([^#]*)#?(.*)/, "$2"); return t = p.unescapehash(t) }, p.settitle = function(e) { var t, n = e.title; n || (t = p.getstatebyindex(0), t && t.url === e.url && (n = t.title || p.options.initialtitle)); try { i.getelementsbytagname("title")[0].innerhtml = n.replace("<", "<").replace(">", ">").replace(" & ", " & ") } catch (o) {} return i.title = n, p }, p.queues = [], p.busy = function(e) { if ("undefined" != typeof e ? p.busy.flag = e : "undefined" == typeof p.busy.flag && (p.busy.flag = !1), !p.busy.flag) { s(p.busy.timeout); var t = function() { var e, n, i; if (!p.busy.flag) for (e = p.queues.length - 1; e >= 0; --e) n = p.queues[e], 0 !== n.length && (i = n.shift(), p.firequeueitem(i), p.busy.timeout = a(t, p.options.busydelay)) }; p.busy.timeout = a(t, p.options.busydelay) } return p.busy.flag }, p.busy.flag = !1, p.firequeueitem = function(e) { return e.callback.apply(e.scope || p, e.args || []) }, p.pushqueue = function(e) { return p.queues[e.queue || 0] = p.queues[e.queue || 0] || [], p.queues[e.queue || 0].push(e), p }, p.queue = function(e, t) { return "function" == typeof e && (e = { callback: e }), "undefined" != typeof t && (e.queue = t), p.busy() ? p.pushqueue(e) : p.firequeueitem(e), p }, p.clearqueue = function() { return p.busy.flag = !1, p.queues = [], p }, p.statechanged = !1, p.doublechecker = !1, p.doublecheckcomplete = function() { return p.statechanged = !0, p.doublecheckclear(), p }, p.doublecheckclear = function() { return p.doublechecker && (s(p.doublechecker), p.doublechecker = !1), p }, p.doublecheck = function(e) { return p.statechanged = !1, p.doublecheckclear(), p.bugs.iedoublecheck && (p.doublechecker = a(function() { return p.doublecheckclear(), p.statechanged || e(), !0 }, p.options.doublecheckinterval)), p }, p.safaristatepoll = function() { var t, n = p.extractstate(p.getlocationhref()); return p.islastsavedstate(n) ? void 0 : (t = n, t || (t = p.createstateobject()), p.adapter.trigger(e, "popstate"), p) }, p.back = function(e) { return e !== !1 && p.busy() ? (p.pushqueue({ scope: p, callback: p.back, args: arguments, queue: e }), !1) : (p.busy(!0), p.doublecheck(function() { p.back(!1) }), f.go(-1), !0) }, p.forward = function(e) { return e !== !1 && p.busy() ? (p.pushqueue({ scope: p, callback: p.forward, args: arguments, queue: e }), !1) : (p.busy(!0), p.doublecheck(function() { p.forward(!1) }), f.go(1), !0) }, p.go = function(e, t) { var n; if (e > 0) for (n = 1; e >= n; ++n) p.forward(t); else { if (!(0 > e)) throw new error("history.go: history.go requires a positive or negative integer passed."); for (n = -1; n >= e; --n) p.back(t) } return p }, p.emulated.pushstate) { var h = function() {}; p.pushstate = p.pushstate || h, p.replacestate = p.replacestate || h } else p.onpopstate = function(t, n) { var i, o, r = !1, a = !1; return p.doublecheckcomplete(), i = p.gethash(), i ? (o = p.extractstate(i || p.getlocationhref(), !0), o ? p.replacestate(o.data, o.title, o.url, !1) : (p.adapter.trigger(e, "anchorchange"), p.busy(!1)), p.expectedstateid = !1, !1) : (r = p.adapter.extracteventdata("state", t, n) || !1, a = r ? p.getstatebyid(r) : p.expectedstateid ? p.getstatebyid(p.expectedstateid) : p.extractstate(p.getlocationhref()), a || (a = p.createstateobject(null, null, p.getlocationhref())), p.expectedstateid = !1, p.islastsavedstate(a) ? (p.busy(!1), !1) : (p.storestate(a), p.savestate(a), p.settitle(a), p.adapter.trigger(e, "statechange"), p.busy(!1), !0)) }, p.adapter.bind(e, "popstate", p.onpopstate), p.pushstate = function(t, n, i, o) { if (p.gethashbyurl(i) && p.emulated.pushstate) throw new error("history.js does not support states with fragement-identifiers (hashes/anchors)."); if (o !== !1 && p.busy()) return p.pushqueue({ scope: p, callback: p.pushstate, args: arguments, queue: o }), !1; p.busy(!0); var r = p.createstateobject(t, n, i); return p.islastsavedstate(r) ? p.busy(!1) : (p.storestate(r), p.expectedstateid = r.id, f.pushstate(r.id, r.title, r.url), p.adapter.trigger(e, "popstate")), !0 }, p.replacestate = function(t, n, i, o) { if (p.gethashbyurl(i) && p.emulated.pushstate) throw new error("history.js does not support states with fragement-identifiers (hashes/anchors)."); if (o !== !1 && p.busy()) return p.pushqueue({ scope: p, callback: p.replacestate, args: arguments, queue: o }), !1; p.busy(!0); var r = p.createstateobject(t, n, i); return p.islastsavedstate(r) ? p.busy(!1) : (p.storestate(r), p.expectedstateid = r.id, f.replacestate(r.id, r.title, r.url), p.adapter.trigger(e, "popstate")), !0 }; if (r) { try { p.store = u.parse(r.getitem("history.store")) || {} } catch (m) { p.store = {} } p.normalizestore() } else p.store = {}, p.normalizestore(); p.adapter.bind(e, "unload", p.clearallintervals), p.savestate(p.storestate(p.extractstate(p.getlocationhref(), !0))), r && (p.onunload = function() { var e, t, n; try { e = u.parse(r.getitem("history.store")) || {} } catch (i) { e = {} } e.idtostate = e.idtostate || {}, e.urltoid = e.urltoid || {}, e.statetoid = e.statetoid || {}; for (t in p.idtostate) p.idtostate.hasownproperty(t) && (e.idtostate[t] = p.idtostate[t]); for (t in p.urltoid) p.urltoid.hasownproperty(t) && (e.urltoid[t] = p.urltoid[t]); for (t in p.statetoid) p.statetoid.hasownproperty(t) && (e.statetoid[t] = p.statetoid[t]); p.store = e, p.normalizestore(), n = u.stringify(e); try { r.setitem("history.store", n) } catch (o) { if (o.code !== domexception.quota_exceeded_err) throw o; r.length && (r.removeitem("history.store"), r.setitem("history.store", n)) } }, p.intervallist.push(l(p.onunload, p.options.storeinterval)), p.adapter.bind(e, "beforeunload", p.onunload), p.adapter.bind(e, "unload", p.onunload)), p.emulated.pushstate || (p.bugs.safaripoll && p.intervallist.push(l(p.safaristatepoll, p.options.safaripollinterval)), ("apple computer, inc." === o.vendor || "mozilla" === (o.appcodename || "")) && (p.adapter.bind(e, "hashchange", function() { p.adapter.trigger(e, "popstate") }), p.gethash() && p.adapter.ondomload(function() { p.adapter.trigger(e, "hashchange") }))) }, (!p.options || !p.options.delayinit) && p.init() }(window), function(e, t) { "function" == typeof define && define.amd ? define(t) : "object" == typeof exports ? module.exports = t() : e.nprogress = t() }(this, function() { function e(e, t, n) { return t > e ? t : e > n ? n : e } function t(e) { return 100 * (-1 + e) } function n(e, n, i) { var o; return o = "translate3d" === c.positionusing ? { transform: "translate3d(" + t(e) + "%,0,0)" } : "translate" === c.positionusing ? { transform: "translate(" + t(e) + "%,0)" } : { "margin-left": t(e) + "%" }, o.transition = "all " + n + "ms " + i, o } function i(e, t) { var n = "string" == typeof e ? e : a(e); return n.indexof(" " + t + " ") >= 0 } function o(e, t) { var n = a(e), o = n + t; i(n, t) || (e.classname = o.substring(1)) } function r(e, t) { var n, o = a(e); i(e, t) && (n = o.replace(" " + t + " ", " "), e.classname = n.substring(1, n.length - 1)) } function a(e) { return (" " + (e.classname || "") + " ").replace(/\s+/gi, " ") } function s(e) { e && e.parentnode && e.parentnode.removechild(e) } var l = {}; l.version = "0.2.0"; var c = l.settings = { minimum: .08, easing: "ease", positionusing: "", speed: 200, trickle: !0, tricklerate: .02, tricklespeed: 800, showspinner: !0, barselector: '[role="bar"]', spinnerselector: '[role="spinner"]', parent: "body", template: '
' }; l.configure = function(e) { var t, n; for (t in e) n = e[t], void 0 !== n && e.hasownproperty(t) && (c[t] = n); return this }, l.status = null, l.set = function(t) { var i = l.isstarted(); t = e(t, c.minimum, 1), l.status = 1 === t ? null : t; var o = l.render(!i), r = o.queryselector(c.barselector), a = c.speed, s = c.easing; return o.offsetwidth, u(function(e) { "" === c.positionusing && (c.positionusing = l.getpositioningcss()), d(r, n(t, a, s)), 1 === t ? (d(o, { transition: "none", opacity: 1 }), o.offsetwidth, settimeout(function() { d(o, { transition: "all " + a + "ms linear", opacity: 0 }), settimeout(function() { l.remove(), e() }, a) }, a)) : settimeout(e, a) }), this }, l.isstarted = function() { return "number" == typeof l.status }, l.start = function() { l.status || l.set(0); var e = function() { settimeout(function() { l.status && (l.trickle(), e()) }, c.tricklespeed) }; return c.trickle && e(), this }, l.done = function(e) { return e || l.status ? l.inc(.3 + .5 * math.random()).set(1) : this }, l.inc = function(t) { var n = l.status; return n ? ("number" != typeof t && (t = (1 - n) * e(math.random() * n, .1, .95)), n = e(n + t, 0, .994), l.set(n)) : l.start() }, l.trickle = function() { return l.inc(math.random() * c.tricklerate) }, function() { var e = 0, t = 0; l.promise = function(n) { return n && "resolved" !== n.state() ? (0 === t && l.start(), e++, t++, n.always(function() { t--, 0 === t ? (e = 0, l.done()) : l.set((e - t) / e) }), this) : this } }(), l.render = function(e) { if (l.isrendered()) return document.getelementbyid("nprogress"); o(document.documentelement, "nprogress-busy"); var n = document.createelement("div"); n.id = "nprogress", n.innerhtml = c.template; var i, r = n.queryselector(c.barselector), a = e ? "-100" : t(l.status || 0), u = document.queryselector(c.parent); return d(r, { transition: "all 0 linear", transform: "translate3d(" + a + "%,0,0)" }), c.showspinner || (i = n.queryselector(c.spinnerselector), i && s(i)), u != document.body && o(u, "nprogress-custom-parent"), u.appendchild(n), n }, l.remove = function() { r(document.documentelement, "nprogress-busy"), r(document.queryselector(c.parent), "nprogress-custom-parent"); var e = document.getelementbyid("nprogress"); e && s(e) }, l.isrendered = function() { return !!document.getelementbyid("nprogress") }, l.getpositioningcss = function() { var e = document.body.style, t = "webkittransform" in e ? "webkit" : "moztransform" in e ? "moz" : "mstransform" in e ? "ms" : "otransform" in e ? "o" : ""; return t + "perspective" in e ? "translate3d" : t + "transform" in e ? "translate" : "margin" }; var u = function() { function e() { var n = t.shift(); n && n(e) } var t = []; return function(n) { t.push(n), 1 == t.length && e() } }(), d = function() { function e(e) { return e.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(e, t) { return t.touppercase() }) } function t(e) { var t = document.body.style; if (e in t) return e; for (var n, i = o.length, r = e.charat(0).touppercase() + e.slice(1); i--;) if (n = o[i] + r, n in t) return n; return e } function n(n) { return n = e(n), r[n] || (r[n] = t(n)) } function i(e, t, i) { t = n(t), e.style[t] = i } var o = ["webkit", "o", "moz", "ms"], r = {}; return function(e, t) { var n, o, r = arguments; if (2 == r.length) for (n in t) o = t[n], void 0 !== o && t.hasownproperty(n) && i(e, n, o); else i(e, r[1], r[2]) } }(); return l }), function(e, t) { "object" == typeof exports ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.spinner = t() }(this, function() { "use strict"; function e(e, t) { var n, i = document.createelement(e || "div"); for (n in t) i[n] = t[n]; return i } function t(e) { for (var t = 1, n = arguments.length; n > t; t++) e.appendchild(arguments[t]); return e } function n(e, t, n, i) { var o = ["opacity", t, ~~(100 * e), n, i].join("-"), r = .01 + 100 * (n / i), a = math.max(1 - (1 - e) / t * (100 - r), e), s = c.substring(0, c.indexof("animation")).tolowercase(), l = s && "-" + s + "-" || ""; return d[o] || (p.insertrule("@" + l + "keyframes " + o + "{0%{opacity:" + a + "}" + r + "%{opacity:" + e + "}" + (r + .01) + "%{opacity:1}" + (r + t) % 100 + "%{opacity:" + e + "}100%{opacity:" + a + "}}", p.cssrules.length), d[o] = 1), o } function i(e, t) { var n, i, o = e.style; if (void 0 !== o[t]) return t; for (t = t.charat(0).touppercase() + t.slice(1), i = 0; u.length > i; i++) if (n = u[i] + t, void 0 !== o[n]) return n } function o(e, t) { for (var n in t) e.style[i(e, n) || n] = t[n]; return e } function r(e) { for (var t = 1; arguments.length > t; t++) { var n = arguments[t]; for (var i in n) void 0 === e[i] && (e[i] = n[i]) } return e } function a(e) { for (var t = { x: e.offsetleft, y: e.offsettop }; e = e.offsetparent;) t.x += e.offsetleft, t.y += e.offsettop; return t } function s(e) { return void 0 === this ? new s(e) : void(this.opts = r(e || {}, s.defaults, f)) } function l() { function n(t, n) { return e("<" + t + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', n) } p.addrule(".spin-vml", "behavior:url(#default#vml)"), s.prototype.lines = function(e, i) { function r() { return o(n("group", { coordsize: c + " " + c, coordorigin: -l + " " + -l }), { width: c, height: c }) } function a(e, a, s) { t(d, t(o(r(), { rotation: 360 / i.lines * e + "deg", left: ~~a }), t(o(n("roundrect", { arcsize: i.corners }), { width: l, height: i.width, left: i.radius, top: -i.width >> 1, filter: s }), n("fill", { color: i.color, opacity: i.opacity }), n("stroke", { opacity: 0 })))) } var s, l = i.length + i.width, c = 2 * l, u = 2 * -(i.width + i.length) + "px", d = o(r(), { position: "absolute", top: u, left: u }); if (i.shadow) for (s = 1; i.lines >= s; s++) a(s, -2, "progid:dximagetransform.microsoft.blur(pixelradius=2,makeshadow=1,shadowopacity=.3)"); for (s = 1; i.lines >= s; s++) a(s); return t(e, d) }, s.prototype.opacity = function(e, t, n, i) { var o = e.firstchild; i = i.shadow && i.lines || 0, o && o.childnodes.length > t + i && (o = o.childnodes[t + i], o = o && o.firstchild, o = o && o.firstchild, o && (o.opacity = n)) } } var c, u = ["webkit", "moz", "ms", "o"], d = {}, p = function() { var n = e("style", { type: "text/css" }); return t(document.getelementsbytagname("head")[0], n), n.sheet || n.stylesheet }(), f = { lines: 12, length: 7, width: 5, radius: 10, rotate: 0, corners: 1, color: "#000", direction: 1, speed: 1, trail: 100, opacity: .25, fps: 20, zindex: 2e9, classname: "spinner", top: "auto", left: "auto", position: "relative" }; s.defaults = {}, r(s.prototype, { spin: function(t) { this.stop(); var n, i, r = this, s = r.opts, l = r.el = o(e(0, { classname: s.classname }), { position: s.position, width: 0, zindex: s.zindex }), u = s.radius + s.length + s.width; if (t && (t.insertbefore(l, t.firstchild || null), i = a(t), n = a(l), o(l, { left: ("auto" == s.left ? i.x - n.x + (t.offsetwidth >> 1) : parseint(s.left, 10) + u) + "px", top: ("auto" == s.top ? i.y - n.y + (t.offsetheight >> 1) : parseint(s.top, 10) + u) + "px" })), l.setattribute("role", "progressbar"), r.lines(l, r.opts), !c) { var d, p = 0, f = (s.lines - 1) * (1 - s.direction) / 2, h = s.fps, m = h / s.speed, g = (1 - s.opacity) / (m * s.trail / 100), v = m / s.lines; ! function y() { p++; for (var e = 0; s.lines > e; e++) d = math.max(1 - (p + (s.lines - e) * v) % m * g, s.opacity), r.opacity(l, e * s.direction + f, d, s); r.timeout = r.el && settimeout(y, ~~(1e3 / h)) }() } return r }, stop: function() { var e = this.el; return e && (cleartimeout(this.timeout), e.parentnode && e.parentnode.removechild(e), this.el = void 0), this }, lines: function(i, r) { function a(t, n) { return o(e(), { position: "absolute", width: r.length + r.width + "px", height: r.width + "px", background: t, boxshadow: n, transformorigin: "left", transform: "rotate(" + ~~(360 / r.lines * l + r.rotate) + "deg) translate(" + r.radius + "px,0)", borderradius: (r.corners * r.width >> 1) + "px" }) } for (var s, l = 0, u = (r.lines - 1) * (1 - r.direction) / 2; r.lines > l; l++) s = o(e(), { position: "absolute", top: 1 + ~(r.width / 2) + "px", transform: r.hwaccel ? "translate3d(0,0,0)" : "", opacity: r.opacity, animation: c && n(r.opacity, r.trail, u + l * r.direction, r.lines) + " " + 1 / r.speed + "s linear infinite" }), r.shadow && t(s, o(a("#000", "0 0 4px #000"), { top: "2px" })), t(i, t(s, a(r.color, "0 0 1px rgba(0,0,0,.1)"))); return i }, opacity: function(e, t, n) { e.childnodes.length > t && (e.childnodes[t].style.opacity = n) } }); var h = o(e("group"), { behavior: "url(#default#vml)" }); return !i(h, "transform") && h.adj ? l() : c = i(h, "animation"), s }), function(e, t) { "object" == typeof exports ? module.exports = t() : "function" == typeof define && define.amd ? define(["spin"], t) : e.ladda = t(e.spinner) }(this, function(e) { "use strict"; function t(e) { if (void 0 === e) return void console.warn("ladda button target must be defined."); e.queryselector(".ladda-label") || (e.innerhtml = '' + e.innerhtml + ""); var t = o(e), n = document.createelement("span"); n.classname = "ladda-spinner", e.appendchild(n); var i, r = { start: function() { return e.setattribute("disabled", ""), e.setattribute("data-loading", ""), cleartimeout(i), t.spin(n), this.setprogress(0), this }, startafter: function(e) { return cleartimeout(i), i = settimeout(function() { r.start() }, e), this }, stop: function() { return e.removeattribute("disabled"), e.removeattribute("data-loading"), cleartimeout(i), i = settimeout(function() { t.stop() }, 1e3), this }, toggle: function() { return this.isloading() ? this.stop() : this.start(), this }, setprogress: function(t) { t = math.max(math.min(t, 1), 0); var n = e.queryselector(".ladda-progress"); 0 === t && n && n.parentnode ? n.parentnode.removechild(n) : (n || (n = document.createelement("div"), n.classname = "ladda-progress", e.appendchild(n)), n.style.width = (t || 0) * e.offsetwidth + "px") }, enable: function() { return this.stop(), this }, disable: function() { return this.stop(), e.setattribute("disabled", ""), this }, isloading: function() { return e.hasattribute("data-loading") } }; return a.push(r), r } function n(e, n) { n = n || {}; var i = []; "string" == typeof e ? i = r(document.queryselectorall(e)) : "object" == typeof e && "string" == typeof e.nodename && (i = [e]); for (var o = 0, a = i.length; a > o; o++)(function() { var e = i[o]; if ("function" == typeof e.addeventlistener) { var r = t(e), a = -1; e.addeventlistener("click", function() { r.startafter(1), "number" == typeof n.timeout && (cleartimeout(a), a = settimeout(r.stop, n.timeout)), "function" == typeof n.callback && n.callback.apply(null, [r]) }, !1) } })() } function i() { for (var e = 0, t = a.length; t > e; e++) a[e].stop() } function o(t) { var n, i = t.offsetheight; i > 32 && (i *= .8), t.hasattribute("data-spinner-size") && (i = parseint(t.getattribute("data-spinner-size"), 10)), t.hasattribute("data-spinner-color") && (n = t.getattribute("data-spinner-color")); var o = 12, r = .2 * i, a = .6 * r, s = 7 > r ? 2 : 3; return new e({ color: n || "#fff", lines: o, radius: r, length: a, width: s, zindex: "auto", top: "auto", left: "auto", classname: "" }) } function r(e) { for (var t = [], n = 0; e.length > n; n++) t.push(e[n]); return t } var a = []; return { bind: n, create: t, stopall: i } }), ! function(e) { "function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof exports ? module.exports = e : e(jquery) }(function(e) { function t(t) { var a = t || window.event, s = l.call(arguments, 1), c = 0, d = 0, p = 0, f = 0, h = 0, m = 0; if (t = e.event.fix(a), t.type = "mousewheel", "detail" in a && (p = -1 * a.detail), "wheeldelta" in a && (p = a.wheeldelta), "wheeldeltay" in a && (p = a.wheeldeltay), "wheeldeltax" in a && (d = -1 * a.wheeldeltax), "axis" in a && a.axis === a.horizontal_axis && (d = -1 * p, p = 0), c = 0 === p ? d : p, "deltay" in a && (p = -1 * a.deltay, c = p), "deltax" in a && (d = a.deltax, 0 === p && (c = -1 * d)), 0 !== p || 0 !== d) { if (1 === a.deltamode) { var g = e.data(this, "mousewheel-line-height"); c *= g, p *= g, d *= g } else if (2 === a.deltamode) { var v = e.data(this, "mousewheel-page-height"); c *= v, p *= v, d *= v } if (f = math.max(math.abs(p), math.abs(d)), (!r || r > f) && (r = f, i(a, f) && (r /= 40)), i(a, f) && (c /= 40, d /= 40, p /= 40), c = math[c >= 1 ? "floor" : "ceil"](c / r), d = math[d >= 1 ? "floor" : "ceil"](d / r), p = math[p >= 1 ? "floor" : "ceil"](p / r), u.settings.normalizeoffset && this.getboundingclientrect) { var y = this.getboundingclientrect(); h = t.clientx - y.left, m = t.clienty - y.top } return t.deltax = d, t.deltay = p, t.deltafactor = r, t.offsetx = h, t.offsety = m, t.deltamode = 0, s.unshift(t, c, d, p), o && cleartimeout(o), o = settimeout(n, 200), (e.event.dispatch || e.event.handle).apply(this, s) } } function n() { r = null } function i(e, t) { return u.settings.adjustolddeltas && "mousewheel" === e.type && t % 120 === 0 } var o, r, a = ["wheel", "mousewheel", "dommousescroll", "mozmousepixelscroll"], s = "onwheel" in document || document.documentmode >= 9 ? ["wheel"] : ["mousewheel", "dommousescroll", "mozmousepixelscroll"], l = array.prototype.slice; if (e.event.fixhooks) for (var c = a.length; c;) e.event.fixhooks[a[--c]] = e.event.mousehooks; var u = e.event.special.mousewheel = { version: "3.1.12", setup: function() { if (this.addeventlistener) for (var n = s.length; n;) this.addeventlistener(s[--n], t, !1); else this.onmousewheel = t; e.data(this, "mousewheel-line-height", u.getlineheight(this)), e.data(this, "mousewheel-page-height", u.getpageheight(this)) }, teardown: function() { if (this.removeeventlistener) for (var n = s.length; n;) this.removeeventlistener(s[--n], t, !1); else this.onmousewheel = null; e.removedata(this, "mousewheel-line-height"), e.removedata(this, "mousewheel-page-height") }, getlineheight: function(t) { var n = e(t), i = n["offsetparent" in e.fn ? "offsetparent" : "parent"](); return i.length || (i = e("body")), parseint(i.css("fontsize"), 10) || parseint(n.css("fontsize"), 10) || 16 }, getpageheight: function(t) { return e(t).height() }, settings: { adjustolddeltas: !0, normalizeoffset: !0 } }; e.fn.extend({ mousewheel: function(e) { return e ? this.bind("mousewheel", e) : this.trigger("mousewheel") }, unmousewheel: function(e) { return this.unbind("mousewheel", e) } }) }); var stats = function() { var e = date.now(), t = e, n = 0, i = 1 / 0, o = 0, r = 0, a = 1 / 0, s = 0, l = 0, c = 0, u = document.createelement("div"); u.id = "stats", u.addeventlistener("mousedown", function(e) { e.preventdefault(), y(++c % 2) }, !1), u.style.csstext = "width:80px;opacity:0.9;cursor:pointer"; var d = document.createelement("div"); d.id = "fps", d.style.csstext = "padding:0 0 3px 3px;text-align:left;background-color:#002", u.appendchild(d); var p = document.createelement("div"); p.id = "fpstext", p.style.csstext = "color:#0ff;font-family:helvetica,arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px", p.innerhtml = "fps", d.appendchild(p); var f = document.createelement("div"); for (f.id = "fpsgraph", f.style.csstext = "position:relative;width:74px;height:30px;background-color:#0ff", d.appendchild(f); 74 > f.children.length;) { var h = document.createelement("span"); h.style.csstext = "width:1px;height:30px;float:left;background-color:#113", f.appendchild(h) } var m = document.createelement("div"); m.id = "ms", m.style.csstext = "padding:0 0 3px 3px;text-align:left;background-color:#020;display:none", u.appendchild(m); var g = document.createelement("div"); g.id = "mstext", g.style.csstext = "color:#0f0;font-family:helvetica,arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px", g.innerhtml = "ms", m.appendchild(g); var v = document.createelement("div"); for (v.id = "msgraph", v.style.csstext = "position:relative;width:74px;height:30px;background-color:#0f0", m.appendchild(v); 74 > v.children.length;) h = document.createelement("span"), h.style.csstext = "width:1px;height:30px;float:left;background-color:#131", v.appendchild(h); var y = function(e) { switch (c = e) { case 0: d.style.display = "block", m.style.display = "none"; break; case 1: d.style.display = "none", m.style.display = "block" } }; return { revision: 12, domelement: u, setmode: y, begin: function() { e = date.now() }, end: function() { var c = date.now(); n = c - e, i = math.min(i, n), o = math.max(o, n), g.textcontent = n + " ms (" + i + "-" + o + ")"; var u = math.min(30, 30 - 30 * (n / 200)); return v.appendchild(v.firstchild).style.height = u + "px", l++, c > t + 1e3 && (r = math.round(1e3 * l / (c - t)), a = math.min(a, r), s = math.max(s, r), p.textcontent = r + " fps (" + a + "-" + s + ")", u = math.min(30, 30 - 30 * (r / 100)), f.appendchild(f.firstchild).style.height = u + "px", t = c, l = 0), c }, update: function() { e = this.end() } } }; "object" == typeof module && (module.exports = stats), ! function(e) { "function" == typeof define && define.amd ? define(["jquery"], e) : e("object" == typeof exports ? require("jquery") : window.jquery || window.zepto) }(function(e) { var t, n, i, o, r, a, s = "close", l = "beforeclose", c = "afterclose", u = "beforeappend", d = "markupparse", p = "open", f = "change", h = "mfp", m = "." + h, g = "mfp-ready", v = "mfp-removing", y = "mfp-prevent-close", w = function() {}, b = !!window.jquery, x = e(window), s = function(e, n) { t.ev.on(h + e + m, n) }, c = function(t, n, i, o) { var r = document.createelement("div"); return r.classname = "mfp-" + t, i && (r.innerhtml = i), o ? n && n.appendchild(r) : (r = e(r), n && r.appendto(n)), r }, t = function(n, i) { t.ev.triggerhandler(h + n, i), t.st.callbacks && (n = n.charat(0).tolowercase() + n.slice(1), t.st.callbacks[n] && t.st.callbacks[n].apply(t, e.isarray(i) ? i : [i])) }, e = function(n) { return n === a && t.currtemplate.closebtn || (t.currtemplate.closebtn = e(t.st.closemarkup.replace("%title%", t.st.tclose)), a = n), t.currtemplate.closebtn }, _ = function() { e.magnificpopup.instance || (t = new w, t.init(), e.magnificpopup.instance = t) }, i = function() { var e = document.createelement("p").style, t = ["ms", "o", "moz", "webkit"]; if (void 0 !== e.transition) return !0; for (; t.length;) if (t.pop() + "transition" in e) return !0; return !1 }; w.prototype = { constructor: w, init: function() { var n = navigator.appversion; t.isie7 = -1 !== n.indexof("msie 7."), t.isie8 = -1 !== n.indexof("msie 8."), t.islowie = t.isie7 || t.isie8, t.isandroid = /android/gi.test(n), t.isios = /iphone|ipad|ipod/gi.test(n), t.supportstransition = i(), t.probablymobile = t.isandroid || t.isios || /(opera mini)|kindle|webos|blackberry|(opera mobi)|(windows phone)|iemobile/i.test(navigator.useragent), i = e(document), t.popupscache = {} }, open: function(n) { var o; if (n.isobj === !1) { t.items = n.items.toarray(), t.index = 0; var a, s = n.items; for (o = 0; o < s.length; o++) if (a = s[o], a.parsed && (a = a.el[0]), a === n.el[0]) { t.index = o; break } } else t.items = e.isarray(n.items) ? n.items : [n.items], t.index = n.index || 0; if (t.isopen) return void t.updateitemhtml(); t.types = [], r = "", t.ev = n.mainel && n.mainel.length ? n.mainel.eq(0) : i, n.key ? (t.popupscache[n.key] || (t.popupscache[n.key] = {}), t.currtemplate = t.popupscache[n.key]) : t.currtemplate = {}, t.st = e.extend(!0, {}, e.magnificpopup.defaults, n), t.fixedcontentpos = "auto" === t.st.fixedcontentpos ? !t.probablymobile : t.st.fixedcontentpos, t.st.modal && (t.st.closeoncontentclick = !1, t.st.closeonbgclick = !1, t.st.showclosebtn = !1, t.st.enableescapekey = !1), t.bgoverlay || (t.bgoverlay = c("bg").on("click" + m, function() { t.close() }), t.wrap = c("wrap").attr("tabindex", -1).on("click" + m, function(e) { t._checkifclose(e.target) && t.close() }), t.container = c("container", t.wrap)), t.contentcontainer = c("content"), t.st.preloader && (t.preloader = c("preloader", t.container, t.st.tloading)); var l = e.magnificpopup.modules; for (o = 0; o < l.length; o++) { var c = l[o]; c = c.charat(0).touppercase() + c.slice(1), t["init" + c].call(t) } t("beforeopen"), t.st.showclosebtn && (t.st.closebtninside ? (s(d, function(e, t, n, i) { n.close_replacewith = e(i.type) }), r += " mfp-close-btn-in") : t.wrap.append(e())), t.st.aligntop && (r += " mfp-align-top"), t.wrap.css(t.fixedcontentpos ? { overflow: t.st.overflowy, overflowx: "hidden", overflowy: t.st.overflowy } : { top: x.scrolltop(), position: "absolute" }), (t.st.fixedbgpos === !1 || "auto" === t.st.fixedbgpos && !t.fixedcontentpos) && t.bgoverlay.css({ height: i.height(), position: "absolute" }), t.st.enableescapekey && i.on("keyup" + m, function(e) { 27 === e.keycode && t.close() }), x.on("resize" + m, function() { t.updatesize() }), t.st.closeoncontentclick || (r += " mfp-auto-cursor"), r && t.wrap.addclass(r); var u = t.wh = x.height(), f = {}; if (t.fixedcontentpos && t._hasscrollbar(u)) { var h = t._getscrollbarsize(); h && (f.marginright = h) } t.fixedcontentpos && (t.isie7 ? e("body, html").css("overflow", "hidden") : f.overflow = "hidden"); var v = t.st.mainclass; return t.isie7 && (v += " mfp-ie7"), v && t._addclasstomfp(v), t.updateitemhtml(), t("buildcontrols"), e("html").css(f), t.bgoverlay.add(t.wrap).prependto(t.st.prependto || e(document.body)), t._lastfocusedel = document.activeelement, settimeout(function() { t.content ? (t._addclasstomfp(g), t._setfocus()) : t.bgoverlay.addclass(g), i.on("focusin" + m, t._onfocusin) }, 16), t.isopen = !0, t.updatesize(u), t(p), n }, close: function() { t.isopen && (t(l), t.isopen = !1, t.st.removaldelay && !t.islowie && t.supportstransition ? (t._addclasstomfp(v), settimeout(function() { t._close() }, t.st.removaldelay)) : t._close()) }, _close: function() { t(s); var n = v + " " + g + " "; if (t.bgoverlay.detach(), t.wrap.detach(), t.container.empty(), t.st.mainclass && (n += t.st.mainclass + " "), t._removeclassfrommfp(n), t.fixedcontentpos) { var o = { marginright: "" }; t.isie7 ? e("body, html").css("overflow", "") : o.overflow = "", e("html").css(o) } i.off("keyup" + m + " focusin" + m), t.ev.off(m), t.wrap.attr("class", "mfp-wrap").removeattr("style"), t.bgoverlay.attr("class", "mfp-bg"), t.container.attr("class", "mfp-container"), !t.st.showclosebtn || t.st.closebtninside && t.currtemplate[t.curritem.type] !== !0 || t.currtemplate.closebtn && t.currtemplate.closebtn.detach(), t._lastfocusedel && e(t._lastfocusedel).focus(), t.curritem = null, t.content = null, t.currtemplate = null, t.prevheight = 0, t(c) }, updatesize: function(e) { if (t.isios) { var n = document.documentelement.clientwidth / window.innerwidth, i = window.innerheight * n; t.wrap.css("height", i), t.wh = i } else t.wh = e || x.height(); t.fixedcontentpos || t.wrap.css("height", t.wh), t("resize") }, updateitemhtml: function() { var n = t.items[t.index]; t.contentcontainer.detach(), t.content && t.content.detach(), n.parsed || (n = t.parseel(t.index)); var i = n.type; if (t("beforechange", [t.curritem ? t.curritem.type : "", i]), t.curritem = n, !t.currtemplate[i]) { var r = t.st[i] ? t.st[i].markup : !1; t("firstmarkupparse", r), t.currtemplate[i] = r ? e(r) : !0 } o && o !== n.type && t.container.removeclass("mfp-" + o + "-holder"); var a = t["get" + i.charat(0).touppercase() + i.slice(1)](n, t.currtemplate[i]); t.appendcontent(a, i), n.preloaded = !0, t(f, n), o = n.type, t.container.prepend(t.contentcontainer), t("afterchange") }, appendcontent: function(e, n) { t.content = e, e ? t.st.showclosebtn && t.st.closebtninside && t.currtemplate[n] === !0 ? t.content.find(".mfp-close").length || t.content.append(e()) : t.content = e : t.content = "", t(u), t.container.addclass("mfp-" + n + "-holder"), t.contentcontainer.append(t.content) }, parseel: function(n) { var i, o = t.items[n]; if (o.tagname ? o = { el: e(o) } : (i = o.type, o = { data: o, src: o.src }), o.el) { for (var r = t.types, a = 0; a < r.length; a++) if (o.el.hasclass("mfp-" + r[a])) { i = r[a]; break } o.src = o.el.attr("data-mfp-src"), o.src || (o.src = o.el.attr("href")) } return o.type = i || t.st.type || "inline", o.index = n, o.parsed = !0, t.items[n] = o, t("elementparse", o), t.items[n] }, addgroup: function(e, n) { var i = function(i) { i.mfpel = this, t._openclick(i, e, n) }; n || (n = {}); var o = "click.magnificpopup"; n.mainel = e, n.items ? (n.isobj = !0, e.off(o).on(o, i)) : (n.isobj = !1, n.delegate ? e.off(o).on(o, n.delegate, i) : (n.items = e, e.off(o).on(o, i))) }, _openclick: function(n, i, o) { var r = void 0 !== o.midclick ? o.midclick : e.magnificpopup.defaults.midclick; if (r || 2 !== n.which && !n.ctrlkey && !n.metakey) { var a = void 0 !== o.disableon ? o.disableon : e.magnificpopup.defaults.disableon; if (a) if (e.isfunction(a)) { if (!a.call(t)) return !0 } else if (x.width() < a) return !0; n.type && (n.preventdefault(), t.isopen && n.stoppropagation()), o.el = e(n.mfpel), o.delegate && (o.items = i.find(o.delegate)), t.open(o) } }, updatestatus: function(e, i) { if (t.preloader) { n !== e && t.container.removeclass("mfp-s-" + n), i || "loading" !== e || (i = t.st.tloading); var o = { status: e, text: i }; t("updatestatus", o), e = o.status, i = o.text, t.preloader.html(i), t.preloader.find("a").on("click", function(e) { e.stopimmediatepropagation() }), t.container.addclass("mfp-s-" + e), n = e } }, _checkifclose: function(n) { if (!e(n).hasclass(y)) { var i = t.st.closeoncontentclick, o = t.st.closeonbgclick; if (i && o) return !0; if (!t.content || e(n).hasclass("mfp-close") || t.preloader && n === t.preloader[0]) return !0; if (n === t.content[0] || e.contains(t.content[0], n)) { if (i) return !0 } else if (o && e.contains(document, n)) return !0; return !1 } }, _addclasstomfp: function(e) { t.bgoverlay.addclass(e), t.wrap.addclass(e) }, _removeclassfrommfp: function(e) { this.bgoverlay.removeclass(e), t.wrap.removeclass(e) }, _hasscrollbar: function(e) { return (t.isie7 ? i.height() : document.body.scrollheight) > (e || x.height()) }, _setfocus: function() { (t.st.focus ? t.content.find(t.st.focus).eq(0) : t.wrap).focus() }, _onfocusin: function(n) { return n.target === t.wrap[0] || e.contains(t.wrap[0], n.target) ? void 0 : (t._setfocus(), !1) }, _parsemarkup: function(t, n, i) { var o; i.data && (n = e.extend(i.data, n)), t(d, [t, n, i]), e.each(n, function(e, n) { if (void 0 === n || n === !1) return !0; if (o = e.split("_"), o.length > 1) { var i = t.find(m + "-" + o[0]); if (i.length > 0) { var r = o[1]; "replacewith" === r ? i[0] !== n[0] && i.replacewith(n) : "img" === r ? i.is("img") ? i.attr("src", n) : i.replacewith('') : i.attr(o[1], n) } } else t.find(m + "-" + e).html(n) }) }, _getscrollbarsize: function() { if (void 0 === t.scrollbarsize) { var e = document.createelement("div"); e.style.csstext = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendchild(e), t.scrollbarsize = e.offsetwidth - e.clientwidth, document.body.removechild(e) } return t.scrollbarsize } }, e.magnificpopup = { instance: null, proto: w.prototype, modules: [], open: function(t, n) { return _(), t = t ? e.extend(!0, {}, t) : {}, t.isobj = !0, t.index = n || 0, this.instance.open(t) }, close: function() { return e.magnificpopup.instance && e.magnificpopup.instance.close() }, registermodule: function(t, n) { n.options && (e.magnificpopup.defaults[t] = n.options), e.extend(this.proto, n.proto), this.modules.push(t) }, defaults: { disableon: 0, key: null, midclick: !1, mainclass: "", preloader: !0, focus: "", closeoncontentclick: !1, closeonbgclick: !0, closebtninside: !0, showclosebtn: !0, enableescapekey: !0, modal: !1, aligntop: !1, removaldelay: 0, prependto: null, fixedcontentpos: "auto", fixedbgpos: "auto", overflowy: "auto", closemarkup: '', tclose: "close (esc)", tloading: "loading..." } }, e.fn.magnificpopup = function(n) { _(); var i = e(this); if ("string" == typeof n) if ("open" === n) { var o, r = b ? i.data("magnificpopup") : i[0].magnificpopup, a = parseint(arguments[1], 10) || 0; r.items ? o = r.items[a] : (o = i, r.delegate && (o = o.find(r.delegate)), o = o.eq(a)), t._openclick({ mfpel: o }, i, r) } else t.isopen && t[n].apply(t, array.prototype.slice.call(arguments, 1)); else n = e.extend(!0, {}, n), b ? i.data("magnificpopup", n) : i[0].magnificpopup = n, t.addgroup(i, n); return i }; var p, k, m, h = "inline", o = function() { m && (k.after(m.addclass(p)).detach(), m = null) }; e.magnificpopup.registermodule(h, { options: { hiddenclass: "hide", markup: "", tnotfound: "content not found" }, proto: { initinline: function() { t.types.push(h), s(s + "." + h, function() { o() }) }, getinline: function(n, i) { if (o(), n.src) { var o = t.st.inline, r = e(n.src); if (r.length) { var a = r[0].parentnode; a && a.tagname && (k || (p = o.hiddenclass, k = c(p), p = "mfp-" + p), m = r.after(k).detach().removeclass(p)), t.updatestatus("ready") } else t.updatestatus("error", o.tnotfound), r = e("
"); return n.inlineelement = r, r } return t.updatestatus("ready"), t._parsemarkup(i, {}, n), i } } }); var b, l = "ajax", a = function() { b && e(document.body).removeclass(b) }, $ = function() { a(), t.req && t.req.abort() }; e.magnificpopup.registermodule(l, { options: { settings: null, cursor: "mfp-ajax-cur", terror: 'the content could not be loaded.' }, proto: { initajax: function() { t.types.push(l), b = t.st.ajax.cursor, s(s + "." + l, $), s("beforechange." + l, $) }, getajax: function(n) { b && e(document.body).addclass(b), t.updatestatus("loading"); var i = e.extend({ url: n.src, success: function(i, o, r) { var a = { data: i, xhr: r }; t("parseajax", a), t.appendcontent(e(a.data), l), n.finished = !0, a(), t._setfocus(), settimeout(function() { t.wrap.addclass(g) }, 16), t.updatestatus("ready"), t("ajaxcontentadded") }, error: function() { a(), n.finished = n.loaderror = !0, t.updatestatus("error", t.st.ajax.terror.replace("%url%", n.src)) } }, t.st.ajax.settings); return t.req = e.ajax(i), "" } } }); var j, z = function(n) { if (n.data && void 0 !== n.data.title) return n.data.title; var i = t.st.image.titlesrc; if (i) { if (e.isfunction(i)) return i.call(t, n); if (n.el) return n.el.attr(i) || "" } return "" }; e.magnificpopup.registermodule("image", { options: { markup: '
', cursor: "mfp-zoom-out-cur", titlesrc: "title", verticalfit: !0, terror: 'the image could not be loaded.' }, proto: { initimage: function() { var n = t.st.image, i = ".image"; t.types.push("image"), s(p + i, function() { "image" === t.curritem.type && n.cursor && e(document.body).addclass(n.cursor) }), s(s + i, function() { n.cursor && e(document.body).removeclass(n.cursor), x.off("resize" + m) }), s("resize" + i, t.resizeimage), t.islowie && s("afterchange", t.resizeimage) }, resizeimage: function() { var e = t.curritem; if (e && e.img && t.st.image.verticalfit) { var n = 0; t.islowie && (n = parseint(e.img.css("padding-top"), 10) + parseint(e.img.css("padding-bottom"), 10)), e.img.css("max-height", t.wh - n) } }, _onimagehassize: function(e) { e.img && (e.hassize = !0, j && clearinterval(j), e.ischeckingimgsize = !1, t("imagehassize", e), e.imghidden && (t.content && t.content.removeclass("mfp-loading"), e.imghidden = !1)) }, findimagesize: function(e) { var n = 0, i = e.img[0], o = function(r) { j && clearinterval(j), j = setinterval(function() { return i.naturalwidth > 0 ? void t._onimagehassize(e) : (n > 200 && clearinterval(j), n++, void(3 === n ? o(10) : 40 === n ? o(50) : 100 === n && o(500))) }, r) }; o(1) }, getimage: function(n, i) { var o = 0, r = function() { n && (n.img[0].complete ? (n.img.off(".mfploader"), n === t.curritem && (t._onimagehassize(n), t.updatestatus("ready")), n.hassize = !0, n.loaded = !0, t("imageloadcomplete")) : (o++, 200 > o ? settimeout(r, 100) : a())) }, a = function() { n && (n.img.off(".mfploader"), n === t.curritem && (t._onimagehassize(n), t.updatestatus("error", s.terror.replace("%url%", n.src))), n.hassize = !0, n.loaded = !0, n.loaderror = !0) }, s = t.st.image, l = i.find(".mfp-img"); if (l.length) { var c = document.createelement("img"); c.classname = "mfp-img", n.el && n.el.find("img").length && (c.alt = n.el.find("img").attr("alt")), n.img = e(c).on("load.mfploader", r).on("error.mfploader", a), c.src = n.src, l.is("img") && (n.img = n.img.clone()), c = n.img[0], c.naturalwidth > 0 ? n.hassize = !0 : c.width || (n.hassize = !1) } return t._parsemarkup(i, { title: z(n), img_replacewith: n.img }, n), t.resizeimage(), n.hassize ? (j && clearinterval(j), n.loaderror ? (i.addclass("mfp-loading"), t.updatestatus("error", s.terror.replace("%url%", n.src))) : (i.removeclass("mfp-loading"), t.updatestatus("ready")), i) : (t.updatestatus("loading"), n.loading = !0, n.hassize || (n.imghidden = !0, i.addclass("mfp-loading"), t.findimagesize(n)), i) } } }); var f, n = function() { return void 0 === f && (f = void 0 !== document.createelement("p").style.moztransform), f }; e.magnificpopup.registermodule("zoom", { options: { enabled: !1, easing: "ease-in-out", duration: 300, opener: function(e) { return e.is("img") ? e : e.find("img") } }, proto: { initzoom: function() { var e, n = t.st.zoom, i = ".zoom"; if (n.enabled && t.supportstransition) { var o, r, a = n.duration, c = function(e) { var t = e.clone().removeattr("style").removeattr("class").addclass("mfp-animated-image"), i = "all " + n.duration / 1e3 + "s " + n.easing, o = { position: "fixed", zindex: 9999, left: 0, top: 0, "-webkit-backface-visibility": "hidden" }, r = "transition"; return o["-webkit-" + r] = o["-moz-" + r] = o["-o-" + r] = o[r] = i, t.css(o), t }, u = function() { t.content.css("visibility", "visible") }; s("buildcontrols" + i, function() { if (t._allowzoom()) { if (cleartimeout(o), t.content.css("visibility", "hidden"), e = t._getitemtozoom(), !e) return void u(); r = c(e), r.css(t._getoffset()), t.wrap.append(r), o = settimeout(function() { r.css(t._getoffset(!0)), o = settimeout(function() { u(), settimeout(function() { r.remove(), e = r = null, t("zoomanimationended") }, 16) }, a) }, 16) } }), s(l + i, function() { if (t._allowzoom()) { if (cleartimeout(o), t.st.removaldelay = a, !e) { if (e = t._getitemtozoom(), !e) return; r = c(e) } r.css(t._getoffset(!0)), t.wrap.append(r), t.content.css("visibility", "hidden"), settimeout(function() { r.css(t._getoffset()) }, 16) } }), s(s + i, function() { t._allowzoom() && (u(), r && r.remove(), e = null) }) } }, _allowzoom: function() { return "image" === t.curritem.type }, _getitemtozoom: function() { return t.curritem.hassize ? t.curritem.img : !1 }, _getoffset: function(n) { var i; i = n ? t.curritem.img : t.st.zoom.opener(t.curritem.el || t.curritem); var o = i.offset(), r = parseint(i.css("padding-top"), 10), a = parseint(i.css("padding-bottom"), 10); o.top -= e(window).scrolltop() - r; var s = { width: i.width(), height: (b ? i.innerheight() : i[0].offsetheight) - a - r }; return n() ? s["-moz-transform"] = s.transform = "translate(" + o.left + "px," + o.top + "px)" : (s.left = o.left, s.top = o.top), s } } }); var d = "iframe", u = "//about:blank", r = function(e) { if (t.currtemplate[d]) { var n = t.currtemplate[d].find("iframe"); n.length && (e || (n[0].src = u), t.isie8 && n.css("display", e ? "block" : "none")) } }; e.magnificpopup.registermodule(d, { options: { markup: '
', srcaction: "iframe_src", patterns: { youtube: { index: "youtube.com", id: "v=", src: "//www.youtube.com/embed/%id%?autoplay=1" }, vimeo: { index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1" }, gmaps: { index: "//maps.google.", src: "%id%&output=embed" } } }, proto: { initiframe: function() { t.types.push(d), s("beforechange", function(e, t, n) { t !== n && (t === d ? r() : n === d && r(!0)) }), s(s + "." + d, function() { r() }) }, getiframe: function(n, i) { var o = n.src, r = t.st.iframe; e.each(r.patterns, function() { return o.indexof(this.index) > -1 ? (this.id && (o = "string" == typeof this.id ? o.substr(o.lastindexof(this.id) + this.id.length, o.length) : this.id.call(this, o)), o = this.src.replace("%id%", o), !1) : void 0 }); var a = {}; return r.srcaction && (a[r.srcaction] = o), t._parsemarkup(i, a, n), t.updatestatus("ready"), i } } }); var v = function(e) { var n = t.items.length; return e > n - 1 ? e - n : 0 > e ? n + e : e }, q = function(e, t, n) { return e.replace(/%curr%/gi, t + 1).replace(/%total%/gi, n) }; e.magnificpopup.registermodule("gallery", { options: { enabled: !1, arrowmarkup: '', preload: [0, 2], navigatebyimgclick: !0, arrows: !0, tprev: "previous (left arrow key)", tnext: "next (right arrow key)", tcounter: "%curr% of %total%" }, proto: { initgallery: function() { var n = t.st.gallery, o = ".mfp-gallery", a = boolean(e.fn.mfpfastclick); return t.direction = !0, n && n.enabled ? (r += " mfp-gallery", s(p + o, function() { n.navigatebyimgclick && t.wrap.on("click" + o, ".mfp-img", function() { return t.items.length > 1 ? (t.next(), !1) : void 0 }), i.on("keydown" + o, function(e) { 37 === e.keycode ? t.prev() : 39 === e.keycode && t.next() }) }), s("updatestatus" + o, function(e, n) { n.text && (n.text = q(n.text, t.curritem.index, t.items.length)) }), s(d + o, function(e, i, o, r) { var a = t.items.length; o.counter = a > 1 ? q(n.tcounter, r.index, a) : "" }), s("buildcontrols" + o, function() { if (t.items.length > 1 && n.arrows && !t.arrowleft) { var i = n.arrowmarkup, o = t.arrowleft = e(i.replace(/%title%/gi, n.tprev).replace(/%dir%/gi, "left")).addclass(y), r = t.arrowright = e(i.replace(/%title%/gi, n.tnext).replace(/%dir%/gi, "right")).addclass(y), s = a ? "mfpfastclick" : "click"; o[s](function() { t.prev() }), r[s](function() { t.next() }), t.isie7 && (c("b", o[0], !1, !0), c("a", o[0], !1, !0), c("b", r[0], !1, !0), c("a", r[0], !1, !0)), t.container.append(o.add(r)) } }), s(f + o, function() { t._preloadtimeout && cleartimeout(t._preloadtimeout), t._preloadtimeout = settimeout(function() { t.preloadnearbyimages(), t._preloadtimeout = null }, 16) }), void s(s + o, function() { i.off(o), t.wrap.off("click" + o), t.arrowleft && a && t.arrowleft.add(t.arrowright).destroymfpfastclick(), t.arrowright = t.arrowleft = null })) : !1 }, next: function() { t.direction = !0, t.index = v(t.index + 1), t.updateitemhtml() }, prev: function() { t.direction = !1, t.index = v(t.index - 1), t.updateitemhtml() }, goto: function(e) { t.direction = e >= t.index, t.index = e, t.updateitemhtml() }, preloadnearbyimages: function() { var e, n = t.st.gallery.preload, i = math.min(n[0], t.items.length), o = math.min(n[1], t.items.length); for (e = 1; e <= (t.direction ? o : i); e++) t._preloaditem(t.index + e); for (e = 1; e <= (t.direction ? i : o); e++) t._preloaditem(t.index - e) }, _preloaditem: function(n) { if (n = v(n), !t.items[n].preloaded) { var i = t.items[n]; i.parsed || (i = t.parseel(n)), t("lazyload", i), "image" === i.type && (i.img = e('').on("load.mfploader", function() { i.hassize = !0 }).on("error.mfploader", function() { i.hassize = !0, i.loaderror = !0, t("lazyloaderror", i) }).attr("src", i.src)), i.preloaded = !0 } } } }); var q = "retina"; e.magnificpopup.registermodule(q, { options: { replacesrc: function(e) { return e.src.replace(/\.\w+$/, function(e) { return "@2x" + e }) }, ratio: 1 }, proto: { initretina: function() { if (window.devicepixelratio > 1) { var e = t.st.retina, n = e.ratio; n = isnan(n) ? n() : n, n > 1 && (s("imagehassize." + q, function(e, t) { t.img.css({ "max-width": t.img[0].naturalwidth / n, width: "100%" }) }), s("elementparse." + q, function(t, i) { i.src = e.replacesrc(i, n) })) } } } }), function() { var t = 1e3, n = "ontouchstart" in window, i = function() { x.off("touchmove" + r + " touchend" + r) }, o = "mfpfastclick", r = "." + o; e.fn.mfpfastclick = function(o) { return e(this).each(function() { var a, s = e(this); if (n) { var l, c, u, d, p, f; s.on("touchstart" + r, function(e) { d = !1, f = 1, p = e.originalevent ? e.originalevent.touches[0] : e.touches[0], c = p.clientx, u = p.clienty, x.on("touchmove" + r, function(e) { p = e.originalevent ? e.originalevent.touches : e.touches, f = p.length, p = p[0], (math.abs(p.clientx - c) > 10 || math.abs(p.clienty - u) > 10) && (d = !0, i()) }).on("touchend" + r, function(e) { i(), d || f > 1 || (a = !0, e.preventdefault(), cleartimeout(l), l = settimeout(function() { a = !1 }, t), o()) }) }) } s.on("click" + r, function() { a || o() }) }) }, e.fn.destroymfpfastclick = function() { e(this).off("touchstart" + r + " click" + r), n && x.off("touchmove" + r + " touchend" + r) } }(), _() }), function() { "use strict"; function e(t, i) { function o(e, t) { return function() { return e.apply(t, arguments) } } var r; if (i = i || {}, this.trackingclick = !1, this.trackingclickstart = 0, this.targetelement = null, this.touchstartx = 0, this.touchstarty = 0, this.lasttouchidentifier = 0, this.touchboundary = i.touchboundary || 10, this.layer = t, this.tapdelay = i.tapdelay || 200, this.taptimeout = i.taptimeout || 700, !e.notneeded(t)) { for (var a = ["onmouse", "onclick", "ontouchstart", "ontouchmove", "ontouchend", "ontouchcancel"], s = this, l = 0, c = a.length; c > l; l++) s[a[l]] = o(s[a[l]], s); n && (t.addeventlistener("mouseover", this.onmouse, !0), t.addeventlistener("mousedown", this.onmouse, !0), t.addeventlistener("mouseup", this.onmouse, !0)), t.addeventlistener("click", this.onclick, !0), t.addeventlistener("touchstart", this.ontouchstart, !1), t.addeventlistener("touchmove", this.ontouchmove, !1), t.addeventlistener("touchend", this.ontouchend, !1), t.addeventlistener("touchcancel", this.ontouchcancel, !1), event.prototype.stopimmediatepropagation || (t.removeeventlistener = function(e, n, i) { var o = node.prototype.removeeventlistener; "click" === e ? o.call(t, e, n.hijacked || n, i) : o.call(t, e, n, i) }, t.addeventlistener = function(e, n, i) { var o = node.prototype.addeventlistener; "click" === e ? o.call(t, e, n.hijacked || (n.hijacked = function(e) { e.propagationstopped || n(e) }), i) : o.call(t, e, n, i) }), "function" == typeof t.onclick && (r = t.onclick, t.addeventlistener("click", function(e) { r(e) }, !1), t.onclick = null) } } var t = navigator.useragent.indexof("windows phone") >= 0, n = navigator.useragent.indexof("android") > 0 && !t, i = /ip(ad|hone|od)/.test(navigator.useragent) && !t, o = i && /os 4_\d(_\d)?/.test(navigator.useragent), r = i && /os [6-7]_\d/.test(navigator.useragent), a = navigator.useragent.indexof("bb10") > 0; e.prototype.needsclick = function(e) { switch (e.nodename.tolowercase()) { case "button": case "select": case "textarea": if (e.disabled) return !0; break; case "input": if (i && "file" === e.type || e.disabled) return !0; break; case "label": case "iframe": case "video": return !0 } return /\bneedsclick\b/.test(e.classname) }, e.prototype.needsfocus = function(e) { switch (e.nodename.tolowercase()) { case "textarea": return !0; case "select": return !n; case "input": switch (e.type) { case "button": case "checkbox": case "file": case "image": case "radio": case "submit": return !1 } return !e.disabled && !e.readonly; default: return /\bneedsfocus\b/.test(e.classname) } }, e.prototype.sendclick = function(e, t) { var n, i; document.activeelement && document.activeelement !== e && document.activeelement.blur(), i = t.changedtouches[0], n = document.createevent("mouseevents"), n.initmouseevent(this.determineeventtype(e), !0, !0, window, 1, i.screenx, i.screeny, i.clientx, i.clienty, !1, !1, !1, !1, 0, null), n.forwardedtouchevent = !0, e.dispatchevent(n) }, e.prototype.determineeventtype = function(e) { return n && "select" === e.tagname.tolowercase() ? "mousedown" : "click" }, e.prototype.focus = function(e) { var t; i && e.setselectionrange && 0 !== e.type.indexof("date") && "time" !== e.type && "month" !== e.type ? (t = e.value.length, e.setselectionrange(t, t)) : e.focus() }, e.prototype.updatescrollparent = function(e) { var t, n; if (t = e.fastclickscrollparent, !t || !t.contains(e)) { n = e; do { if (n.scrollheight > n.offsetheight) { t = n, e.fastclickscrollparent = n; break } n = n.parentelement } while (n) } t && (t.fastclicklastscrolltop = t.scrolltop) }, e.prototype.gettargetelementfromeventtarget = function(e) { return e.nodetype === node.text_node ? e.parentnode : e }, e.prototype.ontouchstart = function(e) { var t, n, r; if (e.targettouches.length > 1) return !0; if (t = this.gettargetelementfromeventtarget(e.target), n = e.targettouches[0], i) { if (r = window.getselection(), r.rangecount && !r.iscollapsed) return !0; if (!o) { if (n.identifier && n.identifier === this.lasttouchidentifier) return e.preventdefault(), !1; this.lasttouchidentifier = n.identifier, this.updatescrollparent(t) } } return this.trackingclick = !0, this.trackingclickstart = e.timestamp, this.targetelement = t, this.touchstartx = n.pagex, this.touchstarty = n.pagey, e.timestamp - this.lastclicktime < this.tapdelay && e.preventdefault(), !0 }, e.prototype.touchhasmoved = function(e) { var t = e.changedtouches[0], n = this.touchboundary; return math.abs(t.pagex - this.touchstartx) > n || math.abs(t.pagey - this.touchstarty) > n ? !0 : !1 }, e.prototype.ontouchmove = function(e) { return this.trackingclick ? ((this.targetelement !== this.gettargetelementfromeventtarget(e.target) || this.touchhasmoved(e)) && (this.trackingclick = !1, this.targetelement = null), !0) : !0 }, e.prototype.findcontrol = function(e) { return void 0 !== e.control ? e.control : e.htmlfor ? document.getelementbyid(e.htmlfor) : e.queryselector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea") }, e.prototype.ontouchend = function(e) { var t, a, s, l, c, u = this.targetelement; if (!this.trackingclick) return !0; if (e.timestamp - this.lastclicktime < this.tapdelay) return this.cancelnextclick = !0, !0; if (e.timestamp - this.trackingclickstart > this.taptimeout) return !0; if (this.cancelnextclick = !1, this.lastclicktime = e.timestamp, a = this.trackingclickstart, this.trackingclick = !1, this.trackingclickstart = 0, r && (c = e.changedtouches[0], u = document.elementfrompoint(c.pagex - window.pagexoffset, c.pagey - window.pageyoffset) || u, u.fastclickscrollparent = this.targetelement.fastclickscrollparent), s = u.tagname.tolowercase(), "label" === s) { if (t = this.findcontrol(u)) { if (this.focus(u), n) return !1; u = t } } else if (this.needsfocus(u)) return e.timestamp - a > 100 || i && window.top !== window && "input" === s ? (this.targetelement = null, !1) : (this.focus(u), this.sendclick(u, e), i && "select" === s || (this.targetelement = null, e.preventdefault()), !1); return i && !o && (l = u.fastclickscrollparent, l && l.fastclicklastscrolltop !== l.scrolltop) ? !0 : (this.needsclick(u) || (e.preventdefault(), this.sendclick(u, e)), !1) }, e.prototype.ontouchcancel = function() { this.trackingclick = !1, this.targetelement = null }, e.prototype.onmouse = function(e) { return this.targetelement ? e.forwardedtouchevent ? !0 : e.cancelable && (!this.needsclick(this.targetelement) || this.cancelnextclick) ? (e.stopimmediatepropagation ? e.stopimmediatepropagation() : e.propagationstopped = !0, e.stoppropagation(), e.preventdefault(), !1) : !0 : !0 }, e.prototype.onclick = function(e) { var t; return this.trackingclick ? (this.targetelement = null, this.trackingclick = !1, !0) : "submit" === e.target.type && 0 === e.detail ? !0 : (t = this.onmouse(e), t || (this.targetelement = null), t) }, e.prototype.destroy = function() { var e = this.layer; n && (e.removeeventlistener("mouseover", this.onmouse, !0), e.removeeventlistener("mousedown", this.onmouse, !0), e.removeeventlistener("mouseup", this.onmouse, !0)), e.removeeventlistener("click", this.onclick, !0), e.removeeventlistener("touchstart", this.ontouchstart, !1), e.removeeventlistener("touchmove", this.ontouchmove, !1), e.removeeventlistener("touchend", this.ontouchend, !1), e.removeeventlistener("touchcancel", this.ontouchcancel, !1) }, e.notneeded = function(e) { var t, i, o, r; if ("undefined" == typeof window.ontouchstart) return !0; if (i = +(/chrome\/([0-9]+)/.exec(navigator.useragent) || [, 0])[1]) { if (!n) return !0; if (t = document.queryselector("meta[name=viewport]")) { if (-1 !== t.content.indexof("user-scalable=no")) return !0; if (i > 31 && document.documentelement.scrollwidth <= window.outerwidth) return !0 } } if (a && (o = navigator.useragent.match(/version\/([0-9]*)\.([0-9]*)/), o[1] >= 10 && o[2] >= 3 && (t = document.queryselector("meta[name=viewport]")))) { if (-1 !== t.content.indexof("user-scalable=no")) return !0; if (document.documentelement.scrollwidth <= window.outerwidth) return !0 } return "none" === e.style.mstouchaction || "manipulation" === e.style.touchaction ? !0 : (r = +(/firefox\/([0-9]+)/.exec(navigator.useragent) || [, 0])[1], r >= 27 && (t = document.queryselector("meta[name=viewport]"), t && (-1 !== t.content.indexof("user-scalable=no") || document.documentelement.scrollwidth <= window.outerwidth)) ? !0 : "none" === e.style.touchaction || "manipulation" === e.style.touchaction ? !0 : !1) }, e.attach = function(t, n) { return new e(t, n) }, "function" == typeof define && "object" == typeof define.amd && define.amd ? define(function() { return e }) : "undefined" != typeof module && module.exports ? (module.exports = e.attach, module.exports.fastclick = e) : window.fastclick = e }(), $(function() { $(window).load(function() { window.loaded = !0 }), $(document).on("click", ".dynamic-modal-content", function(e) { var t = $(this), n = t.attr("href"); openmodal(n, !0, t.hasclass("remember-current-state")), e.preventdefault() }), history.adapter.bind(window, "statechange", function() { if (1 == $.skip_statechange_action) return $.skip_statechange_action = 0, !0; var e = history.getstate(); return "dynamic-modal-content" == e.data.type ? (openmodal(e.url, 0, e.remember_state), !0) : e.data.home || "/" == e.hash ? (closemodal(), !0) : void 0 }), $(document).keyup(function(e) { 27 == e.keycode && closemodal() }), $("#main-menu .menu-item").hover(function(e) { e.stoppropagation(), $(this).addclass("hover") }, function() { $(this).removeclass("hover") }), $(window).resize(function() { $("#content-modal").scroll() }).resize() }), particle.global_draw_color = [0, 0, 0, 255], particle.prototype.submittofields = function(e) { for (var t = 0, n = 0, i = 0; i < e.length; i++) { var o = e[i], r = o.position.x - this.position.x, a = o.position.y - this.position.y, s = o.mass / math.pow(r * r + o.mass / 2 + a * a + o.mass / 2, 1.5); t += r * s, n += a * s } this.acceleration = new vector(t, n) }, particle.prototype.move = function() { this.velocity.x += this.acceleration.x / 1.5, this.velocity.y += this.acceleration.y / 1.5, this.position.x += this.velocity.x / 1.5, this.position.y += this.velocity.y / 1.5 }, particle.prototype.drawvariable = function(e, t) { var n = 4 * (~~this.position.y * t + ~~this.position.x), i = this.velocity.getmagnitude(), o = particle.global_draw_color[0] * i, r = particle.global_draw_color[1], a = .5 * particle.global_draw_color[2] / i, s = particle.global_draw_color[3]; e[n] += o, e[n + 1] += r, e[n + 2] += a, e[n + 3] = s }, particle.prototype.drawbasic = function(e) { var t = e.context; t.fillstyle = this.fillstyle, t.beginpath(), t.arc(this.position.x, this.position.y, this.radius, 0, 2 * math.pi, !1), t.fill(), this.stroke_radius && this.drawhole(e) }, particle.prototype.drawhole = function(e) { var t = e.context; t.fillstyle = this.holefillstyle, t.beginpath(), t.arc(this.position.x, this.position.y, this.stroke_radius, 0, 2 * math.pi, !1), t.fill() }, particle.prototype.drawsoft = function(e, t) { var n = 4 * (~~this.position.y * t + ~~this.position.x), i = particle.global_draw_color[0], o = particle.global_draw_color[1], r = particle.global_draw_color[2], a = particle.global_draw_color[3]; e[n - 4] += .8 * i, e[n - 3] += .8 * o, e[n - 2] += .8 * r, e[n - 1] = a, e[n] += .8 * i, e[n + 1] += .8 * o, e[n + 2] += .8 * r, e[n + 3] = a, e[n + 4] += .8 * i, e[n + 5] += .8 * o, e[n + 6] += .8 * r, e[n + 7] = a, n += 4 * t, e[n - 4] += .8 * i, e[n - 3] += .8 * o, e[n - 2] += .8 * r, e[n - 1] = a, e[n] += i, e[n + 1] += o, e[n + 2] += r, e[n + 3] = a, e[n + 4] += .8 * i, e[n + 5] += .8 * o, e[n + 6] += .8 * r, e[n + 7] = a, n += 4 * t, e[n - 4] += .8 * i, e[n - 3] += .8 * o, e[n - 2] += .8 * r, e[n - 1] = a, e[n] += .8 * i, e[n + 1] += .8 * o, e[n + 2] += .8 * r, e[n + 3] = a, e[n + 4] += .8 * i, e[n + 5] += .8 * o, e[n + 6] += .8 * r, e[n + 7] = a }, particle.prototype.draw = particle.prototype.drawbasic, particle.prototype.setasmenuanchortype = function() { var e = this; e.isfixed = 1, e.fillstyle = "#227eef", e.connects = 1, e.radius = 5, e.stroke_radius = 3, e.holefillstyle = "#e8e8e8", e.anchor_particle = 1 }, particle.prototype.setasbuttonedgetype = function() { var e = this; e.isfixed = 1, e.fillstyle = "#227eef", e.connects = 1, e.radius = 2, e.menu_particle = 1 }, particleemitter.drawcolor = "#999", particleemitter.drawcolor2 = "#000", particleemitter.jitter = .05, particleemitter.fromstring = function(e) { var t = e.substr(1).split(":"), n = new particleemitter; return n.position = point.fromstring(t.shift()), n.velocity = vector.fromstring(t.shift()), n.size = parseint(t.shift()), n.particlelife = parseint(t.shift()), n.spread = parsefloat(t.shift()), n.emissionrate = parseint(t.shift().valueof()), n }, field.drawcolor = "rgb(0,0,255)", field.drawcolor2 = "rgb(0,0,0)", field.prototype.setmass = function(e) { return this.mass = e, this.drawcolor = 0 > e ? "#900" : "#090", this }, field.prototype.moveto = function(e) { this.position = e }, field.prototype.tostring = function() { var e = [this.position.tostring(), this.mass]; return "f" + e.join(":") }, field.fromstring = function(e) { var t = e.substr(1).split(":"), n = new field(point.fromstring(t.shift()), parseint(t.shift())); return n }, vector.prototype.getmagnitude = function() { return math.sqrt(this.x * this.x + this.y * this.y) }, vector.prototype.multiply = function(e) { this.x *= e, this.y *= e }, vector.prototype.add = function(e) { this.x += e.x, this.y += e.y }, vector.prototype.vectorto = function(e) { return new vector(e.x - this.x, e.y - this.y) }, vector.prototype.withinbounds = function(e, t) { return this.x >= e.x - t / 2 && this.x <= e.x + t / 2 && this.y >= e.y - t / 2 && this.y <= e.y + t / 2 }, vector.prototype.getangle = function() { var e = 0, t = 0; this.x > 0 ? this.y > 0 ? (t = 0, e = this.y / this.x) : (t = 3 * math.pi / 2, e = this.x / this.y) : this.y > 0 ? (t = math.pi / 2, e = this.x / this.y) : (t = math.pi, e = this.y / this.x); var n = math.atan(math.abs(e)) + t; return n }, vector.prototype.getangledegrees = function() { return 180 * this.getangle() / math.pi }, vector.prototype.jitter = function(e) { return new vector(this.x + this.x * e * math.random(), this.y + this.y * e * math.random()) }, vector.prototype.copy = function() { return new vector(this.x, this.y) }, vector.prototype.tostring = function() { return this.x.tofixed(3).replace(/\.?0+$/, "") + "," + this.y.tofixed(3).replace(/\.?0+$/, "") }, vector.fromangle = function(e, t) { return new vector(t * math.cos(e), t * math.sin(e)) }, vector.fromstring = function(e) { var t = e.split(","); return new vector(parsefloat(t[0]), parsefloat(t[1])) }, point = vector; var display = null, particlesystem = null, context = document.getelementbyid("display").getcontext("2d"), devicepixelratio = window.devicepixelratio || 1, backingstoreratio = context.webkitbackingstorepixelratio || context.mozbackingstorepixelratio || context.msbackingstorepixelratio || context.obackingstorepixelratio || context.backingstorepixelratio || 1, scale_ratio = devicepixelratio / backingstoreratio; $(function() { var e = document.getelementbyid("display"); $(e).attr("width", $(window).width() * scale_ratio), $(e).attr("height", $(window).height() * scale_ratio), $(e).css("width", $(window).width()), $(e).css("height", $(window).height()), display = new display(document.getelementbyid("display")), display.scale = scale_ratio, display.init(), particlesystem = (new particlesystem).init(display), display.start(), addemittersandfields(particlesystem); var t = null; $(window).resize(function() { cleartimeout(t), t = settimeout(function() { particlesystem.emitters = [], particlesystem.fields = []; var e = document.getelementbyid("display"); $(e).attr("width", $(window).width() * scale_ratio), $(e).attr("height", $(window).height() * scale_ratio), $(e).css("width", $(window).width()), $(e).css("height", $(window).height()), particlesystem.display.context.scale(scale_ratio, scale_ratio), particlesystem.display.scale = scale_ratio, particlesystem.display.calculate_scale(), addemittersandfields(particlesystem) }, 300) }) });