Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onYouTubePlayerAPIReady() {
- mejs.YouTubeApi.iFrameReady()
- }
- function onYouTubePlayerReady(a) {
- mejs.YouTubeApi.flashReady(a)
- }
- function refreshWaypoints() {
- $.waypoints("refresh")
- }
- function findInArray(a, b, c) {
- for (var d in a)if (a[d].hasOwnProperty(b) && a[d][b] === c)return a[d].post_id;
- return !1
- }
- +function (a) {
- "use strict";
- function b() {
- var a = document.createElement("bootstrap"), b = {
- WebkitTransition: "webkitTransitionEnd",
- MozTransition: "transitionend",
- OTransition: "oTransitionEnd otransitionend",
- transition: "transitionend"
- };
- for (var c in b)if (void 0 !== a.style[c])return {end: b[c]}
- }
- a.fn.emulateTransitionEnd = function (b) {
- var c = !1, d = this;
- a(this).one(a.support.transition.end, function () {
- c = !0
- });
- var e = function () {
- c || a(d).trigger(a.support.transition.end)
- };
- return setTimeout(e, b), this
- }, a(function () {
- a.support.transition = b()
- })
- }(jQuery), +function (a) {
- "use strict";
- var b = function (c, d) {
- this.$element = a(c), this.options = a.extend({}, b.DEFAULTS, d), this.transitioning = null, this.options.parent && (this.$parent = a(this.options.parent)), this.options.toggle && this.toggle()
- };
- b.DEFAULTS = {toggle: !0}, b.prototype.dimension = function () {
- var a = this.$element.hasClass("width");
- return a ? "width" : "height"
- }, b.prototype.show = function () {
- if (!this.transitioning && !this.$element.hasClass("in")) {
- var b = a.Event("show.bs.collapse");
- if (this.$element.trigger(b), !b.isDefaultPrevented()) {
- var c = this.$parent && this.$parent.find("> .panel > .in");
- if (c && c.length) {
- var d = c.data("bs.collapse");
- if (d && d.transitioning)return;
- c.collapse("hide"), d || c.data("bs.collapse", null)
- }
- var e = this.dimension();
- this.$element.removeClass("collapse").addClass("collapsing")[e](0), this.transitioning = 1;
- var f = function () {
- this.$element.removeClass("collapsing").addClass("in")[e]("auto"), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
- };
- if (!a.support.transition)return f.call(this);
- var g = a.camelCase(["scroll", e].join("-"));
- this.$element.one(a.support.transition.end, a.proxy(f, this)).emulateTransitionEnd(350)[e](this.$element[0][g])
- }
- }
- }, b.prototype.hide = function () {
- if (!this.transitioning && this.$element.hasClass("in")) {
- var b = a.Event("hide.bs.collapse");
- if (this.$element.trigger(b), !b.isDefaultPrevented()) {
- var c = this.dimension();
- this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"), this.transitioning = 1;
- var d = function () {
- this.transitioning = 0, this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")
- };
- return a.support.transition ? (this.$element[c](0).one(a.support.transition.end, a.proxy(d, this)).emulateTransitionEnd(350), void 0) : d.call(this)
- }
- }
- }, b.prototype.toggle = function () {
- this[this.$element.hasClass("in") ? "hide" : "show"]()
- };
- var c = a.fn.collapse;
- a.fn.collapse = function (c) {
- return this.each(function () {
- var d = a(this), e = d.data("bs.collapse"), f = a.extend({}, b.DEFAULTS, d.data(), "object" == typeof c && c);
- e || d.data("bs.collapse", e = new b(this, f)), "string" == typeof c && e[c]()
- })
- }, a.fn.collapse.Constructor = b, a.fn.collapse.noConflict = function () {
- return a.fn.collapse = c, this
- }, a(document).on("click.bs.collapse.data-api", "[data-toggle=collapse]", function (b) {
- var c, d = a(this), e = d.attr("data-target") || b.preventDefault() || (c = d.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, ""), f = a(e), g = f.data("bs.collapse"), h = g ? "toggle" : d.data(), i = d.attr("data-parent"), j = i && a(i);
- g && g.transitioning || (j && j.find('[data-toggle=collapse][data-parent="' + i + '"]').not(d).addClass("collapsed"), d[f.hasClass("in") ? "addClass" : "removeClass"]("collapsed")), f.collapse(h)
- })
- }(jQuery), +function (a) {
- "use strict";
- var b = function (b, c) {
- this.options = c, this.$element = a(b), this.$backdrop = this.isShown = null, this.options.remote && this.$element.load(this.options.remote)
- };
- b.DEFAULTS = {backdrop: !0, keyboard: !0, show: !0}, b.prototype.toggle = function (a) {
- return this[this.isShown ? "hide" : "show"](a)
- }, b.prototype.show = function (b) {
- var c = this, d = a.Event("show.bs.modal", {relatedTarget: b});
- this.$element.trigger(d), this.isShown || d.isDefaultPrevented() || (this.isShown = !0, this.escape(), this.$element.on("click.dismiss.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.backdrop(function () {
- var d = a.support.transition && c.$element.hasClass("fade");
- c.$element.parent().length || c.$element.appendTo(document.body), c.$element.show(), d && c.$element[0].offsetWidth, c.$element.addClass("in").attr("aria-hidden", !1), c.enforceFocus();
- var e = a.Event("shown.bs.modal", {relatedTarget: b});
- d ? c.$element.find(".modal-dialog").one(a.support.transition.end, function () {
- c.$element.focus().trigger(e)
- }).emulateTransitionEnd(300) : c.$element.focus().trigger(e)
- }))
- }, b.prototype.hide = function (b) {
- b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one(a.support.transition.end, a.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal())
- }, b.prototype.enforceFocus = function () {
- a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function (a) {
- this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.focus()
- }, this))
- }, b.prototype.escape = function () {
- this.isShown && this.options.keyboard ? this.$element.on("keyup.dismiss.bs.modal", a.proxy(function (a) {
- 27 == a.which && this.hide()
- }, this)) : this.isShown || this.$element.off("keyup.dismiss.bs.modal")
- }, b.prototype.hideModal = function () {
- var a = this;
- this.$element.hide(), this.backdrop(function () {
- a.removeBackdrop(), a.$element.trigger("hidden.bs.modal")
- })
- }, b.prototype.removeBackdrop = function () {
- this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
- }, b.prototype.backdrop = function (b) {
- var c = this.$element.hasClass("fade") ? "fade" : "";
- if (this.isShown && this.options.backdrop) {
- var d = a.support.transition && c;
- if (this.$backdrop = a('<div class="modal-backdrop ' + c + '" />').appendTo(document.body), this.$element.on("click.dismiss.modal", a.proxy(function (a) {
- a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this))
- }, this)), d && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b)return;
- d ? this.$backdrop.one(a.support.transition.end, b).emulateTransitionEnd(150) : b()
- } else!this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(a.support.transition.end, b).emulateTransitionEnd(150) : b()) : b && b()
- };
- var c = a.fn.modal;
- a.fn.modal = function (c, d) {
- return this.each(function () {
- var e = a(this), f = e.data("bs.modal"), g = a.extend({}, b.DEFAULTS, e.data(), "object" == typeof c && c);
- f || e.data("bs.modal", f = new b(this, g)), "string" == typeof c ? f[c](d) : g.show && f.show(d)
- })
- }, a.fn.modal.Constructor = b, a.fn.modal.noConflict = function () {
- return a.fn.modal = c, this
- }, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function (b) {
- var c = a(this), d = c.attr("href"), e = a(c.attr("data-target") || d && d.replace(/.*(?=#[^\s]+$)/, "")), f = e.data("modal") ? "toggle" : a.extend({remote: !/#/.test(d) && d}, e.data(), c.data());
- b.preventDefault(), e.modal(f, this).one("hide", function () {
- c.is(":visible") && c.focus()
- })
- }), a(document).on("show.bs.modal", ".modal", function () {
- a(document.body).addClass("modal-open")
- }).on("hidden.bs.modal", ".modal", function () {
- a(document.body).removeClass("modal-open")
- })
- }(jQuery), +function (a) {
- "use strict";
- var b = function (a, b) {
- this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null, this.init("tooltip", a, b)
- };
- b.DEFAULTS = {
- animation: !0,
- placement: "top",
- selector: !1,
- template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
- trigger: "hover focus",
- title: "",
- delay: 0,
- html: !1,
- container: !1
- }, b.prototype.init = function (b, c, d) {
- this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d);
- for (var e = this.options.trigger.split(" "), f = e.length; f--;) {
- var g = e[f];
- if ("click" == g)this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this)); else if ("manual" != g) {
- var h = "hover" == g ? "mouseenter" : "focus", i = "hover" == g ? "mouseleave" : "blur";
- this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this))
- }
- }
- this.options.selector ? this._options = a.extend({}, this.options, {
- trigger: "manual",
- selector: ""
- }) : this.fixTitle()
- }, b.prototype.getDefaults = function () {
- return b.DEFAULTS
- }, b.prototype.getOptions = function (b) {
- return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = {
- show: b.delay,
- hide: b.delay
- }), b
- }, b.prototype.getDelegateOptions = function () {
- var b = {}, c = this.getDefaults();
- return this._options && a.each(this._options, function (a, d) {
- c[a] != d && (b[a] = d)
- }), b
- }, b.prototype.enter = function (b) {
- var c = b instanceof this.constructor ? b : a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
- return clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? (c.timeout = setTimeout(function () {
- "in" == c.hoverState && c.show()
- }, c.options.delay.show), void 0) : c.show()
- }, b.prototype.leave = function (b) {
- var c = b instanceof this.constructor ? b : a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
- return clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? (c.timeout = setTimeout(function () {
- "out" == c.hoverState && c.hide()
- }, c.options.delay.hide), void 0) : c.hide()
- }, b.prototype.show = function () {
- var b = a.Event("show.bs." + this.type);
- if (this.hasContent() && this.enabled) {
- if (this.$element.trigger(b), b.isDefaultPrevented())return;
- var c = this.tip();
- this.setContent(), this.options.animation && c.addClass("fade");
- var d = "function" == typeof this.options.placement ? this.options.placement.call(this, c[0], this.$element[0]) : this.options.placement, e = /\s?auto?\s?/i, f = e.test(d);
- f && (d = d.replace(e, "") || "top"), c.detach().css({
- top: 0,
- left: 0,
- display: "block"
- }).addClass(d), this.options.container ? c.appendTo(this.options.container) : c.insertAfter(this.$element);
- var g = this.getPosition(), h = c[0].offsetWidth, i = c[0].offsetHeight;
- if (f) {
- var j = this.$element.parent(), k = d, l = document.documentElement.scrollTop || document.body.scrollTop, m = "body" == this.options.container ? window.innerWidth : j.outerWidth(), n = "body" == this.options.container ? window.innerHeight : j.outerHeight(), o = "body" == this.options.container ? 0 : j.offset().left;
- d = "bottom" == d && g.top + g.height + i - l > n ? "top" : "top" == d && g.top - l - i < 0 ? "bottom" : "right" == d && g.right + h > m ? "left" : "left" == d && g.left - h < o ? "right" : d, c.removeClass(k).addClass(d)
- }
- var p = this.getCalculatedOffset(d, g, h, i);
- this.applyPlacement(p, d), this.$element.trigger("shown.bs." + this.type)
- }
- }, b.prototype.applyPlacement = function (a, b) {
- var c, d = this.tip(), e = d[0].offsetWidth, f = d[0].offsetHeight, g = parseInt(d.css("margin-top"), 10), h = parseInt(d.css("margin-left"), 10);
- isNaN(g) && (g = 0), isNaN(h) && (h = 0), a.top = a.top + g, a.left = a.left + h, d.offset(a).addClass("in");
- var i = d[0].offsetWidth, j = d[0].offsetHeight;
- if ("top" == b && j != f && (c = !0, a.top = a.top + f - j), /bottom|top/.test(b)) {
- var k = 0;
- a.left < 0 && (k = -2 * a.left, a.left = 0, d.offset(a), i = d[0].offsetWidth, j = d[0].offsetHeight), this.replaceArrow(k - e + i, i, "left")
- } else this.replaceArrow(j - f, j, "top");
- c && d.offset(a)
- }, b.prototype.replaceArrow = function (a, b, c) {
- this.arrow().css(c, a ? 50 * (1 - a / b) + "%" : "")
- }, b.prototype.setContent = function () {
- var a = this.tip(), b = this.getTitle();
- a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right")
- }, b.prototype.hide = function () {
- function b() {
- "in" != c.hoverState && d.detach()
- }
- var c = this, d = this.tip(), e = a.Event("hide.bs." + this.type);
- return this.$element.trigger(e), e.isDefaultPrevented() ? void 0 : (d.removeClass("in"), a.support.transition && this.$tip.hasClass("fade") ? d.one(a.support.transition.end, b).emulateTransitionEnd(150) : b(), this.$element.trigger("hidden.bs." + this.type), this)
- }, b.prototype.fixTitle = function () {
- var a = this.$element;
- (a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "")
- }, b.prototype.hasContent = function () {
- return this.getTitle()
- }, b.prototype.getPosition = function () {
- var b = this.$element[0];
- return a.extend({}, "function" == typeof b.getBoundingClientRect ? b.getBoundingClientRect() : {
- width: b.offsetWidth,
- height: b.offsetHeight
- }, this.$element.offset())
- }, b.prototype.getCalculatedOffset = function (a, b, c, d) {
- return "bottom" == a ? {
- top: b.top + b.height,
- left: b.left + b.width / 2 - c / 2
- } : "top" == a ? {
- top: b.top - d,
- left: b.left + b.width / 2 - c / 2
- } : "left" == a ? {top: b.top + b.height / 2 - d / 2, left: b.left - c} : {
- top: b.top + b.height / 2 - d / 2,
- left: b.left + b.width
- }
- }, b.prototype.getTitle = function () {
- var a, b = this.$element, c = this.options;
- return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title)
- }, b.prototype.tip = function () {
- return this.$tip = this.$tip || a(this.options.template)
- }, b.prototype.arrow = function () {
- return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
- }, b.prototype.validate = function () {
- this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null)
- }, b.prototype.enable = function () {
- this.enabled = !0
- }, b.prototype.disable = function () {
- this.enabled = !1
- }, b.prototype.toggleEnabled = function () {
- this.enabled = !this.enabled
- }, b.prototype.toggle = function (b) {
- var c = b ? a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type) : this;
- c.tip().hasClass("in") ? c.leave(c) : c.enter(c)
- }, b.prototype.destroy = function () {
- this.hide().$element.off("." + this.type).removeData("bs." + this.type)
- };
- var c = a.fn.tooltip;
- a.fn.tooltip = function (c) {
- return this.each(function () {
- var d = a(this), e = d.data("bs.tooltip"), f = "object" == typeof c && c;
- e || d.data("bs.tooltip", e = new b(this, f)), "string" == typeof c && e[c]()
- })
- }, a.fn.tooltip.Constructor = b, a.fn.tooltip.noConflict = function () {
- return a.fn.tooltip = c, this
- }
- }(jQuery), +function (a) {
- "use strict";
- var b = function (b) {
- this.element = a(b)
- };
- b.prototype.show = function () {
- var b = this.element, c = b.closest("ul:not(.dropdown-menu)"), d = b.data("target");
- if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) {
- var e = c.find(".active:last a")[0], f = a.Event("show.bs.tab", {relatedTarget: e});
- if (b.trigger(f), !f.isDefaultPrevented()) {
- var g = a(d);
- this.activate(b.parent("li"), c), this.activate(g, g.parent(), function () {
- b.trigger({type: "shown.bs.tab", relatedTarget: e})
- })
- }
- }
- }, b.prototype.activate = function (b, c, d) {
- function e() {
- f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"), b.addClass("active"), g ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu") && b.closest("li.dropdown").addClass("active"), d && d()
- }
- var f = c.find("> .active"), g = d && a.support.transition && f.hasClass("fade");
- g ? f.one(a.support.transition.end, e).emulateTransitionEnd(150) : e(), f.removeClass("in")
- };
- var c = a.fn.tab;
- a.fn.tab = function (c) {
- return this.each(function () {
- var d = a(this), e = d.data("bs.tab");
- e || d.data("bs.tab", e = new b(this)), "string" == typeof c && e[c]()
- })
- }, a.fn.tab.Constructor = b, a.fn.tab.noConflict = function () {
- return a.fn.tab = c, this
- }, a(document).on("click.bs.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function (b) {
- b.preventDefault(), a(this).tab("show")
- })
- }(jQuery), function (a) {
- "function" == typeof define && define.amd ? define(["jquery"], a) : a(jQuery)
- }(function (a) {
- function b(a) {
- return a
- }
- function c(a) {
- return decodeURIComponent(a.replace(e, " "))
- }
- function d(a) {
- 0 === a.indexOf('"') && (a = a.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
- try {
- return f.json ? JSON.parse(a) : a
- } catch (b) {
- }
- }
- var e = /\+/g, f = a.cookie = function (e, g, h) {
- if (void 0 !== g) {
- if (h = a.extend({}, f.defaults, h), "number" == typeof h.expires) {
- var i = h.expires, j = h.expires = new Date;
- j.setDate(j.getDate() + i)
- }
- return g = f.json ? JSON.stringify(g) : String(g), document.cookie = [f.raw ? e : encodeURIComponent(e), "=", f.raw ? g : encodeURIComponent(g), h.expires ? "; expires=" + h.expires.toUTCString() : "", h.path ? "; path=" + h.path : "", h.domain ? "; domain=" + h.domain : "", h.secure ? "; secure" : ""].join("")
- }
- for (var k = f.raw ? b : c, l = document.cookie.split("; "), m = e ? void 0 : {}, n = 0, o = l.length; o > n; n++) {
- var p = l[n].split("="), q = k(p.shift()), r = k(p.join("="));
- if (e && e === q) {
- m = d(r);
- break
- }
- e || (m[q] = d(r))
- }
- return m
- };
- f.defaults = {}, a.removeCookie = function (b, c) {
- return void 0 !== a.cookie(b) ? (a.cookie(b, "", a.extend({}, c, {expires: -1})), !0) : !1
- }
- }), function (a) {
- a.flexslider = function (b, c) {
- var d = a(b);
- d.vars = a.extend({}, a.flexslider.defaults, c);
- var e, f = d.vars.namespace, g = window.navigator && window.navigator.msPointerEnabled && window.MSGesture, h = ("ontouchstart"in window || g || window.DocumentTouch && document instanceof DocumentTouch) && d.vars.touch, i = "click touchend MSPointerUp", j = "", k = "vertical" === d.vars.direction, l = d.vars.reverse, m = d.vars.itemWidth > 0, n = "fade" === d.vars.animation, o = "" !== d.vars.asNavFor, p = {}, q = !0;
- a.data(b, "flexslider", d), p = {
- init: function () {
- d.animating = !1, d.currentSlide = parseInt(d.vars.startAt ? d.vars.startAt : 0), isNaN(d.currentSlide) && (d.currentSlide = 0), d.animatingTo = d.currentSlide, d.atEnd = 0 === d.currentSlide || d.currentSlide === d.last, d.containerSelector = d.vars.selector.substr(0, d.vars.selector.search(" ")), d.slides = a(d.vars.selector, d), d.container = a(d.containerSelector, d), d.count = d.slides.length, d.syncExists = a(d.vars.sync).length > 0, "slide" === d.vars.animation && (d.vars.animation = "swing"), d.prop = k ? "top" : "marginLeft", d.args = {}, d.manualPause = !1, d.stopped = !1, d.started = !1, d.startTimeout = null, d.transitions = !d.vars.video && !n && d.vars.useCSS && function () {
- var a = document.createElement("div"), b = ["perspectiveProperty", "WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"];
- for (var c in b)if (void 0 !== a.style[b[c]])return d.pfx = b[c].replace("Perspective", "").toLowerCase(), d.prop = "-" + d.pfx + "-transform", !0;
- return !1
- }(), "" !== d.vars.controlsContainer && (d.controlsContainer = a(d.vars.controlsContainer).length > 0 && a(d.vars.controlsContainer)), "" !== d.vars.manualControls && (d.manualControls = a(d.vars.manualControls).length > 0 && a(d.vars.manualControls)), d.vars.randomize && (d.slides.sort(function () {
- return Math.round(Math.random()) - .5
- }), d.container.empty().append(d.slides)), d.doMath(), d.setup("init"), d.vars.controlNav && p.controlNav.setup(), d.vars.directionNav && p.directionNav.setup(), d.vars.keyboard && (1 === a(d.containerSelector).length || d.vars.multipleKeyboard) && a(document).bind("keyup", function (a) {
- var b = a.keyCode;
- if (!d.animating && (39 === b || 37 === b)) {
- var c = 39 === b ? d.getTarget("next") : 37 === b ? d.getTarget("prev") : !1;
- d.flexAnimate(c, d.vars.pauseOnAction)
- }
- }), d.vars.mousewheel && d.bind("mousewheel", function (a, b) {
- a.preventDefault();
- var c = 0 > b ? d.getTarget("next") : d.getTarget("prev");
- d.flexAnimate(c, d.vars.pauseOnAction)
- }), d.vars.pausePlay && p.pausePlay.setup(), d.vars.slideshow && d.vars.pauseInvisible && p.pauseInvisible.init(), d.vars.slideshow && (d.vars.pauseOnHover && d.hover(function () {
- d.manualPlay || d.manualPause || d.pause()
- }, function () {
- d.manualPause || d.manualPlay || d.stopped || d.play()
- }), d.vars.pauseInvisible && p.pauseInvisible.isHidden() || (d.vars.initDelay > 0 ? d.startTimeout = setTimeout(d.play, d.vars.initDelay) : d.play())), o && p.asNav.setup(), h && d.vars.touch && p.touch(), (!n || n && d.vars.smoothHeight) && a(window).bind("resize orientationchange focus", p.resize), d.find("img").attr("draggable", "false"), setTimeout(function () {
- d.vars.start(d)
- }, 200)
- }, asNav: {
- setup: function () {
- d.asNav = !0, d.animatingTo = Math.floor(d.currentSlide / d.move), d.currentItem = d.currentSlide, d.slides.removeClass(f + "active-slide").eq(d.currentItem).addClass(f + "active-slide"), g ? (b._slider = d, d.slides.each(function () {
- var b = this;
- b._gesture = new MSGesture, b._gesture.target = b, b.addEventListener("MSPointerDown", function (a) {
- a.preventDefault(), a.currentTarget._gesture && a.currentTarget._gesture.addPointer(a.pointerId)
- }, !1), b.addEventListener("MSGestureTap", function (b) {
- b.preventDefault();
- var c = a(this), e = c.index();
- a(d.vars.asNavFor).data("flexslider").animating || c.hasClass("active") || (d.direction = d.currentItem < e ? "next" : "prev", d.flexAnimate(e, d.vars.pauseOnAction, !1, !0, !0))
- })
- })) : d.slides.click(function (b) {
- b.preventDefault();
- var c = a(this), e = c.index(), g = c.offset().left - a(d).scrollLeft();
- 0 >= g && c.hasClass(f + "active-slide") ? d.flexAnimate(d.getTarget("prev"), !0) : a(d.vars.asNavFor).data("flexslider").animating || c.hasClass(f + "active-slide") || (d.direction = d.currentItem < e ? "next" : "prev", d.flexAnimate(e, d.vars.pauseOnAction, !1, !0, !0))
- })
- }
- }, controlNav: {
- setup: function () {
- d.manualControls ? p.controlNav.setupManual() : p.controlNav.setupPaging()
- }, setupPaging: function () {
- var b, c, e = "thumbnails" === d.vars.controlNav ? "control-thumbs" : "control-paging", g = 1;
- if (d.controlNavScaffold = a('<ol class="' + f + "control-nav " + f + e + '"></ol>'), d.pagingCount > 1)for (var h = 0; h < d.pagingCount; h++) {
- if (c = d.slides.eq(h), b = "thumbnails" === d.vars.controlNav ? '<img src="' + c.attr("data-thumb") + '"/>' : "<a>" + g + "</a>", "thumbnails" === d.vars.controlNav && !0 === d.vars.thumbCaptions) {
- var k = c.attr("data-thumbcaption");
- "" != k && void 0 != k && (b += '<span class="' + f + 'caption">' + k + "</span>")
- }
- d.controlNavScaffold.append("<li>" + b + "</li>"), g++
- }
- d.controlsContainer ? a(d.controlsContainer).append(d.controlNavScaffold) : d.append(d.controlNavScaffold), p.controlNav.set(), p.controlNav.active(), d.controlNavScaffold.delegate("a, img", i, function (b) {
- if (b.preventDefault(), "" === j || j === b.type) {
- var c = a(this), e = d.controlNav.index(c);
- c.hasClass(f + "active") || (d.direction = e > d.currentSlide ? "next" : "prev", d.flexAnimate(e, d.vars.pauseOnAction))
- }
- "" === j && (j = b.type), p.setToClearWatchedEvent()
- })
- }, setupManual: function () {
- d.controlNav = d.manualControls, p.controlNav.active(), d.controlNav.bind(i, function (b) {
- if (b.preventDefault(), "" === j || j === b.type) {
- var c = a(this), e = d.controlNav.index(c);
- c.hasClass(f + "active") || (d.direction = e > d.currentSlide ? "next" : "prev", d.flexAnimate(e, d.vars.pauseOnAction))
- }
- "" === j && (j = b.type), p.setToClearWatchedEvent()
- })
- }, set: function () {
- var b = "thumbnails" === d.vars.controlNav ? "img" : "a";
- d.controlNav = a("." + f + "control-nav li " + b, d.controlsContainer ? d.controlsContainer : d)
- }, active: function () {
- d.controlNav.removeClass(f + "active").eq(d.animatingTo).addClass(f + "active")
- }, update: function (b, c) {
- d.pagingCount > 1 && "add" === b ? d.controlNavScaffold.append(a("<li><a>" + d.count + "</a></li>")) : 1 === d.pagingCount ? d.controlNavScaffold.find("li").remove() : d.controlNav.eq(c).closest("li").remove(), p.controlNav.set(), d.pagingCount > 1 && d.pagingCount !== d.controlNav.length ? d.update(c, b) : p.controlNav.active()
- }
- }, directionNav: {
- setup: function () {
- var b = a('<ul class="' + f + 'direction-nav"><li><a class="' + f + 'prev" href="#">' + d.vars.prevText + '</a></li><li><a class="' + f + 'next" href="#">' + d.vars.nextText + "</a></li></ul>");
- d.controlsContainer ? (a(d.controlsContainer).append(b), d.directionNav = a("." + f + "direction-nav li a", d.controlsContainer)) : (d.append(b), d.directionNav = a("." + f + "direction-nav li a", d)), p.directionNav.update(), d.directionNav.bind(i, function (b) {
- b.preventDefault();
- var c;
- ("" === j || j === b.type) && (c = a(this).hasClass(f + "next") ? d.getTarget("next") : d.getTarget("prev"), d.flexAnimate(c, d.vars.pauseOnAction)), "" === j && (j = b.type), p.setToClearWatchedEvent()
- })
- }, update: function () {
- var a = f + "disabled";
- 1 === d.pagingCount ? d.directionNav.addClass(a).attr("tabindex", "-1") : d.vars.animationLoop ? d.directionNav.removeClass(a).removeAttr("tabindex") : 0 === d.animatingTo ? d.directionNav.removeClass(a).filter("." + f + "prev").addClass(a).attr("tabindex", "-1") : d.animatingTo === d.last ? d.directionNav.removeClass(a).filter("." + f + "next").addClass(a).attr("tabindex", "-1") : d.directionNav.removeClass(a).removeAttr("tabindex")
- }
- }, pausePlay: {
- setup: function () {
- var b = a('<div class="' + f + 'pauseplay"><a></a></div>');
- d.controlsContainer ? (d.controlsContainer.append(b), d.pausePlay = a("." + f + "pauseplay a", d.controlsContainer)) : (d.append(b), d.pausePlay = a("." + f + "pauseplay a", d)), p.pausePlay.update(d.vars.slideshow ? f + "pause" : f + "play"), d.pausePlay.bind(i, function (b) {
- b.preventDefault(), ("" === j || j === b.type) && (a(this).hasClass(f + "pause") ? (d.manualPause = !0, d.manualPlay = !1, d.pause()) : (d.manualPause = !1, d.manualPlay = !0, d.play())), "" === j && (j = b.type), p.setToClearWatchedEvent()
- })
- }, update: function (a) {
- "play" === a ? d.pausePlay.removeClass(f + "pause").addClass(f + "play").html(d.vars.playText) : d.pausePlay.removeClass(f + "play").addClass(f + "pause").html(d.vars.pauseText)
- }
- }, touch: function () {
- function a(a) {
- d.animating ? a.preventDefault() : (window.navigator.msPointerEnabled || 1 === a.touches.length) && (d.pause(), q = k ? d.h : d.w, s = Number(new Date), u = a.touches[0].pageX, v = a.touches[0].pageY, p = m && l && d.animatingTo === d.last ? 0 : m && l ? d.limit - (d.itemW + d.vars.itemMargin) * d.move * d.animatingTo : m && d.currentSlide === d.last ? d.limit : m ? (d.itemW + d.vars.itemMargin) * d.move * d.currentSlide : l ? (d.last - d.currentSlide + d.cloneOffset) * q : (d.currentSlide + d.cloneOffset) * q, j = k ? v : u, o = k ? u : v, b.addEventListener("touchmove", c, !1), b.addEventListener("touchend", e, !1))
- }
- function c(a) {
- r = k ? j - a.touches[0].pageY : j - a.touches[0].pageX, t = k ? Math.abs(r) < Math.abs(a.touches[0].pageX - o) : Math.abs(r) < Math.abs(a.touches[0].pageY - o), t ? b.removeEventListener("touchmove", c, !1) : (distance = Math.abs(j - a.touches[0].pageX), a.preventDefault(), !n && d.transitions && (vars.animationLoop || (r /= 0 === d.currentSlide && 0 > r || d.currentSlide === d.last && r > 0 ? Math.abs(r) / q + 2 : 1), d.setProps(p + r, "setTouch")))
- }
- function e() {
- if (b.removeEventListener("touchmove", c, !1), d.animatingTo === d.currentSlide && !t && null !== r) {
- var a = l ? -r : r, f = a > 0 ? d.getTarget("next") : d.getTarget("prev");
- d.canAdvance(f) && (Number(new Date) - s < 550 && Math.abs(a) > 50 || Math.abs(a) > q / 2) ? d.flexAnimate(f, d.vars.pauseOnAction) : n || d.flexAnimate(d.currentSlide, d.vars.pauseOnAction, !0)
- }
- b.removeEventListener("touchend", e, !1), j = null, o = null, r = null, p = null
- }
- function f(a) {
- a.stopPropagation(), d.animating ? a.preventDefault() : (d.pause(), b._gesture.addPointer(a.pointerId), w = 0, q = k ? d.h : d.w, s = Number(new Date), p = m && l && d.animatingTo === d.last ? 0 : m && l ? d.limit - (d.itemW + d.vars.itemMargin) * d.move * d.animatingTo : m && d.currentSlide === d.last ? d.limit : m ? (d.itemW + d.vars.itemMargin) * d.move * d.currentSlide : l ? (d.last - d.currentSlide + d.cloneOffset) * q : (d.currentSlide + d.cloneOffset) * q)
- }
- function h(a) {
- a.stopPropagation();
- var c = a.target._slider;
- if (c) {
- var d = -a.translationX, e = -a.translationY;
- return w += k ? e : d, r = w, t = k ? Math.abs(w) < Math.abs(-d) : Math.abs(w) < Math.abs(-e), a.detail === a.MSGESTURE_FLAG_INERTIA ? (setImmediate(function () {
- b._gesture.stop()
- }), void 0) : ((!t || Number(new Date) - s > 500) && (a.preventDefault(), !n && c.transitions && (c.vars.animationLoop || (r = w / (0 === c.currentSlide && 0 > w || c.currentSlide === c.last && w > 0 ? Math.abs(w) / q + 2 : 1)), c.setProps(p + r, "setTouch"))), void 0)
- }
- }
- function i(a) {
- a.stopPropagation();
- var b = a.target._slider;
- if (b) {
- if (b.animatingTo === b.currentSlide && !t && null !== r) {
- var c = l ? -r : r, d = c > 0 ? b.getTarget("next") : b.getTarget("prev");
- b.canAdvance(d) && (Number(new Date) - s < 550 && Math.abs(c) > 50 || Math.abs(c) > q / 2) ? b.flexAnimate(d, b.vars.pauseOnAction) : n || b.flexAnimate(b.currentSlide, b.vars.pauseOnAction, !0)
- }
- j = null, o = null, r = null, p = null, w = 0
- }
- }
- var j, o, p, q, r, s, t = !1, u = 0, v = 0, w = 0;
- g ? (b.style.msTouchAction = "none", b._gesture = new MSGesture, b._gesture.target = b, b.addEventListener("MSPointerDown", f, !1), b._slider = d, b.addEventListener("MSGestureChange", h, !1), b.addEventListener("MSGestureEnd", i, !1)) : b.addEventListener("touchstart", a, !1)
- }, resize: function () {
- !d.animating && d.is(":visible") && (m || d.doMath(), n ? p.smoothHeight() : m ? (d.slides.width(d.computedW), d.update(d.pagingCount), d.setProps()) : k ? (d.viewport.height(d.h), d.setProps(d.h, "setTotal")) : (d.vars.smoothHeight && p.smoothHeight(), d.newSlides.width(d.computedW), d.setProps(d.computedW, "setTotal")))
- }, smoothHeight: function (a) {
- if (!k || n) {
- var b = n ? d : d.viewport;
- a ? b.animate({height: d.slides.eq(d.animatingTo).height()}, a) : b.height(d.slides.eq(d.animatingTo).height())
- }
- }, sync: function (b) {
- var c = a(d.vars.sync).data("flexslider"), e = d.animatingTo;
- switch (b) {
- case"animate":
- c.flexAnimate(e, d.vars.pauseOnAction, !1, !0);
- break;
- case"play":
- c.playing || c.asNav || c.play();
- break;
- case"pause":
- c.pause()
- }
- }, pauseInvisible: {
- visProp: null, init: function () {
- var a = ["webkit", "moz", "ms", "o"];
- if ("hidden"in document)return "hidden";
- for (var b = 0; b < a.length; b++)a[b] + "Hidden"in document && (p.pauseInvisible.visProp = a[b] + "Hidden");
- if (p.pauseInvisible.visProp) {
- var c = p.pauseInvisible.visProp.replace(/[H|h]idden/, "") + "visibilitychange";
- document.addEventListener(c, function () {
- p.pauseInvisible.isHidden() ? d.startTimeout ? clearTimeout(d.startTimeout) : d.pause() : d.started ? d.play() : d.vars.initDelay > 0 ? setTimeout(d.play, d.vars.initDelay) : d.play()
- })
- }
- }, isHidden: function () {
- return document[p.pauseInvisible.visProp] || !1
- }
- }, setToClearWatchedEvent: function () {
- clearTimeout(e), e = setTimeout(function () {
- j = ""
- }, 3e3)
- }
- }, d.flexAnimate = function (b, c, e, g, i) {
- if (d.vars.animationLoop || b === d.currentSlide || (d.direction = b > d.currentSlide ? "next" : "prev"), o && 1 === d.pagingCount && (d.direction = d.currentItem < b ? "next" : "prev"), !d.animating && (d.canAdvance(b, i) || e) && d.is(":visible")) {
- if (o && g) {
- var j = a(d.vars.asNavFor).data("flexslider");
- if (d.atEnd = 0 === b || b === d.count - 1, j.flexAnimate(b, !0, !1, !0, i), d.direction = d.currentItem < b ? "next" : "prev", j.direction = d.direction, Math.ceil((b + 1) / d.visible) - 1 === d.currentSlide || 0 === b)return d.currentItem = b, d.slides.removeClass(f + "active-slide").eq(b).addClass(f + "active-slide"), !1;
- d.currentItem = b, d.slides.removeClass(f + "active-slide").eq(b).addClass(f + "active-slide"), b = Math.floor(b / d.visible)
- }
- if (d.animating = !0, d.animatingTo = b, c && d.pause(), d.vars.before(d), d.syncExists && !i && p.sync("animate"), d.vars.controlNav && p.controlNav.active(), m || d.slides.removeClass(f + "active-slide").eq(b).addClass(f + "active-slide"), d.atEnd = 0 === b || b === d.last, d.vars.directionNav && p.directionNav.update(), b === d.last && (d.vars.end(d), d.vars.animationLoop || d.pause()), n)h ? (d.slides.eq(d.currentSlide).css({
- opacity: 0,
- zIndex: 1
- }), d.slides.eq(b).css({
- opacity: 1,
- zIndex: 2
- }), d.wrapup(t)) : (d.slides.eq(d.currentSlide).css({zIndex: 1}).animate({opacity: 0}, d.vars.animationSpeed, d.vars.easing), d.slides.eq(b).css({zIndex: 2}).animate({opacity: 1}, d.vars.animationSpeed, d.vars.easing, d.wrapup)); else {
- var q, r, s, t = k ? d.slides.filter(":first").height() : d.computedW;
- m ? (q = d.vars.itemMargin, s = (d.itemW + q) * d.move * d.animatingTo, r = s > d.limit && 1 !== d.visible ? d.limit : s) : r = 0 === d.currentSlide && b === d.count - 1 && d.vars.animationLoop && "next" !== d.direction ? l ? (d.count + d.cloneOffset) * t : 0 : d.currentSlide === d.last && 0 === b && d.vars.animationLoop && "prev" !== d.direction ? l ? 0 : (d.count + 1) * t : l ? (d.count - 1 - b + d.cloneOffset) * t : (b + d.cloneOffset) * t, d.setProps(r, "", d.vars.animationSpeed), d.transitions ? (d.vars.animationLoop && d.atEnd || (d.animating = !1, d.currentSlide = d.animatingTo), d.container.unbind("webkitTransitionEnd transitionend"), d.container.bind("webkitTransitionEnd transitionend", function () {
- d.wrapup(t)
- })) : d.container.animate(d.args, d.vars.animationSpeed, d.vars.easing, function () {
- d.wrapup(t)
- })
- }
- d.vars.smoothHeight && p.smoothHeight(d.vars.animationSpeed)
- }
- }, d.wrapup = function (a) {
- n || m || (0 === d.currentSlide && d.animatingTo === d.last && d.vars.animationLoop ? d.setProps(a, "jumpEnd") : d.currentSlide === d.last && 0 === d.animatingTo && d.vars.animationLoop && d.setProps(a, "jumpStart")), d.animating = !1, d.currentSlide = d.animatingTo, d.vars.after(d)
- }, d.animateSlides = function () {
- !d.animating && q && d.flexAnimate(d.getTarget("next"))
- }, d.pause = function () {
- clearInterval(d.animatedSlides), d.animatedSlides = null, d.playing = !1, d.vars.pausePlay && p.pausePlay.update("play"), d.syncExists && p.sync("pause")
- }, d.play = function () {
- d.playing && clearInterval(d.animatedSlides), d.animatedSlides = d.animatedSlides || setInterval(d.animateSlides, d.vars.slideshowSpeed), d.started = d.playing = !0, d.vars.pausePlay && p.pausePlay.update("pause"), d.syncExists && p.sync("play")
- }, d.stop = function () {
- d.pause(), d.stopped = !0
- }, d.canAdvance = function (a, b) {
- var c = o ? d.pagingCount - 1 : d.last;
- return b ? !0 : o && d.currentItem === d.count - 1 && 0 === a && "prev" === d.direction ? !0 : o && 0 === d.currentItem && a === d.pagingCount - 1 && "next" !== d.direction ? !1 : a !== d.currentSlide || o ? d.vars.animationLoop ? !0 : d.atEnd && 0 === d.currentSlide && a === c && "next" !== d.direction ? !1 : d.atEnd && d.currentSlide === c && 0 === a && "next" === d.direction ? !1 : !0 : !1
- }, d.getTarget = function (a) {
- return d.direction = a, "next" === a ? d.currentSlide === d.last ? 0 : d.currentSlide + 1 : 0 === d.currentSlide ? d.last : d.currentSlide - 1
- }, d.setProps = function (a, b, c) {
- var e = function () {
- var c = a ? a : (d.itemW + d.vars.itemMargin) * d.move * d.animatingTo, e = function () {
- if (m)return "setTouch" === b ? a : l && d.animatingTo === d.last ? 0 : l ? d.limit - (d.itemW + d.vars.itemMargin) * d.move * d.animatingTo : d.animatingTo === d.last ? d.limit : c;
- switch (b) {
- case"setTotal":
- return l ? (d.count - 1 - d.currentSlide + d.cloneOffset) * a : (d.currentSlide + d.cloneOffset) * a;
- case"setTouch":
- return l ? a : a;
- case"jumpEnd":
- return l ? a : d.count * a;
- case"jumpStart":
- return l ? d.count * a : a;
- default:
- return a
- }
- }();
- return -1 * e + "px"
- }();
- d.transitions && (e = k ? "translate3d(0," + e + ",0)" : "translate3d(" + e + ",0,0)", c = void 0 !== c ? c / 1e3 + "s" : "0s", d.container.css("-" + d.pfx + "-transition-duration", c)), d.args[d.prop] = e, (d.transitions || void 0 === c) && d.container.css(d.args)
- }, d.setup = function (b) {
- if (n)d.slides.css({
- width: "100%",
- "float": "left",
- marginRight: "-100%",
- position: "relative"
- }), "init" === b && (h ? d.slides.css({
- opacity: 0,
- display: "block",
- webkitTransition: "opacity " + d.vars.animationSpeed / 1e3 + "s ease",
- zIndex: 1
- }).eq(d.currentSlide).css({opacity: 1, zIndex: 2}) : d.slides.css({
- opacity: 0,
- display: "block",
- zIndex: 1
- }).eq(d.currentSlide).css({zIndex: 2}).animate({opacity: 1}, d.vars.animationSpeed, d.vars.easing)), d.vars.smoothHeight && p.smoothHeight(); else {
- var c, e;
- "init" === b && (d.viewport = a('<div class="' + f + 'viewport"></div>').css({
- overflow: "hidden",
- position: "relative"
- }).appendTo(d).append(d.container), d.cloneCount = 0, d.cloneOffset = 0, l && (e = a.makeArray(d.slides).reverse(), d.slides = a(e), d.container.empty().append(d.slides))), d.vars.animationLoop && !m && (d.cloneCount = 2, d.cloneOffset = 1, "init" !== b && d.container.find(".clone").remove(), d.container.append(d.slides.first().clone().addClass("clone").attr("aria-hidden", "true")).prepend(d.slides.last().clone().addClass("clone").attr("aria-hidden", "true"))), d.newSlides = a(d.vars.selector, d), c = l ? d.count - 1 - d.currentSlide + d.cloneOffset : d.currentSlide + d.cloneOffset, k && !m ? (d.container.height(200 * (d.count + d.cloneCount) + "%").css("position", "absolute").width("100%"), setTimeout(function () {
- d.newSlides.css({display: "block"}), d.doMath(), d.viewport.height(d.h), d.setProps(c * d.h, "init")
- }, "init" === b ? 100 : 0)) : (d.container.width(200 * (d.count + d.cloneCount) + "%"), d.setProps(c * d.computedW, "init"), setTimeout(function () {
- d.doMath(), d.newSlides.css({
- width: d.computedW,
- "float": "left",
- display: "block"
- }), d.vars.smoothHeight && p.smoothHeight()
- }, "init" === b ? 100 : 0))
- }
- m || d.slides.removeClass(f + "active-slide").eq(d.currentSlide).addClass(f + "active-slide")
- }, d.doMath = function () {
- var a = d.slides.first(), b = d.vars.itemMargin, c = d.vars.minItems, e = d.vars.maxItems;
- d.w = void 0 === d.viewport ? d.width() : d.viewport.width(), d.h = a.height(), d.boxPadding = a.outerWidth() - a.width(), m ? (d.itemT = d.vars.itemWidth + b, d.minW = c ? c * d.itemT : d.w, d.maxW = e ? e * d.itemT - b : d.w, d.itemW = d.minW > d.w ? (d.w - b * (c - 1)) / c : d.maxW < d.w ? (d.w - b * (e - 1)) / e : d.vars.itemWidth > d.w ? d.w : d.vars.itemWidth, d.visible = Math.floor(d.w / d.itemW), d.move = d.vars.move > 0 && d.vars.move < d.visible ? d.vars.move : d.visible, d.pagingCount = Math.ceil((d.count - d.visible) / d.move + 1), d.last = d.pagingCount - 1, d.limit = 1 === d.pagingCount ? 0 : d.vars.itemWidth > d.w ? d.itemW * (d.count - 1) + b * (d.count - 1) : (d.itemW + b) * d.count - d.w - b) : (d.itemW = d.w, d.pagingCount = d.count, d.last = d.count - 1), d.computedW = d.itemW - d.boxPadding
- }, d.update = function (a, b) {
- d.doMath(), m || (a < d.currentSlide ? d.currentSlide += 1 : a <= d.currentSlide && 0 !== a && (d.currentSlide -= 1), d.animatingTo = d.currentSlide), d.vars.controlNav && !d.manualControls && ("add" === b && !m || d.pagingCount > d.controlNav.length ? p.controlNav.update("add") : ("remove" === b && !m || d.pagingCount < d.controlNav.length) && (m && d.currentSlide > d.last && (d.currentSlide -= 1, d.animatingTo -= 1), p.controlNav.update("remove", d.last))), d.vars.directionNav && p.directionNav.update()
- }, d.addSlide = function (b, c) {
- var e = a(b);
- d.count += 1, d.last = d.count - 1, k && l ? void 0 !== c ? d.slides.eq(d.count - c).after(e) : d.container.prepend(e) : void 0 !== c ? d.slides.eq(c).before(e) : d.container.append(e), d.update(c, "add"), d.slides = a(d.vars.selector + ":not(.clone)", d), d.setup(), d.vars.added(d)
- }, d.removeSlide = function (b) {
- var c = isNaN(b) ? d.slides.index(a(b)) : b;
- d.count -= 1, d.last = d.count - 1, isNaN(b) ? a(b, d.slides).remove() : k && l ? d.slides.eq(d.last).remove() : d.slides.eq(b).remove(), d.doMath(), d.update(c, "remove"), d.slides = a(d.vars.selector + ":not(.clone)", d), d.setup(), d.vars.removed(d)
- }, p.init()
- }, a(window).blur(function () {
- focused = !1
- }).focus(function () {
- focused = !0
- }), a.flexslider.defaults = {
- namespace: "flex-",
- selector: ".slides > li",
- animation: "fade",
- easing: "swing",
- direction: "horizontal",
- reverse: !1,
- animationLoop: !0,
- smoothHeight: !1,
- startAt: 0,
- slideshow: !0,
- slideshowSpeed: 7e3,
- animationSpeed: 600,
- initDelay: 0,
- randomize: !1,
- thumbCaptions: !1,
- pauseOnAction: !0,
- pauseOnHover: !1,
- pauseInvisible: !0,
- useCSS: !0,
- touch: !0,
- video: !1,
- controlNav: !0,
- directionNav: !0,
- prevText: "Previous",
- nextText: "Next",
- keyboard: !0,
- multipleKeyboard: !1,
- mousewheel: !1,
- pausePlay: !1,
- pauseText: "Pause",
- playText: "Play",
- controlsContainer: "",
- manualControls: "",
- sync: "",
- asNavFor: "",
- itemWidth: 0,
- itemMargin: 0,
- minItems: 1,
- maxItems: 0,
- move: 0,
- allowOneSlide: !0,
- start: function () {
- },
- before: function () {
- },
- after: function () {
- },
- end: function () {
- },
- added: function () {
- },
- removed: function () {
- }
- }, a.fn.flexslider = function (b) {
- if (void 0 === b && (b = {}), "object" == typeof b)return this.each(function () {
- var c = a(this), d = b.selector ? b.selector : ".slides > li", e = c.find(d);
- 1 === e.length && b.allowOneSlide === !0 || 0 === e.length ? (e.fadeIn(400), b.start && b.start(c)) : void 0 === c.data("flexslider") && new a.flexslider(this, b)
- });
- var c = a(this).data("flexslider");
- switch (b) {
- case"play":
- c.play();
- break;
- case"pause":
- c.pause();
- break;
- case"stop":
- c.stop();
- break;
- case"next":
- c.flexAnimate(c.getTarget("next"), !0);
- break;
- case"prev":
- case"previous":
- c.flexAnimate(c.getTarget("prev"), !0);
- break;
- default:
- "number" == typeof b && c.flexAnimate(b, !0)
- }
- }
- }(jQuery), new function (a) {
- a.fn.placeholder = function (b) {
- b = b || {};
- var c = b.dataKey || "placeholderValue", d = b.attr || "placeholder", e = b.className || "placeholder", f = b.values || [], g = b.blockSubmit || !1, h = b.blankSubmit || !1, i = b.onSubmit || !1, j = b.value || "", k = b.cursor_position || 0;
- return this.filter(":input").each(function (b) {
- a.data(this, c, f[b] || a(this).attr(d))
- }).each(function () {
- "" === a.trim(a(this).val()) && a(this).addClass(e).val(a.data(this, c))
- }).focus(function () {
- a.trim(a(this).val()) === a.data(this, c) && a(this).removeClass(e).val(j), a.fn.setCursorPosition && a(this).setCursorPosition(k)
- }).blur(function () {
- a.trim(a(this).val()) === j && a(this).addClass(e).val(a.data(this, c))
- }).each(function (b, d) {
- g ? new function (b) {
- a(b.form).submit(function () {
- return a.trim(a(b).val()) != a.data(b, c)
- })
- }(d) : h ? new function (b) {
- a(b.form).submit(function () {
- return a.trim(a(b).val()) == a.data(b, c) && a(b).removeClass(e).val(""), !0
- })
- }(d) : i && new function (b) {
- a(b.form).submit(i)
- }(d)
- })
- }
- }(jQuery), function (a) {
- var b = function () {
- a(".gform_wrapper .gplaceholder").find("input, textarea").filter(function () {
- a(this);
- if ("INPUT" == this.nodeName) {
- var b = this.type;
- return !("hidden" == b || "file" == b || "radio" == b || "checkbox" == b)
- }
- return !0
- }).each(function () {
- var b = a(this), c = this.id, d = a("label[for=" + c + "]").hide(), e = d.last().text();
- e.length > 0 && "*" == e[e.length - 1] && (e = e.substring(0, e.length - 1) + "*"), b[0].setAttribute("placeholder", e)
- });
- var b = !("placeholder"in document.createElement("input"));
- b && a("input[placeholder], textarea[placeholder]").placeholder({blankSubmit: !0})
- };
- a(document).ready(function () {
- b(), a(document).bind("gform_page_loaded", b)
- })
- }(jQuery), function (a) {
- var b, c, d, e, f, g, h, i = "Close", j = "BeforeClose", k = "AfterClose", l = "BeforeAppend", m = "MarkupParse", n = "Open", o = "Change", p = "mfp", q = "." + p, r = "mfp-ready", s = "mfp-removing", t = "mfp-prevent-close", u = function () {
- }, v = !!window.jQuery, w = a(window), x = function (a, c) {
- b.ev.on(p + a + q, c)
- }, y = function (b, c, d, e) {
- var f = document.createElement("div");
- return f.className = "mfp-" + b, d && (f.innerHTML = d), e ? c && c.appendChild(f) : (f = a(f), c && f.appendTo(c)), f
- }, z = function (c, d) {
- b.ev.triggerHandler(p + c, d), b.st.callbacks && (c = c.charAt(0).toLowerCase() + c.slice(1), b.st.callbacks[c] && b.st.callbacks[c].apply(b, a.isArray(d) ? d : [d]))
- }, A = function () {
- (b.st.focus ? b.content.find(b.st.focus).eq(0) : b.wrap).focus()
- }, B = function (c) {
- return c === h && b.currTemplate.closeBtn || (b.currTemplate.closeBtn = a(b.st.closeMarkup.replace("%title%", b.st.tClose)), h = c), b.currTemplate.closeBtn
- }, C = function () {
- a.magnificPopup.instance || (b = new u, b.init(), a.magnificPopup.instance = b)
- }, D = function (c) {
- if (!a(c).hasClass(t)) {
- var d = b.st.closeOnContentClick, e = b.st.closeOnBgClick;
- if (d && e)return !0;
- if (!b.content || a(c).hasClass("mfp-close") || b.preloader && c === b.preloader[0])return !0;
- if (c === b.content[0] || a.contains(b.content[0], c)) {
- if (d)return !0
- } else if (e && a.contains(document, c))return !0;
- return !1
- }
- }, E = function () {
- var a = document.createElement("p").style, b = ["ms", "O", "Moz", "Webkit"];
- if (void 0 !== a.transition)return !0;
- for (; b.length;)if (b.pop() + "Transition"in a)return !0;
- return !1
- };
- u.prototype = {
- constructor: u, init: function () {
- var c = navigator.appVersion;
- b.isIE7 = -1 !== c.indexOf("MSIE 7."), b.isIE8 = -1 !== c.indexOf("MSIE 8."), b.isLowIE = b.isIE7 || b.isIE8, b.isAndroid = /android/gi.test(c), b.isIOS = /iphone|ipad|ipod/gi.test(c), b.supportsTransition = E(), b.probablyMobile = b.isAndroid || b.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent), d = a(document.body), e = a(document), b.popupsCache = {}
- }, open: function (c) {
- var d;
- if (c.isObj === !1) {
- b.items = c.items.toArray(), b.index = 0;
- var f, h = c.items;
- for (d = 0; d < h.length; d++)if (f = h[d], f.parsed && (f = f.el[0]), f === c.el[0]) {
- b.index = d;
- break
- }
- } else b.items = a.isArray(c.items) ? c.items : [c.items], b.index = c.index || 0;
- if (b.isOpen)return b.updateItemHTML(), void 0;
- b.types = [], g = "", b.ev = c.mainEl && c.mainEl.length ? c.mainEl.eq(0) : e, c.key ? (b.popupsCache[c.key] || (b.popupsCache[c.key] = {}), b.currTemplate = b.popupsCache[c.key]) : b.currTemplate = {}, b.st = a.extend(!0, {}, a.magnificPopup.defaults, c), b.fixedContentPos = "auto" === b.st.fixedContentPos ? !b.probablyMobile : b.st.fixedContentPos, b.st.modal && (b.st.closeOnContentClick = !1, b.st.closeOnBgClick = !1, b.st.showCloseBtn = !1, b.st.enableEscapeKey = !1), b.bgOverlay || (b.bgOverlay = y("bg").on("click" + q, function () {
- b.close()
- }), b.wrap = y("wrap").attr("tabindex", -1).on("click" + q, function (a) {
- D(a.target) && b.close()
- }), b.container = y("container", b.wrap)), b.contentContainer = y("content"), b.st.preloader && (b.preloader = y("preloader", b.container, b.st.tLoading));
- var i = a.magnificPopup.modules;
- for (d = 0; d < i.length; d++) {
- var j = i[d];
- j = j.charAt(0).toUpperCase() + j.slice(1), b["init" + j].call(b)
- }
- z("BeforeOpen"), b.st.showCloseBtn && (b.st.closeBtnInside ? (x(m, function (a, b, c, d) {
- c.close_replaceWith = B(d.type)
- }), g += " mfp-close-btn-in") : b.wrap.append(B())), b.st.alignTop && (g += " mfp-align-top"), b.fixedContentPos ? b.wrap.css({
- overflow: b.st.overflowY,
- overflowX: "hidden",
- overflowY: b.st.overflowY
- }) : b.wrap.css({
- top: w.scrollTop(),
- position: "absolute"
- }), (b.st.fixedBgPos === !1 || "auto" === b.st.fixedBgPos && !b.fixedContentPos) && b.bgOverlay.css({
- height: e.height(),
- position: "absolute"
- }), b.st.enableEscapeKey && e.on("keyup" + q, function (a) {
- 27 === a.keyCode && b.close()
- }), w.on("resize" + q, function () {
- b.updateSize()
- }), b.st.closeOnContentClick || (g += " mfp-auto-cursor"), g && b.wrap.addClass(g);
- var k = b.wH = w.height(), l = {};
- if (b.fixedContentPos && b._hasScrollBar(k)) {
- var o = b._getScrollbarSize();
- o && (l.paddingRight = o)
- }
- b.fixedContentPos && (b.isIE7 ? a("body, html").css("overflow", "hidden") : l.overflow = "hidden");
- var p = b.st.mainClass;
- return b.isIE7 && (p += " mfp-ie7"), p && b._addClassToMFP(p), b.updateItemHTML(), z("BuildControls"), a("html").css(l), b.bgOverlay.add(b.wrap).prependTo(document.body), b._lastFocusedEl = document.activeElement, setTimeout(function () {
- b.content ? (b._addClassToMFP(r), A()) : b.bgOverlay.addClass(r), e.on("focusin" + q, function (c) {
- return c.target === b.wrap[0] || a.contains(b.wrap[0], c.target) ? void 0 : (A(), !1)
- })
- }, 16), b.isOpen = !0, b.updateSize(k), z(n), c
- }, close: function () {
- b.isOpen && (z(j), b.isOpen = !1, b.st.removalDelay && !b.isLowIE && b.supportsTransition ? (b._addClassToMFP(s), setTimeout(function () {
- b._close()
- }, b.st.removalDelay)) : b._close())
- }, _close: function () {
- z(i);
- var c = s + " " + r + " ";
- if (b.bgOverlay.detach(), b.wrap.detach(), b.container.empty(), b.st.mainClass && (c += b.st.mainClass + " "), b._removeClassFromMFP(c), b.fixedContentPos) {
- var d = {paddingRight: ""};
- b.isIE7 ? a("body, html").css("overflow", "") : d.overflow = "", a("html").css(d)
- }
- e.off("keyup" + q + " focusin" + q), b.ev.off(q), b.wrap.attr("class", "mfp-wrap").removeAttr("style"), b.bgOverlay.attr("class", "mfp-bg"), b.container.attr("class", "mfp-container"), !b.st.showCloseBtn || b.st.closeBtnInside && b.currTemplate[b.currItem.type] !== !0 || b.currTemplate.closeBtn && b.currTemplate.closeBtn.detach(), b._lastFocusedEl && a(b._lastFocusedEl).focus(), b.currItem = null, b.content = null, b.currTemplate = null, b.prevHeight = 0, z(k)
- }, updateSize: function (a) {
- if (b.isIOS) {
- var c = document.documentElement.clientWidth / window.innerWidth, d = window.innerHeight * c;
- b.wrap.css("height", d), b.wH = d
- } else b.wH = a || w.height();
- b.fixedContentPos || b.wrap.css("height", b.wH), z("Resize")
- }, updateItemHTML: function () {
- var c = b.items[b.index];
- b.contentContainer.detach(), b.content && b.content.detach(), c.parsed || (c = b.parseEl(b.index));
- var d = c.type;
- if (z("BeforeChange", [b.currItem ? b.currItem.type : "", d]), b.currItem = c, !b.currTemplate[d]) {
- var e = b.st[d] ? b.st[d].markup : !1;
- z("FirstMarkupParse", e), b.currTemplate[d] = e ? a(e) : !0
- }
- f && f !== c.type && b.container.removeClass("mfp-" + f + "-holder");
- var g = b["get" + d.charAt(0).toUpperCase() + d.slice(1)](c, b.currTemplate[d]);
- b.appendContent(g, d), c.preloaded = !0, z(o, c), f = c.type, b.container.prepend(b.contentContainer), z("AfterChange")
- }, appendContent: function (a, c) {
- b.content = a, a ? b.st.showCloseBtn && b.st.closeBtnInside && b.currTemplate[c] === !0 ? b.content.find(".mfp-close").length || b.content.append(B()) : b.content = a : b.content = "", z(l), b.container.addClass("mfp-" + c + "-holder"), b.contentContainer.append(b.content)
- }, parseEl: function (c) {
- var d = b.items[c], e = d.type;
- if (d = d.tagName ? {el: a(d)} : {data: d, src: d.src}, d.el) {
- for (var f = b.types, g = 0; g < f.length; g++)if (d.el.hasClass("mfp-" + f[g])) {
- e = f[g];
- break
- }
- d.src = d.el.attr("data-mfp-src"), d.src || (d.src = d.el.attr("href"))
- }
- return d.type = e || b.st.type || "inline", d.index = c, d.parsed = !0, b.items[c] = d, z("ElementParse", d), b.items[c]
- }, addGroup: function (a, c) {
- var d = function (d) {
- d.mfpEl = this, b._openClick(d, a, c)
- };
- c || (c = {});
- var e = "click.magnificPopup";
- c.mainEl = a, c.items ? (c.isObj = !0, a.off(e).on(e, d)) : (c.isObj = !1, c.delegate ? a.off(e).on(e, c.delegate, d) : (c.items = a, a.off(e).on(e, d)))
- }, _openClick: function (c, d, e) {
- var f = void 0 !== e.midClick ? e.midClick : a.magnificPopup.defaults.midClick;
- if (f || 2 !== c.which && !c.ctrlKey && !c.metaKey) {
- var g = void 0 !== e.disableOn ? e.disableOn : a.magnificPopup.defaults.disableOn;
- if (g)if (a.isFunction(g)) {
- if (!g.call(b))return !0
- } else if (w.width() < g)return !0;
- c.type && (c.preventDefault(), b.isOpen && c.stopPropagation()), e.el = a(c.mfpEl), e.delegate && (e.items = d.find(e.delegate)), b.open(e)
- }
- }, updateStatus: function (a, d) {
- if (b.preloader) {
- c !== a && b.container.removeClass("mfp-s-" + c), d || "loading" !== a || (d = b.st.tLoading);
- var e = {status: a, text: d};
- z("UpdateStatus", e), a = e.status, d = e.text, b.preloader.html(d), b.preloader.find("a").on("click", function (a) {
- a.stopImmediatePropagation()
- }), b.container.addClass("mfp-s-" + a), c = a
- }
- }, _addClassToMFP: function (a) {
- b.bgOverlay.addClass(a), b.wrap.addClass(a)
- }, _removeClassFromMFP: function (a) {
- this.bgOverlay.removeClass(a), b.wrap.removeClass(a)
- }, _hasScrollBar: function (a) {
- return (b.isIE7 ? e.height() : document.body.scrollHeight) > (a || w.height())
- }, _parseMarkup: function (b, c, d) {
- var e;
- d.data && (c = a.extend(d.data, c)), z(m, [b, c, d]), a.each(c, function (a, c) {
- if (void 0 === c || c === !1)return !0;
- if (e = a.split("_"), e.length > 1) {
- var d = b.find(q + "-" + e[0]);
- if (d.length > 0) {
- var f = e[1];
- "replaceWith" === f ? d[0] !== c[0] && d.replaceWith(c) : "img" === f ? d.is("img") ? d.attr("src", c) : d.replaceWith('<img src="' + c + '" class="' + d.attr("class") + '" />') : d.attr(e[1], c)
- }
- } else b.find(q + "-" + a).html(c)
- })
- }, _getScrollbarSize: function () {
- if (void 0 === b.scrollbarSize) {
- var a = document.createElement("div");
- a.id = "mfp-sbm", a.style.cssText = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(a), b.scrollbarSize = a.offsetWidth - a.clientWidth, document.body.removeChild(a)
- }
- return b.scrollbarSize
- }
- }, a.magnificPopup = {
- instance: null,
- proto: u.prototype,
- modules: [],
- open: function (b, c) {
- return C(), b = b ? a.extend(!0, {}, b) : {}, b.isObj = !0, b.index = c || 0, this.instance.open(b)
- },
- close: function () {
- return a.magnificPopup.instance && a.magnificPopup.instance.close()
- },
- registerModule: function (b, c) {
- c.options && (a.magnificPopup.defaults[b] = c.options), a.extend(this.proto, c.proto), this.modules.push(b)
- },
- 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,
- fixedContentPos: "auto",
- fixedBgPos: "auto",
- overflowY: "auto",
- closeMarkup: '<button title="%title%" type="button" class="mfp-close">×</button>',
- tClose: "Close (Esc)",
- tLoading: "Loading..."
- }
- }, a.fn.magnificPopup = function (c) {
- C();
- var d = a(this);
- if ("string" == typeof c)if ("open" === c) {
- var e, f = v ? d.data("magnificPopup") : d[0].magnificPopup, g = parseInt(arguments[1], 10) || 0;
- f.items ? e = f.items[g] : (e = d, f.delegate && (e = e.find(f.delegate)), e = e.eq(g)), b._openClick({mfpEl: e}, d, f)
- } else b.isOpen && b[c].apply(b, Array.prototype.slice.call(arguments, 1)); else c = a.extend(!0, {}, c), v ? d.data("magnificPopup", c) : d[0].magnificPopup = c, b.addGroup(d, c);
- return d
- };
- var F, G, H, I = "inline", J = function () {
- H && (G.after(H.addClass(F)).detach(), H = null)
- };
- a.magnificPopup.registerModule(I, {
- options: {hiddenClass: "hide", markup: "", tNotFound: "Content not found"},
- proto: {
- initInline: function () {
- b.types.push(I), x(i + "." + I, function () {
- J()
- })
- }, getInline: function (c, d) {
- if (J(), c.src) {
- var e = b.st.inline, f = a(c.src);
- if (f.length) {
- var g = f[0].parentNode;
- g && g.tagName && (G || (F = e.hiddenClass, G = y(F), F = "mfp-" + F), H = f.after(G).detach().removeClass(F)), b.updateStatus("ready")
- } else b.updateStatus("error", e.tNotFound), f = a("<div>");
- return c.inlineElement = f, f
- }
- return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d
- }
- }
- });
- var K, L = "ajax", M = function () {
- K && d.removeClass(K)
- }, N = function () {
- M(), b.req && b.req.abort()
- };
- a.magnificPopup.registerModule(L, {
- options: {
- settings: null,
- cursor: "mfp-ajax-cur",
- tError: '<a href="%url%">The content</a> could not be loaded.'
- }, proto: {
- initAjax: function () {
- b.types.push(L), K = b.st.ajax.cursor, x(i + "." + L, N), x("BeforeChange." + L, N)
- }, getAjax: function (c) {
- K && d.addClass(K), b.updateStatus("loading");
- var e = a.extend({
- url: c.src, success: function (d, e, f) {
- var g = {data: d, xhr: f};
- z("ParseAjax", g), b.appendContent(a(g.data), L), c.finished = !0, M(), A(), setTimeout(function () {
- b.wrap.addClass(r)
- }, 16), b.updateStatus("ready"), z("AjaxContentAdded")
- }, error: function () {
- M(), c.finished = c.loadError = !0, b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src))
- }
- }, b.st.ajax.settings);
- return b.req = a.ajax(e), ""
- }
- }
- });
- var O, P = function (c) {
- if (c.data && void 0 !== c.data.title)return c.data.title;
- var d = b.st.image.titleSrc;
- if (d) {
- if (a.isFunction(d))return d.call(b, c);
- if (c.el)return c.el.attr(d) || ""
- }
- return ""
- };
- a.magnificPopup.registerModule("image", {
- options: {
- markup: '<div class="mfp-figure"><div class="mfp-close"></div><div class="mfp-img"></div><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></div>',
- cursor: "mfp-zoom-out-cur",
- titleSrc: "title",
- verticalFit: !0,
- tError: '<a href="%url%">The image</a> could not be loaded.'
- }, proto: {
- initImage: function () {
- var a = b.st.image, c = ".image";
- b.types.push("image"), x(n + c, function () {
- "image" === b.currItem.type && a.cursor && d.addClass(a.cursor)
- }), x(i + c, function () {
- a.cursor && d.removeClass(a.cursor), w.off("resize" + q)
- }), x("Resize" + c, b.resizeImage), b.isLowIE && x("AfterChange", b.resizeImage)
- }, resizeImage: function () {
- var a = b.currItem;
- if (a && a.img && b.st.image.verticalFit) {
- var c = 0;
- b.isLowIE && (c = parseInt(a.img.css("padding-top"), 10) + parseInt(a.img.css("padding-bottom"), 10)), a.img.css("max-height", b.wH - c)
- }
- }, _onImageHasSize: function (a) {
- a.img && (a.hasSize = !0, O && clearInterval(O), a.isCheckingImgSize = !1, z("ImageHasSize", a), a.imgHidden && (b.content && b.content.removeClass("mfp-loading"), a.imgHidden = !1))
- }, findImageSize: function (a) {
- var c = 0, d = a.img[0], e = function (f) {
- O && clearInterval(O), O = setInterval(function () {
- return d.naturalWidth > 0 ? (b._onImageHasSize(a), void 0) : (c > 200 && clearInterval(O), c++, 3 === c ? e(10) : 40 === c ? e(50) : 100 === c && e(500), void 0)
- }, f)
- };
- e(1)
- }, getImage: function (c, d) {
- var e = 0, f = function () {
- c && (c.img[0].complete ? (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("ready")), c.hasSize = !0, c.loaded = !0, z("ImageLoadComplete")) : (e++, 200 > e ? setTimeout(f, 100) : g()))
- }, g = function () {
- c && (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("error", h.tError.replace("%url%", c.src))), c.hasSize = !0, c.loaded = !0, c.loadError = !0)
- }, h = b.st.image, i = d.find(".mfp-img");
- if (i.length) {
- var j = document.createElement("img");
- j.className = "mfp-img", c.img = a(j).on("load.mfploader", f).on("error.mfploader", g), j.src = c.src, i.is("img") && (c.img = c.img.clone()), c.img[0].naturalWidth > 0 && (c.hasSize = !0)
- }
- return b._parseMarkup(d, {
- title: P(c),
- img_replaceWith: c.img
- }, c), b.resizeImage(), c.hasSize ? (O && clearInterval(O), c.loadError ? (d.addClass("mfp-loading"), b.updateStatus("error", h.tError.replace("%url%", c.src))) : (d.removeClass("mfp-loading"), b.updateStatus("ready")), d) : (b.updateStatus("loading"), c.loading = !0, c.hasSize || (c.imgHidden = !0, d.addClass("mfp-loading"), b.findImageSize(c)), d)
- }
- }
- });
- var Q, R = function () {
- return void 0 === Q && (Q = void 0 !== document.createElement("p").style.MozTransform), Q
- };
- a.magnificPopup.registerModule("zoom", {
- options: {
- enabled: !1,
- easing: "ease-in-out",
- duration: 300,
- opener: function (a) {
- return a.is("img") ? a : a.find("img")
- }
- }, proto: {
- initZoom: function () {
- var a, c = b.st.zoom, d = ".zoom";
- if (c.enabled && b.supportsTransition) {
- var e, f, g = c.duration, h = function (a) {
- var b = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"), d = "all " + c.duration / 1e3 + "s " + c.easing, e = {
- position: "fixed",
- zIndex: 9999,
- left: 0,
- top: 0,
- "-webkit-backface-visibility": "hidden"
- }, f = "transition";
- return e["-webkit-" + f] = e["-moz-" + f] = e["-o-" + f] = e[f] = d, b.css(e), b
- }, k = function () {
- b.content.css("visibility", "visible")
- };
- x("BuildControls" + d, function () {
- if (b._allowZoom()) {
- if (clearTimeout(e), b.content.css("visibility", "hidden"), a = b._getItemToZoom(), !a)return k(), void 0;
- f = h(a), f.css(b._getOffset()), b.wrap.append(f), e = setTimeout(function () {
- f.css(b._getOffset(!0)), e = setTimeout(function () {
- k(), setTimeout(function () {
- f.remove(), a = f = null, z("ZoomAnimationEnded")
- }, 16)
- }, g)
- }, 16)
- }
- }), x(j + d, function () {
- if (b._allowZoom()) {
- if (clearTimeout(e), b.st.removalDelay = g, !a) {
- if (a = b._getItemToZoom(), !a)return;
- f = h(a)
- }
- f.css(b._getOffset(!0)), b.wrap.append(f), b.content.css("visibility", "hidden"), setTimeout(function () {
- f.css(b._getOffset())
- }, 16)
- }
- }), x(i + d, function () {
- b._allowZoom() && (k(), f && f.remove(), a = null)
- })
- }
- }, _allowZoom: function () {
- return "image" === b.currItem.type
- }, _getItemToZoom: function () {
- return b.currItem.hasSize ? b.currItem.img : !1
- }, _getOffset: function (c) {
- var d;
- d = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem);
- var e = d.offset(), f = parseInt(d.css("padding-top"), 10), g = parseInt(d.css("padding-bottom"), 10);
- e.top -= a(window).scrollTop() - f;
- var h = {width: d.width(), height: (v ? d.innerHeight() : d[0].offsetHeight) - g - f};
- return R() ? h["-moz-transform"] = h.transform = "translate(" + e.left + "px," + e.top + "px)" : (h.left = e.left, h.top = e.top), h
- }
- }
- });
- var S = "iframe", T = "//about:blank", U = function (a) {
- if (b.currTemplate[S]) {
- var c = b.currTemplate[S].find("iframe");
- c.length && (a || (c[0].src = T), b.isIE8 && c.css("display", a ? "block" : "none"))
- }
- };
- a.magnificPopup.registerModule(S, {
- options: {
- markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',
- 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 () {
- b.types.push(S), x("BeforeChange", function (a, b, c) {
- b !== c && (b === S ? U() : c === S && U(!0))
- }), x(i + "." + S, function () {
- U()
- })
- }, getIframe: function (c, d) {
- var e = c.src, f = b.st.iframe;
- a.each(f.patterns, function () {
- return e.indexOf(this.index) > -1 ? (this.id && (e = "string" == typeof this.id ? e.substr(e.lastIndexOf(this.id) + this.id.length, e.length) : this.id.call(this, e)), e = this.src.replace("%id%", e), !1) : void 0
- });
- var g = {};
- return f.srcAction && (g[f.srcAction] = e), b._parseMarkup(d, g, c), b.updateStatus("ready"), d
- }
- }
- });
- var V = function (a) {
- var c = b.items.length;
- return a > c - 1 ? a - c : 0 > a ? c + a : a
- }, W = function (a, b, c) {
- return a.replace("%curr%", b + 1).replace("%total%", c)
- };
- a.magnificPopup.registerModule("gallery", {
- options: {
- enabled: !1,
- arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
- 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 c = b.st.gallery, d = ".mfp-gallery", f = Boolean(a.fn.mfpFastClick);
- return b.direction = !0, c && c.enabled ? (g += " mfp-gallery", x(n + d, function () {
- c.navigateByImgClick && b.wrap.on("click" + d, ".mfp-img", function () {
- return b.items.length > 1 ? (b.next(), !1) : void 0
- }), e.on("keydown" + d, function (a) {
- 37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next()
- })
- }), x("UpdateStatus" + d, function (a, c) {
- c.text && (c.text = W(c.text, b.currItem.index, b.items.length))
- }), x(m + d, function (a, d, e, f) {
- var g = b.items.length;
- e.counter = g > 1 ? W(c.tCounter, f.index, g) : ""
- }), x("BuildControls" + d, function () {
- if (b.items.length > 1 && c.arrows && !b.arrowLeft) {
- var d = c.arrowMarkup, e = b.arrowLeft = a(d.replace("%title%", c.tPrev).replace("%dir%", "left")).addClass(t), g = b.arrowRight = a(d.replace("%title%", c.tNext).replace("%dir%", "right")).addClass(t), h = f ? "mfpFastClick" : "click";
- e[h](function () {
- b.prev()
- }), g[h](function () {
- b.next()
- }), b.isIE7 && (y("b", e[0], !1, !0), y("a", e[0], !1, !0), y("b", g[0], !1, !0), y("a", g[0], !1, !0)), b.container.append(e.add(g))
- }
- }), x(o + d, function () {
- b._preloadTimeout && clearTimeout(b._preloadTimeout), b._preloadTimeout = setTimeout(function () {
- b.preloadNearbyImages(), b._preloadTimeout = null
- }, 16)
- }), x(i + d, function () {
- e.off(d), b.wrap.off("click" + d), b.arrowLeft && f && b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(), b.arrowRight = b.arrowLeft = null
- }), void 0) : !1
- }, next: function () {
- b.direction = !0, b.index = V(b.index + 1), b.updateItemHTML()
- }, prev: function () {
- b.direction = !1, b.index = V(b.index - 1), b.updateItemHTML()
- }, goTo: function (a) {
- b.direction = a >= b.index, b.index = a, b.updateItemHTML()
- }, preloadNearbyImages: function () {
- var a, c = b.st.gallery.preload, d = Math.min(c[0], b.items.length), e = Math.min(c[1], b.items.length);
- for (a = 1; a <= (b.direction ? e : d); a++)b._preloadItem(b.index + a);
- for (a = 1; a <= (b.direction ? d : e); a++)b._preloadItem(b.index - a)
- }, _preloadItem: function (c) {
- if (c = V(c), !b.items[c].preloaded) {
- var d = b.items[c];
- d.parsed || (d = b.parseEl(c)), z("LazyLoad", d), "image" === d.type && (d.img = a('<img class="mfp-img" />').on("load.mfploader", function () {
- d.hasSize = !0
- }).on("error.mfploader", function () {
- d.hasSize = !0, d.loadError = !0, z("LazyLoadError", d)
- }).attr("src", d.src)), d.preloaded = !0
- }
- }
- }
- });
- var X = "retina";
- a.magnificPopup.registerModule(X, {
- options: {
- replaceSrc: function (a) {
- return a.src.replace(/\.\w+$/, function (a) {
- return "@2x" + a
- })
- }, ratio: 1
- }, proto: {
- initRetina: function () {
- if (window.devicePixelRatio > 1) {
- var a = b.st.retina, c = a.ratio;
- c = isNaN(c) ? c() : c, c > 1 && (x("ImageHasSize." + X, function (a, b) {
- b.img.css({"max-width": b.img[0].naturalWidth / c, width: "100%"})
- }), x("ElementParse." + X, function (b, d) {
- d.src = a.replaceSrc(d, c)
- }))
- }
- }
- }
- }), function () {
- var b = 1e3, c = "ontouchstart"in window, d = function () {
- w.off("touchmove" + f + " touchend" + f)
- }, e = "mfpFastClick", f = "." + e;
- a.fn.mfpFastClick = function (e) {
- return a(this).each(function () {
- var g, h = a(this);
- if (c) {
- var i, j, k, l, m, n;
- h.on("touchstart" + f, function (a) {
- l = !1, n = 1, m = a.originalEvent ? a.originalEvent.touches[0] : a.touches[0], j = m.clientX, k = m.clientY, w.on("touchmove" + f, function (a) {
- m = a.originalEvent ? a.originalEvent.touches : a.touches, n = m.length, m = m[0], (Math.abs(m.clientX - j) > 10 || Math.abs(m.clientY - k) > 10) && (l = !0, d())
- }).on("touchend" + f, function (a) {
- d(), l || n > 1 || (g = !0, a.preventDefault(), clearTimeout(i), i = setTimeout(function () {
- g = !1
- }, b), e())
- })
- })
- }
- h.on("click" + f, function () {
- g || e()
- })
- })
- }, a.fn.destroyMfpFastClick = function () {
- a(this).off("touchstart" + f + " click" + f), c && w.off("touchmove" + f + " touchend" + f)
- }
- }()
- }(window.jQuery || window.Zepto), function (a, b, c) {
- var d = function (d, e) {
- this.elem = d, this.$elem = a(d), this.options = e, this.metadata = this.$elem.data("plugin-options"), this.$nav = this.$elem.find("a"), this.$win = a(b), this.sections = {}, this.didScroll = !1, this.$doc = a(c), this.docHeight = this.$doc.height()
- };
- d.prototype = {
- defaults: {
- currentClass: "current",
- changeHash: !1,
- easing: "swing",
- filter: "",
- scrollSpeed: 750,
- scrollOffset: 0,
- scrollThreshold: .5,
- begin: !1,
- end: !1,
- scrollChange: !1
- }, init: function () {
- var b = this;
- return b.config = a.extend({}, b.defaults, b.options, b.metadata), "" !== b.config.filter && (b.$nav = b.$nav.filter(b.config.filter)), b.$nav.on("click.onePageNav", a.proxy(b.handleClick, b)), b.getPositions(), b.bindInterval(), b.$win.on("resize.onePageNav", a.proxy(b.getPositions, b)), this
- }, adjustNav: function (a, b) {
- a.$elem.find("." + a.config.currentClass).removeClass(a.config.currentClass), b.addClass(a.config.currentClass)
- }, bindInterval: function () {
- var a, b = this;
- b.$win.on("scroll.onePageNav", function () {
- b.didScroll = !0
- }), b.t = setInterval(function () {
- a = b.$doc.height(), b.didScroll && (b.didScroll = !1, b.scrollChange()), a !== b.docHeight && (b.docHeight = a, b.getPositions())
- }, 250)
- }, getHash: function (a) {
- return a.attr("href").split("#")[1]
- }, getPositions: function () {
- var b, c, d, e = this;
- e.$nav.each(function () {
- b = e.getHash(a(this)), d = a("#" + b), d.length && (c = d.offset().top, e.sections[b] = Math.round(c) - e.config.scrollOffset)
- })
- }, getSection: function (a) {
- var b = null, c = Math.round(this.$win.height() * this.config.scrollThreshold);
- for (var d in this.sections)this.sections[d] - c < a && (b = d);
- return b
- }, handleClick: function (c) {
- var d = this, e = a(c.currentTarget), f = e.parent(), g = "#" + d.getHash(e);
- f.hasClass(d.config.currentClass) || (d.config.begin && d.config.begin(), d.adjustNav(d, f), d.unbindInterval(), a.scrollTo(g, d.config.scrollSpeed, {
- axis: "y",
- easing: d.config.easing,
- offset: {top: -d.config.scrollOffset},
- onAfter: function () {
- d.config.changeHash && (b.location.hash = g), d.bindInterval(), d.config.end && d.config.end()
- }
- })), c.preventDefault()
- }, scrollChange: function () {
- var a, b = this.$win.scrollTop(), c = this.getSection(b);
- null !== c && (a = this.$elem.find('a[href$="#' + c + '"]').parent(), a.hasClass(this.config.currentClass) || (this.adjustNav(this, a), this.config.scrollChange && this.config.scrollChange(a)))
- }, unbindInterval: function () {
- clearInterval(this.t), this.$win.unbind("scroll.onePageNav")
- }
- }, d.defaults = d.prototype.defaults, a.fn.onePageNav = function (a) {
- return this.each(function () {
- new d(this, a).init()
- })
- }
- }(jQuery, window, document), function (a) {
- function b(a) {
- return "object" == typeof a ? a : {top: a, left: a}
- }
- var c = a.scrollTo = function (b, c, d) {
- a(window).scrollTo(b, c, d)
- };
- c.defaults = {axis: "xy", duration: parseFloat(a.fn.jquery) >= 1.3 ? 0 : 1, limit: !0}, c.window = function () {
- return a(window)._scrollable()
- }, a.fn._scrollable = function () {
- return this.map(function () {
- var b = this, c = !b.nodeName || -1 != a.inArray(b.nodeName.toLowerCase(), ["iframe", "#document", "html", "body"]);
- if (!c)return b;
- var d = (b.contentWindow || b).document || b.ownerDocument || b;
- return /webkit/i.test(navigator.userAgent) || "BackCompat" == d.compatMode ? d.body : d.documentElement
- })
- }, a.fn.scrollTo = function (d, e, f) {
- return "object" == typeof e && (f = e, e = 0), "function" == typeof f && (f = {onAfter: f}), "max" == d && (d = 9e9), f = a.extend({}, c.defaults, f), e = e || f.duration, f.queue = f.queue && f.axis.length > 1, f.queue && (e /= 2), f.offset = b(f.offset), f.over = b(f.over), this._scrollable().each(function () {
- function g(a) {
- j.animate(l, e, f.easing, a && function () {
- a.call(this, d, f)
- })
- }
- if (d) {
- var h, i = this, j = a(i), k = d, l = {}, m = j.is("html,body");
- switch (typeof k) {
- case"number":
- case"string":
- if (/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(k)) {
- k = b(k);
- break
- }
- if (k = a(k, this), !k.length)return;
- case"object":
- (k.is || k.style) && (h = (k = a(k)).offset())
- }
- a.each(f.axis.split(""), function (a, b) {
- var d = "x" == b ? "Left" : "Top", e = d.toLowerCase(), n = "scroll" + d, o = i[n], p = c.max(i, b);
- if (h)l[n] = h[e] + (m ? 0 : o - j.offset()[e]), f.margin && (l[n] -= parseInt(k.css("margin" + d)) || 0, l[n] -= parseInt(k.css("border" + d + "Width")) || 0), l[n] += f.offset[e] || 0, f.over[e] && (l[n] += k["x" == b ? "width" : "height"]() * f.over[e]); else {
- var q = k[e];
- l[n] = q.slice && "%" == q.slice(-1) ? parseFloat(q) / 100 * p : q
- }
- f.limit && /^\d+$/.test(l[n]) && (l[n] = l[n] <= 0 ? 0 : Math.min(l[n], p)), !a && f.queue && (o != l[n] && g(f.onAfterFirst), delete l[n])
- }), g(f.onAfter)
- }
- }).end()
- }, c.max = function (b, c) {
- var d = "x" == c ? "Width" : "Height", e = "scroll" + d;
- if (!a(b).is("html,body"))return b[e] - a(b)[d.toLowerCase()]();
- var f = "client" + d, g = b.ownerDocument.documentElement, h = b.ownerDocument.body;
- return Math.max(g[e], h[e]) - Math.min(g[f], h[f])
- }
- }(jQuery), function (a, b) {
- function c() {
- this._state = [], this._defaults = {
- classHolder: "sbHolder",
- classHolderDisabled: "sbHolderDisabled",
- classSelector: "sbSelector",
- classOptions: "sbOptions",
- classGroup: "sbGroup",
- classSub: "sbSub",
- classDisabled: "sbDisabled",
- classToggleOpen: "sbToggleOpen",
- classToggle: "sbToggle",
- classFocus: "sbFocus",
- speed: 200,
- effect: "slide",
- onChange: null,
- onOpen: null,
- onClose: null
- }
- }
- var d = "selectbox", e = !1, f = !0;
- a.extend(c.prototype, {
- _isOpenSelectbox: function (a) {
- if (!a)return e;
- var b = this._getInst(a);
- return b.isOpen
- }, _isDisabledSelectbox: function (a) {
- if (!a)return e;
- var b = this._getInst(a);
- return b.isDisabled
- }, _attachSelectbox: function (b, c) {
- function g() {
- var b, c, d = this.attr("id").split("_")[1];
- for (b in n._state)b !== d && n._state.hasOwnProperty(b) && (c = a("select[sb='" + b + "']")[0], c && n._closeSelectbox(c))
- }
- function h() {
- var c = arguments[1] && arguments[1].sub ? !0 : !1, d = arguments[1] && arguments[1].disabled ? !0 : !1;
- arguments[0].each(function (e) {
- var g, h = a(this), i = a("<li>");
- h.is(":selected") && (j.text(h.text()), p = f), e === r - 1 && i.addClass("last"), h.is(":disabled") || d ? (g = a("<span>", {text: h.text()}).addClass(o.settings.classDisabled), c && g.addClass(o.settings.classSub), g.appendTo(i)) : (g = a("<a>", {
- href: "#" + h.val(),
- rel: h.val()
- }).text(h.text()).bind("click.sb", function (c) {
- c && c.preventDefault && c.preventDefault();
- {
- var d = k, e = a(this);
- d.attr("id").split("_")[1]
- }
- n._changeSelectbox(b, e.attr("rel"), e.text()), n._closeSelectbox(b)
- }).bind("mouseover.sb", function () {
- var b = a(this);
- b.parent().siblings().find("a").removeClass(o.settings.classFocus), b.addClass(o.settings.classFocus)
- }).bind("mouseout.sb", function () {
- a(this).removeClass(o.settings.classFocus)
- }), c && g.addClass(o.settings.classSub), h.is(":selected") && g.addClass(o.settings.classFocus), g.appendTo(i)), i.appendTo(l)
- })
- }
- if (this._getInst(b))return e;
- var i, j, k, l, m = a(b), n = this, o = n._newInst(m), p = e, q = (m.find("optgroup"), m.find("option")), r = q.length;
- m.attr("sb", o.uid), a.extend(o.settings, n._defaults, c), n._state[o.uid] = e, m.hide(), i = a("<div>", {
- id: "sbHolder_" + o.uid,
- "class": o.settings.classHolder,
- tabindex: m.attr("tabindex")
- }), j = a("<a>", {
- id: "sbSelector_" + o.uid, href: "#", "class": o.settings.classSelector, click: function (c) {
- c.preventDefault(), g.apply(a(this), []);
- var d = a(this).attr("id").split("_")[1];
- n._state[d] ? n._closeSelectbox(b) : n._openSelectbox(b)
- }
- }), k = a("<a>", {
- id: "sbToggle_" + o.uid, href: "#", "class": o.settings.classToggle, click: function (c) {
- c.preventDefault(), g.apply(a(this), []);
- var d = a(this).attr("id").split("_")[1];
- n._state[d] ? n._closeSelectbox(b) : n._openSelectbox(b)
- }
- }), k.appendTo(i), l = a("<ul>", {
- id: "sbOptions_" + o.uid,
- "class": o.settings.classOptions,
- css: {display: "none"}
- }), m.children().each(function () {
- var b, c = a(this), d = {};
- c.is("option") ? h(c) : c.is("optgroup") && (b = a("<li>"), a("<span>", {text: c.attr("label")}).addClass(o.settings.classGroup).appendTo(b), b.appendTo(l), c.is(":disabled") && (d.disabled = !0), d.sub = !0, h(c.find("option"), d))
- }), p || j.text(q.first().text()), a.data(b, d, o), i.data("uid", o.uid).bind("keydown.sb", function (b) {
- var c = b.charCode ? b.charCode : b.keyCode ? b.keyCode : 0, e = a(this), f = e.data("uid"), g = e.siblings("select[sb='" + f + "']").data(d), h = e.siblings(["select[sb='", f, "']"].join("")).get(0), i = e.find("ul").find("a." + g.settings.classFocus);
- switch (c) {
- case 37:
- case 38:
- if (i.length > 0) {
- var j;
- a("a", e).removeClass(g.settings.classFocus), j = i.parent().prevAll("li:has(a)").eq(0).find("a"), j.length > 0 && (j.addClass(g.settings.classFocus).focus(), a("#sbSelector_" + f).text(j.text()))
- }
- break;
- case 39:
- case 40:
- var j;
- a("a", e).removeClass(g.settings.classFocus), j = i.length > 0 ? i.parent().nextAll("li:has(a)").eq(0).find("a") : e.find("ul").find("a").eq(0), j.length > 0 && (j.addClass(g.settings.classFocus).focus(), a("#sbSelector_" + f).text(j.text()));
- break;
- case 13:
- i.length > 0 && n._changeSelectbox(h, i.attr("rel"), i.text()), n._closeSelectbox(h);
- break;
- case 9:
- if (h) {
- var g = n._getInst(h);
- g && (i.length > 0 && n._changeSelectbox(h, i.attr("rel"), i.text()), n._closeSelectbox(h))
- }
- var k = parseInt(e.attr("tabindex"), 10);
- b.shiftKey ? k-- : k++, a("*[tabindex='" + k + "']").focus();
- break;
- case 27:
- n._closeSelectbox(h)
- }
- return b.stopPropagation(), !1
- }).delegate("a", "mouseover", function () {
- a(this).addClass(o.settings.classFocus)
- }).delegate("a", "mouseout", function () {
- a(this).removeClass(o.settings.classFocus)
- }), j.appendTo(i), l.appendTo(i), i.insertAfter(m), a("html").on("mousedown", function (b) {
- b.stopPropagation(), a("select").selectbox("close")
- }), a([".", o.settings.classHolder, ", .", o.settings.classSelector].join("")).mousedown(function (a) {
- a.stopPropagation()
- })
- }, _detachSelectbox: function (b) {
- var c = this._getInst(b);
- return c ? (a("#sbHolder_" + c.uid).remove(), a.data(b, d, null), a(b).show(), void 0) : e
- }, _changeSelectbox: function (b, c, d) {
- var g, h = this._getInst(b);
- h && (g = this._get(h, "onChange"), a("#sbSelector_" + h.uid).text(d)), c = c.replace(/\'/g, "\\'"), a(b).find("option").attr("selected", e), a(b).find("option[value='" + c + "']").attr("selected", f), h && g ? g.apply(h.input ? h.input[0] : null, [c, h]) : h && h.input && h.input.trigger("change")
- }, _enableSelectbox: function (b) {
- var c = this._getInst(b);
- return c && c.isDisabled ? (a("#sbHolder_" + c.uid).removeClass(c.settings.classHolderDisabled), c.isDisabled = e, a.data(b, d, c), void 0) : e
- }, _disableSelectbox: function (b) {
- var c = this._getInst(b);
- return !c || c.isDisabled ? e : (a("#sbHolder_" + c.uid).addClass(c.settings.classHolderDisabled), c.isDisabled = f, a.data(b, d, c), void 0)
- }, _optionSelectbox: function (b, c, f) {
- var g = this._getInst(b);
- return g ? (g[c] = f, a.data(b, d, g), void 0) : e
- }, _openSelectbox: function (b) {
- var c = this._getInst(b);
- if (c && !c.isOpen && !c.isDisabled) {
- var e = a("#sbOptions_" + c.uid), g = parseInt(a(window).height(), 10), h = a("#sbHolder_" + c.uid).offset(), i = a(window).scrollTop(), j = e.prev().height(), k = g - (h.top - i) - j / 2, l = this._get(c, "onOpen");
- e.css({
- top: j + "px",
- maxHeight: k - j + "px"
- }), "fade" === c.settings.effect ? e.fadeIn(c.settings.speed) : e.slideDown(c.settings.speed), a("#sbToggle_" + c.uid).addClass(c.settings.classToggleOpen), this._state[c.uid] = f, c.isOpen = f, l && l.apply(c.input ? c.input[0] : null, [c]), a.data(b, d, c)
- }
- }, _closeSelectbox: function (b) {
- var c = this._getInst(b);
- if (c && c.isOpen) {
- var f = this._get(c, "onClose");
- "fade" === c.settings.effect ? a("#sbOptions_" + c.uid).fadeOut(c.settings.speed) : a("#sbOptions_" + c.uid).slideUp(c.settings.speed), a("#sbToggle_" + c.uid).removeClass(c.settings.classToggleOpen), this._state[c.uid] = e, c.isOpen = e, f && f.apply(c.input ? c.input[0] : null, [c]), a.data(b, d, c)
- }
- }, _newInst: function (a) {
- var b = a[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1");
- return {id: b, input: a, uid: Math.floor(99999999 * Math.random()), isOpen: e, isDisabled: e, settings: {}}
- }, _getInst: function (b) {
- try {
- return a.data(b, d)
- } catch (c) {
- throw"Missing instance data for this selectbox"
- }
- }, _get: function (a, c) {
- return a.settings[c] !== b ? a.settings[c] : this._defaults[c]
- }
- }), a.fn.selectbox = function (b) {
- var c = Array.prototype.slice.call(arguments, 1);
- return "string" == typeof b && "isDisabled" == b ? a.selectbox["_" + b + "Selectbox"].apply(a.selectbox, [this[0]].concat(c)) : "option" == b && 2 == arguments.length && "string" == typeof arguments[1] ? a.selectbox["_" + b + "Selectbox"].apply(a.selectbox, [this[0]].concat(c)) : this.each(function () {
- "string" == typeof b ? a.selectbox["_" + b + "Selectbox"].apply(a.selectbox, [this].concat(c)) : a.selectbox._attachSelectbox(this, b)
- })
- }, a.selectbox = new c, a.selectbox.version = "0.2"
- }(jQuery), function (a, b, c) {
- function d(b, c) {
- this.element = b, this.$element = a(b), this.options = a.extend(!0, {}, r, c), this.attributes = this._readDataAttributes(), this._defaults = r, this._name = i, this.init(), this.bind()
- }
- function e(a, b, d) {
- var e = "";
- if (d) {
- var f = new Date;
- f.setTime(f.getTime() + 24 * d * 60 * 60 * 1e3), e = "; expires=" + f.toGMTString()
- }
- var g = escape(a) + "=" + escape(b) + e + "; path=/";
- c.cookie = g
- }
- function f(a) {
- e(a, "", -1)
- }
- function g(a) {
- for (var b = escape(a) + "=", d = c.cookie.split(";"), e = 0; e < d.length; e++) {
- for (var f = d[e]; " " === f.charAt(0);)f = f.substring(1, f.length);
- if (0 === f.indexOf(b)) {
- var g = unescape(f.substring(b.length, f.length));
- return g
- }
- }
- return !1
- }
- function h(a, b) {
- for (var c = Array.prototype.slice.call(arguments).splice(2), d = a.split("."), e = d.pop(), f = 0; f < d.length; f++)b = b[d[f]];
- return b[e].apply(this, c)
- }
- var i = "twoClickSocial", j = "tcs_facebook", k = "tcs_pinterest", l = "tcs_facebook_share", m = "tcs_facebook_like", n = "tcs_facebook", o = "tcs_pinterest", p = {
- loaded: !1,
- active: !1
- }, q = {loaded: !1, active: !1}, r = {
- url: c.URL,
- description: c.description,
- expiration: 28,
- facebook: {app_id: "152941331548334", hideComments: !0, like: !1, share: !1},
- pinterest: {pinterest: !1},
- selector: {
- name: "name",
- caption: "caption",
- description: "description",
- url: "url",
- picture: "picture",
- callback: "callback"
- },
- onSDKLoaded: function (a) {
- this.console && console.log("SDK loaded: " + a)
- },
- tooltip: {
- headline: "Jetzt soziale Netzwerke aktivieren!",
- text: "Deine Privatsphäre ist uns wichtig, deshalb wird der Button erst aktiv, wenn du den Schieberegler betätigst.",
- linkname: "Mehr erfahren",
- url: c.location,
- direction: "bottom"
- }
- };
- d.prototype.init = function () {
- this.$element.addClass("tcs"), q.active = "1" === g(j), p.active = "1" === g(k), this.$element.append(this._createUI())
- }, d.prototype._createUI = function () {
- var b = a('<ul class="tcs_container">'), c = this.options;
- return (c.facebook.like || c.facebook.share) && this._appendEntry(b, n), c.pinterest.pinterest && this._appendEntry(b, o), b
- }, d.prototype._appendEntry = function (b, c) {
- var d = this.options, e = a('<li class="' + c + '">'), f = a('<span class="tcs_switch off"></span>');
- switch (c) {
- case n:
- if (d.facebook.like) {
- var g = _createButton(m);
- if (e.append(g), q.active) {
- g.hide(), f.removeClass("off").addClass("on");
- var h = this.createLikeButton();
- e.append(h)
- }
- }
- if (d.facebook.share) {
- var i = _createButton(l);
- if (e.append(i), q.active) {
- i.hide(), f.removeClass("off").addClass("on");
- var j = this.createShareButton();
- e.append(j)
- }
- }
- q.active ? q.active && !q.loaded && _loadFacebookSDK(d) : this.handleTooltip(e, !0);
- break;
- case o:
- var k = _createButton(c);
- if (e.append(k), p.active) {
- k.hide(), f.removeClass("off").addClass("on");
- var r = this.createPinterestButton();
- e.append(r)
- } else this.handleTooltip(e, !0);
- p.active && !p.loaded && _loadPinterestSDK(d, function () {
- });
- break;
- default:
- return
- }
- e.append(_createTooltip(d.tooltip)), e.prepend(f), b.append(e)
- }, d.prototype._readDataAttributes = function () {
- var b = {}, c = this.$element, d = this.options;
- return a.each(d.selector, function (a, e) {
- var f = c.data(e);
- "undefined" != typeof f && "" !== f ? b[a] = f : ("url" === a || "description" === a) && (b[a] = d[a])
- }), b
- }, d.prototype.createLikeButton = function () {
- var b = this.options.url, c = a('<div class="fb-like" data-href="' + b + '" data-width="450" data-layout="button_count" data-show-faces="false" data-send="false"></div>');
- return this.options.facebook.hideComments && c.addClass("hide-comments"), c
- }, d.prototype.createShareButton = function () {
- var b = this, c = a('<div class="fb-share">');
- return c.on("click", function () {
- var a = b._readDataAttributes();
- console.log(a), _openShareDialog(a)
- }), c
- }, d.prototype.createPinterestButton = function () {
- var b = a('<div class="pinterest-btn">'), c = a("<a>").append('<img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" />'), d = this._readDataAttributes(), e = encodeURI(d.url), f = d.description, g = encodeURI(d.picture), h = "//pinterest.com/pin/create/button/?url=" + e + "&description=" + f + "&media=" + g;
- return c.attr("href", h), c.data("pin-do", "buttonPin"), c.data("pin-config", "beside"), c.on("click", function (a) {
- return a.preventDefault(), !1
- }), b.append(c), b
- }, d.prototype.handleTooltip = function (b, c) {
- c === !0 ? a.isFunction(jQuery().hoverIntent) ? b.hoverIntent(this.mouseEnterHandler, this.mouseLeaveHandler) : b.on("mouseenter", this.mouseEnterHandler).on("mouseleave", this.mouseLeaveHandler) : (b.find(".tcs_tooltip").hide(), b.off("mouseenter").off("mouseleave"))
- }, d.prototype.mouseEnterHandler = function () {
- var b = a(this).find(".tcs_tooltip");
- clearTimeout(a(this).data("timeoutId")), b.fadeIn("slow")
- }, d.prototype.mouseLeaveHandler = function () {
- var b = a(this).find(".tcs_tooltip"), c = setTimeout(function () {
- b.fadeOut("slow")
- }, 650);
- a(this).data("timeoutId", c)
- }, d.prototype.bind = function () {
- {
- var b = this, c = this.$element, d = this.options;
- this.attributes
- }
- c.find(".tcs_switch").on("click", function () {
- var g = a(this).parent().attr("class"), h = a(this).hasClass("off"), i = a("." + g).find(".tcs_switch");
- if (_toggleSwitches(i, h), g === n)h ? ("undefined" == typeof FB && _loadFacebookSDK(d), _replaceFacebookLikeButtons(), _replaceFacebookShareButtons(), e(j, "1", d.expiration), q.active = !0) : (a(".fb-like").hide(), a(".fb-share").hide(), a("." + m).show(), a("." + l).show(), f(j), q.active = !1); else if (g === o)if (h) {
- {
- c.data(d.pinterest.url), c.data(d.pinterest.description)
- }
- p.loaded === !1 ? (_replacePinterestButtons(), _loadPinterestSDK(d, function () {
- })) : _replacePinterestButtons(), e(k, "1", d.expiration), p.active = !0
- } else a(".pinterest-btn").hide(), a("." + o + ".tcs_btn").show(), f(k), p.active = !1;
- b.handleTooltip(a("." + g), !h)
- })
- }, _replaceFacebookLikeButtons = function () {
- var b = a("." + m);
- 0 !== b.length && b.each(function () {
- a(this).hide();
- var b = a(this).siblings(".fb-like");
- if (b.length > 0)return b.show(), !0;
- var c = a(this).parents(".tcs").data().plugin_twoClickSocial.createLikeButton();
- a(this).parent("li").append(c)
- })
- }, _replaceFacebookShareButtons = function () {
- var b = a("." + l);
- 0 !== b.length && b.each(function () {
- a(this).hide();
- var b = a(this).siblings(".fb-share");
- return b.length > 0 ? (b.show(), !0) : (b = a(this).parents(".tcs").data().plugin_twoClickSocial.createShareButton(), a(this).parent("li").append(b), void 0)
- })
- }, _replacePinterestButtons = function () {
- var b = a("." + o + ".tcs_btn");
- 0 !== b.length && b.each(function () {
- a(this).hide();
- var b = a(this).siblings(".pinterest-btn");
- return b.length > 0 ? (b.show(), !0) : (b = a(this).parents(".tcs").data().plugin_twoClickSocial.createPinterestButton(), a(this).parent("li").append(b), void 0)
- })
- }, _createButton = function (b) {
- return a('<div class="tcs_btn ' + b + '">')
- }, _createTooltip = function (b) {
- var c = a('<div class="tcs_tooltip ' + b.direction + '">'), d = a('<div class="tcs_tooltip_content">'), e = a('<h3 class="tcs_tooltip_headline">').text(b.headline), f = a('<p class="tcs_tooltip_text">').text(b.text), g = a('<a class="tcs_tooltip_link" target="_blank">').attr("href", b.url).text(b.linkname);
- return d.append(e).append(f).append(g), c.append(d).hide()
- }, _toggleSwitches = function (a, b) {
- b ? a.removeClass("off").addClass("on") : a.removeClass("on").addClass("off")
- }, _loadFacebookSDK = function (a) {
- b.fbAsyncInit = function () {
- FB.init({
- appId: a.facebook.app_id,
- status: !1,
- cookie: !0,
- oauth: !0,
- xfbml: !0
- }), a.onSDKLoaded("facebook"), q.loaded = !0
- }, function (a) {
- var b, c = "facebook-jssdk";
- a.getElementById(c) || (b = a.createElement("script"), b.id = c, b.async = !0, b.src = "//connect.facebook.net/de_DE/all.js", a.getElementsByTagName("head")[0].appendChild(b))
- }(c)
- }, _loadPinterestSDK = function (b, c) {
- var d = a.Deferred(), e = d.promise();
- a.ajaxSetup({cache: !0}), a.getScript("//assets.pinterest.com/js/pinit.js", function () {
- var f = setInterval(function () {
- var b = a('script[id^="PIN_"]');
- b.length > 0 && d.resolve()
- }, 500);
- e.done(function () {
- clearInterval(f), b.onSDKLoaded("pinterest"), c && "function" == typeof c && c(), p.loaded = !0
- })
- })
- }, _openShareDialog = function (a) {
- var c = {
- method: "feed",
- name: a.name,
- caption: a.caption,
- description: a.description,
- picture: a.picture,
- link: a.url
- };
- FB.ui(c, function (c) {
- if (c && c.post_id) {
- this.console && console.log(c);
- var d = a.callback;
- a.callback && h(d, b)
- } else this.console && console.log(c)
- })
- }, a.fn[i] = function (b) {
- return this.each(function () {
- a.data(this, "plugin_" + i) || a.data(this, "plugin_" + i, new d(this, b))
- })
- }
- }(jQuery, window, document), function (a) {
- a.fn.unveil = function (b, c) {
- function d() {
- f = l.filter(function () {
- var b = a(this), c = h.scrollTop(), d = c + h.height(), e = b.offset().top, f = e + b.height();
- return f >= c - i && d + i >= e
- }), e = f.trigger("unveil"), l = l.not(e)
- }
- var e, f, g, h = a(window), i = b || 0, j = window.devicePixelRatio > 1, k = j ? "data-src-retina" : "data-src", l = this;
- return this.one("unveil", function () {
- g = this.getAttribute(k), g = g || this.getAttribute("data-src"), g && (this.setAttribute("src", g), this.onload = function () {
- c && "function" == typeof c && c(), a(this).removeClass("unveil")
- })
- }), h.scroll(d), h.resize(d), d(), this
- }
- }(window.jQuery || window.Zepto), function () {
- var a = [].indexOf || function (a) {
- for (var b = 0, c = this.length; c > b; b++)if (b in this && this[b] === a)return b;
- return -1
- }, b = [].slice;
- !function (a, b) {
- return "function" == typeof define && define.amd ? define("waypoints", ["jquery"], function (c) {
- return b(c, a)
- }) : b(a.jQuery, a)
- }(this, function (c, d) {
- var e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t;
- return e = c(d), l = a.call(d, "ontouchstart") >= 0, h = {
- horizontal: {},
- vertical: {}
- }, i = 1, k = {}, j = "waypoints-context-id", o = "resize.waypoints", p = "scroll.waypoints", q = 1, r = "waypoints-waypoint-ids", s = "waypoint", t = "waypoints", f = function () {
- function a(a) {
- var b = this;
- this.$element = a, this.element = a[0], this.didResize = !1, this.didScroll = !1, this.id = "context" + i++, this.oldScroll = {
- x: a.scrollLeft(),
- y: a.scrollTop()
- }, this.waypoints = {
- horizontal: {},
- vertical: {}
- }, a.data(j, this.id), k[this.id] = this, a.bind(p, function () {
- var a;
- return b.didScroll || l ? void 0 : (b.didScroll = !0, a = function () {
- return b.doScroll(), b.didScroll = !1
- }, d.setTimeout(a, c[t].settings.scrollThrottle))
- }), a.bind(o, function () {
- var a;
- return b.didResize ? void 0 : (b.didResize = !0, a = function () {
- return c[t]("refresh"), b.didResize = !1
- }, d.setTimeout(a, c[t].settings.resizeThrottle))
- })
- }
- return a.prototype.doScroll = function () {
- var a, b = this;
- return a = {
- horizontal: {
- newScroll: this.$element.scrollLeft(),
- oldScroll: this.oldScroll.x,
- forward: "right",
- backward: "left"
- },
- vertical: {
- newScroll: this.$element.scrollTop(),
- oldScroll: this.oldScroll.y,
- forward: "down",
- backward: "up"
- }
- }, !l || a.vertical.oldScroll && a.vertical.newScroll || c[t]("refresh"), c.each(a, function (a, d) {
- var e, f, g;
- return g = [], f = d.newScroll > d.oldScroll, e = f ? d.forward : d.backward, c.each(b.waypoints[a], function (a, b) {
- var c, e;
- return d.oldScroll < (c = b.offset) && c <= d.newScroll ? g.push(b) : d.newScroll < (e = b.offset) && e <= d.oldScroll ? g.push(b) : void 0
- }), g.sort(function (a, b) {
- return a.offset - b.offset
- }), f || g.reverse(), c.each(g, function (a, b) {
- return b.options.continuous || a === g.length - 1 ? b.trigger([e]) : void 0
- })
- }), this.oldScroll = {x: a.horizontal.newScroll, y: a.vertical.newScroll}
- }, a.prototype.refresh = function () {
- var a, b, d, e = this;
- return d = c.isWindow(this.element), b = this.$element.offset(), this.doScroll(), a = {
- horizontal: {
- contextOffset: d ? 0 : b.left,
- contextScroll: d ? 0 : this.oldScroll.x,
- contextDimension: this.$element.width(),
- oldScroll: this.oldScroll.x,
- forward: "right",
- backward: "left",
- offsetProp: "left"
- },
- vertical: {
- contextOffset: d ? 0 : b.top,
- contextScroll: d ? 0 : this.oldScroll.y,
- contextDimension: d ? c[t]("viewportHeight") : this.$element.height(),
- oldScroll: this.oldScroll.y,
- forward: "down",
- backward: "up",
- offsetProp: "top"
- }
- }, c.each(a, function (a, b) {
- return c.each(e.waypoints[a], function (a, d) {
- var e, f, g, h, i;
- return e = d.options.offset, g = d.offset, f = c.isWindow(d.element) ? 0 : d.$element.offset()[b.offsetProp], c.isFunction(e) ? e = e.apply(d.element) : "string" == typeof e && (e = parseFloat(e), d.options.offset.indexOf("%") > -1 && (e = Math.ceil(b.contextDimension * e / 100))), d.offset = f - b.contextOffset + b.contextScroll - e, d.options.onlyOnScroll && null != g || !d.enabled ? void 0 : null !== g && g < (h = b.oldScroll) && h <= d.offset ? d.trigger([b.backward]) : null !== g && g > (i = b.oldScroll) && i >= d.offset ? d.trigger([b.forward]) : null === g && b.oldScroll >= d.offset ? d.trigger([b.forward]) : void 0
- })
- })
- }, a.prototype.checkEmpty = function () {
- return c.isEmptyObject(this.waypoints.horizontal) && c.isEmptyObject(this.waypoints.vertical) ? (this.$element.unbind([o, p].join(" ")), delete k[this.id]) : void 0
- }, a
- }(), g = function () {
- function a(a, b, d) {
- var e, f;
- d = c.extend({}, c.fn[s].defaults, d), "bottom-in-view" === d.offset && (d.offset = function () {
- var a;
- return a = c[t]("viewportHeight"), c.isWindow(b.element) || (a = b.$element.height()), a - c(this).outerHeight()
- }), this.$element = a, this.element = a[0], this.axis = d.horizontal ? "horizontal" : "vertical", this.callback = d.handler, this.context = b, this.enabled = d.enabled, this.id = "waypoints" + q++, this.offset = null, this.options = d, b.waypoints[this.axis][this.id] = this, h[this.axis][this.id] = this, e = null != (f = a.data(r)) ? f : [], e.push(this.id), a.data(r, e)
- }
- return a.prototype.trigger = function (a) {
- return this.enabled ? (null != this.callback && this.callback.apply(this.element, a), this.options.triggerOnce ? this.destroy() : void 0) : void 0
- }, a.prototype.disable = function () {
- return this.enabled = !1
- }, a.prototype.enable = function () {
- return this.context.refresh(), this.enabled = !0
- }, a.prototype.destroy = function () {
- return delete h[this.axis][this.id], delete this.context.waypoints[this.axis][this.id], this.context.checkEmpty()
- }, a.getWaypointsByElement = function (a) {
- var b, d;
- return (d = c(a).data(r)) ? (b = c.extend({}, h.horizontal, h.vertical), c.map(d, function (a) {
- return b[a]
- })) : []
- }, a
- }(), n = {
- init: function (a, b) {
- var d;
- return null == b && (b = {}), null == (d = b.handler) && (b.handler = a), this.each(function () {
- var a, d, e, h;
- return a = c(this), e = null != (h = b.context) ? h : c.fn[s].defaults.context, c.isWindow(e) || (e = a.closest(e)), e = c(e), d = k[e.data(j)], d || (d = new f(e)), new g(a, d, b)
- }), c[t]("refresh"), this
- }, disable: function () {
- return n._invoke(this, "disable")
- }, enable: function () {
- return n._invoke(this, "enable")
- }, destroy: function () {
- return n._invoke(this, "destroy")
- }, prev: function (a, b) {
- return n._traverse.call(this, a, b, function (a, b, c) {
- return b > 0 ? a.push(c[b - 1]) : void 0
- })
- }, next: function (a, b) {
- return n._traverse.call(this, a, b, function (a, b, c) {
- return b < c.length - 1 ? a.push(c[b + 1]) : void 0
- })
- }, _traverse: function (a, b, e) {
- var f, g;
- return null == a && (a = "vertical"), null == b && (b = d), g = m.aggregate(b), f = [], this.each(function () {
- var b;
- return b = c.inArray(this, g[a]), e(f, b, g[a])
- }), this.pushStack(f)
- }, _invoke: function (a, b) {
- return a.each(function () {
- var a;
- return a = g.getWaypointsByElement(this), c.each(a, function (a, c) {
- return c[b](), !0
- })
- }), this
- }
- }, c.fn[s] = function () {
- var a, d;
- return d = arguments[0], a = 2 <= arguments.length ? b.call(arguments, 1) : [], n[d] ? n[d].apply(this, a) : c.isFunction(d) ? n.init.apply(this, arguments) : c.isPlainObject(d) ? n.init.apply(this, [null, d]) : d ? c.error("The " + d + " method does not exist in jQuery Waypoints.") : c.error("jQuery Waypoints needs a callback function or handler option.")
- }, c.fn[s].defaults = {
- context: d,
- continuous: !0,
- enabled: !0,
- horizontal: !1,
- offset: 0,
- triggerOnce: !1
- }, m = {
- refresh: function () {
- return c.each(k, function (a, b) {
- return b.refresh()
- })
- }, viewportHeight: function () {
- var a;
- return null != (a = d.innerHeight) ? a : e.height()
- }, aggregate: function (a) {
- var b, d, e;
- return b = h, a && (b = null != (e = k[c(a).data(j)]) ? e.waypoints : void 0), b ? (d = {
- horizontal: [],
- vertical: []
- }, c.each(d, function (a, e) {
- return c.each(b[a], function (a, b) {
- return e.push(b)
- }), e.sort(function (a, b) {
- return a.offset - b.offset
- }), d[a] = c.map(e, function (a) {
- return a.element
- }), d[a] = c.unique(d[a])
- }), d) : []
- }, above: function (a) {
- return null == a && (a = d), m._filter(a, "vertical", function (a, b) {
- return b.offset <= a.oldScroll.y
- })
- }, below: function (a) {
- return null == a && (a = d), m._filter(a, "vertical", function (a, b) {
- return b.offset > a.oldScroll.y
- })
- }, left: function (a) {
- return null == a && (a = d), m._filter(a, "horizontal", function (a, b) {
- return b.offset <= a.oldScroll.x
- })
- }, right: function (a) {
- return null == a && (a = d), m._filter(a, "horizontal", function (a, b) {
- return b.offset > a.oldScroll.x
- })
- }, enable: function () {
- return m._invoke("enable")
- }, disable: function () {
- return m._invoke("disable")
- }, destroy: function () {
- return m._invoke("destroy")
- }, extendFn: function (a, b) {
- return n[a] = b
- }, _invoke: function (a) {
- var b;
- return b = c.extend({}, h.vertical, h.horizontal), c.each(b, function (b, c) {
- return c[a](), !0
- })
- }, _filter: function (a, b, d) {
- var e, f;
- return (e = k[c(a).data(j)]) ? (f = [], c.each(e.waypoints[b], function (a, b) {
- return d(e, b) ? f.push(b) : void 0
- }), f.sort(function (a, b) {
- return a.offset - b.offset
- }), c.map(f, function (a) {
- return a.element
- })) : []
- }
- }, c[t] = function () {
- var a, c;
- return c = arguments[0], a = 2 <= arguments.length ? b.call(arguments, 1) : [], m[c] ? m[c].apply(null, a) : m.aggregate.call(null, c)
- }, c[t].settings = {resizeThrottle: 100, scrollThrottle: 30}, e.load(function () {
- return c[t]("refresh")
- })
- })
- }.call(this), function () {
- !function (a, b) {
- return "function" == typeof define && define.amd ? define(["jquery", "waypoints"], b) : b(a.jQuery)
- }(this, function (a) {
- var b, c;
- return b = {wrapper: '<div class="sticky-wrapper" />', stuckClass: "stuck"}, c = function (a, b) {
- return a.wrap(b.wrapper), a.parent()
- }, a.waypoints("extendFn", "sticky", function (d) {
- var e, f, g;
- return f = a.extend({}, a.fn.waypoint.defaults, b, d), e = c(this, f), g = f.handler, f.handler = function (b) {
- var c, d;
- return c = a(this).children(":first"), d = "down" === b || "right" === b, c.toggleClass(f.stuckClass, d), e.height(d ? c.outerHeight() : ""), null != g ? g.call(this, b) : void 0
- }, e.waypoint(f), this.data("stuckClass", f.stuckClass)
- }), a.waypoints("extendFn", "unsticky", function () {
- return this.parent().waypoint("destroy"), this.unwrap(), this.removeClass(this.data("stuckClass"))
- })
- })
- }.call(this), function (a, b) {
- function c(b, c) {
- this.element = b, this.$element = a(b), this.options = a.extend(!0, {}, e, c), this._defaults = e, this._name = d, this.init(), this.bind(), this.draw()
- }
- var d = "lines", e = {
- direction: "up",
- isMobile: !1,
- color: {top: "rgba(0, 0, 0, 0)", bottom: "rgba(0, 0, 0, 0)"},
- shadow: {type: "outer", color: {R: 0, G: 0, B: 0}, opacity: .3, height: 20}
- };
- c.prototype.init = function () {
- var a = this.element, b = this.$element.parent();
- if (a.width = b.width(), a.getContext) {
- var c = a.getContext("2d");
- this.ctx = c;
- var d = this.$element.data("top-color");
- "undefined" != typeof d && "" !== d && (this.options.color.top = d);
- var e = this.$element.data("bottom-color");
- "undefined" != typeof e && "" !== e && (this.options.color.bottom = e)
- }
- }, c.prototype.bind = function () {
- var a = this, c = this.element, d = this.$element.parent(), e = this.options.isMobile;
- e ? b.addEventListener("orientationchange", function () {
- c.width = d.width(), devicePixelRatio > 1 && (c.height = 70), a.draw()
- }, !1) : b.attachEvent ? b.attachEvent("onresize", function () {
- c.width = d.width(), a.draw()
- }) : b.addEventListener && b.addEventListener("resize", function () {
- c.width = d.width(), a.draw()
- }, !1)
- }, c.prototype.draw = function () {
- var a = this.options.isMobile, c = this.element, d = this.ctx, e = parseInt(this.$element.attr("height"), 10), g = parseInt(this.$element.attr("width"), 10);
- if ("undefined" != typeof d) {
- if (a && (devicePixelRatio = b.devicePixelRatio || 1, backingStoreRatio = d.webkitBackingStorePixelRatio || d.mozBackingStorePixelRatio || d.msBackingStorePixelRatio || d.oBackingStorePixelRatio || d.backingStorePixelRatio || 1, ratio = devicePixelRatio / backingStoreRatio, devicePixelRatio !== backingStoreRatio)) {
- var i = g, j = e;
- c.width = i * ratio, c.height = j * ratio, c.style.width = i + "px", c.style.height = j + "px", d.scale(ratio, ratio)
- }
- var k = h(g, e), l = this.options.shadow.height, m = "up" === this.options.direction ? -1 : 1, n = this.options.color.top, o = this.options.color.bottom, p = {
- color: n,
- x: -k,
- y: -e / 2,
- w: g + 2 * k,
- h: e
- }, q = {color: o, x: -k, y: e / 2, w: g + 2 * k, h: e};
- d.translate(g / 2, e / 2), d.rotate(m * Math.atan((e - 2 * l) / g)), d.translate(-g / 2, -e / 2), "transparent" !== n && (d.fillStyle = p.color, d.fillRect(p.x, p.y, p.w, p.h)), "transparent" !== o && (d.fillStyle = q.color, d.fillRect(q.x, q.y, q.w, q.h)), f(d, e, g, k, this.options.shadow)
- }
- };
- var f = function (a, b, c, d, e) {
- var f = 0, h = a.createLinearGradient(0, 0, 0, e.height);
- "inner" === e.type ? (f = e.height, h.addColorStop(0, g(e.color, 0)), h.addColorStop(1, g(e.color, e.opacity))) : (f = 0, h.addColorStop(0, g(e.color, e.opacity)), h.addColorStop(1, g(e.color, 0))), a.save(), a.translate(0, b / 2 - f), a.fillStyle = h, a.fillRect(-d, 0, c + 2 * d, e.height), a.restore()
- }, g = function (a, b) {
- return "rgba(" + a.R + ", " + a.G + ", " + a.B + ", " + b + ")"
- }, h = function () {
- return 50
- };
- a.fn[d] = function (b) {
- return this.each(function () {
- a.data(this, "plugin_" + d) || a.data(this, "plugin_" + d, new c(this, b))
- })
- }
- }(jQuery, window, document), function (a) {
- a.fn.hoverIntent = function (b, c, d) {
- var e = {interval: 100, sensitivity: 7, timeout: 0};
- e = "object" == typeof b ? a.extend(e, b) : a.isFunction(c) ? a.extend(e, {
- over: b,
- out: c,
- selector: d
- }) : a.extend(e, {over: b, out: b, selector: c});
- var f, g, h, i, j = function (a) {
- f = a.pageX, g = a.pageY
- }, k = function (b, c) {
- return c.hoverIntent_t = clearTimeout(c.hoverIntent_t), Math.abs(h - f) + Math.abs(i - g) < e.sensitivity ? (a(c).off("mousemove.hoverIntent", j), c.hoverIntent_s = 1, e.over.apply(c, [b])) : (h = f, i = g, c.hoverIntent_t = setTimeout(function () {
- k(b, c)
- }, e.interval), void 0)
- }, l = function (a, b) {
- return b.hoverIntent_t = clearTimeout(b.hoverIntent_t), b.hoverIntent_s = 0, e.out.apply(b, [a])
- }, m = function (b) {
- var c = jQuery.extend({}, b), d = this;
- d.hoverIntent_t && (d.hoverIntent_t = clearTimeout(d.hoverIntent_t)), "mouseenter" == b.type ? (h = c.pageX, i = c.pageY, a(d).on("mousemove.hoverIntent", j), 1 != d.hoverIntent_s && (d.hoverIntent_t = setTimeout(function () {
- k(c, d)
- }, e.interval))) : (a(d).off("mousemove.hoverIntent", j), 1 == d.hoverIntent_s && (d.hoverIntent_t = setTimeout(function () {
- l(c, d)
- }, e.timeout)))
- };
- return this.on({"mouseenter.hoverIntent": m, "mouseleave.hoverIntent": m}, e.selector)
- }
- }(jQuery), jQuery(function (a) {
- function b() {
- var b = a("script:first"), c = b.css("color"), d = !1;
- if (/^rgba/.test(c))d = !0; else try {
- d = c !== b.css("color", "rgba(0, 0, 0, 0.5)").css("color"), b.css("color", c)
- } catch (e) {
- }
- return b.removeAttr("style"), d
- }
- function c(b, c, d) {
- var e = [];
- return a.each(b, function (f) {
- var g = [], h = b[f], i = c[f];
- if (h.inset && g.push("inset"), "undefined" != typeof i.left && g.push(parseFloat(h.left + d * (i.left - h.left)) + "px " + parseFloat(h.top + d * (i.top - h.top)) + "px"), "undefined" != typeof i.blur && g.push(parseFloat(h.blur + d * (i.blur - h.blur)) + "px"), "undefined" != typeof i.spread && g.push(parseFloat(h.spread + d * (i.spread - h.spread)) + "px"), "undefined" != typeof i.color) {
- var j = "rgb" + (a.support.rgba ? "a" : "") + "(" + parseInt(h.color[0] + d * (i.color[0] - h.color[0]), 10) + "," + parseInt(h.color[1] + d * (i.color[1] - h.color[1]), 10) + "," + parseInt(h.color[2] + d * (i.color[2] - h.color[2]), 10);
- a.support.rgba && (j += "," + parseFloat(h.color[3] + d * (i.color[3] - h.color[3]))), j += ")", g.push(j)
- }
- e.push(g.join(" "))
- }), e.join(", ")
- }
- function d(b) {
- function c() {
- var a = /^inset\b/.exec(b.substring(j));
- return null !== a && a.length > 0 ? (l.inset = !0, j += a[0].length, !0) : !1
- }
- function d() {
- var a = /^(-?[0-9\.]+)(?:px)?\s+(-?[0-9\.]+)(?:px)?(?:\s+(-?[0-9\.]+)(?:px)?)?(?:\s+(-?[0-9\.]+)(?:px)?)?/.exec(b.substring(j));
- return null !== a && a.length > 0 ? (l.left = parseInt(a[1], 10), l.top = parseInt(a[2], 10), l.blur = a[3] ? parseInt(a[3], 10) : 0, l.spread = a[4] ? parseInt(a[4], 10) : 0, j += a[0].length, !0) : !1
- }
- function e() {
- var a = /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(b.substring(j));
- return null !== a && a.length > 0 ? (l.color = [parseInt(a[1], 16), parseInt(a[2], 16), parseInt(a[3], 16), 1], j += a[0].length, !0) : (a = /^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(b.substring(j)), null !== a && a.length > 0 ? (l.color = [17 * parseInt(a[1], 16), 17 * parseInt(a[2], 16), 17 * parseInt(a[3], 16), 1], j += a[0].length, !0) : (a = /^rgb\(\s*([0-9\.]+)\s*,\s*([0-9\.]+)\s*,\s*([0-9\.]+)\s*\)/.exec(b.substring(j)), null !== a && a.length > 0 ? (l.color = [parseInt(a[1], 10), parseInt(a[2], 10), parseInt(a[3], 10), 1], j += a[0].length, !0) : (a = /^rgba\(\s*([0-9\.]+)\s*,\s*([0-9\.]+)\s*,\s*([0-9\.]+)\s*,\s*([0-9\.]+)\s*\)/.exec(b.substring(j)), null !== a && a.length > 0 ? (l.color = [parseInt(a[1], 10), parseInt(a[2], 10), parseInt(a[3], 10), parseFloat(a[4])], j += a[0].length, !0) : !1)))
- }
- function f() {
- var a = /^\s+/.exec(b.substring(j));
- return null !== a && a.length > 0 ? (j += a[0].length, !0) : !1
- }
- function g() {
- var a = /^\s*,\s*/.exec(b.substring(j));
- return null !== a && a.length > 0 ? (j += a[0].length, !0) : !1
- }
- function h(b) {
- if (a.isPlainObject(b)) {
- var c, d, e = 0, f = [];
- for (a.isArray(b.color) && (d = b.color, e = d.length), c = 0; 4 > c; c++)e > c ? f.push(d[c]) : 3 === c ? f.push(1) : f.push(0)
- }
- return a.extend({left: 0, top: 0, blur: 0, spread: 0}, b)
- }
- for (var i = [], j = 0, k = b.length, l = h(); k > j;)if (c())f(); else if (d())f(); else if (e())f(); else {
- if (!g())break;
- i.push(h(l)), l = {}
- }
- return i.push(h(l)), i
- }
- a.extend(!0, a, {support: {rgba: b()}});
- var e, f = a("html").prop("style");
- a.each(["boxShadow", "MozBoxShadow", "WebkitBoxShadow"], function (a, b) {
- var c = f[b];
- return "undefined" != typeof c ? (e = b, !1) : void 0
- }), e && (a.Tween.propHooks.boxShadow = {
- get: function (b) {
- return a(b.elem).css(e)
- }, set: function (b) {
- var f, g = b.elem.style, h = d(a(b.elem)[0].style[e] || a(b.elem).css(e)), i = d(b.end), j = Math.max(h.length, i.length);
- for (f = 0; j > f; f++)i[f] = a.extend({}, h[f], i[f]), h[f] ? "color"in h[f] && a.isArray(h[f].color) !== !1 || (h[f].color = i[f].color || [0, 0, 0, 0]) : h[f] = d("0 0 0 0 rgba(0,0,0,0)")[0];
- b.run = function (a) {
- var b = c(h, i, a);
- g[e] = b
- }
- }
- })
- }), jQuery.easing.jswing = jQuery.easing.swing, jQuery.extend(jQuery.easing, {
- def: "easeOutQuad",
- swing: function (a, b, c, d, e) {
- return jQuery.easing[jQuery.easing.def](a, b, c, d, e)
- },
- easeInQuad: function (a, b, c, d, e) {
- return d * (b /= e) * b + c
- },
- easeOutQuad: function (a, b, c, d, e) {
- return -d * (b /= e) * (b - 2) + c
- },
- easeInOutQuad: function (a, b, c, d, e) {
- return (b /= e / 2) < 1 ? d / 2 * b * b + c : -d / 2 * (--b * (b - 2) - 1) + c
- },
- easeInCubic: function (a, b, c, d, e) {
- return d * (b /= e) * b * b + c
- },
- easeOutCubic: function (a, b, c, d, e) {
- return d * ((b = b / e - 1) * b * b + 1) + c
- },
- easeInOutCubic: function (a, b, c, d, e) {
- return (b /= e / 2) < 1 ? d / 2 * b * b * b + c : d / 2 * ((b -= 2) * b * b + 2) + c
- },
- easeInQuart: function (a, b, c, d, e) {
- return d * (b /= e) * b * b * b + c
- },
- easeOutQuart: function (a, b, c, d, e) {
- return -d * ((b = b / e - 1) * b * b * b - 1) + c
- },
- easeInOutQuart: function (a, b, c, d, e) {
- return (b /= e / 2) < 1 ? d / 2 * b * b * b * b + c : -d / 2 * ((b -= 2) * b * b * b - 2) + c
- },
- easeInQuint: function (a, b, c, d, e) {
- return d * (b /= e) * b * b * b * b + c
- },
- easeOutQuint: function (a, b, c, d, e) {
- return d * ((b = b / e - 1) * b * b * b * b + 1) + c
- },
- easeInOutQuint: function (a, b, c, d, e) {
- return (b /= e / 2) < 1 ? d / 2 * b * b * b * b * b + c : d / 2 * ((b -= 2) * b * b * b * b + 2) + c
- },
- easeInSine: function (a, b, c, d, e) {
- return -d * Math.cos(b / e * (Math.PI / 2)) + d + c
- },
- easeOutSine: function (a, b, c, d, e) {
- return d * Math.sin(b / e * (Math.PI / 2)) + c
- },
- easeInOutSine: function (a, b, c, d, e) {
- return -d / 2 * (Math.cos(Math.PI * b / e) - 1) + c
- },
- easeInExpo: function (a, b, c, d, e) {
- return 0 == b ? c : d * Math.pow(2, 10 * (b / e - 1)) + c
- },
- easeOutExpo: function (a, b, c, d, e) {
- return b == e ? c + d : d * (-Math.pow(2, -10 * b / e) + 1) + c
- },
- easeInOutExpo: function (a, b, c, d, e) {
- return 0 == b ? c : b == e ? c + d : (b /= e / 2) < 1 ? d / 2 * Math.pow(2, 10 * (b - 1)) + c : d / 2 * (-Math.pow(2, -10 * --b) + 2) + c
- },
- easeInCirc: function (a, b, c, d, e) {
- return -d * (Math.sqrt(1 - (b /= e) * b) - 1) + c
- },
- easeOutCirc: function (a, b, c, d, e) {
- return d * Math.sqrt(1 - (b = b / e - 1) * b) + c
- },
- easeInOutCirc: function (a, b, c, d, e) {
- return (b /= e / 2) < 1 ? -d / 2 * (Math.sqrt(1 - b * b) - 1) + c : d / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + c
- },
- easeInElastic: function (a, b, c, d, e) {
- var f = 1.70158, g = 0, h = d;
- if (0 == b)return c;
- if (1 == (b /= e))return c + d;
- if (g || (g = .3 * e), h < Math.abs(d)) {
- h = d;
- var f = g / 4
- } else var f = g / (2 * Math.PI) * Math.asin(d / h);
- return -(h * Math.pow(2, 10 * (b -= 1)) * Math.sin(2 * (b * e - f) * Math.PI / g)) + c
- },
- easeOutElastic: function (a, b, c, d, e) {
- var f = 1.70158, g = 0, h = d;
- if (0 == b)return c;
- if (1 == (b /= e))return c + d;
- if (g || (g = .3 * e), h < Math.abs(d)) {
- h = d;
- var f = g / 4
- } else var f = g / (2 * Math.PI) * Math.asin(d / h);
- return h * Math.pow(2, -10 * b) * Math.sin(2 * (b * e - f) * Math.PI / g) + d + c
- },
- easeInOutElastic: function (a, b, c, d, e) {
- var f = 1.70158, g = 0, h = d;
- if (0 == b)return c;
- if (2 == (b /= e / 2))return c + d;
- if (g || (g = .3 * e * 1.5), h < Math.abs(d)) {
- h = d;
- var f = g / 4
- } else var f = g / (2 * Math.PI) * Math.asin(d / h);
- return 1 > b ? -.5 * h * Math.pow(2, 10 * (b -= 1)) * Math.sin(2 * (b * e - f) * Math.PI / g) + c : h * Math.pow(2, -10 * (b -= 1)) * Math.sin(2 * (b * e - f) * Math.PI / g) * .5 + d + c
- },
- easeInBack: function (a, b, c, d, e, f) {
- return void 0 == f && (f = 1.70158), d * (b /= e) * b * ((f + 1) * b - f) + c
- },
- easeOutBack: function (a, b, c, d, e, f) {
- return void 0 == f && (f = 1.70158), d * ((b = b / e - 1) * b * ((f + 1) * b + f) + 1) + c
- },
- easeInOutBack: function (a, b, c, d, e, f) {
- return void 0 == f && (f = 1.70158), (b /= e / 2) < 1 ? d / 2 * b * b * (((f *= 1.525) + 1) * b - f) + c : d / 2 * ((b -= 2) * b * (((f *= 1.525) + 1) * b + f) + 2) + c
- },
- easeInBounce: function (a, b, c, d, e) {
- return d - jQuery.easing.easeOutBounce(a, e - b, 0, d, e) + c
- },
- easeOutBounce: function (a, b, c, d, e) {
- return (b /= e) < 1 / 2.75 ? 7.5625 * d * b * b + c : 2 / 2.75 > b ? d * (7.5625 * (b -= 1.5 / 2.75) * b + .75) + c : 2.5 / 2.75 > b ? d * (7.5625 * (b -= 2.25 / 2.75) * b + .9375) + c : d * (7.5625 * (b -= 2.625 / 2.75) * b + .984375) + c
- },
- easeInOutBounce: function (a, b, c, d, e) {
- return e / 2 > b ? .5 * jQuery.easing.easeInBounce(a, 2 * b, 0, d, e) + c : .5 * jQuery.easing.easeOutBounce(a, 2 * b - e, 0, d, e) + .5 * d + c
- }
- });
- var requirejs, require, define;
- !function (global) {
- function isFunction(a) {
- return "[object Function]" === ostring.call(a)
- }
- function isArray(a) {
- return "[object Array]" === ostring.call(a)
- }
- function each(a, b) {
- if (a) {
- var c;
- for (c = 0; c < a.length && (!a[c] || !b(a[c], c, a)); c += 1);
- }
- }
- function eachReverse(a, b) {
- if (a) {
- var c;
- for (c = a.length - 1; c > -1 && (!a[c] || !b(a[c], c, a)); c -= 1);
- }
- }
- function hasProp(a, b) {
- return hasOwn.call(a, b)
- }
- function getOwn(a, b) {
- return hasProp(a, b) && a[b]
- }
- function eachProp(a, b) {
- var c;
- for (c in a)if (hasProp(a, c) && b(a[c], c))break
- }
- function mixin(a, b, c, d) {
- return b && eachProp(b, function (b, e) {
- (c || !hasProp(a, e)) && (d && "string" != typeof b ? (a[e] || (a[e] = {}), mixin(a[e], b, c, d)) : a[e] = b)
- }), a
- }
- function bind(a, b) {
- return function () {
- return b.apply(a, arguments)
- }
- }
- function scripts() {
- return document.getElementsByTagName("script")
- }
- function defaultOnError(a) {
- throw a
- }
- function getGlobal(a) {
- if (!a)return a;
- var b = global;
- return each(a.split("."), function (a) {
- b = b[a]
- }), b
- }
- function makeError(a, b, c, d) {
- var e = new Error(b + "\nhttp://requirejs.org/docs/errors.html#" + a);
- return e.requireType = a, e.requireModules = d, c && (e.originalError = c), e
- }
- function newContext(a) {
- function b(a) {
- var b, c;
- for (b = 0; a[b]; b += 1)if (c = a[b], "." === c)a.splice(b, 1), b -= 1; else if (".." === c) {
- if (1 === b && (".." === a[2] || ".." === a[0]))break;
- b > 0 && (a.splice(b - 1, 2), b -= 2)
- }
- }
- function c(a, c, d) {
- var e, f, g, h, i, j, k, l, m, n, o, p = c && c.split("/"), q = p, r = x.map, s = r && r["*"];
- if (a && "." === a.charAt(0) && (c ? (q = getOwn(x.pkgs, c) ? p = [c] : p.slice(0, p.length - 1), a = q.concat(a.split("/")), b(a), f = getOwn(x.pkgs, e = a[0]), a = a.join("/"), f && a === e + "/" + f.main && (a = e)) : 0 === a.indexOf("./") && (a = a.substring(2))), d && r && (p || s)) {
- for (h = a.split("/"), i = h.length; i > 0; i -= 1) {
- if (k = h.slice(0, i).join("/"), p)for (j = p.length; j > 0; j -= 1)if (g = getOwn(r, p.slice(0, j).join("/")), g && (g = getOwn(g, k))) {
- l = g, m = i;
- break
- }
- if (l)break;
- !n && s && getOwn(s, k) && (n = getOwn(s, k), o = i)
- }
- !l && n && (l = n, m = o), l && (h.splice(0, m, l), a = h.join("/"))
- }
- return a
- }
- function d(a) {
- isBrowser && each(scripts(), function (b) {
- return b.getAttribute("data-requiremodule") === a && b.getAttribute("data-requirecontext") === u.contextName ? (b.parentNode.removeChild(b), !0) : void 0
- })
- }
- function e(a) {
- var b = getOwn(x.paths, a);
- return b && isArray(b) && b.length > 1 ? (d(a), b.shift(), u.require.undef(a), u.require([a]), !0) : void 0
- }
- function f(a) {
- var b, c = a ? a.indexOf("!") : -1;
- return c > -1 && (b = a.substring(0, c), a = a.substring(c + 1, a.length)), [b, a]
- }
- function g(a, b, d, e) {
- var g, h, i, j, k = null, l = b ? b.name : null, m = a, n = !0, o = "";
- return a || (n = !1, a = "_@r" + (E += 1)), j = f(a), k = j[0], a = j[1], k && (k = c(k, l, e), h = getOwn(C, k)), a && (k ? o = h && h.normalize ? h.normalize(a, function (a) {
- return c(a, l, e)
- }) : c(a, l, e) : (o = c(a, l, e), j = f(o), k = j[0], o = j[1], d = !0, g = u.nameToUrl(o))), i = !k || h || d ? "" : "_unnormalized" + (F += 1), {
- prefix: k,
- name: o,
- parentMap: b,
- unnormalized: !!i,
- url: g,
- originalName: m,
- isDefine: n,
- id: (k ? k + "!" + o : o) + i
- }
- }
- function h(a) {
- var b = a.id, c = getOwn(y, b);
- return c || (c = y[b] = new u.Module(a)), c
- }
- function i(a, b, c) {
- var d = a.id, e = getOwn(y, d);
- !hasProp(C, d) || e && !e.defineEmitComplete ? (e = h(a), e.error && "error" === b ? c(e.error) : e.on(b, c)) : "defined" === b && c(C[d])
- }
- function j(a, b) {
- var c = a.requireModules, d = !1;
- b ? b(a) : (each(c, function (b) {
- var c = getOwn(y, b);
- c && (c.error = a, c.events.error && (d = !0, c.emit("error", a)))
- }), d || req.onError(a))
- }
- function k() {
- globalDefQueue.length && (apsp.apply(B, [B.length - 1, 0].concat(globalDefQueue)), globalDefQueue = [])
- }
- function l(a) {
- delete y[a], delete z[a]
- }
- function m(a, b, c) {
- var d = a.map.id;
- a.error ? a.emit("error", a.error) : (b[d] = !0, each(a.depMaps, function (d, e) {
- var f = d.id, g = getOwn(y, f);
- !g || a.depMatched[e] || c[f] || (getOwn(b, f) ? (a.defineDep(e, C[f]), a.check()) : m(g, b, c))
- }), c[d] = !0)
- }
- function n() {
- var a, b, c, f, g = 1e3 * x.waitSeconds, h = g && u.startTime + g < (new Date).getTime(), i = [], k = [], l = !1, o = !0;
- if (!s) {
- if (s = !0, eachProp(z, function (c) {
- if (a = c.map, b = a.id, c.enabled && (a.isDefine || k.push(c), !c.error))if (!c.inited && h)e(b) ? (f = !0, l = !0) : (i.push(b), d(b)); else if (!c.inited && c.fetched && a.isDefine && (l = !0, !a.prefix))return o = !1
- }), h && i.length)return c = makeError("timeout", "Load timeout for modules: " + i, null, i), c.contextName = u.contextName, j(c);
- o && each(k, function (a) {
- m(a, {}, {})
- }), h && !f || !l || !isBrowser && !isWebWorker || w || (w = setTimeout(function () {
- w = 0, n()
- }, 50)), s = !1
- }
- }
- function o(a) {
- hasProp(C, a[0]) || h(g(a[0], null, !0)).init(a[1], a[2])
- }
- function p(a, b, c, d) {
- a.detachEvent && !isOpera ? d && a.detachEvent(d, b) : a.removeEventListener(c, b, !1)
- }
- function q(a) {
- var b = a.currentTarget || a.srcElement;
- return p(b, u.onScriptLoad, "load", "onreadystatechange"), p(b, u.onScriptError, "error"), {
- node: b,
- id: b && b.getAttribute("data-requiremodule")
- }
- }
- function r() {
- var a;
- for (k(); B.length;) {
- if (a = B.shift(), null === a[0])return j(makeError("mismatch", "Mismatched anonymous define() module: " + a[a.length - 1]));
- o(a)
- }
- }
- var s, t, u, v, w, x = {
- waitSeconds: 7,
- baseUrl: "./",
- paths: {},
- pkgs: {},
- shim: {},
- config: {}
- }, y = {}, z = {}, A = {}, B = [], C = {}, D = {}, E = 1, F = 1;
- return v = {
- require: function (a) {
- return a.require ? a.require : a.require = u.makeRequire(a.map)
- }, exports: function (a) {
- return a.usingExports = !0, a.map.isDefine ? a.exports ? a.exports : a.exports = C[a.map.id] = {} : void 0
- }, module: function (a) {
- return a.module ? a.module : a.module = {
- id: a.map.id, uri: a.map.url, config: function () {
- var b, c = getOwn(x.pkgs, a.map.id);
- return b = c ? getOwn(x.config, a.map.id + "/" + c.main) : getOwn(x.config, a.map.id), b || {}
- }, exports: C[a.map.id]
- }
- }
- }, t = function (a) {
- this.events = getOwn(A, a.id) || {}, this.map = a, this.shim = getOwn(x.shim, a.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0
- }, t.prototype = {
- init: function (a, b, c, d) {
- d = d || {}, this.inited || (this.factory = b, c ? this.on("error", c) : this.events.error && (c = bind(this, function (a) {
- this.emit("error", a)
- })), this.depMaps = a && a.slice(0), this.errback = c, this.inited = !0, this.ignore = d.ignore, d.enabled || this.enabled ? this.enable() : this.check())
- }, defineDep: function (a, b) {
- this.depMatched[a] || (this.depMatched[a] = !0, this.depCount -= 1, this.depExports[a] = b)
- }, fetch: function () {
- if (!this.fetched) {
- this.fetched = !0, u.startTime = (new Date).getTime();
- var a = this.map;
- return this.shim ? (u.makeRequire(this.map, {enableBuildCallback: !0})(this.shim.deps || [], bind(this, function () {
- return a.prefix ? this.callPlugin() : this.load()
- })), void 0) : a.prefix ? this.callPlugin() : this.load()
- }
- }, load: function () {
- var a = this.map.url;
- D[a] || (D[a] = !0, u.load(this.map.id, a))
- }, check: function () {
- if (this.enabled && !this.enabling) {
- var a, b, c = this.map.id, d = this.depExports, e = this.exports, f = this.factory;
- if (this.inited) {
- if (this.error)this.emit("error", this.error); else if (!this.defining) {
- if (this.defining = !0, this.depCount < 1 && !this.defined) {
- if (isFunction(f)) {
- if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)try {
- e = u.execCb(c, f, d, e)
- } catch (g) {
- a = g
- } else e = u.execCb(c, f, d, e);
- if (this.map.isDefine && (b = this.module, b && void 0 !== b.exports && b.exports !== this.exports ? e = b.exports : void 0 === e && this.usingExports && (e = this.exports)), a)return a.requireMap = this.map, a.requireModules = this.map.isDefine ? [this.map.id] : null, a.requireType = this.map.isDefine ? "define" : "require", j(this.error = a)
- } else e = f;
- this.exports = e, this.map.isDefine && !this.ignore && (C[c] = e, req.onResourceLoad && req.onResourceLoad(u, this.map, this.depMaps)), l(c), this.defined = !0
- }
- this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0)
- }
- } else this.fetch()
- }
- }, callPlugin: function () {
- var a = this.map, b = a.id, d = g(a.prefix);
- this.depMaps.push(d), i(d, "defined", bind(this, function (d) {
- var e, f, k, m = this.map.name, n = this.map.parentMap ? this.map.parentMap.name : null, o = u.makeRequire(a.parentMap, {enableBuildCallback: !0});
- return this.map.unnormalized ? (d.normalize && (m = d.normalize(m, function (a) {
- return c(a, n, !0)
- }) || ""), f = g(a.prefix + "!" + m, this.map.parentMap), i(f, "defined", bind(this, function (a) {
- this.init([], function () {
- return a
- }, null, {enabled: !0, ignore: !0})
- })), k = getOwn(y, f.id), k && (this.depMaps.push(f), this.events.error && k.on("error", bind(this, function (a) {
- this.emit("error", a)
- })), k.enable()), void 0) : (e = bind(this, function (a) {
- this.init([], function () {
- return a
- }, null, {enabled: !0})
- }), e.error = bind(this, function (a) {
- this.inited = !0, this.error = a, a.requireModules = [b], eachProp(y, function (a) {
- 0 === a.map.id.indexOf(b + "_unnormalized") && l(a.map.id)
- }), j(a)
- }), e.fromText = bind(this, function (c, d) {
- var f = a.name, i = g(f), k = useInteractive;
- d && (c = d), k && (useInteractive = !1), h(i), hasProp(x.config, b) && (x.config[f] = x.config[b]);
- try {
- req.exec(c)
- } catch (l) {
- return j(makeError("fromtexteval", "fromText eval for " + b + " failed: " + l, l, [b]))
- }
- k && (useInteractive = !0), this.depMaps.push(i), u.completeLoad(f), o([f], e)
- }), d.load(a.name, o, e, x), void 0)
- })), u.enable(d, this), this.pluginMaps[d.id] = d
- }, enable: function () {
- z[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function (a, b) {
- var c, d, e;
- if ("string" == typeof a) {
- if (a = g(a, this.map.isDefine ? this.map : this.map.parentMap, !1, !this.skipMap), this.depMaps[b] = a, e = getOwn(v, a.id))return this.depExports[b] = e(this), void 0;
- this.depCount += 1, i(a, "defined", bind(this, function (a) {
- this.defineDep(b, a), this.check()
- })), this.errback && i(a, "error", bind(this, this.errback))
- }
- c = a.id, d = y[c], hasProp(v, c) || !d || d.enabled || u.enable(a, this)
- })), eachProp(this.pluginMaps, bind(this, function (a) {
- var b = getOwn(y, a.id);
- b && !b.enabled && u.enable(a, this)
- })), this.enabling = !1, this.check()
- }, on: function (a, b) {
- var c = this.events[a];
- c || (c = this.events[a] = []), c.push(b)
- }, emit: function (a, b) {
- each(this.events[a], function (a) {
- a(b)
- }), "error" === a && delete this.events[a]
- }
- }, u = {
- config: x,
- contextName: a,
- registry: y,
- defined: C,
- urlFetched: D,
- defQueue: B,
- Module: t,
- makeModuleMap: g,
- nextTick: req.nextTick,
- onError: j,
- configure: function (a) {
- a.baseUrl && "/" !== a.baseUrl.charAt(a.baseUrl.length - 1) && (a.baseUrl += "/");
- var b = x.pkgs, c = x.shim, d = {paths: !0, config: !0, map: !0};
- eachProp(a, function (a, b) {
- d[b] ? "map" === b ? (x.map || (x.map = {}), mixin(x[b], a, !0, !0)) : mixin(x[b], a, !0) : x[b] = a
- }), a.shim && (eachProp(a.shim, function (a, b) {
- isArray(a) && (a = {deps: a}), !a.exports && !a.init || a.exportsFn || (a.exportsFn = u.makeShimExports(a)), c[b] = a
- }), x.shim = c), a.packages && (each(a.packages, function (a) {
- var c;
- a = "string" == typeof a ? {name: a} : a, c = a.location, b[a.name] = {
- name: a.name,
- location: c || a.name,
- main: (a.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "")
- }
- }), x.pkgs = b), eachProp(y, function (a, b) {
- a.inited || a.map.unnormalized || (a.map = g(b))
- }), (a.deps || a.callback) && u.require(a.deps || [], a.callback)
- },
- makeShimExports: function (a) {
- function b() {
- var b;
- return a.init && (b = a.init.apply(global, arguments)), b || a.exports && getGlobal(a.exports)
- }
- return b
- },
- makeRequire: function (b, d) {
- function e(c, f, i) {
- var k, l, m;
- return d.enableBuildCallback && f && isFunction(f) && (f.__requireJsBuild = !0), "string" == typeof c ? isFunction(f) ? j(makeError("requireargs", "Invalid require call"), i) : b && hasProp(v, c) ? v[c](y[b.id]) : req.get ? req.get(u, c, b, e) : (l = g(c, b, !1, !0), k = l.id, hasProp(C, k) ? C[k] : j(makeError("notloaded", 'Module name "' + k + '" has not been loaded yet for context: ' + a + (b ? "" : ". Use require([])")))) : (r(), u.nextTick(function () {
- r(), m = h(g(null, b)), m.skipMap = d.skipMap, m.init(c, f, i, {enabled: !0}), n()
- }), e)
- }
- return d = d || {}, mixin(e, {
- isBrowser: isBrowser, toUrl: function (a) {
- var d, e = a.lastIndexOf("."), f = a.split("/")[0], g = "." === f || ".." === f;
- return -1 !== e && (!g || e > 1) && (d = a.substring(e, a.length), a = a.substring(0, e)), u.nameToUrl(c(a, b && b.id, !0), d, !0)
- }, defined: function (a) {
- return hasProp(C, g(a, b, !1, !0).id)
- }, specified: function (a) {
- return a = g(a, b, !1, !0).id, hasProp(C, a) || hasProp(y, a)
- }
- }), b || (e.undef = function (a) {
- k();
- var c = g(a, b, !0), d = getOwn(y, a);
- delete C[a], delete D[c.url], delete A[a], d && (d.events.defined && (A[a] = d.events), l(a))
- }), e
- },
- enable: function (a) {
- var b = getOwn(y, a.id);
- b && h(a).enable()
- },
- completeLoad: function (a) {
- var b, c, d, f = getOwn(x.shim, a) || {}, g = f.exports;
- for (k(); B.length;) {
- if (c = B.shift(), null === c[0]) {
- if (c[0] = a, b)break;
- b = !0
- } else c[0] === a && (b = !0);
- o(c)
- }
- if (d = getOwn(y, a), !b && !hasProp(C, a) && d && !d.inited) {
- if (!(!x.enforceDefine || g && getGlobal(g)))return e(a) ? void 0 : j(makeError("nodefine", "No define call for " + a, null, [a]));
- o([a, f.deps || [], f.exportsFn])
- }
- n()
- },
- nameToUrl: function (a, b, c) {
- var d, e, f, g, h, i, j, k, l;
- if (req.jsExtRegExp.test(a))k = a + (b || ""); else {
- for (d = x.paths, e = x.pkgs, h = a.split("/"), i = h.length; i > 0; i -= 1) {
- if (j = h.slice(0, i).join("/"), f = getOwn(e, j), l = getOwn(d, j)) {
- isArray(l) && (l = l[0]), h.splice(0, i, l);
- break
- }
- if (f) {
- g = a === f.name ? f.location + "/" + f.main : f.location, h.splice(0, i, g);
- break
- }
- }
- k = h.join("/"), k += b || (/\?/.test(k) || c ? "" : ".js"), k = ("/" === k.charAt(0) || k.match(/^[\w\+\.\-]+:/) ? "" : x.baseUrl) + k
- }
- return x.urlArgs ? k + ((-1 === k.indexOf("?") ? "?" : "&") + x.urlArgs) : k
- },
- load: function (a, b) {
- req.load(u, a, b)
- },
- execCb: function (a, b, c, d) {
- return b.apply(d, c)
- },
- onScriptLoad: function (a) {
- if ("load" === a.type || readyRegExp.test((a.currentTarget || a.srcElement).readyState)) {
- interactiveScript = null;
- var b = q(a);
- u.completeLoad(b.id)
- }
- },
- onScriptError: function (a) {
- var b = q(a);
- return e(b.id) ? void 0 : j(makeError("scripterror", "Script error for: " + b.id, a, [b.id]))
- }
- }, u.require = u.makeRequire(), u
- }
- function getInteractiveScript() {
- return interactiveScript && "interactive" === interactiveScript.readyState ? interactiveScript : (eachReverse(scripts(), function (a) {
- return "interactive" === a.readyState ? interactiveScript = a : void 0
- }), interactiveScript)
- }
- var req, s, head, baseElement, dataMain, src, interactiveScript, currentlyAddingScript, mainScript, subPath, version = "2.1.8", commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm, cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, jsSuffixRegExp = /\.js$/, currDirRegExp = /^\.\//, op = Object.prototype, ostring = op.toString, hasOwn = op.hasOwnProperty, ap = Array.prototype, apsp = ap.splice, isBrowser = !("undefined" == typeof window || !navigator || !window.document), isWebWorker = !isBrowser && "undefined" != typeof importScripts, readyRegExp = isBrowser && "PLAYSTATION 3" === navigator.platform ? /^complete$/ : /^(complete|loaded)$/, defContextName = "_", isOpera = "undefined" != typeof opera && "[object Opera]" === opera.toString(), contexts = {}, cfg = {}, globalDefQueue = [], useInteractive = !1;
- if ("undefined" == typeof define) {
- if ("undefined" != typeof requirejs) {
- if (isFunction(requirejs))return;
- cfg = requirejs, requirejs = void 0
- }
- "undefined" == typeof require || isFunction(require) || (cfg = require, require = void 0), req = requirejs = function (a, b, c, d) {
- var e, f, g = defContextName;
- return isArray(a) || "string" == typeof a || (f = a, isArray(b) ? (a = b, b = c, c = d) : a = []), f && f.context && (g = f.context), e = getOwn(contexts, g), e || (e = contexts[g] = req.s.newContext(g)), f && e.configure(f), e.require(a, b, c)
- }, req.config = function (a) {
- return req(a)
- }, req.nextTick = "undefined" != typeof setTimeout ? function (a) {
- setTimeout(a, 4)
- } : function (a) {
- a()
- }, require || (require = req), req.version = version, req.jsExtRegExp = /^\/|:|\?|\.js$/, req.isBrowser = isBrowser, s = req.s = {
- contexts: contexts,
- newContext: newContext
- }, req({}), each(["toUrl", "undef", "defined", "specified"], function (a) {
- req[a] = function () {
- var b = contexts[defContextName];
- return b.require[a].apply(b, arguments)
- }
- }), isBrowser && (head = s.head = document.getElementsByTagName("head")[0], baseElement = document.getElementsByTagName("base")[0], baseElement && (head = s.head = baseElement.parentNode)), req.onError = defaultOnError, req.createNode = function (a) {
- var b = a.xhtml ? document.createElementNS("http://www.w3.org/1999/xhtml", "html:script") : document.createElement("script");
- return b.type = a.scriptType || "text/javascript", b.charset = "utf-8", b.async = !0, b
- }, req.load = function (a, b, c) {
- var d, e = a && a.config || {};
- if (isBrowser)return d = req.createNode(e, b, c), d.setAttribute("data-requirecontext", a.contextName), d.setAttribute("data-requiremodule", b), !d.attachEvent || d.attachEvent.toString && d.attachEvent.toString().indexOf("[native code") < 0 || isOpera ? (d.addEventListener("load", a.onScriptLoad, !1), d.addEventListener("error", a.onScriptError, !1)) : (useInteractive = !0, d.attachEvent("onreadystatechange", a.onScriptLoad)), d.src = c, currentlyAddingScript = d, baseElement ? head.insertBefore(d, baseElement) : head.appendChild(d), currentlyAddingScript = null, d;
- if (isWebWorker)try {
- importScripts(c), a.completeLoad(b)
- } catch (f) {
- a.onError(makeError("importscripts", "importScripts failed for " + b + " at " + c, f, [b]))
- }
- }, isBrowser && eachReverse(scripts(), function (a) {
- return head || (head = a.parentNode), dataMain = a.getAttribute("data-main"), dataMain ? (mainScript = dataMain, cfg.baseUrl || (src = mainScript.split("/"), mainScript = src.pop(), subPath = src.length ? src.join("/") + "/" : "./", cfg.baseUrl = subPath), mainScript = mainScript.replace(jsSuffixRegExp, ""), req.jsExtRegExp.test(mainScript) && (mainScript = dataMain), cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript], !0) : void 0
- }), define = function (a, b, c) {
- var d, e;
- "string" != typeof a && (c = b, b = a, a = null), isArray(b) || (c = b, b = null), !b && isFunction(c) && (b = [], c.length && (c.toString().replace(commentRegExp, "").replace(cjsRequireRegExp, function (a, c) {
- b.push(c)
- }), b = (1 === c.length ? ["require"] : ["require", "exports", "module"]).concat(b))), useInteractive && (d = currentlyAddingScript || getInteractiveScript(), d && (a || (a = d.getAttribute("data-requiremodule")), e = contexts[d.getAttribute("data-requirecontext")])), (e ? e.defQueue : globalDefQueue).push([a, b, c])
- }, define.amd = {jQuery: !0}, req.exec = function (text) {
- return eval(text)
- }, req(cfg)
- }
- }(this), function () {
- var a = this, b = a._, c = {}, d = Array.prototype, e = Object.prototype, f = Function.prototype, g = d.push, h = d.slice, i = d.concat, j = e.toString, k = e.hasOwnProperty, l = d.forEach, m = d.map, n = d.reduce, o = d.reduceRight, p = d.filter, q = d.every, r = d.some, s = d.indexOf, t = d.lastIndexOf, u = Array.isArray, v = Object.keys, w = f.bind, x = function (a) {
- return a instanceof x ? a : this instanceof x ? (this._wrapped = a, void 0) : new x(a)
- };
- "undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = x), exports._ = x) : a._ = x, x.VERSION = "1.4.4";
- var y = x.each = x.forEach = function (a, b, d) {
- if (null != a)if (l && a.forEach === l)a.forEach(b, d); else if (a.length === +a.length) {
- for (var e = 0, f = a.length; f > e; e++)if (b.call(d, a[e], e, a) === c)return
- } else for (var g in a)if (x.has(a, g) && b.call(d, a[g], g, a) === c)return
- };
- x.map = x.collect = function (a, b, c) {
- var d = [];
- return null == a ? d : m && a.map === m ? a.map(b, c) : (y(a, function (a, e, f) {
- d[d.length] = b.call(c, a, e, f)
- }), d)
- };
- var z = "Reduce of empty array with no initial value";
- x.reduce = x.foldl = x.inject = function (a, b, c, d) {
- var e = arguments.length > 2;
- if (null == a && (a = []), n && a.reduce === n)return d && (b = x.bind(b, d)), e ? a.reduce(b, c) : a.reduce(b);
- if (y(a, function (a, f, g) {
- e ? c = b.call(d, c, a, f, g) : (c = a, e = !0)
- }), !e)throw new TypeError(z);
- return c
- }, x.reduceRight = x.foldr = function (a, b, c, d) {
- var e = arguments.length > 2;
- if (null == a && (a = []), o && a.reduceRight === o)return d && (b = x.bind(b, d)), e ? a.reduceRight(b, c) : a.reduceRight(b);
- var f = a.length;
- if (f !== +f) {
- var g = x.keys(a);
- f = g.length
- }
- if (y(a, function (h, i, j) {
- i = g ? g[--f] : --f, e ? c = b.call(d, c, a[i], i, j) : (c = a[i], e = !0)
- }), !e)throw new TypeError(z);
- return c
- }, x.find = x.detect = function (a, b, c) {
- var d;
- return A(a, function (a, e, f) {
- return b.call(c, a, e, f) ? (d = a, !0) : void 0
- }), d
- }, x.filter = x.select = function (a, b, c) {
- var d = [];
- return null == a ? d : p && a.filter === p ? a.filter(b, c) : (y(a, function (a, e, f) {
- b.call(c, a, e, f) && (d[d.length] = a)
- }), d)
- }, x.reject = function (a, b, c) {
- return x.filter(a, function (a, d, e) {
- return !b.call(c, a, d, e)
- }, c)
- }, x.every = x.all = function (a, b, d) {
- b || (b = x.identity);
- var e = !0;
- return null == a ? e : q && a.every === q ? a.every(b, d) : (y(a, function (a, f, g) {
- return (e = e && b.call(d, a, f, g)) ? void 0 : c
- }), !!e)
- };
- var A = x.some = x.any = function (a, b, d) {
- b || (b = x.identity);
- var e = !1;
- return null == a ? e : r && a.some === r ? a.some(b, d) : (y(a, function (a, f, g) {
- return e || (e = b.call(d, a, f, g)) ? c : void 0
- }), !!e)
- };
- x.contains = x.include = function (a, b) {
- return null == a ? !1 : s && a.indexOf === s ? -1 != a.indexOf(b) : A(a, function (a) {
- return a === b
- })
- }, x.invoke = function (a, b) {
- var c = h.call(arguments, 2), d = x.isFunction(b);
- return x.map(a, function (a) {
- return (d ? b : a[b]).apply(a, c)
- })
- }, x.pluck = function (a, b) {
- return x.map(a, function (a) {
- return a[b]
- })
- }, x.where = function (a, b, c) {
- return x.isEmpty(b) ? c ? null : [] : x[c ? "find" : "filter"](a, function (a) {
- for (var c in b)if (b[c] !== a[c])return !1;
- return !0
- })
- }, x.findWhere = function (a, b) {
- return x.where(a, b, !0)
- }, x.max = function (a, b, c) {
- if (!b && x.isArray(a) && a[0] === +a[0] && 65535 > a.length)return Math.max.apply(Math, a);
- if (!b && x.isEmpty(a))return -1 / 0;
- var d = {computed: -1 / 0, value: -1 / 0};
- return y(a, function (a, e, f) {
- var g = b ? b.call(c, a, e, f) : a;
- g >= d.computed && (d = {value: a, computed: g})
- }), d.value
- }, x.min = function (a, b, c) {
- if (!b && x.isArray(a) && a[0] === +a[0] && 65535 > a.length)return Math.min.apply(Math, a);
- if (!b && x.isEmpty(a))return 1 / 0;
- var d = {computed: 1 / 0, value: 1 / 0};
- return y(a, function (a, e, f) {
- var g = b ? b.call(c, a, e, f) : a;
- d.computed > g && (d = {value: a, computed: g})
- }), d.value
- }, x.shuffle = function (a) {
- var b, c = 0, d = [];
- return y(a, function (a) {
- b = x.random(c++), d[c - 1] = d[b], d[b] = a
- }), d
- };
- var B = function (a) {
- return x.isFunction(a) ? a : function (b) {
- return b[a]
- }
- };
- x.sortBy = function (a, b, c) {
- var d = B(b);
- return x.pluck(x.map(a, function (a, b, e) {
- return {value: a, index: b, criteria: d.call(c, a, b, e)}
- }).sort(function (a, b) {
- var c = a.criteria, d = b.criteria;
- if (c !== d) {
- if (c > d || void 0 === c)return 1;
- if (d > c || void 0 === d)return -1
- }
- return a.index < b.index ? -1 : 1
- }), "value")
- };
- var C = function (a, b, c, d) {
- var e = {}, f = B(b || x.identity);
- return y(a, function (b, g) {
- var h = f.call(c, b, g, a);
- d(e, h, b)
- }), e
- };
- x.groupBy = function (a, b, c) {
- return C(a, b, c, function (a, b, c) {
- (x.has(a, b) ? a[b] : a[b] = []).push(c)
- })
- }, x.countBy = function (a, b, c) {
- return C(a, b, c, function (a, b) {
- x.has(a, b) || (a[b] = 0), a[b]++
- })
- }, x.sortedIndex = function (a, b, c, d) {
- c = null == c ? x.identity : B(c);
- for (var e = c.call(d, b), f = 0, g = a.length; g > f;) {
- var h = f + g >>> 1;
- e > c.call(d, a[h]) ? f = h + 1 : g = h
- }
- return f
- }, x.toArray = function (a) {
- return a ? x.isArray(a) ? h.call(a) : a.length === +a.length ? x.map(a, x.identity) : x.values(a) : []
- }, x.size = function (a) {
- return null == a ? 0 : a.length === +a.length ? a.length : x.keys(a).length
- }, x.first = x.head = x.take = function (a, b, c) {
- return null == a ? void 0 : null == b || c ? a[0] : h.call(a, 0, b)
- }, x.initial = function (a, b, c) {
- return h.call(a, 0, a.length - (null == b || c ? 1 : b))
- }, x.last = function (a, b, c) {
- return null == a ? void 0 : null == b || c ? a[a.length - 1] : h.call(a, Math.max(a.length - b, 0))
- }, x.rest = x.tail = x.drop = function (a, b, c) {
- return h.call(a, null == b || c ? 1 : b)
- }, x.compact = function (a) {
- return x.filter(a, x.identity)
- };
- var D = function (a, b, c) {
- return y(a, function (a) {
- x.isArray(a) ? b ? g.apply(c, a) : D(a, b, c) : c.push(a)
- }), c
- };
- x.flatten = function (a, b) {
- return D(a, b, [])
- }, x.without = function (a) {
- return x.difference(a, h.call(arguments, 1))
- }, x.uniq = x.unique = function (a, b, c, d) {
- x.isFunction(b) && (d = c, c = b, b = !1);
- var e = c ? x.map(a, c, d) : a, f = [], g = [];
- return y(e, function (c, d) {
- (b ? d && g[g.length - 1] === c : x.contains(g, c)) || (g.push(c), f.push(a[d]))
- }), f
- }, x.union = function () {
- return x.uniq(i.apply(d, arguments))
- }, x.intersection = function (a) {
- var b = h.call(arguments, 1);
- return x.filter(x.uniq(a), function (a) {
- return x.every(b, function (b) {
- return x.indexOf(b, a) >= 0
- })
- })
- }, x.difference = function (a) {
- var b = i.apply(d, h.call(arguments, 1));
- return x.filter(a, function (a) {
- return !x.contains(b, a)
- })
- }, x.zip = function () {
- for (var a = h.call(arguments), b = x.max(x.pluck(a, "length")), c = Array(b), d = 0; b > d; d++)c[d] = x.pluck(a, "" + d);
- return c
- }, x.object = function (a, b) {
- if (null == a)return {};
- for (var c = {}, d = 0, e = a.length; e > d; d++)b ? c[a[d]] = b[d] : c[a[d][0]] = a[d][1];
- return c
- }, x.indexOf = function (a, b, c) {
- if (null == a)return -1;
- var d = 0, e = a.length;
- if (c) {
- if ("number" != typeof c)return d = x.sortedIndex(a, b), a[d] === b ? d : -1;
- d = 0 > c ? Math.max(0, e + c) : c
- }
- if (s && a.indexOf === s)return a.indexOf(b, c);
- for (; e > d; d++)if (a[d] === b)return d;
- return -1
- }, x.lastIndexOf = function (a, b, c) {
- if (null == a)return -1;
- var d = null != c;
- if (t && a.lastIndexOf === t)return d ? a.lastIndexOf(b, c) : a.lastIndexOf(b);
- for (var e = d ? c : a.length; e--;)if (a[e] === b)return e;
- return -1
- }, x.range = function (a, b, c) {
- 1 >= arguments.length && (b = a || 0, a = 0), c = arguments[2] || 1;
- for (var d = Math.max(Math.ceil((b - a) / c), 0), e = 0, f = Array(d); d > e;)f[e++] = a, a += c;
- return f
- }, x.bind = function (a, b) {
- if (a.bind === w && w)return w.apply(a, h.call(arguments, 1));
- var c = h.call(arguments, 2);
- return function () {
- return a.apply(b, c.concat(h.call(arguments)))
- }
- }, x.partial = function (a) {
- var b = h.call(arguments, 1);
- return function () {
- return a.apply(this, b.concat(h.call(arguments)))
- }
- }, x.bindAll = function (a) {
- var b = h.call(arguments, 1);
- return 0 === b.length && (b = x.functions(a)), y(b, function (b) {
- a[b] = x.bind(a[b], a)
- }), a
- }, x.memoize = function (a, b) {
- var c = {};
- return b || (b = x.identity), function () {
- var d = b.apply(this, arguments);
- return x.has(c, d) ? c[d] : c[d] = a.apply(this, arguments)
- }
- }, x.delay = function (a, b) {
- var c = h.call(arguments, 2);
- return setTimeout(function () {
- return a.apply(null, c)
- }, b)
- }, x.defer = function (a) {
- return x.delay.apply(x, [a, 1].concat(h.call(arguments, 1)))
- }, x.throttle = function (a, b) {
- var c, d, e, f, g = 0, h = function () {
- g = new Date, e = null, f = a.apply(c, d)
- };
- return function () {
- var i = new Date, j = b - (i - g);
- return c = this, d = arguments, 0 >= j ? (clearTimeout(e), e = null, g = i, f = a.apply(c, d)) : e || (e = setTimeout(h, j)), f
- }
- }, x.debounce = function (a, b, c) {
- var d, e;
- return function () {
- var f = this, g = arguments, h = function () {
- d = null, c || (e = a.apply(f, g))
- }, i = c && !d;
- return clearTimeout(d), d = setTimeout(h, b), i && (e = a.apply(f, g)), e
- }
- }, x.once = function (a) {
- var b, c = !1;
- return function () {
- return c ? b : (c = !0, b = a.apply(this, arguments), a = null, b)
- }
- }, x.wrap = function (a, b) {
- return function () {
- var c = [a];
- return g.apply(c, arguments), b.apply(this, c)
- }
- }, x.compose = function () {
- var a = arguments;
- return function () {
- for (var b = arguments, c = a.length - 1; c >= 0; c--)b = [a[c].apply(this, b)];
- return b[0]
- }
- }, x.after = function (a, b) {
- return 0 >= a ? b() : function () {
- return 1 > --a ? b.apply(this, arguments) : void 0
- }
- }, x.keys = v || function (a) {
- if (a !== Object(a))throw new TypeError("Invalid object");
- var b = [];
- for (var c in a)x.has(a, c) && (b[b.length] = c);
- return b
- }, x.values = function (a) {
- var b = [];
- for (var c in a)x.has(a, c) && b.push(a[c]);
- return b
- }, x.pairs = function (a) {
- var b = [];
- for (var c in a)x.has(a, c) && b.push([c, a[c]]);
- return b
- }, x.invert = function (a) {
- var b = {};
- for (var c in a)x.has(a, c) && (b[a[c]] = c);
- return b
- }, x.functions = x.methods = function (a) {
- var b = [];
- for (var c in a)x.isFunction(a[c]) && b.push(c);
- return b.sort()
- }, x.extend = function (a) {
- return y(h.call(arguments, 1), function (b) {
- if (b)for (var c in b)a[c] = b[c]
- }), a
- }, x.pick = function (a) {
- var b = {}, c = i.apply(d, h.call(arguments, 1));
- return y(c, function (c) {
- c in a && (b[c] = a[c])
- }), b
- }, x.omit = function (a) {
- var b = {}, c = i.apply(d, h.call(arguments, 1));
- for (var e in a)x.contains(c, e) || (b[e] = a[e]);
- return b
- }, x.defaults = function (a) {
- return y(h.call(arguments, 1), function (b) {
- if (b)for (var c in b)null == a[c] && (a[c] = b[c])
- }), a
- }, x.clone = function (a) {
- return x.isObject(a) ? x.isArray(a) ? a.slice() : x.extend({}, a) : a
- }, x.tap = function (a, b) {
- return b(a), a
- };
- var E = function (a, b, c, d) {
- if (a === b)return 0 !== a || 1 / a == 1 / b;
- if (null == a || null == b)return a === b;
- a instanceof x && (a = a._wrapped), b instanceof x && (b = b._wrapped);
- var e = j.call(a);
- if (e != j.call(b))return !1;
- switch (e) {
- case"[object String]":
- return a == b + "";
- case"[object Number]":
- return a != +a ? b != +b : 0 == a ? 1 / a == 1 / b : a == +b;
- case"[object Date]":
- case"[object Boolean]":
- return +a == +b;
- case"[object RegExp]":
- return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase
- }
- if ("object" != typeof a || "object" != typeof b)return !1;
- for (var f = c.length; f--;)if (c[f] == a)return d[f] == b;
- c.push(a), d.push(b);
- var g = 0, h = !0;
- if ("[object Array]" == e) {
- if (g = a.length, h = g == b.length)for (; g-- && (h = E(a[g], b[g], c, d)););
- } else {
- var i = a.constructor, k = b.constructor;
- if (i !== k && !(x.isFunction(i) && i instanceof i && x.isFunction(k) && k instanceof k))return !1;
- for (var l in a)if (x.has(a, l) && (g++, !(h = x.has(b, l) && E(a[l], b[l], c, d))))break;
- if (h) {
- for (l in b)if (x.has(b, l) && !g--)break;
- h = !g
- }
- }
- return c.pop(), d.pop(), h
- };
- x.isEqual = function (a, b) {
- return E(a, b, [], [])
- }, x.isEmpty = function (a) {
- if (null == a)return !0;
- if (x.isArray(a) || x.isString(a))return 0 === a.length;
- for (var b in a)if (x.has(a, b))return !1;
- return !0
- }, x.isElement = function (a) {
- return !(!a || 1 !== a.nodeType)
- }, x.isArray = u || function (a) {
- return "[object Array]" == j.call(a)
- }, x.isObject = function (a) {
- return a === Object(a)
- }, y(["Arguments", "Function", "String", "Number", "Date", "RegExp"], function (a) {
- x["is" + a] = function (b) {
- return j.call(b) == "[object " + a + "]"
- }
- }), x.isArguments(arguments) || (x.isArguments = function (a) {
- return !(!a || !x.has(a, "callee"))
- }), "function" != typeof/./ && (x.isFunction = function (a) {
- return "function" == typeof a
- }), x.isFinite = function (a) {
- return isFinite(a) && !isNaN(parseFloat(a))
- }, x.isNaN = function (a) {
- return x.isNumber(a) && a != +a
- }, x.isBoolean = function (a) {
- return a === !0 || a === !1 || "[object Boolean]" == j.call(a)
- }, x.isNull = function (a) {
- return null === a
- }, x.isUndefined = function (a) {
- return void 0 === a
- }, x.has = function (a, b) {
- return k.call(a, b)
- }, x.noConflict = function () {
- return a._ = b, this
- }, x.identity = function (a) {
- return a
- }, x.times = function (a, b, c) {
- for (var d = Array(a), e = 0; a > e; e++)d[e] = b.call(c, e);
- return d
- }, x.random = function (a, b) {
- return null == b && (b = a, a = 0), a + Math.floor(Math.random() * (b - a + 1))
- };
- var F = {escape: {"&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/"}};
- F.unescape = x.invert(F.escape);
- var G = {
- escape: RegExp("[" + x.keys(F.escape).join("") + "]", "g"),
- unescape: RegExp("(" + x.keys(F.unescape).join("|") + ")", "g")
- };
- x.each(["escape", "unescape"], function (a) {
- x[a] = function (b) {
- return null == b ? "" : ("" + b).replace(G[a], function (b) {
- return F[a][b]
- })
- }
- }), x.result = function (a, b) {
- if (null == a)return null;
- var c = a[b];
- return x.isFunction(c) ? c.call(a) : c
- }, x.mixin = function (a) {
- y(x.functions(a), function (b) {
- var c = x[b] = a[b];
- x.prototype[b] = function () {
- var a = [this._wrapped];
- return g.apply(a, arguments), L.call(this, c.apply(x, a))
- }
- })
- };
- var H = 0;
- x.uniqueId = function (a) {
- var b = ++H + "";
- return a ? a + b : b
- }, x.templateSettings = {evaluate: /<%([\s\S]+?)%>/g, interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g};
- var I = /(.)^/, J = {
- "'": "'",
- "\\": "\\",
- "\r": "r",
- "\n": "n",
- " ": "t",
- "\u2028": "u2028",
- "\u2029": "u2029"
- }, K = /\\|'|\r|\n|\t|\u2028|\u2029/g;
- x.template = function (a, b, c) {
- var d;
- c = x.defaults({}, c, x.templateSettings);
- var e = RegExp([(c.escape || I).source, (c.interpolate || I).source, (c.evaluate || I).source].join("|") + "|$", "g"), f = 0, g = "__p+='";
- a.replace(e, function (b, c, d, e, h) {
- return g += a.slice(f, h).replace(K, function (a) {
- return "\\" + J[a]
- }), c && (g += "'+\n((__t=(" + c + "))==null?'':_.escape(__t))+\n'"), d && (g += "'+\n((__t=(" + d + "))==null?'':__t)+\n'"), e && (g += "';\n" + e + "\n__p+='"), f = h + b.length, b
- }), g += "';\n", c.variable || (g = "with(obj||{}){\n" + g + "}\n"), g = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + g + "return __p;\n";
- try {
- d = Function(c.variable || "obj", "_", g)
- } catch (h) {
- throw h.source = g, h
- }
- if (b)return d(b, x);
- var i = function (a) {
- return d.call(this, a, x)
- };
- return i.source = "function(" + (c.variable || "obj") + "){\n" + g + "}", i
- }, x.chain = function (a) {
- return x(a).chain()
- };
- var L = function (a) {
- return this._chain ? x(a).chain() : a
- };
- x.mixin(x), y(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function (a) {
- var b = d[a];
- x.prototype[a] = function () {
- var c = this._wrapped;
- return b.apply(c, arguments), "shift" != a && "splice" != a || 0 !== c.length || delete c[0], L.call(this, c)
- }
- }), y(["concat", "join", "slice"], function (a) {
- var b = d[a];
- x.prototype[a] = function () {
- return L.call(this, b.apply(this._wrapped, arguments))
- }
- }), x.extend(x.prototype, {
- chain: function () {
- return this._chain = !0, this
- }, value: function () {
- return this._wrapped
- }
- })
- }.call(this);
- var mejs = mejs || {};
- mejs.version = "2.13.1", mejs.meIndex = 0, mejs.plugins = {
- silverlight: [{
- version: [3, 0],
- types: ["video/mp4", "video/m4v", "video/mov", "video/wmv", "audio/wma", "audio/m4a", "audio/mp3", "audio/wav", "audio/mpeg"]
- }],
- flash: [{
- version: [9, 0, 124],
- types: ["video/mp4", "video/m4v", "video/mov", "video/flv", "video/rtmp", "video/x-flv", "audio/flv", "audio/x-flv", "audio/mp3", "audio/m4a", "audio/mpeg", "video/youtube", "video/x-youtube"]
- }],
- youtube: [{version: null, types: ["video/youtube", "video/x-youtube", "audio/youtube", "audio/x-youtube"]}],
- vimeo: [{version: null, types: ["video/vimeo", "video/x-vimeo"]}]
- }, mejs.Utility = {
- encodeUrl: function (a) {
- return encodeURIComponent(a)
- }, escapeHTML: function (a) {
- return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")
- }, absolutizeUrl: function (a) {
- var b = document.createElement("div");
- return b.innerHTML = '<a href="' + this.escapeHTML(a) + '">x</a>', b.firstChild.href
- }, getScriptPath: function (a) {
- for (var b, c, d, e = 0, f = "", g = "", h = document.getElementsByTagName("script"), i = h.length, j = a.length; i > e; e++) {
- for (c = h[e].src, b = c.lastIndexOf("/"), b > -1 ? (d = c.substring(b + 1), c = c.substring(0, b + 1)) : (d = c, c = ""), b = 0; j > b; b++)if (g = a[b], g = d.indexOf(g), g > -1) {
- f = c;
- break
- }
- if ("" !== f)break
- }
- return f
- }, secondsToTimeCode: function (a, b, c, d) {
- "undefined" == typeof c ? c = !1 : "undefined" == typeof d && (d = 25);
- var e = Math.floor(a / 3600) % 24, f = Math.floor(a / 60) % 60, g = Math.floor(a % 60);
- return a = Math.floor((a % 1 * d).toFixed(3)), (b || e > 0 ? (10 > e ? "0" + e : e) + ":" : "") + (10 > f ? "0" + f : f) + ":" + (10 > g ? "0" + g : g) + (c ? ":" + (10 > a ? "0" + a : a) : "")
- }, timeCodeToSeconds: function (a, b, c, d) {
- "undefined" == typeof c ? c = !1 : "undefined" == typeof d && (d = 25), a = a.split(":"), b = parseInt(a[0], 10);
- var e = parseInt(a[1], 10), f = parseInt(a[2], 10), g = 0, h = 0;
- return c && (g = parseInt(a[3]) / d), h = 3600 * b + 60 * e + f + g
- }, convertSMPTEtoSeconds: function (a) {
- if ("string" != typeof a)return !1;
- a = a.replace(",", ".");
- var b = 0, c = -1 != a.indexOf(".") ? a.split(".")[1].length : 0, d = 1;
- a = a.split(":").reverse();
- for (var e = 0; e < a.length; e++)d = 1, e > 0 && (d = Math.pow(60, e)), b += Number(a[e]) * d;
- return Number(b.toFixed(c))
- }, removeSwf: function (a) {
- var b = document.getElementById(a);
- b && /object|embed/i.test(b.nodeName) && (mejs.MediaFeatures.isIE ? (b.style.display = "none", function () {
- 4 == b.readyState ? mejs.Utility.removeObjectInIE(a) : setTimeout(arguments.callee, 10)
- }()) : b.parentNode.removeChild(b))
- }, removeObjectInIE: function (a) {
- if (a = document.getElementById(a)) {
- for (var b in a)"function" == typeof a[b] && (a[b] = null);
- a.parentNode.removeChild(a)
- }
- }
- }, mejs.PluginDetector = {
- hasPluginVersion: function (a, b) {
- var c = this.plugins[a];
- return b[1] = b[1] || 0, b[2] = b[2] || 0, c[0] > b[0] || c[0] == b[0] && c[1] > b[1] || c[0] == b[0] && c[1] == b[1] && c[2] >= b[2] ? !0 : !1
- },
- nav: window.navigator,
- ua: window.navigator.userAgent.toLowerCase(),
- plugins: [],
- addPlugin: function (a, b, c, d, e) {
- this.plugins[a] = this.detectPlugin(b, c, d, e)
- },
- detectPlugin: function (a, b, c, d) {
- var e, f = [0, 0, 0];
- if ("undefined" != typeof this.nav.plugins && "object" == typeof this.nav.plugins[a]) {
- if ((c = this.nav.plugins[a].description) && ("undefined" == typeof this.nav.mimeTypes || !this.nav.mimeTypes[b] || this.nav.mimeTypes[b].enabledPlugin))for (f = c.replace(a, "").replace(/^\s+/, "").replace(/\sr/gi, ".").split("."), a = 0; a < f.length; a++)f[a] = parseInt(f[a].match(/\d+/), 10)
- } else if ("undefined" != typeof window.ActiveXObject)try {
- (e = new ActiveXObject(c)) && (f = d(e))
- } catch (g) {
- }
- return f
- }
- }, mejs.PluginDetector.addPlugin("flash", "Shockwave Flash", "application/x-shockwave-flash", "ShockwaveFlash.ShockwaveFlash", function (a) {
- var b = [];
- return (a = a.GetVariable("$version")) && (a = a.split(" ")[1].split(","), b = [parseInt(a[0], 10), parseInt(a[1], 10), parseInt(a[2], 10)]), b
- }), mejs.PluginDetector.addPlugin("silverlight", "Silverlight Plug-In", "application/x-silverlight-2", "AgControl.AgControl", function (a) {
- var b = [0, 0, 0, 0], c = function (a, b, c, d) {
- for (; a.isVersionSupported(b[0] + "." + b[1] + "." + b[2] + "." + b[3]);)b[c] += d;
- b[c] -= d
- };
- return c(a, b, 0, 1), c(a, b, 1, 1), c(a, b, 2, 1e4), c(a, b, 2, 1e3), c(a, b, 2, 100), c(a, b, 2, 10), c(a, b, 2, 1), c(a, b, 3, 1), b
- }), mejs.MediaFeatures = {
- init: function () {
- var a, b = this, c = document, d = mejs.PluginDetector.nav, e = mejs.PluginDetector.ua.toLowerCase(), f = ["source", "track", "audio", "video"];
- b.isiPad = null !== e.match(/ipad/i), b.isiPhone = null !== e.match(/iphone/i), b.isiOS = b.isiPhone || b.isiPad, b.isAndroid = null !== e.match(/android/i), b.isBustedAndroid = null !== e.match(/android 2\.[12]/), b.isBustedNativeHTTPS = "https:" === location.protocol && (null !== e.match(/android [12]\./) || null !== e.match(/macintosh.* version.* safari/)), b.isIE = null !== d.appName.toLowerCase().match(/trident/gi), b.isChrome = null !== e.match(/chrome/gi), b.isFirefox = null !== e.match(/firefox/gi), b.isWebkit = null !== e.match(/webkit/gi), b.isGecko = null !== e.match(/gecko/gi) && !b.isWebkit && !b.isIE, b.isOpera = null !== e.match(/opera/gi), b.hasTouch = "ontouchstart"in window && null != window.ontouchstart, b.svg = !!document.createElementNS && !!document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect;
- for (d = 0; d < f.length; d++)a = document.createElement(f[d]);
- b.supportsMediaTag = "undefined" != typeof a.canPlayType || b.isBustedAndroid;
- try {
- a.canPlayType("video/mp4")
- } catch (g) {
- b.supportsMediaTag = !1
- }
- b.hasSemiNativeFullScreen = "undefined" != typeof a.webkitEnterFullscreen, b.hasNativeFullscreen = "undefined" != typeof a.requestFullscreen, b.hasWebkitNativeFullScreen = "undefined" != typeof a.webkitRequestFullScreen, b.hasMozNativeFullScreen = "undefined" != typeof a.mozRequestFullScreen, b.hasMsNativeFullScreen = "undefined" != typeof a.msRequestFullscreen, b.hasTrueNativeFullScreen = b.hasWebkitNativeFullScreen || b.hasMozNativeFullScreen || b.hasMsNativeFullScreen, b.nativeFullScreenEnabled = b.hasTrueNativeFullScreen, b.hasMozNativeFullScreen ? b.nativeFullScreenEnabled = document.mozFullScreenEnabled : b.hasMsNativeFullScreen && (b.nativeFullScreenEnabled = document.msFullscreenEnabled), b.isChrome && (b.hasSemiNativeFullScreen = !1), b.hasTrueNativeFullScreen && (b.fullScreenEventName = "", b.hasWebkitNativeFullScreen ? b.fullScreenEventName = "webkitfullscreenchange" : b.hasMozNativeFullScreen ? b.fullScreenEventName = "mozfullscreenchange" : b.hasMsNativeFullScreen && (b.fullScreenEventName = "MSFullscreenChange"), b.isFullScreen = function () {
- return a.mozRequestFullScreen ? c.mozFullScreen : a.webkitRequestFullScreen ? c.webkitIsFullScreen : a.hasMsNativeFullScreen ? null !== c.msFullscreenElement : void 0
- }, b.requestFullScreen = function (a) {
- b.hasWebkitNativeFullScreen ? a.webkitRequestFullScreen() : b.hasMozNativeFullScreen ? a.mozRequestFullScreen() : b.hasMsNativeFullScreen && a.msRequestFullscreen()
- }, b.cancelFullScreen = function () {
- b.hasWebkitNativeFullScreen ? document.webkitCancelFullScreen() : b.hasMozNativeFullScreen ? document.mozCancelFullScreen() : b.hasMsNativeFullScreen && document.msExitFullscreen()
- }), b.hasSemiNativeFullScreen && e.match(/mac os x 10_5/i) && (b.hasNativeFullScreen = !1, b.hasSemiNativeFullScreen = !1)
- }
- }, mejs.MediaFeatures.init(), mejs.HtmlMediaElement = {
- pluginType: "native",
- isFullScreen: !1,
- setCurrentTime: function (a) {
- this.currentTime = a
- },
- setMuted: function (a) {
- this.muted = a
- },
- setVolume: function (a) {
- this.volume = a
- },
- stop: function () {
- this.pause()
- },
- setSrc: function (a) {
- for (var b = this.getElementsByTagName("source"); b.length > 0;)this.removeChild(b[0]);
- if ("string" == typeof a)this.src = a; else {
- var c;
- for (b = 0; b < a.length; b++)if (c = a[b], this.canPlayType(c.type)) {
- this.src = c.src;
- break
- }
- }
- },
- setVideoSize: function (a, b) {
- this.width = a, this.height = b
- }
- }, mejs.PluginMediaElement = function (a, b, c) {
- this.id = a, this.pluginType = b, this.src = c, this.events = {}, this.attributes = {}
- }, mejs.PluginMediaElement.prototype = {
- pluginElement: null,
- pluginType: "",
- isFullScreen: !1,
- playbackRate: -1,
- defaultPlaybackRate: -1,
- seekable: [],
- played: [],
- paused: !0,
- ended: !1,
- seeking: !1,
- duration: 0,
- error: null,
- tagName: "",
- muted: !1,
- volume: 1,
- currentTime: 0,
- play: function () {
- null != this.pluginApi && ("youtube" == this.pluginType ? this.pluginApi.playVideo() : this.pluginApi.playMedia(), this.paused = !1)
- },
- load: function () {
- null != this.pluginApi && ("youtube" != this.pluginType && this.pluginApi.loadMedia(), this.paused = !1)
- },
- pause: function () {
- null != this.pluginApi && ("youtube" == this.pluginType ? this.pluginApi.pauseVideo() : this.pluginApi.pauseMedia(), this.paused = !0)
- },
- stop: function () {
- null != this.pluginApi && ("youtube" == this.pluginType ? this.pluginApi.stopVideo() : this.pluginApi.stopMedia(), this.paused = !0)
- },
- canPlayType: function (a) {
- var b, c, d, e = mejs.plugins[this.pluginType];
- for (b = 0; b < e.length; b++)if (d = e[b], mejs.PluginDetector.hasPluginVersion(this.pluginType, d.version))for (c = 0; c < d.types.length; c++)if (a == d.types[c])return "probably";
- return ""
- },
- positionFullscreenButton: function (a, b, c) {
- null != this.pluginApi && this.pluginApi.positionFullscreenButton && this.pluginApi.positionFullscreenButton(Math.floor(a), Math.floor(b), c)
- },
- hideFullscreenButton: function () {
- null != this.pluginApi && this.pluginApi.hideFullscreenButton && this.pluginApi.hideFullscreenButton()
- },
- setSrc: function (a) {
- if ("string" == typeof a)this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a)), this.src = mejs.Utility.absolutizeUrl(a); else {
- var b, c;
- for (b = 0; b < a.length; b++)if (c = a[b], this.canPlayType(c.type)) {
- this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)), this.src = mejs.Utility.absolutizeUrl(a);
- break
- }
- }
- },
- setCurrentTime: function (a) {
- null != this.pluginApi && ("youtube" == this.pluginType ? this.pluginApi.seekTo(a) : this.pluginApi.setCurrentTime(a), this.currentTime = a)
- },
- setVolume: function (a) {
- null != this.pluginApi && ("youtube" == this.pluginType ? this.pluginApi.setVolume(100 * a) : this.pluginApi.setVolume(a), this.volume = a)
- },
- setMuted: function (a) {
- null != this.pluginApi && ("youtube" == this.pluginType ? (a ? this.pluginApi.mute() : this.pluginApi.unMute(), this.muted = a, this.dispatchEvent("volumechange")) : this.pluginApi.setMuted(a), this.muted = a)
- },
- setVideoSize: function (a, b) {
- this.pluginElement.style && (this.pluginElement.style.width = a + "px", this.pluginElement.style.height = b + "px"), null != this.pluginApi && this.pluginApi.setVideoSize && this.pluginApi.setVideoSize(a, b)
- },
- setFullscreen: function (a) {
- null != this.pluginApi && this.pluginApi.setFullscreen && this.pluginApi.setFullscreen(a)
- },
- enterFullScreen: function () {
- null != this.pluginApi && this.pluginApi.setFullscreen && this.setFullscreen(!0)
- },
- exitFullScreen: function () {
- null != this.pluginApi && this.pluginApi.setFullscreen && this.setFullscreen(!1)
- },
- addEventListener: function (a, b) {
- this.events[a] = this.events[a] || [], this.events[a].push(b)
- },
- removeEventListener: function (a, b) {
- if (!a)return this.events = {}, !0;
- var c = this.events[a];
- if (!c)return !0;
- if (!b)return this.events[a] = [], !0;
- for (i = 0; i < c.length; i++)if (c[i] === b)return this.events[a].splice(i, 1), !0;
- return !1
- },
- dispatchEvent: function (a) {
- var b, c, d = this.events[a];
- if (d)for (c = Array.prototype.slice.call(arguments, 1), b = 0; b < d.length; b++)d[b].apply(null, c)
- },
- hasAttribute: function (a) {
- return a in this.attributes
- },
- removeAttribute: function (a) {
- delete this.attributes[a]
- },
- getAttribute: function (a) {
- return this.hasAttribute(a) ? this.attributes[a] : ""
- },
- setAttribute: function (a, b) {
- this.attributes[a] = b
- },
- remove: function () {
- mejs.Utility.removeSwf(this.pluginElement.id), mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)
- }
- }, mejs.MediaPluginBridge = {
- pluginMediaElements: {}, htmlMediaElements: {}, registerPluginElement: function (a, b, c) {
- this.pluginMediaElements[a] = b, this.htmlMediaElements[a] = c
- }, unregisterPluginElement: function (a) {
- delete this.pluginMediaElements[a], delete this.htmlMediaElements[a]
- }, initPlugin: function (a) {
- var b = this.pluginMediaElements[a], c = this.htmlMediaElements[a];
- if (b) {
- switch (b.pluginType) {
- case"flash":
- b.pluginElement = b.pluginApi = document.getElementById(a);
- break;
- case"silverlight":
- b.pluginElement = document.getElementById(b.id), b.pluginApi = b.pluginElement.Content.MediaElementJS
- }
- null != b.pluginApi && b.success && b.success(b, c)
- }
- }, fireEvent: function (a, b, c) {
- var d, e;
- if (a = this.pluginMediaElements[a]) {
- b = {type: b, target: a};
- for (d in c)a[d] = c[d], b[d] = c[d];
- e = c.bufferedTime || 0, b.target.buffered = b.buffered = {
- start: function () {
- return 0
- }, end: function () {
- return e
- }, length: 1
- }, a.dispatchEvent(b.type, b)
- }
- }
- }, mejs.MediaElementDefaults = {
- mode: "auto",
- plugins: ["flash", "silverlight", "youtube", "vimeo"],
- enablePluginDebug: !1,
- httpsBasicAuthSite: !1,
- type: "",
- pluginPath: mejs.Utility.getScriptPath(["mediaelement.js", "mediaelement.min.js", "mediaelement-and-player.js", "mediaelement-and-player.min.js"]),
- flashName: "flashmediaelement.swf",
- flashStreamer: "",
- enablePluginSmoothing: !1,
- enablePseudoStreaming: !1,
- pseudoStreamingStartQueryParam: "start",
- silverlightName: "silverlightmediaelement.xap",
- defaultVideoWidth: 480,
- defaultVideoHeight: 270,
- pluginWidth: -1,
- pluginHeight: -1,
- pluginVars: [],
- timerRate: 250,
- startVolume: .8,
- success: function () {
- },
- error: function () {
- }
- }, mejs.MediaElement = function (a, b) {
- return mejs.HtmlMediaElementShim.create(a, b)
- }, mejs.HtmlMediaElementShim = {
- create: function (a, b) {
- var c = mejs.MediaElementDefaults, d = "string" == typeof a ? document.getElementById(a) : a, e = d.tagName.toLowerCase(), f = "audio" === e || "video" === e, g = f ? d.getAttribute("src") : d.getAttribute("href");
- e = d.getAttribute("poster");
- var h, i = d.getAttribute("autoplay"), j = d.getAttribute("preload"), k = d.getAttribute("controls");
- for (h in b)c[h] = b[h];
- return g = "undefined" == typeof g || null === g || "" == g ? null : g, e = "undefined" == typeof e || null === e ? "" : e, j = "undefined" == typeof j || null === j || "false" === j ? "none" : j, i = !("undefined" == typeof i || null === i || "false" === i), k = !("undefined" == typeof k || null === k || "false" === k), h = this.determinePlayback(d, c, mejs.MediaFeatures.supportsMediaTag, f, g), h.url = null !== h.url ? mejs.Utility.absolutizeUrl(h.url) : "", "native" == h.method ? (mejs.MediaFeatures.isBustedAndroid && (d.src = h.url, d.addEventListener("click", function () {
- d.play()
- }, !1)), this.updateNative(h, c, i, j)) : "" !== h.method ? this.createPlugin(h, c, e, i, j, k) : (this.createErrorMessage(h, c, e), this)
- }, determinePlayback: function (a, b, c, d, e) {
- var f, g, h, i, j = [], k = {
- method: "",
- url: "",
- htmlMediaElement: a,
- isVideo: "audio" != a.tagName.toLowerCase()
- };
- if ("undefined" != typeof b.type && "" !== b.type)if ("string" == typeof b.type)j.push({
- type: b.type,
- url: e
- }); else for (f = 0; f < b.type.length; f++)j.push({
- type: b.type[f],
- url: e
- }); else if (null !== e)h = this.formatType(e, a.getAttribute("type")), j.push({
- type: h,
- url: e
- }); else for (f = 0; f < a.childNodes.length; f++)g = a.childNodes[f], 1 == g.nodeType && "source" == g.tagName.toLowerCase() && (e = g.getAttribute("src"), h = this.formatType(e, g.getAttribute("type")), g = g.getAttribute("media"), (!g || !window.matchMedia || window.matchMedia && window.matchMedia(g).matches) && j.push({
- type: h,
- url: e
- }));
- if (!d && j.length > 0 && null !== j[0].url && this.getTypeFromFile(j[0].url).indexOf("audio") > -1 && (k.isVideo = !1), mejs.MediaFeatures.isBustedAndroid && (a.canPlayType = function (a) {
- return null !== a.match(/video\/(mp4|m4v)/gi) ? "maybe" : ""
- }), !(!c || "auto" !== b.mode && "auto_plugin" !== b.mode && "native" !== b.mode || mejs.MediaFeatures.isBustedNativeHTTPS && b.httpsBasicAuthSite === !0)) {
- for (d || (f = document.createElement(k.isVideo ? "video" : "audio"), a.parentNode.insertBefore(f, a), a.style.display = "none", k.htmlMediaElement = a = f), f = 0; f < j.length; f++)if ("" !== a.canPlayType(j[f].type).replace(/no/, "") || "" !== a.canPlayType(j[f].type.replace(/mp3/, "mpeg")).replace(/no/, "")) {
- k.method = "native", k.url = j[f].url;
- break
- }
- if ("native" === k.method && (null !== k.url && (a.src = k.url), "auto_plugin" !== b.mode))return k
- }
- if ("auto" === b.mode || "auto_plugin" === b.mode || "shim" === b.mode)for (f = 0; f < j.length; f++)for (h = j[f].type, a = 0; a < b.plugins.length; a++)for (e = b.plugins[a], g = mejs.plugins[e], c = 0; c < g.length; c++)if (i = g[c], null == i.version || mejs.PluginDetector.hasPluginVersion(e, i.version))for (d = 0; d < i.types.length; d++)if (h == i.types[d])return k.method = e, k.url = j[f].url, k;
- return "auto_plugin" === b.mode && "native" === k.method ? k : ("" === k.method && j.length > 0 && (k.url = j[0].url), k)
- }, formatType: function (a, b) {
- return a && !b ? this.getTypeFromFile(a) : b && ~b.indexOf(";") ? b.substr(0, b.indexOf(";")) : b
- }, getTypeFromFile: function (a) {
- return a = a.split("?")[0], a = a.substring(a.lastIndexOf(".") + 1).toLowerCase(), (/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a) ? "video" : "audio") + "/" + this.getTypeFromExtension(a)
- }, getTypeFromExtension: function (a) {
- switch (a) {
- case"mp4":
- case"m4v":
- return "mp4";
- case"webm":
- case"webma":
- case"webmv":
- return "webm";
- case"ogg":
- case"oga":
- case"ogv":
- return "ogg";
- default:
- return a
- }
- }, createErrorMessage: function (a, b, c) {
- var d = a.htmlMediaElement, e = document.createElement("div");
- e.className = "me-cannotplay";
- try {
- e.style.width = d.width + "px", e.style.height = d.height + "px"
- } catch (f) {
- }
- e.innerHTML = b.customError ? b.customError : "" !== c ? '<a href="' + a.url + '"><img src="' + c + '" width="100%" height="100%" /></a>' : '<a href="' + a.url + '"><span>' + mejs.i18n.t("Download File") + "</span></a>", d.parentNode.insertBefore(e, d), d.style.display = "none", b.error(d)
- }, createPlugin: function (a, b, c, d, e, f) {
- c = a.htmlMediaElement;
- var g, h = 1, i = 1, j = "me_" + a.method + "_" + mejs.meIndex++, k = new mejs.PluginMediaElement(j, a.method, a.url), l = document.createElement("div");
- for (k.tagName = c.tagName, g = 0; g < c.attributes.length; g++) {
- var m = c.attributes[g];
- 1 == m.specified && k.setAttribute(m.name, m.value)
- }
- for (g = c.parentNode; null !== g && "body" != g.tagName.toLowerCase();) {
- if ("p" == g.parentNode.tagName.toLowerCase()) {
- g.parentNode.parentNode.insertBefore(g, g.parentNode);
- break
- }
- g = g.parentNode
- }
- switch (a.isVideo ? (h = b.pluginWidth > 0 ? b.pluginWidth : b.videoWidth > 0 ? b.videoWidth : null !== c.getAttribute("width") ? c.getAttribute("width") : b.defaultVideoWidth, i = b.pluginHeight > 0 ? b.pluginHeight : b.videoHeight > 0 ? b.videoHeight : null !== c.getAttribute("height") ? c.getAttribute("height") : b.defaultVideoHeight, h = mejs.Utility.encodeUrl(h), i = mejs.Utility.encodeUrl(i)) : b.enablePluginDebug && (h = 320, i = 240), k.success = b.success, mejs.MediaPluginBridge.registerPluginElement(j, k, c), l.className = "me-plugin", l.id = j + "_container", a.isVideo ? c.parentNode.insertBefore(l, c) : document.body.insertBefore(l, document.body.childNodes[0]), d = ["id=" + j, "isvideo=" + (a.isVideo ? "true" : "false"), "autoplay=" + (d ? "true" : "false"), "preload=" + e, "width=" + h, "startvolume=" + b.startVolume, "timerrate=" + b.timerRate, "flashstreamer=" + b.flashStreamer, "height=" + i, "pseudostreamstart=" + b.pseudoStreamingStartQueryParam], null !== a.url && ("flash" == a.method ? d.push("file=" + mejs.Utility.encodeUrl(a.url)) : d.push("file=" + a.url)), b.enablePluginDebug && d.push("debug=true"), b.enablePluginSmoothing && d.push("smoothing=true"), b.enablePseudoStreaming && d.push("pseudostreaming=true"), f && d.push("controls=true"), b.pluginVars && (d = d.concat(b.pluginVars)), a.method) {
- case"silverlight":
- l.innerHTML = '<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="' + j + '" name="' + j + '" width="' + h + '" height="' + i + '" class="mejs-shim"><param name="initParams" value="' + d.join(",") + '" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="' + b.pluginPath + b.silverlightName + '" /></object>';
- break;
- case"flash":
- mejs.MediaFeatures.isIE ? (a = document.createElement("div"), l.appendChild(a), a.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="' + j + '" width="' + h + '" height="' + i + '" class="mejs-shim"><param name="movie" value="' + b.pluginPath + b.flashName + "?x=" + new Date + '" /><param name="flashvars" value="' + d.join("&") + '" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>') : l.innerHTML = '<embed id="' + j + '" name="' + j + '" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="' + b.pluginPath + b.flashName + '" flashvars="' + d.join("&") + '" width="' + h + '" height="' + i + '" class="mejs-shim"></embed>';
- break;
- case"youtube":
- b = a.url.substr(a.url.lastIndexOf("=") + 1), youtubeSettings = {
- container: l,
- containerId: l.id,
- pluginMediaElement: k,
- pluginId: j,
- videoId: b,
- height: i,
- width: h
- }, mejs.PluginDetector.hasPluginVersion("flash", [10, 0, 0]) ? mejs.YouTubeApi.createFlash(youtubeSettings) : mejs.YouTubeApi.enqueueIframe(youtubeSettings);
- break;
- case"vimeo":
- k.vimeoid = a.url.substr(a.url.lastIndexOf("/") + 1), l.innerHTML = '<iframe src="http://player.vimeo.com/video/' + k.vimeoid + '?portrait=0&byline=0&title=0" width="' + h + '" height="' + i + '" frameborder="0" class="mejs-shim"></iframe>'
- }
- return c.style.display = "none", c.removeAttribute("autoplay"), k
- }, updateNative: function (a, b) {
- var c, d = a.htmlMediaElement;
- for (c in mejs.HtmlMediaElement)d[c] = mejs.HtmlMediaElement[c];
- return b.success(d, d), d
- }
- }, mejs.YouTubeApi = {
- isIframeStarted: !1, isIframeLoaded: !1, loadIframeApi: function () {
- if (!this.isIframeStarted) {
- var a = document.createElement("script");
- a.src = "//www.youtube.com/player_api";
- var b = document.getElementsByTagName("script")[0];
- b.parentNode.insertBefore(a, b), this.isIframeStarted = !0
- }
- }, iframeQueue: [], enqueueIframe: function (a) {
- this.isLoaded ? this.createIframe(a) : (this.loadIframeApi(), this.iframeQueue.push(a))
- }, createIframe: function (a) {
- var b = a.pluginMediaElement, c = new YT.Player(a.containerId, {
- height: a.height,
- width: a.width,
- videoId: a.videoId,
- playerVars: {controls: 0},
- events: {
- onReady: function () {
- a.pluginMediaElement.pluginApi = c, mejs.MediaPluginBridge.initPlugin(a.pluginId), setInterval(function () {
- mejs.YouTubeApi.createEvent(c, b, "timeupdate")
- }, 250)
- }, onStateChange: function (a) {
- mejs.YouTubeApi.handleStateChange(a.data, c, b)
- }
- }
- })
- }, createEvent: function (a, b, c) {
- if (c = {type: c, target: b}, a && a.getDuration) {
- b.currentTime = c.currentTime = a.getCurrentTime(), b.duration = c.duration = a.getDuration(), c.paused = b.paused, c.ended = b.ended, c.muted = a.isMuted(), c.volume = a.getVolume() / 100, c.bytesTotal = a.getVideoBytesTotal(), c.bufferedBytes = a.getVideoBytesLoaded();
- var d = c.bufferedBytes / c.bytesTotal * c.duration;
- c.target.buffered = c.buffered = {
- start: function () {
- return 0
- }, end: function () {
- return d
- }, length: 1
- }
- }
- b.dispatchEvent(c.type, c)
- }, iFrameReady: function () {
- for (this.isIframeLoaded = this.isLoaded = !0; this.iframeQueue.length > 0;)this.createIframe(this.iframeQueue.pop())
- }, flashPlayers: {}, createFlash: function (a) {
- this.flashPlayers[a.pluginId] = a;
- var b, c = "//www.youtube.com/apiplayer?enablejsapi=1&playerapiid=" + a.pluginId + "&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";
- mejs.MediaFeatures.isIE ? (b = document.createElement("div"), a.container.appendChild(b), b.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="' + a.pluginId + '" width="' + a.width + '" height="' + a.height + '" class="mejs-shim"><param name="movie" value="' + c + '" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>') : a.container.innerHTML = '<object type="application/x-shockwave-flash" id="' + a.pluginId + '" data="' + c + '" width="' + a.width + '" height="' + a.height + '" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>'
- }, flashReady: function (a) {
- var b = this.flashPlayers[a], c = document.getElementById(a), d = b.pluginMediaElement;
- d.pluginApi = d.pluginElement = c, mejs.MediaPluginBridge.initPlugin(a), c.cueVideoById(b.videoId), a = b.containerId + "_callback", window[a] = function (a) {
- mejs.YouTubeApi.handleStateChange(a, c, d)
- }, c.addEventListener("onStateChange", a), setInterval(function () {
- mejs.YouTubeApi.createEvent(c, d, "timeupdate")
- }, 250)
- }, handleStateChange: function (a, b, c) {
- switch (a) {
- case-1:
- c.paused = !0, c.ended = !0, mejs.YouTubeApi.createEvent(b, c, "loadedmetadata");
- break;
- case 0:
- c.paused = !1, c.ended = !0, mejs.YouTubeApi.createEvent(b, c, "ended");
- break;
- case 1:
- c.paused = !1, c.ended = !1, mejs.YouTubeApi.createEvent(b, c, "play"), mejs.YouTubeApi.createEvent(b, c, "playing");
- break;
- case 2:
- c.paused = !0, c.ended = !1, mejs.YouTubeApi.createEvent(b, c, "pause");
- break;
- case 3:
- mejs.YouTubeApi.createEvent(b, c, "progress")
- }
- }
- }, window.mejs = mejs, window.MediaElement = mejs.MediaElement, function (a, b) {
- var c = {locale: {language: "", strings: {}}, methods: {}};
- c.locale.getLanguage = function () {
- return c.locale.language || navigator.language
- }, "undefined" != typeof mejsL10n && (c.locale.language = mejsL10n.language), c.locale.INIT_LANGUAGE = c.locale.getLanguage(), c.methods.checkPlain = function (a) {
- var b, c, d = {"&": "&", '"': """, "<": "<", ">": ">"};
- a = String(a);
- for (b in d)d.hasOwnProperty(b) && (c = RegExp(b, "g"), a = a.replace(c, d[b]));
- return a
- }, c.methods.formatString = function (a, b) {
- for (var d in b) {
- switch (d.charAt(0)) {
- case"@":
- b[d] = c.methods.checkPlain(b[d]);
- break;
- case"!":
- break;
- default:
- b[d] = '<em class="placeholder">' + c.methods.checkPlain(b[d]) + "</em>"
- }
- a = a.replace(d, b[d])
- }
- return a
- }, c.methods.t = function (a, b, d) {
- return c.locale.strings && c.locale.strings[d.context] && c.locale.strings[d.context][a] && (a = c.locale.strings[d.context][a]), b && (a = c.methods.formatString(a, b)), a
- }, c.t = function (a, b, d) {
- if ("string" == typeof a && a.length > 0) {
- var e = c.locale.getLanguage();
- return d = d || {context: e}, c.methods.t(a, b, d)
- }
- throw{name: "InvalidArgumentException", message: "First argument is either not a string or empty."}
- }, b.i18n = c
- }(document, mejs), function (a) {
- "undefined" != typeof mejsL10n && (a[mejsL10n.language] = mejsL10n.strings)
- }(mejs.i18n.locale.strings), function (a) {
- a.de = {
- Fullscreen: "Vollbild",
- "Go Fullscreen": "Vollbild an",
- "Turn off Fullscreen": "Vollbild aus",
- Close: "Schließen"
- }
- }(mejs.i18n.locale.strings), function (a) {
- a.zh = {Fullscreen: "全螢幕", "Go Fullscreen": "全屏模式", "Turn off Fullscreen": "退出全屏模式", Close: "關閉"}
- }(mejs.i18n.locale.strings), "undefined" != typeof jQuery ? mejs.$ = jQuery : "undefined" != typeof ender && (mejs.$ = ender), function (a) {
- mejs.MepDefaults = {
- poster: "",
- showPosterWhenEnded: !1,
- defaultVideoWidth: 480,
- defaultVideoHeight: 270,
- videoWidth: -1,
- videoHeight: -1,
- defaultAudioWidth: 400,
- defaultAudioHeight: 30,
- defaultSeekBackwardInterval: function (a) {
- return .05 * a.duration
- },
- defaultSeekForwardInterval: function (a) {
- return .05 * a.duration
- },
- audioWidth: -1,
- audioHeight: -1,
- startVolume: .8,
- loop: !1,
- autoRewind: !0,
- enableAutosize: !0,
- alwaysShowHours: !1,
- showTimecodeFrameCount: !1,
- framesPerSecond: 25,
- autosizeProgress: !0,
- alwaysShowControls: !1,
- hideVideoControlsOnLoad: !1,
- clickToPlayPause: !0,
- iPadUseNativeControls: !1,
- iPhoneUseNativeControls: !1,
- AndroidUseNativeControls: !1,
- features: ["playpause", "current", "progress", "duration", "tracks", "volume", "fullscreen"],
- isVideo: !0,
- enableKeyboard: !0,
- pauseOtherPlayers: !0,
- keyActions: [{
- keys: [32, 179], action: function (a, b) {
- b.paused || b.ended ? b.play() : b.pause()
- }
- }, {
- keys: [38], action: function (a, b) {
- b.setVolume(Math.min(b.volume + .1, 1))
- }
- }, {
- keys: [40], action: function (a, b) {
- b.setVolume(Math.max(b.volume - .1, 0))
- }
- }, {
- keys: [37, 227], action: function (a, b) {
- if (!isNaN(b.duration) && b.duration > 0) {
- a.isVideo && (a.showControls(), a.startControlsTimer());
- var c = Math.max(b.currentTime - a.options.defaultSeekBackwardInterval(b), 0);
- b.setCurrentTime(c)
- }
- }
- }, {
- keys: [39, 228], action: function (a, b) {
- if (!isNaN(b.duration) && b.duration > 0) {
- a.isVideo && (a.showControls(), a.startControlsTimer());
- var c = Math.min(b.currentTime + a.options.defaultSeekForwardInterval(b), b.duration);
- b.setCurrentTime(c)
- }
- }
- }, {
- keys: [70], action: function (a) {
- "undefined" != typeof a.enterFullScreen && (a.isFullScreen ? a.exitFullScreen() : a.enterFullScreen())
- }
- }]
- }, mejs.mepIndex = 0, mejs.players = {}, mejs.MediaElementPlayer = function (b, c) {
- return this instanceof mejs.MediaElementPlayer ? (this.$media = this.$node = a(b), this.node = this.media = this.$media[0], "undefined" != typeof this.node.player ? this.node.player : (this.node.player = this, "undefined" == typeof c && (c = this.$node.data("mejsoptions")), this.options = a.extend({}, mejs.MepDefaults, c), this.id = "mep_" + mejs.mepIndex++, mejs.players[this.id] = this, this.init(), this)) : new mejs.MediaElementPlayer(b, c)
- }, mejs.MediaElementPlayer.prototype = {
- hasFocus: !1, controlsAreVisible: !0, init: function () {
- var b = this, c = mejs.MediaFeatures, d = a.extend(!0, {}, b.options, {
- success: function (a, c) {
- b.meReady(a, c)
- }, error: function (a) {
- b.handleError(a)
- }
- }), e = b.media.tagName.toLowerCase();
- b.isDynamic = "audio" !== e && "video" !== e, b.isVideo = b.isDynamic ? b.options.isVideo : "audio" !== e && b.options.isVideo, c.isiPad && b.options.iPadUseNativeControls || c.isiPhone && b.options.iPhoneUseNativeControls ? (b.$media.attr("controls", "controls"), c.isiPad && null !== b.media.getAttribute("autoplay") && (b.media.load(), b.media.play())) : c.isAndroid && b.options.AndroidUseNativeControls || (b.$media.removeAttr("controls"), b.container = a('<div id="' + b.id + '" class="mejs-container ' + (mejs.MediaFeatures.svg ? "svg" : "no-svg") + '"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(b.$media[0].className).insertBefore(b.$media), b.container.addClass((c.isAndroid ? "mejs-android " : "") + (c.isiOS ? "mejs-ios " : "") + (c.isiPad ? "mejs-ipad " : "") + (c.isiPhone ? "mejs-iphone " : "") + (b.isVideo ? "mejs-video " : "mejs-audio ")), c.isiOS ? (c = b.$media.clone(), b.container.find(".mejs-mediaelement").append(c), b.$media.remove(), b.$node = b.$media = c, b.node = b.media = c[0]) : b.container.find(".mejs-mediaelement").append(b.$media), b.controls = b.container.find(".mejs-controls"), b.layers = b.container.find(".mejs-layers"), c = b.isVideo ? "video" : "audio", e = c.substring(0, 1).toUpperCase() + c.substring(1), b.width = b.options[c + "Width"] > 0 || b.options[c + "Width"].toString().indexOf("%") > -1 ? b.options[c + "Width"] : "" !== b.media.style.width && null !== b.media.style.width ? b.media.style.width : null !== b.media.getAttribute("width") ? b.$media.attr("width") : b.options["default" + e + "Width"], b.height = b.options[c + "Height"] > 0 || b.options[c + "Height"].toString().indexOf("%") > -1 ? b.options[c + "Height"] : "" !== b.media.style.height && null !== b.media.style.height ? b.media.style.height : null !== b.$media[0].getAttribute("height") ? b.$media.attr("height") : b.options["default" + e + "Height"], b.setPlayerSize(b.width, b.height), d.pluginWidth = b.width, d.pluginHeight = b.height), mejs.MediaElement(b.$media[0], d), "undefined" != typeof b.container && b.controlsAreVisible && b.container.trigger("controlsshown")
- }, showControls: function (a) {
- var b = this;
- a = "undefined" == typeof a || a, b.controlsAreVisible || (a ? (b.controls.css("visibility", "visible").stop(!0, !0).fadeIn(200, function () {
- b.controlsAreVisible = !0, b.container.trigger("controlsshown")
- }), b.container.find(".mejs-control").css("visibility", "visible").stop(!0, !0).fadeIn(200, function () {
- b.controlsAreVisible = !0
- })) : (b.controls.css("visibility", "visible").css("display", "block"), b.container.find(".mejs-control").css("visibility", "visible").css("display", "block"), b.controlsAreVisible = !0, b.container.trigger("controlsshown")), b.setControlsSize())
- }, hideControls: function (b) {
- var c = this;
- b = "undefined" == typeof b || b, c.controlsAreVisible && !c.options.alwaysShowControls && (b ? (c.controls.stop(!0, !0).fadeOut(200, function () {
- a(this).css("visibility", "hidden").css("display", "block"), c.controlsAreVisible = !1, c.container.trigger("controlshidden")
- }), c.container.find(".mejs-control").stop(!0, !0).fadeOut(200, function () {
- a(this).css("visibility", "hidden").css("display", "block")
- })) : (c.controls.css("visibility", "hidden").css("display", "block"), c.container.find(".mejs-control").css("visibility", "hidden").css("display", "block"), c.controlsAreVisible = !1, c.container.trigger("controlshidden")))
- }, controlsTimer: null, startControlsTimer: function (a) {
- var b = this;
- a = "undefined" != typeof a ? a : 1500, b.killControlsTimer("start"), b.controlsTimer = setTimeout(function () {
- b.hideControls(), b.killControlsTimer("hide")
- }, a)
- }, killControlsTimer: function () {
- null !== this.controlsTimer && (clearTimeout(this.controlsTimer), delete this.controlsTimer, this.controlsTimer = null)
- }, controlsEnabled: !0, disableControls: function () {
- this.killControlsTimer(), this.hideControls(!1), this.controlsEnabled = !1
- }, enableControls: function () {
- this.showControls(!1), this.controlsEnabled = !0
- }, meReady: function (a, b) {
- var c = this, d = mejs.MediaFeatures, e = b.getAttribute("autoplay");
- e = !("undefined" == typeof e || null === e || "false" === e);
- var f;
- if (!c.created) {
- if (c.created = !0, c.media = a, c.domNode = b, !(d.isAndroid && c.options.AndroidUseNativeControls || d.isiPad && c.options.iPadUseNativeControls || d.isiPhone && c.options.iPhoneUseNativeControls)) {
- c.buildposter(c, c.controls, c.layers, c.media), c.buildkeyboard(c, c.controls, c.layers, c.media), c.buildoverlays(c, c.controls, c.layers, c.media), c.findTracks();
- for (f in c.options.features)if (d = c.options.features[f], c["build" + d])try {
- c["build" + d](c, c.controls, c.layers, c.media)
- } catch (g) {
- }
- c.container.trigger("controlsready"), c.setPlayerSize(c.width, c.height), c.setControlsSize(), c.isVideo && (mejs.MediaFeatures.hasTouch ? c.$media.bind("touchstart", function () {
- c.controlsAreVisible ? c.hideControls(!1) : c.controlsEnabled && c.showControls(!1)
- }) : (mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback = function () {
- c.options.clickToPlayPause && (c.media.paused ? c.media.play() : c.media.pause())
- }, c.media.addEventListener("click", c.clickToPlayPauseCallback, !1), c.container.bind("mouseenter mouseover", function () {
- c.controlsEnabled && (c.options.alwaysShowControls || (c.killControlsTimer("enter"), c.showControls(), c.startControlsTimer(2500)))
- }).bind("mousemove", function () {
- c.controlsEnabled && (c.controlsAreVisible || c.showControls(), c.options.alwaysShowControls || c.startControlsTimer(2500))
- }).bind("mouseleave", function () {
- c.controlsEnabled && !c.media.paused && !c.options.alwaysShowControls && c.startControlsTimer(1e3)
- })), c.options.hideVideoControlsOnLoad && c.hideControls(!1), e && !c.options.alwaysShowControls && c.hideControls(), c.options.enableAutosize && c.media.addEventListener("loadedmetadata", function (a) {
- c.options.videoHeight <= 0 && null === c.domNode.getAttribute("height") && !isNaN(a.target.videoHeight) && (c.setPlayerSize(a.target.videoWidth, a.target.videoHeight), c.setControlsSize(), c.media.setVideoSize(a.target.videoWidth, a.target.videoHeight))
- }, !1)), a.addEventListener("play", function () {
- for (var a in mejs.players) {
- var b = mejs.players[a];
- b.id != c.id && c.options.pauseOtherPlayers && !b.paused && !b.ended && b.pause(), b.hasFocus = !1
- }
- c.hasFocus = !0
- }, !1), c.media.addEventListener("ended", function () {
- if (c.options.autoRewind)try {
- c.media.setCurrentTime(0)
- } catch (a) {
- }
- c.media.pause(), c.setProgressRail && c.setProgressRail(), c.setCurrentRail && c.setCurrentRail(), c.options.loop ? c.media.play() : !c.options.alwaysShowControls && c.controlsEnabled && c.showControls()
- }, !1), c.media.addEventListener("loadedmetadata", function () {
- c.updateDuration && c.updateDuration(), c.updateCurrent && c.updateCurrent(), c.isFullScreen || (c.setPlayerSize(c.width, c.height), c.setControlsSize())
- }, !1), setTimeout(function () {
- c.setPlayerSize(c.width, c.height), c.setControlsSize()
- }, 50), c.globalBind("resize", function () {
- c.isFullScreen || mejs.MediaFeatures.hasTrueNativeFullScreen && document.webkitIsFullScreen || c.setPlayerSize(c.width, c.height), c.setControlsSize()
- }), "youtube" == c.media.pluginType && c.container.find(".mejs-overlay-play").hide()
- }
- e && "native" == a.pluginType && (a.load(), a.play()), c.options.success && ("string" == typeof c.options.success ? window[c.options.success](c.media, c.domNode, c) : c.options.success(c.media, c.domNode, c))
- }
- }, handleError: function (a) {
- this.controls.hide(), this.options.error && this.options.error(a)
- }, setPlayerSize: function (b, c) {
- if ("undefined" != typeof b && (this.width = b), "undefined" != typeof c && (this.height = c), this.height.toString().indexOf("%") > 0 || "100%" === this.$node.css("max-width") || parseInt(this.$node.css("max-width").replace(/px/, ""), 10) / this.$node.offsetParent().width() === 1 || this.$node[0].currentStyle && "100%" === this.$node[0].currentStyle.maxWidth) {
- var d = this.isVideo ? this.media.videoWidth && this.media.videoWidth > 0 ? this.media.videoWidth : this.options.defaultVideoWidth : this.options.defaultAudioWidth, e = this.isVideo ? this.media.videoHeight && this.media.videoHeight > 0 ? this.media.videoHeight : this.options.defaultVideoHeight : this.options.defaultAudioHeight, f = this.container.parent().closest(":visible").width();
- d = this.isVideo || !this.options.autosizeProgress ? parseInt(f * e / d, 10) : e, "body" === this.container.parent()[0].tagName.toLowerCase() && (f = a(window).width(), d = a(window).height()), 0 != d && 0 != f && (this.container.width(f).height(d), this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%"), this.isVideo && this.media.setVideoSize && this.media.setVideoSize(f, d), this.layers.children(".mejs-layer").width("100%").height("100%"))
- } else this.container.width(this.width).height(this.height), this.layers.children(".mejs-layer").width(this.width).height(this.height);
- f = this.layers.find(".mejs-overlay-play"), d = f.find(".mejs-overlay-button"), f.height(this.container.height() - this.controls.height()), d.css("margin-top", "-" + (d.height() / 2 - this.controls.height() / 2).toString() + "px")
- }, setControlsSize: function () {
- var b = 0, c = 0, d = this.controls.find(".mejs-time-rail"), e = this.controls.find(".mejs-time-total");
- this.controls.find(".mejs-time-current"), this.controls.find(".mejs-time-loaded");
- var f = d.siblings();
- this.options && !this.options.autosizeProgress && (c = parseInt(d.css("width"))), 0 !== c && c || (f.each(function () {
- var c = a(this);
- "absolute" != c.css("position") && c.is(":visible") && (b += a(this).outerWidth(!0))
- }), c = this.controls.width() - b - (d.outerWidth(!0) - d.width())), d.width(c), e.width(c - (e.outerWidth(!0) - e.width())), this.setProgressRail && this.setProgressRail(), this.setCurrentRail && this.setCurrentRail()
- }, buildposter: function (b, c, d, e) {
- var f = a('<div class="mejs-poster mejs-layer"></div>').appendTo(d);
- c = b.$media.attr("poster"), "" !== b.options.poster && (c = b.options.poster), "" !== c && null != c ? this.setPoster(c) : f.hide(), e.addEventListener("play", function () {
- f.hide()
- }, !1), b.options.showPosterWhenEnded && b.options.autoRewind && e.addEventListener("ended", function () {
- f.show()
- }, !1)
- }, setPoster: function (b) {
- var c = this.container.find(".mejs-poster"), d = c.find("img");
- 0 == d.length && (d = a('<img width="100%" height="100%" />').appendTo(c)), d.attr("src", b), c.css({"background-image": "url(" + b + ")"})
- }, buildoverlays: function (b, c, d, e) {
- var f = this;
- if (b.isVideo) {
- var g = a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(d), h = a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(d), i = a('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(d).click(function () {
- f.options.clickToPlayPause && (e.paused ? e.play() : e.pause())
- });
- e.addEventListener("play", function () {
- i.hide(), g.hide(), c.find(".mejs-time-buffering").hide(), h.hide()
- }, !1), e.addEventListener("playing", function () {
- i.hide(), g.hide(), c.find(".mejs-time-buffering").hide(), h.hide()
- }, !1), e.addEventListener("seeking", function () {
- g.show(), c.find(".mejs-time-buffering").show()
- }, !1), e.addEventListener("seeked", function () {
- g.hide(), c.find(".mejs-time-buffering").hide()
- }, !1), e.addEventListener("pause", function () {
- mejs.MediaFeatures.isiPhone || i.show()
- }, !1), e.addEventListener("waiting", function () {
- g.show(), c.find(".mejs-time-buffering").show()
- }, !1), e.addEventListener("loadeddata", function () {
- g.show(), c.find(".mejs-time-buffering").show()
- }, !1), e.addEventListener("canplay", function () {
- g.hide(), c.find(".mejs-time-buffering").hide()
- }, !1), e.addEventListener("error", function () {
- g.hide(), c.find(".mejs-time-buffering").hide(), h.show(), h.find("mejs-overlay-error").html("Error loading this resource")
- }, !1)
- }
- }, buildkeyboard: function (b, c, d, e) {
- this.globalBind("keydown", function (a) {
- if (b.hasFocus && b.options.enableKeyboard)for (var c = 0, d = b.options.keyActions.length; d > c; c++)for (var f = b.options.keyActions[c], g = 0, h = f.keys.length; h > g; g++)if (a.keyCode == f.keys[g])return a.preventDefault(), f.action(b, e, a.keyCode), !1;
- return !0
- }), this.globalBind("click", function (c) {
- 0 == a(c.target).closest(".mejs-container").length && (b.hasFocus = !1)
- })
- }, findTracks: function () {
- var b = this, c = b.$media.find("track");
- b.tracks = [], c.each(function (c, d) {
- d = a(d), b.tracks.push({
- srclang: d.attr("srclang") ? d.attr("srclang").toLowerCase() : "",
- src: d.attr("src"),
- kind: d.attr("kind"),
- label: d.attr("label") || "",
- entries: [],
- isLoaded: !1
- })
- })
- }, changeSkin: function (a) {
- this.container[0].className = "mejs-container " + a, this.setPlayerSize(this.width, this.height), this.setControlsSize()
- }, play: function () {
- this.media.play()
- }, pause: function () {
- try {
- this.media.pause()
- } catch (a) {
- }
- }, load: function () {
- this.media.load()
- }, setMuted: function (a) {
- this.media.setMuted(a)
- }, setCurrentTime: function (a) {
- this.media.setCurrentTime(a)
- }, getCurrentTime: function () {
- return this.media.currentTime
- }, setVolume: function (a) {
- this.media.setVolume(a)
- }, getVolume: function () {
- return this.media.volume
- }, setSrc: function (a) {
- this.media.setSrc(a)
- }, remove: function () {
- var a, b;
- for (a in this.options.features)if (b = this.options.features[a], this["clean" + b])try {
- this["clean" + b](this)
- } catch (c) {
- }
- this.isDynamic ? this.$node.insertBefore(this.container) : (this.$media.prop("controls", !0), this.$node.clone().show().insertBefore(this.container), this.$node.remove()), "native" !== this.media.pluginType && this.media.remove(), delete mejs.players[this.id], this.container.remove(), this.globalUnbind(), delete this.node.player
- }
- }, function () {
- function b(b, d) {
- var e = {d: [], w: []};
- return a.each((b || "").split(" "), function (a, b) {
- var f = b + "." + d;
- 0 === f.indexOf(".") ? (e.d.push(f), e.w.push(f)) : e[c.test(b) ? "w" : "d"].push(f)
- }), e.d = e.d.join(" "), e.w = e.w.join(" "), e
- }
- var c = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;
- mejs.MediaElementPlayer.prototype.globalBind = function (c, d, e) {
- c = b(c, this.id), c.d && a(document).bind(c.d, d, e), c.w && a(window).bind(c.w, d, e)
- }, mejs.MediaElementPlayer.prototype.globalUnbind = function (c, d) {
- c = b(c, this.id), c.d && a(document).unbind(c.d, d), c.w && a(window).unbind(c.w, d)
- }
- }(), "undefined" != typeof jQuery && (jQuery.fn.mediaelementplayer = function (a) {
- return a === !1 ? this.each(function () {
- var a = jQuery(this).data("mediaelementplayer");
- a && a.remove(), jQuery(this).removeData("mediaelementplayer")
- }) : this.each(function () {
- jQuery(this).data("mediaelementplayer", new mejs.MediaElementPlayer(this, a))
- }), this
- }), a(document).ready(function () {
- a(".mejs-player").mediaelementplayer()
- }), window.MediaElementPlayer = mejs.MediaElementPlayer
- }(mejs.$), function (a) {
- a.extend(mejs.MepDefaults, {playpauseText: mejs.i18n.t("Play/Pause")}), a.extend(MediaElementPlayer.prototype, {
- buildplaypause: function (b, c, d, e) {
- var f = a('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="' + this.id + '" title="' + this.options.playpauseText + '" aria-label="' + this.options.playpauseText + '"></button></div>').appendTo(c).click(function (a) {
- return a.preventDefault(), e.paused ? e.play() : e.pause(), !1
- });
- e.addEventListener("play", function () {
- f.removeClass("mejs-play").addClass("mejs-pause")
- }, !1), e.addEventListener("playing", function () {
- f.removeClass("mejs-play").addClass("mejs-pause")
- }, !1), e.addEventListener("pause", function () {
- f.removeClass("mejs-pause").addClass("mejs-play")
- }, !1), e.addEventListener("paused", function () {
- f.removeClass("mejs-pause").addClass("mejs-play")
- }, !1)
- }
- })
- }(mejs.$), function (a) {
- a.extend(mejs.MepDefaults, {stopText: "Stop"}), a.extend(MediaElementPlayer.prototype, {
- buildstop: function (b, c, d, e) {
- a('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="' + this.id + '" title="' + this.options.stopText + '" aria-label="' + this.options.stopText + '"></button></div>').appendTo(c).click(function () {
- e.paused || e.pause(), e.currentTime > 0 && (e.setCurrentTime(0), e.pause(), c.find(".mejs-time-current").width("0px"), c.find(".mejs-time-handle").css("left", "0px"), c.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0)), c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0)), d.find(".mejs-poster").show())
- })
- }
- })
- }(mejs.$), function (a) {
- a.extend(MediaElementPlayer.prototype, {
- buildprogress: function (b, c, d, e) {
- a('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(c), c.find(".mejs-time-buffering").hide();
- var f = this, g = c.find(".mejs-time-total");
- d = c.find(".mejs-time-loaded");
- var h = c.find(".mejs-time-current"), i = c.find(".mejs-time-handle"), j = c.find(".mejs-time-float"), k = c.find(".mejs-time-float-current"), l = function (a) {
- a = a.pageX;
- var b = g.offset(), c = g.outerWidth(!0), d = 0, f = d = 0;
- e.duration && (a < b.left ? a = b.left : a > c + b.left && (a = c + b.left), f = a - b.left, d = f / c, d = .02 >= d ? 0 : d * e.duration, m && d !== e.currentTime && e.setCurrentTime(d), mejs.MediaFeatures.hasTouch || (j.css("left", f), k.html(mejs.Utility.secondsToTimeCode(d)), j.show()))
- }, m = !1;
- g.bind("mousedown", function (a) {
- return 1 === a.which ? (m = !0, l(a), f.globalBind("mousemove.dur", function (a) {
- l(a)
- }), f.globalBind("mouseup.dur", function () {
- m = !1, j.hide(), f.globalUnbind(".dur")
- }), !1) : void 0
- }).bind("mouseenter", function () {
- f.globalBind("mousemove.dur", function (a) {
- l(a)
- }), mejs.MediaFeatures.hasTouch || j.show()
- }).bind("mouseleave", function () {
- m || (f.globalUnbind(".dur"), j.hide())
- }), e.addEventListener("progress", function (a) {
- b.setProgressRail(a), b.setCurrentRail(a)
- }, !1), e.addEventListener("timeupdate", function (a) {
- b.setProgressRail(a), b.setCurrentRail(a)
- }, !1), f.loaded = d, f.total = g, f.current = h, f.handle = i
- }, setProgressRail: function (a) {
- var b = void 0 != a ? a.target : this.media, c = null;
- b && b.buffered && b.buffered.length > 0 && b.buffered.end && b.duration ? c = b.buffered.end(0) / b.duration : b && void 0 != b.bytesTotal && b.bytesTotal > 0 && void 0 != b.bufferedBytes ? c = b.bufferedBytes / b.bytesTotal : a && a.lengthComputable && 0 != a.total && (c = a.loaded / a.total), null !== c && (c = Math.min(1, Math.max(0, c)), this.loaded && this.total && this.loaded.width(this.total.width() * c))
- }, setCurrentRail: function () {
- if (void 0 != this.media.currentTime && this.media.duration && this.total && this.handle) {
- var a = Math.round(this.total.width() * this.media.currentTime / this.media.duration), b = a - Math.round(this.handle.outerWidth(!0) / 2);
- this.current.width(a), this.handle.css("left", b)
- }
- }
- })
- }(mejs.$), function (a) {
- a.extend(mejs.MepDefaults, {
- duration: -1,
- timeAndDurationSeparator: "<span> | </span>"
- }), a.extend(MediaElementPlayer.prototype, {
- buildcurrent: function (b, c, d, e) {
- a('<div class="mejs-time"><span class="mejs-currenttime">' + (b.options.alwaysShowHours ? "00:" : "") + (b.options.showTimecodeFrameCount ? "00:00:00" : "00:00") + "</span></div>").appendTo(c), this.currenttime = this.controls.find(".mejs-currenttime"), e.addEventListener("timeupdate", function () {
- b.updateCurrent()
- }, !1)
- }, buildduration: function (b, c, d, e) {
- c.children().last().find(".mejs-currenttime").length > 0 ? a(this.options.timeAndDurationSeparator + '<span class="mejs-duration">' + (this.options.duration > 0 ? mejs.Utility.secondsToTimeCode(this.options.duration, this.options.alwaysShowHours || this.media.duration > 3600, this.options.showTimecodeFrameCount, this.options.framesPerSecond || 25) : (b.options.alwaysShowHours ? "00:" : "") + (b.options.showTimecodeFrameCount ? "00:00:00" : "00:00")) + "</span>").appendTo(c.find(".mejs-time")) : (c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"), a('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">' + (this.options.duration > 0 ? mejs.Utility.secondsToTimeCode(this.options.duration, this.options.alwaysShowHours || this.media.duration > 3600, this.options.showTimecodeFrameCount, this.options.framesPerSecond || 25) : (b.options.alwaysShowHours ? "00:" : "") + (b.options.showTimecodeFrameCount ? "00:00:00" : "00:00")) + "</span></div>").appendTo(c)), this.durationD = this.controls.find(".mejs-duration"), e.addEventListener("timeupdate", function () {
- b.updateDuration()
- }, !1)
- }, updateCurrent: function () {
- this.currenttime && this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime, this.options.alwaysShowHours || this.media.duration > 3600, this.options.showTimecodeFrameCount, this.options.framesPerSecond || 25))
- }, updateDuration: function () {
- this.container.toggleClass("mejs-long-video", this.media.duration > 3600), this.durationD && (this.options.duration > 0 || this.media.duration) && this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration > 0 ? this.options.duration : this.media.duration, this.options.alwaysShowHours, this.options.showTimecodeFrameCount, this.options.framesPerSecond || 25))
- }
- })
- }(mejs.$), function (a) {
- a.extend(mejs.MepDefaults, {
- muteText: mejs.i18n.t("Mute Toggle"),
- hideVolumeOnTouchDevices: !0,
- audioVolume: "horizontal",
- videoVolume: "vertical"
- }), a.extend(MediaElementPlayer.prototype, {
- buildvolume: function (b, c, d, e) {
- if (!mejs.MediaFeatures.hasTouch || !this.options.hideVolumeOnTouchDevices) {
- var f = this, g = f.isVideo ? f.options.videoVolume : f.options.audioVolume, h = "horizontal" == g ? a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="' + f.id + '" title="' + f.options.muteText + '" aria-label="' + f.options.muteText + '"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(c) : a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="' + f.id + '" title="' + f.options.muteText + '" aria-label="' + f.options.muteText + '"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(c), i = f.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"), j = f.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"), k = f.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"), l = f.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"), m = function (a, b) {
- if (i.is(":visible") || "undefined" != typeof b)if (a = Math.max(0, a), a = Math.min(a, 1), 0 == a ? h.removeClass("mejs-mute").addClass("mejs-unmute") : h.removeClass("mejs-unmute").addClass("mejs-mute"), "vertical" == g) {
- var c = j.height(), d = j.position(), e = c - c * a;
- l.css("top", Math.round(d.top + e - l.height() / 2)), k.height(c - e), k.css("top", d.top + e)
- } else c = j.width(), d = j.position(), c *= a, l.css("left", Math.round(d.left + c - l.width() / 2)), k.width(Math.round(c)); else i.show(), m(a, !0), i.hide()
- }, n = function (a) {
- var b = null, c = j.offset();
- if ("vertical" == g) {
- if (b = j.height(), parseInt(j.css("top").replace(/px/, ""), 10), b = (b - (a.pageY - c.top)) / b, 0 == c.top || 0 == c.left)return
- } else b = j.width(), b = (a.pageX - c.left) / b;
- b = Math.max(0, b), b = Math.min(b, 1), m(b), 0 == b ? e.setMuted(!0) : e.setMuted(!1), e.setVolume(b)
- }, o = !1, p = !1;
- h.hover(function () {
- i.show(), p = !0
- }, function () {
- p = !1, !o && "vertical" == g && i.hide()
- }), i.bind("mouseover", function () {
- p = !0
- }).bind("mousedown", function (a) {
- return n(a), f.globalBind("mousemove.vol", function (a) {
- n(a)
- }), f.globalBind("mouseup.vol", function () {
- o = !1, f.globalUnbind(".vol"), !p && "vertical" == g && i.hide()
- }), o = !0, !1
- }), h.find("button").click(function () {
- e.setMuted(!e.muted)
- }), e.addEventListener("volumechange", function () {
- o || (e.muted ? (m(0), h.removeClass("mejs-mute").addClass("mejs-unmute")) : (m(e.volume), h.removeClass("mejs-unmute").addClass("mejs-mute")))
- }, !1), f.container.is(":visible") && (m(b.options.startVolume), 0 === b.options.startVolume && e.setMuted(!0), "native" === e.pluginType && e.setVolume(b.options.startVolume))
- }
- }
- })
- }(mejs.$), function (a) {
- a.extend(mejs.MepDefaults, {
- usePluginFullScreen: !0, newWindowCallback: function () {
- return ""
- }, fullscreenText: mejs.i18n.t("Fullscreen")
- }), a.extend(MediaElementPlayer.prototype, {
- isFullScreen: !1,
- isNativeFullScreen: !1,
- isInIframe: !1,
- buildfullscreen: function (b, c, d, e) {
- if (b.isVideo) {
- b.isInIframe = window.location != window.parent.location, mejs.MediaFeatures.hasTrueNativeFullScreen && (d = function () {
- b.isFullScreen && (mejs.MediaFeatures.isFullScreen() ? (b.isNativeFullScreen = !0, b.setControlsSize()) : (b.isNativeFullScreen = !1, b.exitFullScreen()))
- }, mejs.MediaFeatures.hasMozNativeFullScreen ? b.globalBind(mejs.MediaFeatures.fullScreenEventName, d) : b.container.bind(mejs.MediaFeatures.fullScreenEventName, d));
- var f = this, g = a('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="' + f.id + '" title="' + f.options.fullscreenText + '" aria-label="' + f.options.fullscreenText + '"></button></div>').appendTo(c);
- if ("native" === f.media.pluginType || !f.options.usePluginFullScreen && !mejs.MediaFeatures.isFirefox)g.click(function () {
- mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen() || b.isFullScreen ? b.exitFullScreen() : b.enterFullScreen()
- }); else {
- var h = null;
- if (function () {
- var a = document.createElement("x"), b = document.documentElement, c = window.getComputedStyle;
- return "pointerEvents"in a.style ? (a.style.pointerEvents = "auto", a.style.pointerEvents = "x", b.appendChild(a), c = c && "auto" === c(a, "").pointerEvents, b.removeChild(a), !!c) : !1
- }() && !mejs.MediaFeatures.isOpera) {
- var i = !1, j = function () {
- if (i) {
- for (var a in k)k[a].hide();
- g.css("pointer-events", ""), f.controls.css("pointer-events", ""), f.media.removeEventListener("click", f.clickToPlayPauseCallback), i = !1
- }
- }, k = {};
- c = ["top", "left", "right", "bottom"];
- var l, m = function () {
- var a = g.offset().left - f.container.offset().left, b = g.offset().top - f.container.offset().top, c = g.outerWidth(!0), d = g.outerHeight(!0), e = f.container.width(), h = f.container.height();
- for (l in k)k[l].css({position: "absolute", top: 0, left: 0});
- k.top.width(e).height(b), k.left.width(a).height(d).css({top: b}), k.right.width(e - a - c).height(d).css({
- top: b,
- left: a + c
- }), k.bottom.width(e).height(h - d - b).css({top: b + d})
- };
- for (f.globalBind("resize", function () {
- m()
- }), l = 0, d = c.length; d > l; l++)k[c[l]] = a('<div class="mejs-fullscreen-hover" />').appendTo(f.container).mouseover(j).hide();
- g.on("mouseover", function () {
- if (!f.isFullScreen) {
- var a = g.offset(), c = b.container.offset();
- e.positionFullscreenButton(a.left - c.left, a.top - c.top, !1), g.css("pointer-events", "none"), f.controls.css("pointer-events", "none"), f.media.addEventListener("click", f.clickToPlayPauseCallback);
- for (l in k)k[l].show();
- m(), i = !0
- }
- }), e.addEventListener("fullscreenchange", function () {
- f.isFullScreen = !f.isFullScreen, f.isFullScreen ? f.media.removeEventListener("click", f.clickToPlayPauseCallback) : f.media.addEventListener("click", f.clickToPlayPauseCallback), j()
- }), f.globalBind("mousemove", function (a) {
- if (i) {
- var b = g.offset();
- (a.pageY < b.top || a.pageY > b.top + g.outerHeight(!0) || a.pageX < b.left || a.pageX > b.left + g.outerWidth(!0)) && (g.css("pointer-events", ""), f.controls.css("pointer-events", ""), i = !1)
- }
- })
- } else g.on("mouseover", function () {
- null !== h && (clearTimeout(h), delete h);
- var a = g.offset(), c = b.container.offset();
- e.positionFullscreenButton(a.left - c.left, a.top - c.top, !0)
- }).on("mouseout", function () {
- null !== h && (clearTimeout(h), delete h), h = setTimeout(function () {
- e.hideFullscreenButton()
- }, 1500)
- })
- }
- b.fullscreenBtn = g, f.globalBind("keydown", function (a) {
- (mejs.MediaFeatures.hasTrueNativeFullScreen && mejs.MediaFeatures.isFullScreen() || f.isFullScreen) && 27 == a.keyCode && b.exitFullScreen()
- })
- }
- },
- cleanfullscreen: function (a) {
- a.exitFullScreen()
- },
- containerSizeTimeout: null,
- enterFullScreen: function () {
- var b = this;
- if ("native" === b.media.pluginType || !mejs.MediaFeatures.isFirefox && !b.options.usePluginFullScreen) {
- if (a(document.documentElement).addClass("mejs-fullscreen"), normalHeight = b.container.height(), normalWidth = b.container.width(), "native" === b.media.pluginType)if (mejs.MediaFeatures.hasTrueNativeFullScreen)mejs.MediaFeatures.requestFullScreen(b.container[0]), b.isInIframe && setTimeout(function d() {
- b.isNativeFullScreen && (a(window).width() !== screen.width ? b.exitFullScreen() : setTimeout(d, 500))
- }, 500); else if (mejs.MediaFeatures.hasSemiNativeFullScreen)return b.media.webkitEnterFullscreen(), void 0;
- if (b.isInIframe) {
- var c = b.options.newWindowCallback(this);
- if ("" !== c) {
- if (!mejs.MediaFeatures.hasTrueNativeFullScreen)return b.pause(), window.open(c, b.id, "top=0,left=0,width=" + screen.availWidth + ",height=" + screen.availHeight + ",resizable=yes,scrollbars=no,status=no,toolbar=no"), void 0;
- setTimeout(function () {
- b.isNativeFullScreen || (b.pause(), window.open(c, b.id, "top=0,left=0,width=" + screen.availWidth + ",height=" + screen.availHeight + ",resizable=yes,scrollbars=no,status=no,toolbar=no"))
- }, 250)
- }
- }
- b.container.addClass("mejs-container-fullscreen").width("100%").height("100%"), b.containerSizeTimeout = setTimeout(function () {
- b.container.css({width: "100%", height: "100%"}), b.setControlsSize()
- }, 500), "native" === b.media.pluginType ? b.$media.width("100%").height("100%") : (b.container.find(".mejs-shim").width("100%").height("100%"), b.media.setVideoSize(a(window).width(), a(window).height())), b.layers.children("div").width("100%").height("100%"), b.fullscreenBtn && b.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"), b.setControlsSize(), b.isFullScreen = !0
- }
- },
- exitFullScreen: function () {
- clearTimeout(this.containerSizeTimeout), "native" !== this.media.pluginType && mejs.MediaFeatures.isFirefox ? this.media.setFullscreen(!1) : (mejs.MediaFeatures.hasTrueNativeFullScreen && (mejs.MediaFeatures.isFullScreen() || this.isFullScreen) && mejs.MediaFeatures.cancelFullScreen(), a(document.documentElement).removeClass("mejs-fullscreen"), this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight), "native" === this.media.pluginType ? this.$media.width(normalWidth).height(normalHeight) : (this.container.find(".mejs-shim").width(normalWidth).height(normalHeight), this.media.setVideoSize(normalWidth, normalHeight)), this.layers.children("div").width(normalWidth).height(normalHeight), this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"), this.setControlsSize(), this.isFullScreen = !1)
- }
- })
- }(mejs.$), function (a) {
- a.extend(mejs.MepDefaults, {
- startLanguage: "",
- tracksText: mejs.i18n.t("Captions/Subtitles"),
- hideCaptionsButtonWhenEmpty: !0,
- toggleCaptionsButtonWhenOnlyOne: !1,
- slidesSelector: ""
- }), a.extend(MediaElementPlayer.prototype, {
- hasChapters: !1, buildtracks: function (b, c, d, e) {
- if (0 != b.tracks.length) {
- var f;
- if (this.domNode.textTracks)for (f = this.domNode.textTracks.length - 1; f >= 0; f--)this.domNode.textTracks[f].mode = "hidden";
- for (b.chapters = a('<div class="mejs-chapters mejs-layer"></div>').prependTo(d).hide(), b.captions = a('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>').prependTo(d).hide(), b.captionsText = b.captions.find(".mejs-captions-text"), b.captionsButton = a('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="' + this.id + '" title="' + this.options.tracksText + '" aria-label="' + this.options.tracksText + '"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="' + b.id + '_captions" id="' + b.id + '_captions_none" value="none" checked="checked" /><label for="' + b.id + '_captions_none">' + mejs.i18n.t("None") + "</label></li></ul></div></div>").appendTo(c), f = c = 0; f < b.tracks.length; f++)"subtitles" == b.tracks[f].kind && c++;
- for (this.options.toggleCaptionsButtonWhenOnlyOne && 1 == c ? b.captionsButton.on("click", function () {
- b.setTrack(null == b.selectedTrack ? b.tracks[0].srclang : "none")
- }) : b.captionsButton.hover(function () {
- a(this).find(".mejs-captions-selector").css("visibility", "visible")
- }, function () {
- a(this).find(".mejs-captions-selector").css("visibility", "hidden")
- }).on("click", "input[type=radio]", function () {
- lang = this.value, b.setTrack(lang)
- }), b.options.alwaysShowControls ? b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover") : b.container.bind("controlsshown", function () {
- b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")
- }).bind("controlshidden", function () {
- e.paused || b.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")
- }), b.trackToLoad = -1, b.selectedTrack = null, b.isLoadingTrack = !1, f = 0; f < b.tracks.length; f++)"subtitles" == b.tracks[f].kind && b.addTrackButton(b.tracks[f].srclang, b.tracks[f].label);
- b.loadNextTrack(), e.addEventListener("timeupdate", function () {
- b.displayCaptions()
- }, !1), "" != b.options.slidesSelector && (b.slidesContainer = a(b.options.slidesSelector), e.addEventListener("timeupdate", function () {
- b.displaySlides()
- }, !1)), e.addEventListener("loadedmetadata", function () {
- b.displayChapters()
- }, !1), b.container.hover(function () {
- b.hasChapters && (b.chapters.css("visibility", "visible"), b.chapters.fadeIn(200).height(b.chapters.find(".mejs-chapter").outerHeight()))
- }, function () {
- b.hasChapters && !e.paused && b.chapters.fadeOut(200, function () {
- a(this).css("visibility", "hidden"), a(this).css("display", "block")
- })
- }), null !== b.node.getAttribute("autoplay") && b.chapters.css("visibility", "hidden")
- }
- }, setTrack: function (a) {
- var b;
- if ("none" == a)this.selectedTrack = null, this.captionsButton.removeClass("mejs-captions-enabled"); else for (b = 0; b < this.tracks.length; b++)if (this.tracks[b].srclang == a) {
- null == this.selectedTrack && this.captionsButton.addClass("mejs-captions-enabled"), this.selectedTrack = this.tracks[b], this.captions.attr("lang", this.selectedTrack.srclang), this.displayCaptions();
- break
- }
- }, loadNextTrack: function () {
- this.trackToLoad++, this.trackToLoad < this.tracks.length ? (this.isLoadingTrack = !0, this.loadTrack(this.trackToLoad)) : (this.isLoadingTrack = !1, this.checkForTracks())
- }, loadTrack: function (b) {
- var c = this, d = c.tracks[b];
- a.ajax({
- url: d.src, dataType: "text", success: function (a) {
- d.entries = "string" == typeof a && /<tt\s+xml/gi.exec(a) ? mejs.TrackFormatParser.dfxp.parse(a) : mejs.TrackFormatParser.webvvt.parse(a), d.isLoaded = !0, c.enableTrackButton(d.srclang, d.label), c.loadNextTrack(), "chapters" == d.kind && c.media.addEventListener("play", function () {
- c.media.duration > 0 && c.displayChapters(d)
- }, !1), "slides" == d.kind && c.setupSlides(d)
- }, error: function () {
- c.loadNextTrack()
- }
- })
- }, enableTrackButton: function (b, c) {
- "" === c && (c = mejs.language.codes[b] || b), this.captionsButton.find("input[value=" + b + "]").prop("disabled", !1).siblings("label").html(c), this.options.startLanguage == b && a("#" + this.id + "_captions_" + b).click(), this.adjustLanguageBox()
- }, addTrackButton: function (b, c) {
- "" === c && (c = mejs.language.codes[b] || b), this.captionsButton.find("ul").append(a('<li><input type="radio" name="' + this.id + '_captions" id="' + this.id + "_captions_" + b + '" value="' + b + '" disabled="disabled" /><label for="' + this.id + "_captions_" + b + '">' + c + " (loading)</label></li>")), this.adjustLanguageBox(), this.container.find(".mejs-captions-translations option[value=" + b + "]").remove()
- }, adjustLanguageBox: function () {
- this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(!0) + this.captionsButton.find(".mejs-captions-translations").outerHeight(!0))
- }, checkForTracks: function () {
- var a = !1;
- if (this.options.hideCaptionsButtonWhenEmpty) {
- for (i = 0; i < this.tracks.length; i++)if ("subtitles" == this.tracks[i].kind) {
- a = !0;
- break
- }
- a || (this.captionsButton.hide(), this.setControlsSize())
- }
- }, displayCaptions: function () {
- if ("undefined" != typeof this.tracks) {
- var a, b = this.selectedTrack;
- if (null != b && b.isLoaded)for (a = 0; a < b.entries.times.length; a++)if (this.media.currentTime >= b.entries.times[a].start && this.media.currentTime <= b.entries.times[a].stop)return this.captionsText.html(b.entries.text[a]), this.captions.show().height(0), void 0;
- this.captions.hide()
- }
- }, setupSlides: function (a) {
- this.slides = a, this.slides.entries.imgs = [this.slides.entries.text.length], this.showSlide(0)
- }, showSlide: function (b) {
- if ("undefined" != typeof this.tracks && "undefined" != typeof this.slidesContainer) {
- var c = this, d = c.slides.entries.text[b], e = c.slides.entries.imgs[b];
- "undefined" == typeof e || "undefined" == typeof e.fadeIn ? c.slides.entries.imgs[b] = e = a('<img src="' + d + '">').on("load", function () {
- e.appendTo(c.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()
- }) : !e.is(":visible") && !e.is(":animated") && e.fadeIn().siblings(":visible").fadeOut()
- }
- }, displaySlides: function () {
- if ("undefined" != typeof this.slides) {
- var a, b = this.slides;
- for (a = 0; a < b.entries.times.length; a++)if (this.media.currentTime >= b.entries.times[a].start && this.media.currentTime <= b.entries.times[a].stop) {
- this.showSlide(a);
- break
- }
- }
- }, displayChapters: function () {
- var a;
- for (a = 0; a < this.tracks.length; a++)if ("chapters" == this.tracks[a].kind && this.tracks[a].isLoaded) {
- this.drawChapters(this.tracks[a]), this.hasChapters = !0;
- break
- }
- }, drawChapters: function (b) {
- var c, d, e = this, f = d = 0;
- for (e.chapters.empty(), c = 0; c < b.entries.times.length; c++)d = b.entries.times[c].stop - b.entries.times[c].start, d = Math.floor(d / e.media.duration * 100), (d + f > 100 || c == b.entries.times.length - 1 && 100 > d + f) && (d = 100 - f), e.chapters.append(a('<div class="mejs-chapter" rel="' + b.entries.times[c].start + '" style="left: ' + f.toString() + "%;width: " + d.toString() + '%;"><div class="mejs-chapter-block' + (c == b.entries.times.length - 1 ? " mejs-chapter-block-last" : "") + '"><span class="ch-title">' + b.entries.text[c] + '</span><span class="ch-time">' + mejs.Utility.secondsToTimeCode(b.entries.times[c].start) + "–" + mejs.Utility.secondsToTimeCode(b.entries.times[c].stop) + "</span></div></div>")), f += d;
- e.chapters.find("div.mejs-chapter").click(function () {
- e.media.setCurrentTime(parseFloat(a(this).attr("rel"))), e.media.paused && e.media.play()
- }), e.chapters.show()
- }
- }), mejs.language = {
- codes: {
- af: "Afrikaans",
- sq: "Albanian",
- ar: "Arabic",
- be: "Belarusian",
- bg: "Bulgarian",
- ca: "Catalan",
- zh: "Chinese",
- "zh-cn": "Chinese Simplified",
- "zh-tw": "Chinese Traditional",
- hr: "Croatian",
- cs: "Czech",
- da: "Danish",
- nl: "Dutch",
- en: "English",
- et: "Estonian",
- tl: "Filipino",
- fi: "Finnish",
- fr: "French",
- gl: "Galician",
- de: "German",
- el: "Greek",
- ht: "Haitian Creole",
- iw: "Hebrew",
- hi: "Hindi",
- hu: "Hungarian",
- is: "Icelandic",
- id: "Indonesian",
- ga: "Irish",
- it: "Italian",
- ja: "Japanese",
- ko: "Korean",
- lv: "Latvian",
- lt: "Lithuanian",
- mk: "Macedonian",
- ms: "Malay",
- mt: "Maltese",
- no: "Norwegian",
- fa: "Persian",
- pl: "Polish",
- pt: "Portuguese",
- ro: "Romanian",
- ru: "Russian",
- sr: "Serbian",
- sk: "Slovak",
- sl: "Slovenian",
- es: "Spanish",
- sw: "Swahili",
- sv: "Swedish",
- tl: "Tagalog",
- th: "Thai",
- tr: "Turkish",
- uk: "Ukrainian",
- vi: "Vietnamese",
- cy: "Welsh",
- yi: "Yiddish"
- }
- }, mejs.TrackFormatParser = {
- webvvt: {
- pattern_identifier: /^([a-zA-z]+-)?[0-9]+$/,
- pattern_timecode: /^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
- parse: function (b) {
- var c = 0;
- b = mejs.TrackFormatParser.split2(b, /\r?\n/);
- for (var d, e, f = {
- text: [],
- times: []
- }; c < b.length; c++)if (this.pattern_identifier.exec(b[c]) && (c++, (d = this.pattern_timecode.exec(b[c])) && c < b.length)) {
- for (c++, e = b[c], c++; "" !== b[c] && c < b.length;)e = e + "\n" + b[c], c++;
- e = a.trim(e).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi, "<a href='$1' target='_blank'>$1</a>"), f.text.push(e), f.times.push({
- start: 0 == mejs.Utility.convertSMPTEtoSeconds(d[1]) ? .2 : mejs.Utility.convertSMPTEtoSeconds(d[1]),
- stop: mejs.Utility.convertSMPTEtoSeconds(d[3]),
- settings: d[5]
- })
- }
- return f
- }
- }, dfxp: {
- parse: function (b) {
- b = a(b).filter("tt");
- var c = 0;
- c = b.children("div").eq(0);
- var d = c.find("p");
- c = b.find("#" + c.attr("style"));
- var e, f;
- if (b = {
- text: [],
- times: []
- }, c.length && (f = c.removeAttr("id").get(0).attributes, f.length))for (e = {}, c = 0; c < f.length; c++)e[f[c].name.split(":")[1]] = f[c].value;
- for (c = 0; c < d.length; c++) {
- var g;
- if (f = {
- start: null,
- stop: null,
- style: null
- }, d.eq(c).attr("begin") && (f.start = mejs.Utility.convertSMPTEtoSeconds(d.eq(c).attr("begin"))), !f.start && d.eq(c - 1).attr("end") && (f.start = mejs.Utility.convertSMPTEtoSeconds(d.eq(c - 1).attr("end"))), d.eq(c).attr("end") && (f.stop = mejs.Utility.convertSMPTEtoSeconds(d.eq(c).attr("end"))), !f.stop && d.eq(c + 1).attr("begin") && (f.stop = mejs.Utility.convertSMPTEtoSeconds(d.eq(c + 1).attr("begin"))), e) {
- g = "";
- for (var h in e)g += h + ":" + e[h] + ";"
- }
- g && (f.style = g), 0 == f.start && (f.start = .2), b.times.push(f), f = a.trim(d.eq(c).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi, "<a href='$1' target='_blank'>$1</a>"), b.text.push(f), 0 == b.times.start && (b.times.start = 2)
- }
- return b
- }
- }, split2: function (a, b) {
- return a.split(b)
- }
- }, 3 != "x\n\ny".split(/\n/gi).length && (mejs.TrackFormatParser.split2 = function (a, b) {
- var c, d = [], e = "";
- for (c = 0; c < a.length; c++)e += a.substring(c, c + 1), b.test(e) && (d.push(e.replace(b, "")), e = "");
- return d.push(e), d
- })
- }(mejs.$), function (a) {
- a.extend(mejs.MepDefaults, {
- contextMenuItems: [{
- render: function (a) {
- return "undefined" == typeof a.enterFullScreen ? null : a.isFullScreen ? mejs.i18n.t("Turn off Fullscreen") : mejs.i18n.t("Go Fullscreen")
- }, click: function (a) {
- a.isFullScreen ? a.exitFullScreen() : a.enterFullScreen()
- }
- }, {
- render: function (a) {
- return a.media.muted ? mejs.i18n.t("Unmute") : mejs.i18n.t("Mute")
- }, click: function (a) {
- a.media.muted ? a.setMuted(!1) : a.setMuted(!0)
- }
- }, {isSeparator: !0}, {
- render: function () {
- return mejs.i18n.t("Download Video")
- }, click: function (a) {
- window.location.href = a.media.currentSrc
- }
- }]
- }), a.extend(MediaElementPlayer.prototype, {
- buildcontextmenu: function (b) {
- b.contextMenu = a('<div class="mejs-contextmenu"></div>').appendTo(a("body")).hide(), b.container.bind("contextmenu", function (a) {
- return b.isContextMenuEnabled ? (a.preventDefault(), b.renderContextMenu(a.clientX - 1, a.clientY - 1), !1) : void 0
- }), b.container.bind("click", function () {
- b.contextMenu.hide()
- }), b.contextMenu.bind("mouseleave", function () {
- b.startContextMenuTimer()
- })
- }, cleancontextmenu: function (a) {
- a.contextMenu.remove()
- }, isContextMenuEnabled: !0, enableContextMenu: function () {
- this.isContextMenuEnabled = !0
- }, disableContextMenu: function () {
- this.isContextMenuEnabled = !1
- }, contextMenuTimeout: null, startContextMenuTimer: function () {
- var a = this;
- a.killContextMenuTimer(), a.contextMenuTimer = setTimeout(function () {
- a.hideContextMenu(), a.killContextMenuTimer()
- }, 750)
- }, killContextMenuTimer: function () {
- var a = this.contextMenuTimer;
- null != a && (clearTimeout(a), delete a)
- }, hideContextMenu: function () {
- this.contextMenu.hide()
- }, renderContextMenu: function (b, c) {
- for (var d = this, e = "", f = d.options.contextMenuItems, g = 0, h = f.length; h > g; g++)if (f[g].isSeparator)e += '<div class="mejs-contextmenu-separator"></div>'; else {
- var i = f[g].render(d);
- null != i && (e += '<div class="mejs-contextmenu-item" data-itemindex="' + g + '" id="element-' + 1e6 * Math.random() + '">' + i + "</div>")
- }
- d.contextMenu.empty().append(a(e)).css({
- top: c,
- left: b
- }).show(), d.contextMenu.find(".mejs-contextmenu-item").each(function () {
- var b = a(this), c = parseInt(b.data("itemindex"), 10), e = d.options.contextMenuItems[c];
- "undefined" != typeof e.show && e.show(b, d), b.click(function () {
- "undefined" != typeof e.click && e.click(d), d.contextMenu.hide()
- })
- }), setTimeout(function () {
- d.killControlsTimer("rev3")
- }, 100)
- }
- })
- }(mejs.$), function (a) {
- a.extend(mejs.MepDefaults, {postrollCloseText: mejs.i18n.t("Close")}), a.extend(MediaElementPlayer.prototype, {
- buildpostroll: function (b, c, d) {
- var e = this.container.find('link[rel="postroll"]').attr("href");
- "undefined" != typeof e && (b.postroll = a('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">' + this.options.postrollCloseText + '</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(d).hide(), this.media.addEventListener("ended", function () {
- a.ajax({
- dataType: "html", url: e, success: function (a) {
- d.find(".mejs-postroll-layer-content").html(a)
- }
- }), b.postroll.show()
- }, !1))
- }
- })
- }(mejs.$);
- var CarGame = function (a) {
- function b(b) {
- requirejs.config({
- baseUrl: pickup_vars.template + "/assets/js",
- paths: {
- settings: ["pickup/CarGame/build/Settings"],
- game: ["pickup/CarGame/build/Game"],
- highscore: ["pickup/CarGame/build/Highscore"]
- }
- }), requirejs(["settings"], function (d) {
- i = a(b)[0], i.getContext && (k = i.getContext("2d"), l = d, k && (a("body").hasClass("tablet") ? a("#game-tablet-placeholder").show() : c(), window.addEventListener("resize", e, !1), e()))
- })
- }
- function c() {
- a("#car-game").waypoint(function () {
- a("#game-intro-logo").show().animate({marginTop: "130px"}, 2e3, "easeOutElastic", function () {
- a("#game-intro-background").fadeIn(800), a("#game-intro .pickup-button").fadeIn(800).one("click", function () {
- a("#game-intro").hide(), a("#hud").fadeIn(), f()
- })
- })
- }, {offset: "50%", triggerOnce: !0})
- }
- function d() {
- var a = i.width, b = i.height, c = [{x: a, y: b}, {x: 0, y: b}, {x: 0, y: b - l.RISE - l.H_OFFSET}, {
- x: a,
- y: b - l.H_OFFSET
- }];
- k.fillStyle = "#000", k.fillRect(0, 0, a, b), k.beginPath(), k.fillStyle = l.HILL_COLOR;
- var d = c.length - 1;
- k.moveTo(c[d].x, c[d].y);
- for (var e = 0; e < c.length; e++)k.lineTo(c[e].x, c[e].y);
- k.closePath(), k.fill()
- }
- function e() {
- j = a("#bergaufundup").width(), i.width !== j && (i.width = a("#bergaufundup").width(), d())
- }
- function f() {
- Loading.show(), requirejs(["game", "highscore"], function (b, c) {
- Tracking.track("click", "BergaufundupSpieldaten", "Auszeitzone Berg auf und up Spieldaten geladen", !0);
- var d = new createjs.LoadQueue;
- d.installPlugin(createjs.Sound), d.loadManifest([{
- id: "collect",
- src: l.SOUND_COLLECT_PICKUP
- }, {id: "speedup", src: l.SOUND_TRUCK_SPEED_UP}, {
- id: "outOfFuel",
- src: l.SOUND_TRUCK_OUT_OF_FUEL
- }, {id: "idle", src: l.SOUND_TRUCK_IDLE}, {id: "drive", src: l.SOUND_TRUCK_DRIVE}, {
- id: "background",
- src: l.SOUND_GAME_BACKGROUND
- }]), d.addEventListener("complete", function () {
- Loading.hide(), b.start(i, g)
- }), "undefined" == typeof m && (m = new c);
- var e = a("#game-mute");
- e.on("click", function () {
- a(this).hasClass("btn-mute") ? (a(this).removeClass("btn-mute").addClass("btn-unmute"), b.mute(!0)) : (a(this).removeClass("btn-unmute").addClass("btn-mute"), b.mute(!1))
- }), m.setClickListener(function () {
- a("#game-status").hide(), a("#game-play-again").hide(), Tracking.track("click", "BergaufundupReplay", "Auszeitzone Berg auf und up Replay aus Highscore", !0), b.start(i, g)
- }, function () {
- var c = a("#game-play-again").show();
- c.one("click", function () {
- a(this).hide(), a("#game-status").hide(), Tracking.track("click", "BergaufundupReplay", "Auszeitzone Berg auf und up Replay", !0), b.start(i, g)
- })
- })
- })
- }
- function g(b) {
- a("#game-status").html("Game Over").fadeIn(4e3, function () {
- Loading.show(), h(b)
- })
- }
- function h(a) {
- m.set(a);
- var b = m.get();
- b.done(function (a) {
- Loading.hide(), m.show(a)
- }).fail(function (a) {
- Loading.hide(), log("Fehler: "), log(a)
- }).always(function () {
- })
- }
- var i, j, k, l, m;
- return {
- init: function (c) {
- a(c).length > 0 && b(c)
- }
- }
- }(jQuery), AuszeitzoneBeissdichdurch = function (a) {
- function b() {
- a("#beissdichdurch").length > 0 && a("#beissdichdurch").waypoint(function () {
- a("#beissdichdurchImage").animate({left: "50%"}, 2e3, "easeOutElastic", function () {
- a("#beissdichdurchImage").one("click", function (b) {
- v = a(this), w = a("#beissdichdurchContent"), v.off("click"), c(), b.preventDefault()
- })
- })
- }, {offset: "50%", triggerOnce: !0})
- }
- function c() {
- if (Loading.show(), y = a("#beissdichdurch").height(), t = a("#beissdichdurch h2").html(), a("#beissdichdurch").css("min-height", y + "px"), "undefined" == typeof B && (B = PickupSounds.getSupportedAudioFormat()), a("#debug").append("<br>beissdichdurch, supportedAudioFormat: " + B), "undefined" == typeof u) {
- var b = window.location.protocol, c = "https" === b ? {createjs: ["libs/createjs/soundjs-NEXT.min"]} : {createjs: ["libs/createjs/soundjs-NEXT.min"]};
- requirejs.config({
- baseUrl: pickup_vars.template + "/assets/js",
- paths: c
- }), requirejs(["createjs", "libs/require/plugins/text!pickup/templates/TemplateAuszeitzoneBeissdichdurchCounter.html"], function (b, c) {
- u = _.template(c), D = a("html").hasClass("no-flexbox") ? [{
- src: "beissdichdurch_crunch01.mp3|beissdichdurch_crunch01.ogg",
- id: 0
- }, {
- src: "beissdichdurch_crunch02.mp3|beissdichdurch_crunch02.ogg",
- id: 1
- }, {
- src: "beissdichdurch_crunch03.mp3|beissdichdurch_crunch03.ogg",
- id: 2
- }] : [{
- src: "beissdichdurch_crunch01.m4a|beissdichdurch_crunch01.ogg",
- id: 0
- }, {
- src: "beissdichdurch_crunch02.m4a|beissdichdurch_crunch02.ogg",
- id: 1
- }, {
- src: "beissdichdurch_crunch03.m4a|beissdichdurch_crunch03.ogg",
- id: 2
- }], createjs.Sound.addEventListener("fileload", createjs.proxy(d, this)), createjs.Sound.registerManifest(D, Z), C = setTimeout(function () {
- f()
- }, 7e3)
- })
- }
- }
- function d() {
- a("#debug").append("<br>beissdichdurch, loadHandler, soundCrunchLoaded: " + $), $++, $ === D.length && (clearTimeout(C), g())
- }
- function e() {
- clearTimeout(C), $++, $ === W.length && g()
- }
- function f() {
- a("#debug").append("<br>beissdichdurch, onSoundTimeout"), clearTimeout(C), K = !1, g()
- }
- function g() {
- var b = new Image;
- a(b).load(function () {
- v.css("background-image", "url(" + M + ")"), h()
- }).error(function () {
- w.html(G.fail_loading)
- }).attr("src", M)
- }
- function h() {
- var b = v.attr("data-nonce"), c = {
- url: pickup_vars.ajaxurl,
- data: {action: "getAuszeitzoneBeissdichdurchInteraktionKlicks", nonce: b}
- };
- a.ajax(a.extend({}, F, c)).done(function (b) {
- a.each(b, function (a, b) {
- P.push({titel: b.titel, post_id: b.post_id})
- }), j(), K && i(), v.trigger("click"), Tracking.track("click", "AuszeitzoneBeissdichdurch", "Auszeitzone Beiss dich durch geladen", !1)
- }).fail(function () {
- w.html(G.fail_loading)
- }).always(function () {
- Loading.hide()
- })
- }
- function i() {
- a("section#beissdichdurch").prepend('<div id="beissdichdurchSoundToggle" class="on"></div>'), A = a("#beissdichdurchSoundToggle"), A.on("click", function () {
- a(this).hasClass("on") ? (a(this).removeClass("on"), a(this).addClass("off"), K = !K) : (a(this).removeClass("off"), a(this).addClass("on"), K = !K)
- })
- }
- function j() {
- v.on("click", function () {
- if (O++, H && (H = !1, a("#beissdichdurch h2").css("font-size", "3.2em").html(t)), K) {
- var b = Math.floor(Math.random() * D.length);
- createjs.Sound.play(b.toString(), createjs.Sound.INTERRUPT_NONE, 0, 0, !1, 1)
- }
- N >= U * (T - 1) && (E++, s());
- var c = findInArray(P, "titel", O.toString());
- c ? (Q++, k(c), v.off("click")) : (w.html(""), r())
- })
- }
- function k(b) {
- Loading.show();
- var c = {
- url: pickup_vars.ajaxurl,
- data: {action: "getAuszeitzoneBeissdichdurchContent", issmich_id: b, audio: B}
- };
- a.ajax(a.extend({}, F, c)).done(function (b) {
- if (b.issmich_bild) {
- var c = new Image;
- a(c).load(function () {
- x = a(this)[0].height, l(b)
- }).error(function () {
- w.html(G.fail_loading)
- }).attr("src", b.issmich_bild)
- } else l(b)
- }).fail(function () {
- }).always(function () {
- Loading.hide()
- })
- }
- function l(b) {
- Tracking.track("click", "BeissdichdurchEreignis", "Auszeitzone Beiss dich durch Ereignis bei Riegel " + E, !1);
- var c = '<div class="additionalContent container">';
- b.issmich_content && 23 === E ? c = '<div class="content">' + b.issmich_content + "</div>" : b.issmich_content && (c = '<div class="col-md-10 col-md-offset-1 content">' + b.issmich_content + "</div>"), b.issmich_text && (c = c + '<div class="col-md-10 col-md-offset-1 text">' + b.issmich_text + "</div>"), b.issmich_bild && (c = c + '<div class="col-md-10 col-md-offset-1 image"><img src="' + b.issmich_bild + '" /></div<div<>'), c += "</div>", a("#beissdichdurchImageWrapper").hide();
- var d = !1;
- b.issmich_sound && (d = createjs.Sound.play(b.issmich_sound), d.volume = .8), w.append(c).hide(), a("#beissdichdurchWrapper h2:first").fadeOut("fast", function () {
- if (b.issmich_mehrfach_klick) {
- var c = a(".additionalContent .image");
- c.css({overflow: "hidden", height: .25 * x})
- }
- w.fadeIn("fast", function () {
- }), w.find("#beissdichdurch_teilen").length > 0 ? m() : Q < P.length ? setTimeout(function () {
- w.on("click.AuszeitzoneBeissdichdurch", function () {
- p(d, b.issmich_mehrfach_klick)
- })
- }, R) : w.css("cursor", "normal")
- })
- }
- function m() {
- H = !0, w.off("click.AuszeitzoneBeissdichdurch");
- var b = a("#beissdichdurch_teilen");
- b.attr("data-name", I.fbname), b.attr("data-caption", ""), b.attr("data-description", I.fbdescription), b.attr("data-url", I.fblink), b.attr("data-picture", I.fbpicture), b.attr("data-callback", "AuszeitzoneBeissdichdurch.facebookCallback"), b.twoClickSocial({
- facebook: {share: !0},
- tooltip: {url: a("head base").attr("href").length > 0 ? a("head base").attr("href") + "/datenschutz#social-plugins" : document.location.protocol + "//" + document.location.host + "/datenschutz#social-plugins"}
- }), a("#beissdichdurchFacebookShareNein a").on("click", function (a) {
- a.preventDefault(), o()
- })
- }
- function n() {
- Tracking.track("click", "BeissdichdurchFacebookShare", "Auszeitzone Beiss dich durch Facebook Share", !0), p()
- }
- function o() {
- a("#beissdichdurch h2").html("Gut, du klickst also doch noch öfter <br>auf dem Profil von deinem Ex-Partner rum.").css("font-size", "2.4em").hide(), p()
- }
- function p(b, c) {
- if (b && K && b.play(), c) {
- J++;
- var d = a(".additionalContent .image"), e = d.find("img").css("margin-top");
- if (e === .25 * -x * 3 + "px")J = 0, q(); else {
- var f = .25 * x * J;
- d.find("img").css("margin-top", "-" + f + "px")
- }
- } else q()
- }
- function q() {
- w.off("click.AuszeitzoneBeissdichdurch").fadeOut(400, function () {
- a("#beissdichdurch h2").fadeIn("slow", function () {
- }), a("#beissdichdurchImageWrapper").show(), r(), j()
- })
- }
- function r() {
- switch (E) {
- case 17:
- S = 0;
- break;
- case 30:
- S = 2;
- break;
- case 62:
- S = 1;
- break;
- case 85:
- S = 2
- }
- N >= U * (T - 1) && (N = -U, v.hide());
- var a = 0;
- switch (S) {
- case 1:
- a = -535;
- break;
- case 2:
- a = -1073;
- break;
- case 3:
- a = -1626;
- break;
- default:
- a = 0
- }
- if (N += U, v.css("background-position", a + "px -" + N + "px"), 0 === N) {
- var b = Math.round(Math.random());
- b ? v.css("left", 0).show().animate({left: "50%"}, V, function () {
- }) : v.css("left", "100%").show().animate({left: "50%"}, V, function () {
- })
- }
- }
- function s() {
- if (E === L) {
- "undefined" !== z && (a("section#beissdichdurch").prepend('<div id="beissdichdurchCount"></div>'), z = a("#beissdichdurchCount"));
- var b = u({number: E, text: G.riegelCountMultiple});
- z.html(b), z.delay(1200).fadeIn(200, function () {
- a(this).delay(100).fadeOut(200, function () {
- a(this).delay(100).fadeIn(200)
- })
- })
- } else if (E > L) {
- var c = u({number: E, text: G.riegelCountMultiple});
- z.find(".number").fadeTo(300, 0, function () {
- z.html(b), a(this).hide().fadeTo(300, 1)
- }), z.html(c)
- }
- }
- var t, u, v, w, x, y, z, A, B, C, D, E = 0, F = {
- type: "post",
- dataType: "json"
- }, G = {
- fail_loading: '<p class="fail">Leider konnten wir die Spieldaten nicht laden :(</p>',
- riegelCountOne: "PiCK UP!",
- riegelCountMultiple: "PiCK UP!s"
- }, H = !1, I = {
- fbname: "PiCK UP!",
- fbdescription: 'Ich habe gerade "Beiß dich durch“ auf der PiCK UP!-Website ausprobiert und muss sagen:"Es lohnt sich!" Probiert es aus: <a href="https://' + window.location.hostname + '/#beissdichdurch+">Beiss dich durch</a>',
- fblink: "https://" + window.location.hostname + "/#beissdichdurch",
- fbpicture: "https://" + window.location.hostname + pickup_vars.template + "/assets/img/auszeitzone_katschong/fbKatschong.png"
- }, J = 0, K = !0, L = 50, M = pickup_vars.template + "/assets/img/auszeitzone_beissdichdurch/riegel.png", N = 0, O = 0, P = [], Q = 0, R = 1400, S = 2, T = 6, U = 350, V = 600, W = ["/assets/beissdichdurch_crunch01", "/assets/beissdichdurch_crunch02"], X = window.location.pathname, Y = X.substring(0, X.lastIndexOf("/")), Z = Y + "/assets/", $ = 0;
- return {
- init: b, soundFileLoaded: function () {
- e()
- }, facebookCallback: function () {
- n()
- }
- }
- }(jQuery), AuszeitzoneKatschong = function (a) {
- function b() {
- a("#katschong").length > 0 && a("#katschong").waypoint(function () {
- a("#katschongHeadlineIntro").fadeIn("slow", function () {
- c()
- })
- }, {offset: "50%", triggerOnce: !0})
- }
- function c() {
- a("#katschong img.unveil").unveil(0, refreshWaypoints), e() ? (v = !0, g("tag")) : o()
- }
- function d() {
- var b = new Date, c = b.getMinutes(), d = b.getHours(), e = 60 - c, f = 23 - d;
- b.setTime(b.getTime() + 60 * f * 60 * 1e3 + 60 * e * 1e3), a.cookie(u, w, {expires: b})
- }
- function e() {
- return a.cookie(u) ? !0 : !1
- }
- function f() {
- Loading.show();
- var b = {url: pickup_vars.ajaxurl, data: {action: "saveAuszeitzoneKatschongDbEntry", auswahl: w}};
- a.ajax(a.extend({}, x, b)).done(function () {
- }).fail(function () {
- log(" Katschong: Abspeichern fehlgeschlagen.")
- }).always(function () {
- g("tag")
- })
- }
- function g(b) {
- Loading.show();
- var c = {url: pickup_vars.ajaxurl, data: {action: "getAuszeitzoneKatschongErgebnisse", zeitraum: b}};
- a.ajax(a.extend({}, x, c)).done(function (b) {
- b ? (a.each(b, function (a, b) {
- z = Math.round(void 0 === b["0"] ? 0 : Math.round(b["0"] / b.gesamtstimmen * 1e4) / 100), A = Math.round(void 0 === b["1"] ? 0 : Math.round(b["1"] / b.gesamtstimmen * 1e4) / 100), B = Math.round(void 0 === b["2"] ? 0 : Math.round(b["2"] / b.gesamtstimmen * 1e4) / 100)
- }), "undefined" == typeof s ? (requirejs.config({baseUrl: pickup_vars.template + "/assets/js"}), requirejs(["libs/require/plugins/text!pickup/templates/TemplateAuszeitzoneKatschong.html"], function (a) {
- s = _.template(a), i()
- })) : i()) : h()
- }).fail(function () {
- h()
- }).always(function () {
- Loading.hide()
- })
- }
- function h() {
- a("#katschong_abstimmung").append(C.fail_loading)
- }
- function i() {
- var b = s({id: "ergebnis_katschong", prozent: z}), c = s({
- id: "ergebnis_oder",
- prozent: B
- }), d = s({id: "ergebnis_schubidu", prozent: A});
- a("#katschong_ergebnis").html("").append(b + c + d), j()
- }
- function j() {
- r = a("#katschong").height(), a("#katschong").css("min-height", r + "px"), D ? (v ? (a("#katschongIntroHeadlineWrapper").hide(), a("#katschongHeadlineErgebnis").show()) : (a("#katschongIntroHeadlineWrapper").slideUp(), a("#katschongHeadlineErgebnis").slideDown(function () {
- a(this).css({overflow: "visible", height: "auto"})
- })), a("#katschong_select").selectbox({
- onOpen: function () {
- }, onChange: function () {
- D = !1, g(a(this).val())
- }
- }), k()) : l()
- }
- function k() {
- v ? (y = 0, a(".katschongAbstimmButton").hide().next(".btnShadow").hide()) : a(".katschongAbstimmButton").slideUp().next(".btnShadow").hide(), a("#btnOder").addClass("deactivated").animate({
- fontSize: "1em",
- paddingTop: "80px"
- }, y, function () {
- a("#btnOder a").on("click", function (a) {
- a.preventDefault()
- }), l()
- });
- .5 * a("#btnKatschong img").width();
- a("#btnKatschong img").css("cursor", "default").animate({width: "210px", marginRight: "20%"}, y, function () {
- }), a("#btnSchubidu img").css("cursor", "default").animate({width: "210px", marginLeft: "20%"}, y, function () {
- })
- }
- function l() {
- var b = v ? 800 : 1600;
- a("#katschong_ergebnis").slideDown(b, function () {
- var b = Math.round(1.5 * parseInt(z, 10)), c = Math.round(1.5 * parseInt(B, 10)), d = Math.round(1.5 * parseInt(A, 10));
- 20 > b && (b = 20), 20 > c && (c = 20), 20 > d && (d = 20), v && n();
- var e = v ? 6 : 12;
- a("#ergebnis_katschong .chart_top").animate({height: b}, b * e, function () {
- a("#ergebnis_katschong .prozent").css("margin-top", "-" + m(b) + "px").fadeIn(), a("#ergebnis_oder .chart_top").animate({height: c}, c * e, function () {
- a("#ergebnis_oder .prozent").css("margin-top", "-" + m(c) + "px").fadeIn(), a("#ergebnis_schubidu .chart_top").animate({height: d}, d * e, function () {
- a("#ergebnis_schubidu .prozent").css("margin-top", "-" + m(d) + "px").fadeIn(), v || n()
- })
- })
- })
- })
- }
- function m(a) {
- return a + 70
- }
- function n() {
- a("#katschong_teilen").twoClickSocial({
- facebook: {share: !0},
- tooltip: {
- direction: "top",
- url: a("head base").attr("href").length > 0 ? a("head base").attr("href") + "/datenschutz#social-plugins" : document.location.protocol + "//" + document.location.host + "/datenschutz#social-plugins"
- }
- }), v ? a("#katschong_teilen").slideDown(10, function () {
- a(this).css("overflow", "visible")
- }) : a("#katschong_teilen").delay(2e3).slideDown(10, function () {
- a(this).css("overflow", "visible")
- });
- var b, c, d = a("#katschong_teilen");
- -1 === w && (w = a.cookie(u)), 0 === parseInt(w, 10) ? (b = t.fbdescriptionKatschong, c = t.fbpictureKatschong) : 1 === parseInt(w, 10) ? (b = t.fbdescriptionSchubidu, c = t.fbpictureSchubidu) : (b = t.fbdescriptionOder, c = t.fbpictureOder), d.attr("data-name", t.fbname), d.attr("data-description", b), d.attr("data-url", t.fblink), d.attr("data-picture", c), d.attr("data-callback", "AuszeitzoneKatschong.facebookCallback")
- }
- function o() {
- a(".katschongAbstimmButton").slideDown(), a("#btnKatschong").on("click", function (a) {
- a.preventDefault(), w = 0, p()
- }), a("#btnSchubidu").on("click", function (a) {
- a.preventDefault(), w = 1, p()
- }), a("#btnOder a").on("click", function (a) {
- a.preventDefault(), w = 2, p()
- })
- }
- function p() {
- Tracking.track("click", "KatschongAbstimmung", "Katschong Abstimmung " + w, !0), d(), f(), q()
- }
- function q() {
- a("#btnKatschong").off("click").find(".abstimm_button").hide(), a("#btnSchubidu").off("click").find(".abstimm_button").hide(), a("#btnOder a").off("click"), a("#btnOder a").on("click", function (a) {
- a.preventDefault()
- })
- }
- var r, s, t = {
- fbname: "PiCK UP!",
- fbdescriptionKatschong: "Mein Tag war heute so richtig Katschong und deiner? Gib dein Tagesvoting hier ab!",
- fbdescriptionSchubidu: "Mein Tag war heute total Schubidu und deiner? Gib dein Tagesvoting hier ab!",
- fbdescriptionOder: "Ich bin heute total unentschlossen. Alles fühlt sich so ODER an. Wie geht’s dir? Gib dein Tagesvoting hier ab!",
- fblink: "http://" + window.location.hostname + "/#katschong",
- fbpictureKatschong: "http://" + window.location.hostname + pickup_vars.template + "/assets/img/auszeitzone_katschong/fbKatschong.jpg",
- fbpictureSchubidu: "http://" + window.location.hostname + pickup_vars.template + "/assets/img/auszeitzone_katschong/fbSchubidu.jpg",
- fbpictureOder: "http://" + window.location.hostname + pickup_vars.template + "/assets/img/auszeitzone_katschong/fbOder.jpg"
- }, u = "pickup_katschong", v = !1, w = -1, x = {
- type: "post",
- dataType: "json"
- }, y = 1200, z = 0, A = 0, B = 0, C = {fail_loading: '<p class="fail">Leider konnten wir die Ergebnisse nicht laden. Wir haben unseren Technikern Bescheid gegeben.</p>'}, D = !0;
- return {
- init: b, facebookCallback: function () {
- Tracking.track("click", "KatschongFacebookShare", "Katschong Facebook Share", !0), Tracking.trackTarget("Katschong", "AuszeitzoneKatschong", "KatschongFacebookShare")
- }
- }
- }(jQuery), ContentSlider = function (a) {
- function b(b, d) {
- var e = {};
- return d || (d = {}), a.extend(e, c, d), a(b).flexslider(e)
- }
- var c = {slideshow: !1, animation: "slide"};
- return {
- addSlider: function (a, c) {
- return b(a, c)
- }
- }
- }(jQuery), Formulare = function (a) {
- function b() {
- a(document).bind("gform_post_render", function () {
- Formulare.initForm()
- }), e(), c(), d()
- }
- function c() {
- a(".gfield_date_dropdown_day select, .gfield_date_dropdown_month select, .gfield_date_dropdown_year select, .selectbox select").selectbox({
- onOpen: function () {
- }, onChange: function () {
- }
- }), a('input[type="submit"]').addClass("pickup-button btn btn-lg btn-primary"), a('li.geburtsdatum input[type="text"]').attr("pattern", "[0-9]*")
- }
- function d() {
- if (a(".formFail").length > 0) {
- var b = a(".formFail").parent().parent().nextAll(".pflichtfelder");
- b.empty().html(a(".formFail").first())
- }
- a(".validation_message").has(".formFailInline").css("display", "block")
- }
- function e() {
- a(document).bind("gform_confirmation_loaded", function (b, c) {
- a(".gform_confirmation_message_" + c).nextAll(".pflichtfelder").hide();
- var d = "", e = "";
- switch (c) {
- case f:
- d = "Kontakt", e = "Kontaktanfrage";
- break;
- case g:
- d = "NewsletterFooter", e = "Newsletter";
- break;
- case h:
- d = "NewsletterHeader", e = "Newsletter";
- break;
- case i:
- d = "NewsletterMobile", e = "Newsletter";
- break;
- default:
- d = "Formular " + c, e = "Formular-Eingabe"
- }
- Tracking.trackTarget(d, d, e);
- a.post("https://www.etracker.com/form.php", {
- et: pickup_vars.etracker,
- name: d,
- strF0: e
- }).done(function () {
- log("post success")
- }).fail(function () {
- log("post error")
- }).always(function () {
- log("post always")
- })
- })
- }
- var f = 1, g = 3, h = 9, i = 5;
- return {
- init: b, initForm: function () {
- c(), d()
- }
- }
- }(jQuery), Gewinnspiele = function (a) {
- function b() {
- a("body").hasClass("mobile") && (s = !0), k(), l(), a(document).bind("gform_post_render", function (a, b) {
- b !== o && b !== p && b !== q && b !== r && Gewinnspiele.initGewinnspielFormulare()
- })
- }
- function c() {
- a(".gewinnspielTeilnahmebedingungenLink").on("click", function (b) {
- b.preventDefault(), m = a(this).closest("label");
- var c = a(this).closest(".flexsliderGewinnspiel").next(".gewinnspielTeilnahmebedingungen").html();
- a.magnificPopup.open({
- items: {src: c},
- type: "inline",
- tClose: "Schliessen (Esc)",
- callbacks: {
- open: function () {
- d()
- }
- }
- })
- })
- }
- function d() {
- a(".gewinnspielDatenschutzbestimmungenLinkLightbox").on("click", function (b) {
- b.preventDefault(), a.magnificPopup.close(), m.find("a.gewinnspielDatenschutzbestimmungenLink").trigger("click")
- })
- }
- function e() {
- a(".gewinnspielDatenschutzbestimmungenLink").on("click", function (b) {
- b.preventDefault(), m = a(this).closest("label");
- var c = a(this).closest(".flexsliderGewinnspiel").next().next(".gewinnspielDatenschutzbestimmungen").html();
- a.magnificPopup.open({
- items: {src: c},
- type: "inline",
- tClose: "Schliessen (Esc)",
- callbacks: {
- open: function () {
- f()
- }
- }
- })
- })
- }
- function f() {
- a(".gewinnspielTeilnahmebedingungenLinkLightbox").on("click", function (b) {
- b.preventDefault(), a.magnificPopup.close(), m.find("a.gewinnspielTeilnahmebedingungenLink").trigger("click")
- })
- }
- function g(b, c) {
- n = a("#gewinnspielFeedback" + c).html(), a("#" + b + " input.gewinnspielAntwort").change(function () {
- var d = parseInt(a("#" + b + " input[type=radio]:checked").val(), 10);
- a("#" + b + " .antwortoption").removeClass("selected").removeClass("false"), a("#" + b + " .antwortoption.selected").removeClass("selected"), a("#" + b + " #gewinnspielAntwort_" + c + "_" + d).addClass("selected"), a("#gewinnspielAlert" + c + ":visible").hide(), a("#gewinnspielFeedback" + c + ":visible").fadeOut()
- })
- }
- function h(b, c) {
- a("#" + b).submit(function () {
- var d = parseInt(a("#" + b + " input[type=radio]:checked").val(), 10);
- return isNaN(d) ? a("#gewinnspielAlert" + c).show() : (a("#gewinnspielAlert" + c + ":visible").hide(), 1 === a("#" + b).data("retry") ? d === parseInt(a("#" + b).data("id"), 10) ? (a("#" + b + " .antwortoption.selected").addClass("true"), i(c, a(this), d)) : (a("#" + b + " .antwortoption.selected").data("wrong").length > 0 ? a("#gewinnspielFeedback" + c).html(a("#" + b + " .antwortoption.selected").data("wrong")) : a("#gewinnspielFeedback" + c).html(n), a("#gewinnspielFeedback" + c).fadeIn(), a("#" + b + " .antwortoption.selected").addClass("false")) : i(c, a(this), d)), !1
- })
- }
- function i(b, c, d) {
- a("#gewinnspielSubmit" + b).attr("disabled", "disabled"), c.closest(".gewinnspielContent").nextAll(".gewinnspielFormular").find(".gewinnspielantwort").find("input").val(d), setTimeout(function () {
- c.closest(".flexsliderGewinnspiel").flexslider("next")
- }, 1e3)
- }
- function j() {
- var b = a(".flexsliderGewinnspiel").data("id"), c = "gewinnspielFrageForm" + b;
- Gewinnspiele.setupChangeListener(c, b), Gewinnspiele.setupSubmitListener(c, b)
- }
- function k() {
- var b = 2;
- if (s) {
- b = 1;
- var c = a(".gewinnspielImage");
- c.prev().prepend(c.html()), c.next().prepend(c.html()), c.remove()
- }
- var d = {
- animationLoop: !1,
- touch: !1,
- controlNav: !1,
- directionNav: !1,
- keyboard: !1,
- itemWidth: 585,
- minItems: b,
- maxItems: b,
- useCSS: !1,
- after: function (b) {
- if (Tracking.track("click", "GewinnspielFormular", "Gewinnspiel-Formular Anzeige", !1), s) {
- var c = a(b.slides.eq(b.currentSlide)).find("form"), d = {easing: "swing"};
- a.scrollTo(c, 800, d)
- }
- }
- };
- ContentSlider.addSlider(".flexsliderGewinnspiel", d)
- }
- function l() {
- c(), e()
- }
- var m, n, o = 3, p = 9, q = 5, r = 1, s = !1;
- return {
- init: b, initGewinnspielFormulare: function () {
- l()
- }, setupChangeListener: function (a, b) {
- g(a, b)
- }, setupSubmitListener: function (a, b) {
- h(a, b)
- }, setupGenericGewinnspiel: function () {
- j()
- }
- }
- }(jQuery), Intro = function (a) {
- function b() {
- a("#intro").length > 0 && c()
- }
- function c() {
- ContentSlider.addSlider("#intro .flexslider", {
- animationLoop: !1, video: !0, start: function () {
- }, before: function (b) {
- var c = a(b.slides.eq(b.animatingTo)).find("img");
- c.addClass("unveiled"), d && (d[0].paused || d[0].pause())
- }, after: function (a) {
- Tracking.track("click", "IntroSlide", "Intro Slide " + a.currentSlide, !1)
- }
- })
- }
- {
- var d;
- pickup_vars.template + "/assets/video/", a('<a href="#" class="scrolling videoLinkBox">'), a('<a href="#" class="videoReplay"></a>')
- }
- return {init: b}
- }(jQuery), Loading = function (a) {
- function b() {
- e && !e.is(":visible") && e.modal("show")
- }
- function c() {
- e && e.is(":visible") && e.modal("hide")
- }
- function d() {
- requirejs.config({baseUrl: pickup_vars.template + "/assets/js"}), requirejs(["libs/require/plugins/text!pickup/templates/TemplateLoading.html"], function (b) {
- var c = _.template(b);
- a("body").append(c), e = a("#modalLoading"), e.modal({keyboard: !1, backdrop: "static", show: !1})
- })
- }
- var e;
- return {init: d, show: b, hide: c}
- }(jQuery), Newsletter = function (a) {
- "use strict";
- function b() {
- a(".newsletter-toggle").on("click", function (b) {
- b.preventDefault();
- var c = a(".newsletter-content-wrapper"), d = a(".newsletter-btn-clickarea");
- c.is(":visible") ? (a(".newsletter-btn-close").fadeOut("fast"), c.hide(), d.show()) : (d.hide(), c.show(), a(".newsletter-btn-close").fadeIn("fast"), Tracking.track("click", "NewsletterDropdown", "Header Newsletter-Dropdown", !0))
- })
- }
- var c = 3, d = 9, e = 5;
- return {
- init: function () {
- b(), a("#newsletterFormularFooter #input_3_5 input").attr("id", "choice_3_5_1"), a("#newsletterFormularFooter #input_3_5 input").attr("name", "input_3_5.1"), a("#newsletterFormularFooter #input_3_5 label").attr("for", "input_3_5.1"), a(document).bind("gform_confirmation_loaded", function (b, f) {
- switch (f) {
- case c:
- Tracking.trackTarget("Newsletter", "Newsletter", "Newsletteranmeldung Footer"), a("#footerNewsletterText").hide();
- break;
- case d:
- Tracking.trackTarget("Newsletter", "Newsletter", "Newsletteranmeldung Header"), a("#headerNewsletterText").hide();
- break;
- case e:
- Tracking.trackTarget("Newsletter", "Newsletter", "Newsletteranmeldung Mobile")
- }
- })
- }
- }
- }(jQuery), PageSettings = function (a) {
- function b() {
- a("body").hasClass("homepage") && a("a.navbar-brand, a.brandFlip").on("click", function (b) {
- var c = {easing: "swing"};
- a.scrollTo("0px", 800, c), b.preventDefault()
- })
- }
- function c() {
- /*a("canvas.nav-canvas").lines({
- direction: "up",
- color: {top: "#ffcc00", bottom: "transparent"},
- shadow: {type: "inner", opacity: .3, color: {R: 80, G: 80, B: 80}, height: 10}
- }), a("canvas.up.inner").lines({
- direction: "up",
- shadow: {type: "inner", opacity: .3, color: {R: 80, G: 80, B: 80}, height: 10}
- }), a("canvas.up.outer").lines({
- direction: "up",
- shadow: {type: "outer", opacity: .3, color: {R: 80, G: 80, B: 80}, height: 10}
- }), a("canvas.down.outer").lines({
- direction: "down",
- shadow: {type: "outer", opacity: .3, color: {R: 80, G: 80, B: 80}, height: 10}
- }), a("canvas.down.inner").lines({
- direction: "down",
- shadow: {type: "inner", opacity: .3, color: {R: 80, G: 80, B: 80}, height: 10}
- })*/
- }
- function d(b) {
- if (0 !== a(b).length) {
- var c = !1, d = !1, e = !1, f = "image", g = {};
- a(b).hasClass("recipe") ? (e = !0, c = !0, f = "ajax") : a(b).hasClass("html") ? (e = !0, f = "ajax") : a(b).hasClass("iframe") ? f = "iframe" : (d = !0, g = {closeOnContentClick: !0});
- var h = {
- callbacks: {
- elementParse: function (a) {
- if (e) {
- var b = a.el.attr("href");
- a.src = -1 !== b.indexOf("?") ? b + "&display=inline" : b + "?display=inline"
- }
- }, updateStatus: function (a) {
- "ready" === a.status && c && Rezepte.initFlexslider()
- }
- }, type: f, tLoading: "", closeBtnInside: !0, tClose: "Schliessen (Esc)"
- };
- a.extend(h, g), a(b).magnificPopup(h)
- }
- }
- function e(b, c, d) {
- a(b).on("click", function (b) {
- if (a(this.hash).length > 0) {
- "function" == typeof c && c();
- var e = a(this).attr("href"), f = 0;
- a.each(i, function (a, b) {
- return e === b.target ? (f = b.offset, !1) : void 0
- });
- var g = {easing: "swing", offset: f};
- "function" == typeof d && a.extend({}, g, {onAfter: d()}), a.scrollTo(this.hash, 800, g), b.preventDefault()
- }
- })
- }
- function f() {
- a(".querverlinkung a").on("click", function () {
- var b = a(this).attr("data-product-id"), c = a(this).attr("href");
- if ("#alleRezepte" === c) {
- var d = a(this).attr("data-product-name");
- a("#rezeptFilterSorte").selectbox("change", b, d)
- } else {
- var e = a(c + " .slides > li." + b).not(".clone"), f = a(c + " .slides > li").not(".clone"), g = f.index(e);
- g > -1 && a(c + " .flexslider").flexslider(g)
- }
- })
- }
- function g() {
- a("#main-navigation").waypoint("sticky", {wrapper: '<div class="sticky-wrapper" />', stuckClass: "stuck"})
- }
- function h() {
- a("body").hasClass("homepage") && a("#menu-hauptnavigation").onePageNav({
- currentClass: "active",
- changeHash: !0,
- scrollSpeed: 1e3,
- scrollOffset: 0
- })
- }
- var i = [{target: "#produkte", offset: 60}, {target: "#videos", offset: 50}, {
- target: "#rezepte",
- offset: 120
- }, {target: "#alleRezepte", offset: -100}, {target: "#aktionen0", offset: -80}];
- return {
- init: function () {
- a("body").hasClass("daten-aendern") && a("#gform_submit_button_3").attr("value", "Daten ändern"), g(), b(), d(".content a.lightbox.img"), d(".content a.lightbox.recipe"), d(".content a.lightbox.html"), d(".content a.lightbox.iframe"), d(".content area.lightbox.iframe"), e("a.scrolling, .scrolling a"), f(), c(), h(), a("#facebookLike").twoClickSocial({
- url: "http://www.pickup.de/",
- facebook: {like: !0},
- tooltip: {url: a("head base").attr("href").length > 0 ? a("head base").attr("href") + "/datenschutz#social-plugins" : document.location.protocol + "//" + document.location.host + "/datenschutz#social-plugins"}
- })
- }, initLightboxLinks: function (a) {
- d(a)
- }, initScrollLinks: function (a, b, c) {
- e(a, b, c)
- }
- }
- }(jQuery), Produkte = function (a) {
- function b() {
- var b = 1400;
- m && (b = 600);
- var d = {
- animationSpeed: b, easing: "easeOutCirc", touch: n, useCSS: !1, start: function (b) {
- var c = a(b.slides.eq(b.currentSlide)).find(".produktName");
- c.show().css("marginTop", "20px")
- }, before: function (b) {
- if (m)f(), console.log("slide"), window.addEventListener("orientationchange", function () {
- f(), console.log("slideWindowSize")
- }, !1), a(".product-details").length > 0 && (a(".product-details").hide().css("float", "none"), a(".close-details-btn").hide()); else {
- var c = a(b.slides.eq(b.animatingTo)).find(".produktName");
- c.css("marginTop", "-280px"), a(b.slides.eq(b.animatingTo)).find(".produktDetails").hide()
- }
- {
- var d = a(b.slides.eq(b.animatingTo)).attr("class");
- a(b).find("." + d + " img.unveil").unveil()
- }
- }, after: function (b) {
- if (Tracking.track("click", "ProduktSlide", "Produkte Anzeige Slide " + b.currentSlide, !1), !m) {
- c(b), a("#produkte .flexslider ul.slides li").find(".produktDetails").hide();
- {
- a(b.slides.eq(b.animatingTo)).find(".produktDetails").fadeIn()
- }
- }
- }
- };
- ContentSlider.addSlider("#produkte .flexslider", d)
- }
- function c(b) {
- var c = a(b.slides.eq(b.animatingTo)).find(".produktName");
- c.show().animate({marginTop: "20px"}, 600, "easeOutElastic")
- }
- function d() {
- a(".product-details-btn").on("click", function (b) {
- b.preventDefault();
- var c = a(this).attr("data-productId");
- return "loading" === o[c] ? (console.log("loading"), void 0) : ("undefined" == typeof o[c] ? (o[c] = "loading", e(c)) : a("#product-details-" + c).is(":visible") ? h(c) : g(c), void 0)
- })
- }
- function e(b) {
- i = a("#produkte .flex-active-slide").find(".product-details-btn"), j = a("#produkte .flexslider");
- var c = i.attr("data-nonce"), d = i.attr("data-productId"), e = {
- url: pickup_vars.ajaxurl,
- data: {action: "product_details", productId: d, nonce: c}
- };
- a.ajax(a.extend({}, k, e)).done(function (a) {
- j.after(a.html), g(d)
- }).fail(function () {
- j.append(l.fail_loading)
- }).always(function () {
- log("done"), o[b] = "done"
- })
- }
- function f() {
- var b = a(".flex-active-slide .produktcontent img").height();
- a("#produkte .flexslider ul.slides li .product-img").css("height", b)
- }
- function g(b) {
- a("#product-details-" + b).slideDown(), a(".close-details-btn").show()
- }
- function h(b) {
- a("#product-details-" + b).slideUp(), a(".close-details-btn").hide()
- }
- var i, j, k = {
- type: "post",
- dataType: "json"
- }, l = {
- fail_loading: '<p class="fail">Leider konnten wir die Zutaten und Nährwerte für dieses Produkt nicht laden.</p>',
- no_results: '<p class="fail">Für dieses Produkt gibt es keine genauen Informationen</p>'
- }, m = !1, n = !0, o = {};
- return {
- init: function () {
- a("body").hasClass("mobile") && (m = !0, a("body").hasClass("windowsphone") && (n = !1), d()), b()
- }
- }
- }(jQuery), Rezepte = function (a) {
- function b(b) {
- a(b).selectbox(t)
- }
- function c(a) {
- a.selectbox("detach"), a.selectbox("attach", t)
- }
- function d(b, c) {
- c ? a(b).removeAttr("disabled") : a(b).attr("disabled", "disabled")
- }
- function e() {
- var c = {url: pickup_vars.ajaxurl, data: {action: "get_recipes"}};
- a.ajax(a.extend({}, q, c)).done(function (c) {
- a("#recipesAdditional").html(c.html), m = a("#rezeptListe"), n = a("#more_recipes"), o = a("#rezeptFilterKategorie"), p = a("#rezeptFilterSorte"), b(".rezeptSelect"), a("#more_recipes").on("click", function (a) {
- a.preventDefault(), f()
- }), a.waypoints("refresh")
- }).fail(function () {
- m = a("#recipesAdditional"), m.html(r.fail_loading)
- }).always(function () {
- l()
- })
- }
- function f() {
- var b = n.attr("data-nonce"), c = n.attr("data-offset"), d = n.attr("data-limit"), e = o.val(), f = p.val();
- Loading.show();
- var g = {
- url: pickup_vars.ajaxurl,
- data: {action: "more_recipes", nonce: b, offset: c, limit: d, category: e, product: f}
- };
- a.ajax(a.extend({}, q, g)).done(function (b) {
- m.append('<div class="moreRecipes">' + b.html + "</div>");
- var e = a("#rezeptListe .moreRecipes .rezept").hide();
- e.each(function (b) {
- a(this).delay(200 * b).fadeIn()
- }), a("#rezeptListe").find(".moreRecipes").removeClass("moreRecipes"), b.more ? n.attr("data-offset", +parseInt(c, 10) + parseInt(d, 10)) : n.hide().next(".btnShadow").hide(), a.waypoints("refresh")
- }).fail(function () {
- m.html(r.fail_loading)
- }).always(function () {
- Loading.hide(), l()
- })
- }
- function g() {
- $containerMobile = a("#rezepte .flexslider"), $moreButtonMobile = a("#more_recipes_mobile"), a("#more_recipes_mobile").on("click", function (a) {
- a.preventDefault(), h()
- })
- }
- function h() {
- var b = $moreButtonMobile.attr("data-nonce"), c = $moreButtonMobile.attr("data-offset"), d = $moreButtonMobile.attr("data-limit");
- Loading.show();
- var e = {url: pickup_vars.ajaxurl, data: {action: "more_recipes_mobile", nonce: b, offset: c, limit: d}};
- a.ajax(a.extend({}, q, e)).done(function (b) {
- "4" === c ? $containerMobile.after('<div class="center" id="mobileMoreRecipes"><h3>NOCH MEHR KNACKIGE REZEPTE:</h3>' + b.html + "</div>") : a("#mobileMoreRecipes").append(b.html), b.more ? $moreButtonMobile.attr("data-offset", +parseInt(c, 10) + parseInt(d, 10)) : $moreButtonMobile.hide()
- }).fail(function () {
- $containerMobile.html(r.fail_loading)
- }).always(function () {
- Loading.hide()
- })
- }
- function i(b) {
- var c = b.input.attr("data-nonce"), d = o.val(), e = p.val(), f = n.attr("data-limit");
- Loading.show();
- var g = {url: pickup_vars.ajaxurl, data: {action: "filter_recipes", nonce: c, category: d, product: e}};
- a.ajax(a.extend({}, q, g)).done(function (a) {
- var b = a.html ? a.html : r.no_results;
- m.html(b), a.more ? (n.attr("data-offset", f), n.show().next().show()) : n.hide().next().hide()
- }).fail(function () {
- m.html(r.fail_loading)
- }).always(function () {
- Loading.hide(), l()
- })
- }
- function j(b, e) {
- var f;
- if (b.id === o.attr("id"))f = p; else {
- if (b.id !== p.attr("id"))return;
- f = o
- }
- f.find("option").each(function () {
- if ("" === e)return d(this, !0), !0;
- var b = a(this).attr("data-refs");
- if (b) {
- var c = !1;
- a.each(b.split(","), function (a, b) {
- return b === e ? (c = !0, void 0) : void 0
- }), d(this, c)
- }
- }), c(f)
- }
- function k(b, c) {
- var d = a("#" + b.id).next(".sbHolder").find("ul li a");
- d.removeClass("highlightTextColor"), a("#" + b.id).next(".sbHolder").find('ul li a[rel="' + c + '"]').toggleClass("highlightTextColor")
- }
- function l() {
- "undefined" != typeof PageSettings && PageSettings.initLightboxLinks(".rezept a.lightbox"), a.isFunction(jQuery().hoverIntent) ? a(".rezept").hoverIntent(function () {
- a(this).animate({boxShadow: "0 0 12px rgba(0,0,0,0.4)"}, 500)
- }, function () {
- a(this).animate({boxShadow: "0 0 0 rgba(0,0,0,0)"}, 900)
- }) : a(".rezept").on("mouseenter", this.mouseEnterHandler).on("mouseleave", this.mouseLeaveHandler)
- }
- var m, n, o, p, q = {
- type: "post",
- dataType: "json"
- }, r = {
- fail_loading: '<p class="fail">Oh nein! Leider konnten wir keine weiteren Rezepte laden.</p>',
- no_results: '<p class="fail">Für diese Auswahl gibt es leider keine Rezepte.</p>',
- slider_left_overview: "Zur Schritt-für-Schritt Anleitung<span></span>",
- slider_left_step: "Zum nächsten Schritt<span></span>"
- }, s = !0, t = {
- onChange: function (a, b) {
- i(b), j(b, a), k(b, a)
- }
- };
- return {
- initFlexslider: function () {
- a("#rezept-slider").length > 0 && (a("body").hasClass("mobile") || a("#recipe-social-media").twoClickSocial({
- url: a("#permalinkRecipe").html().length > 0 ? a("#permalinkRecipe").html() : "http://www.pickup.de",
- facebook: {like: !0, share: !0},
- pinterest: {pinterest: !0},
- tooltip: {
- direction: "top",
- url: a("head base").attr("href").length > 0 ? a("head base").attr("href") + "/datenschutz#social-plugins" : document.location.protocol + "//" + document.location.host + "/datenschutz#social-plugins"
- }
- }), a(".next-slide").html(r.slider_left_overview), a("#rezept-slider").flexslider({
- slideshow: !1,
- directionNav: !1,
- animation: "slide",
- easing: "easeInOutCirc",
- animationSpeed: 1400,
- animationLoop: !1,
- selector: ".rezept-slides > .rezept-slide",
- manualControls: ".rezept-slider-nav > li > a",
- touch: s,
- start: function (b) {
- a(b.slides.eq(b.currentSlide)).find(".zubereitungsschrittZutaten").show()
- },
- before: function (b) {
- 0 === b.animatingTo ? (a(".prev-slide").fadeOut(300), a(".recipe-thumb").fadeOut(300), a(".next-slide").html(r.slider_left_overview)) : (a(".prev-slide").fadeIn(300), a(".recipe-thumb").delay(300).fadeIn(300), a(".next-slide").html(r.slider_left_step));
- a(b.slides.eq(b.animatingTo)).find(".zubereitungsschrittZutaten").show();
- b.animatingTo === b.count - 1 ? a(".next-slide").fadeOut(300) : a(".next-slide").fadeIn(300)
- }
- }), a(".next-slide").on("click", function (b) {
- a("#rezept-slider").flexslider("next"), b.preventDefault()
- }), a(".prev-slide").on("click", function (b) {
- a("#rezept-slider").flexslider("prev"), b.preventDefault()
- }))
- }, init: function () {
- a("body").hasClass("windowsphone") && (s = !1), a("body").hasClass("mobile") ? (ContentSlider.addSlider("#rezepte .flexslider"), a(".next-slide").html("Vor<span></span>"), a(".prev-slide").html("Zurück<span></span>"), g()) : a("#rezepte").waypoint(function () {
- e()
- }, {triggerOnce: !0, offset: "100%"}), Rezepte.initFlexslider()
- }
- }
- }(jQuery), PickupSounds = function (a) {
- function b() {
- try {
- var a = new Audio, b = !!a.canPlayType, c = !!(b ? !1 : a.play);
- b || c ? "" !== Modernizr.audio.m4a && "no" !== Modernizr.audio.m4a ? supportedAudioFormat = "m4a" : "" !== Modernizr.audio.ogg && "no" !== Modernizr.audio.ogg && (supportedAudioFormat = "ogg") : supportedAudioFormat = !1
- } catch (d) {
- supportedAudioFormat = !1
- }
- return supportedAudioFormat
- }
- function c(b, c) {
- a("#debug").empty().html("_loadAudio: " + b);
- var d = b, e = new Audio(d);
- return e.addEventListener("canplaythrough", function () {
- a("#debug").empty().html("_loadAudio: canplaythrough"), "function" == typeof c && c()
- }, !1), e.addEventListener("error", function () {
- a("#debug").empty().html("_loadAudio: error"), "function" == typeof c && c()
- }, !1), e.addEventListener("abort", function () {
- a("#debug").empty().html("_loadAudio: abort"), "function" == typeof c && c()
- }, !1), e.load(), e
- }
- return {
- getSupportedAudioFormat: function () {
- return b()
- }, loadAudio: function (a, b) {
- return c(a, b)
- }
- }
- }(jQuery), Videos = function (a) {
- function b() {
- i = ContentSlider.addSlider("#videos .flexslider", {
- animationLoop: !1,
- animationSpeed: 1e3,
- useCSS: !1,
- start: function () {
- g(a("#videos .flexslider li:eq(0)")), c(".videolink"), e()
- },
- before: function (b) {
- d(b);
- var c = b.slides.eq(b.animatingTo);
- if (a(c).find("div.btnWrap").hide(), b.animatingTo > b.currentSlide) {
- g(c, b.animatingTo);
- var e = a(c).find("img.unveil");
- e.unveil()
- } else h(b.animatingTo)
- },
- after: function (b) {
- Tracking.track("click", "SpotSlide", "Spots Anzeige Slide " + b.currentSlide, !1);
- var c = a(b.slides.eq(b.currentSlide)).find("div.btnWrap");
- c.delay(1e3).fadeIn(400)
- }
- })
- }
- function c(b) {
- a(b).on("click", function (b) {
- if (b.preventDefault(), !a(this).parent().hasClass("active")) {
- var c = a(this).data("video"), d = (a(this).data("target"), "http://www.youtube.com/watch?v=" + c), e = j, f = a(this).attr("title"), g = a(this).data("beschreibung");
- Loading.show(), e.setSrc(d), e.load(), e.play(), Loading.hide();
- var h = a("#videos li.flex-active-slide");
- h.find("h1.videotitle").html(f), h.find(".videobeschreibung").html(g), h.find(".videoPlaylist li.active").removeClass("active"), a(this).parent().addClass("active")
- }
- })
- }
- function d(b) {
- a("#videos .flexslider li.video:eq(" + b.currentSlide + ") video").each(function () {
- f()
- })
- }
- function e() {
- a("#videos li.video").waypoint(function (a) {
- "up" === a && f()
- }, {
- offset: function () {
- return a(this).height()
- }
- }).waypoint(function (a) {
- "down" === a && f()
- }, {
- offset: function () {
- return -1 * a(this).height()
- }
- })
- }
- function f() {
- j && !j.paused && j.pause()
- }
- function g(b, c) {
- var d = pickup_vars.template + "/assets/js/vendor/";
- b.hasClass("videoInitialised") ? h(c) : (j = b.addClass("videoInitialised").find("video:eq(0)").mediaelementplayer({
- pluginPath: d,
- features: ["playpause", "progress", "current", "duration", "volume", "fullscreen"],
- flashName: "flashmediaelement.swf",
- success: function (b) {
- a(b).bind("play", function () {
- Tracking.track("videostart", "SpotPlay", "Spot play", !0)
- })
- }
- }), j = j[0].player, k.push(j))
- }
- function h(a) {
- j = k[a]
- }
- var i, j, k = [];
- return {
- init: function () {
- a("#videos").length > 0 && (b(), a("#videos .flexslider li.flex-active-slide .videoPlaylist img.unveil").unveil())
- }
- }
- }(jQuery);
- window.log = function () {
- log.history = log.history || [], log.history.push(arguments), this.console && console.log(Array.prototype.slice.call(arguments))
- }, window.timelog = function () {
- if (log.history = log.history || [], log.history.push(arguments), this.console) {
- var a = new Date, b = a.getHours() + ":" + a.getMinutes() + ":" + a.getSeconds() + ":" + a.getMilliseconds();
- console.log(b + ": " + Array.prototype.slice.call(arguments))
- }
- }, $.urlParam = function (a) {
- var b = new RegExp("[\\?&]" + a + "=([^&#]*)").exec(window.location.href);
- return null == b ? null : b[1] || 0
- };
- var Tracking = function (a) {
- function b() {
- a("#menu-meta-company-navigation li.menu-leibniz-de a").bind("click", function () {
- c("link", "HeaderLeibniz", "Link auf www.leibniz.de", !0)
- }), a("#menu-meta-company-navigation li.menu-unternehmen a").bind("click", function () {
- c("link", "HeaderUnternehmen", "Link auf www.bahlsen.com", !0)
- }), a("#main-navigation .socialfacebook a").bind("click", function () {
- c("link", "HeaderSocialMediaFacebook", "Header Link auf Facebook", !0)
- }), a("#main-navigation .socialyoutube a").bind("click", function () {
- c("link", "HeaderSocialMediaFacebook", "Header Link auf YouTube", !0)
- }), a("#main-navigation .socialpinterest a").bind("click", function () {
- c("link", "HeaderSocialMediaFacebook", "Header Link auf Pinterest", !0)
- }), a("#menu-hauptnavigation li.menu-produkte a").bind("click", function () {
- c("link", "HauptnavigationProdukte", "Hauptnavigation Produkte", !1)
- }), a("#menu-hauptnavigation li.menu-rezepte a").bind("click", function () {
- c("link", "HauptnavigationRezepte", "Hauptnavigation Rezepte", !1)
- }), a("#menu-hauptnavigation li.menu-spots a").bind("click", function () {
- c("link", "HauptnavigationSpots", "Hauptnavigation Spots", !1)
- }), a("#menu-hauptnavigation li.menu-aktionen a").bind("click", function () {
- c("link", "HauptnavigationAktionen", "Hauptnavigation Aktionen", !1)
- }), a("#facebook .rfb-link").bind("click", function () {
- c("link", "FacebookPostLink", "Facebook Klick auf Post-Link", !1)
- }), a("a.track").bind("click", function () {
- var b = a(this).data("track");
- b || (b = "Beschreibung ist leer"), c("click", "TrackingLink", b, !1)
- }), a("footer.content-info .nav li.socialfacebook a").bind("click", function () {
- c("link", "FooterSocialMediaFacebook", "Footer Facebook", !0)
- }), a("footer.content-info .nav li.socialyoutube a").bind("click", function () {
- c("link", "FooterSocialMediaYoutube", "Footer YouTube", !0)
- }), a("footer.content-info .nav li.socialpinterest a").bind("click", function () {
- c("link", "FooterSocialMediaPinterest", "Footer Pinterest", !0)
- }), a("#rezepte").waypoint(function () {
- c("page", "SectionRezepte", "Section Rezepte", !0)
- }, {triggerOnce: !0, offset: 200}), a("#beissdichdurch").waypoint(function () {
- c("page", "SectionBeissdichdurch", "Section Beiss dich durch", !0)
- }, {triggerOnce: !0, offset: 200}), a("#videos").waypoint(function () {
- c("page", "SectionSpots", "Section Spots", !0)
- }, {triggerOnce: !0, offset: 200}), a("#bergaufundup").waypoint(function () {
- c("page", "SectionBergaufundup", "Section Berg Auf und Up", !0)
- }, {triggerOnce: !0, offset: 200}), a("#aktionen0").waypoint(function () {
- c("page", "SectionAktionen", "Section Aktion", !0)
- }, {triggerOnce: !0, offset: 200}), a("#aktionen1").waypoint(function () {
- c("page", "SectionAktionen", "Section Aktion 2", !0)
- }, {triggerOnce: !0, offset: 200}), a("#newsletter").waypoint(function () {
- c("page", "SectionNewsletter", "Section Newsletter", !0)
- }, {triggerOnce: !0, offset: 200})
- }
- function c(b, c, d, g) {
- if ("function" == typeof et_eC_Wrapper && "object" == typeof ET_Event) {
- b = b ? b : "click", c = c ? encodeURIComponent(c) : "";
- var h = d ? encodeURIComponent(d) : "";
- if (g) {
- if (-1 !== a.inArray(c, f))return;
- f.push(c)
- }
- switch (b) {
- case"link":
- ET_Event.link(h, c);
- break;
- case"download":
- ET_Event.download(h, c);
- break;
- case"videostart":
- ET_Event.videoStart(h);
- break;
- case"videostop":
- ET_Event.videoStop(h);
- break;
- case"page":
- et_eC_Wrapper(e, d, "", "", "", "", "", "", "", "", "", "", "");
- break;
- default:
- ET_Event.click(h, c)
- }
- }
- }
- function d(a, b, c) {
- "function" == typeof et_eC_Wrapper && "object" == typeof ET_Event && et_eC_Wrapper(e, a, b, "", "", c, "", "", "", "", "", "", "")
- }
- var e, f = [];
- return {
- init: function () {
- pickup_vars.etracker.length > 0 && (e = pickup_vars.etracker, b())
- }, track: function (a, b, d, e) {
- c(a, b, d, e)
- }, trackTarget: function (a, b, c) {
- d(a, b, c)
- }
- }
- }(jQuery), Main = function () {
- "use strict";
- return {
- init: function () {
- PageSettings.init(), Loading.init(), Intro.init(), Produkte.init(), Rezepte.init(), Videos.init(), Formulare.init(), Gewinnspiele.init(), Newsletter.init(), Tracking.init(), AuszeitzoneBeissdichdurch.init(), CarGame.init("#car-game"), AuszeitzoneKatschong.init()
- }
- }
- }(jQuery);
- $(document).ready(function () {
- Main.init()
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement