(function (o, y, Ab) { var S = { html: false, photo: false, iframe: false, inline: false, transition: "elastic", speed: 300, fadeOut: 300, width: false, initialWidth: "600", innerWidth: false, maxWidth: false, height: false, initialHeight: "450", innerHeight: false, maxHeight: false, scalePhotos: true, scrolling: true, opacity: 0.9, preloading: true, className: false, overlayClose: true, escKey: true, arrowKey: true, top: false, bottom: false, left: false, right: false, fixed: false, data: undefined, closeButton: true, fastIframe: true, open: false, reposition: true, loop: true, slideshow: false, slideshowAuto: true, slideshowSpeed: 2500, slideshowStart: "开启自动播放", slideshowStop: "关闭自动播放", photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i, retinaImage: false, retinaUrl: false, retinaSuffix: "@2x.$1", current: T("当前") + ": {current} / {total}", previous: T("上一个") + " ", next: T("下一个") + " ", close: T("关闭"), xhrError: "加载内容失败.", imgError: "加载图片失败.", returnFocus: true, trapFocus: true, onOpen: false, onLoad: false, onComplete: false, onCleanup: false, onClosed: false, rel: function () { return this.rel }, href: function () { return o(this).children("img").attr("src") }, title: function () { return this.title }, createImg: function () { var Aq = new Image(); var Ap = o(this).data("cbox-img-attrs"); if (typeof Ap === "object") { o.each(Ap, function (Ar, As) { Aq[Ar] = As }) } return Aq }, createIframe: function () { var Ap = y.createElement("iframe"); var Aq = o(this).data("cbox-iframe-attrs"); if (typeof Aq === "object") { o.each(Aq, function (Ar, As) { Ap[Ar] = As }) } if ("frameBorder" in Ap) { Ap.frameBorder = 0 } if ("allowTransparency" in Ap) { Ap.allowTransparency = "true" } Ap.name = (new Date()).getTime(); Ap.allowFullScreen = true; return Ap } }, j = "colorbox", G = "cbox", H = G + "Element", R = G + "_open", W = G + "_load", Al = G + "_complete", D = G + "_cleanup", k = G + "_closed", t = G + "_purge", Z, s, f, C, J, N, Af, w, An, F, V, Q, Ad, B, a, K, Ae, n, Ao, E, u = o(""), Aa, g, c, Ac, i, Ai, O, A, p, Aj, h, r, P = "div", Ak = 0, v = {}, q; function Ag(Ap, As, Aq) { var Ar = y.createElement(Ap); if (As) { Ar.id = G + As } if (Aq) { Ar.style.cssText = Aq } return o(Ar) } function X() { return Ab.innerHeight ? Ab.innerHeight : o(Ab).height() } function Ah(Aq, Ap) { if (Ap !== Object(Ap)) { Ap = {} } this.cache = {}; this.el = Aq; this.value = function (Ar) { var As; if (this.cache[Ar] === undefined) { As = o(this.el).attr("data-cbox-" + Ar); if (As !== undefined) { this.cache[Ar] = As } else { if (Ap[Ar] !== undefined) { this.cache[Ar] = Ap[Ar] } else { if (S[Ar] !== undefined) { this.cache[Ar] = S[Ar] } } } } return this.cache[Ar] }; this.get = function (Ar) { var As = this.value(Ar); return o.isFunction(As) ? As.call(this.el, this) : As } } function I(Ap) { var Ar = An.length, Aq = (Ai + Ap) % Ar; return (Aq < 0) ? Ar + Aq : Aq } function e(Ap, Aq) { return Math.round((/%/.test(Ap) ? ((Aq === "x" ? F.width() : X()) / 100) : 1) * parseInt(Ap, 10)) } function Am(Aq, Ap) { return Aq.get("photo") || Aq.get("photoRegex").test(Ap) } function Y(Aq, Ap) { return Aq.get("retinaUrl") && Ab.devicePixelRatio > 1 ? Ap.replace(Aq.get("photoRegex"), Aq.get("retinaSuffix")) : Ap } function L(Ap) { if ("contains" in s[0] && !s[0].contains(Ap.target) && Ap.target !== Z[0]) { Ap.stopPropagation(); s.focus() } } function U(Ap) { if (U.str !== Ap) { s.add(Z).removeClass(U.str).addClass(Ap); U.str = Ap } } function z(Ap) { Ai = 0; if (Ap && Ap !== false && Ap !== "nofollow") { An = o("." + H).filter(function () { var Aq = o.data(this, j); var Ar = new Ah(this, Aq); return (Ar.get("rel") === Ap) }); Ai = An.index(Aa.el); if (Ai === -1) { An = An.add(Aa.el); Ai = An.length - 1 } } else { An = o(Aa.el) } } function x(Ap) { o(y).trigger(Ap); u.triggerHandler(Ap) } var b = (function () { var Au, Av = G + "Slideshow_", Aw = "click." + G, As; function Ax() { clearTimeout(As) } function At() { if (Aa.get("loop") || An[Ai + 1]) { Ax(); As = setTimeout(r.next, Aa.get("slideshowSpeed")) } } function Aq() { K.html(Aa.get("slideshowStop")).unbind(Aw).one(Aw, Ap); u.bind(Al, At).bind(W, Ax); s.removeClass(Av + "off").addClass(Av + "on") } function Ap() { Ax(); u.unbind(Al, At).unbind(W, Ax); K.html(Aa.get("slideshowStart")).unbind(Aw).one(Aw, function () { r.next(); Aq() }); s.removeClass(Av + "on").addClass(Av + "off") } function Ar() { Au = false; K.hide(); Ax(); u.unbind(Al, At).unbind(W, Ax); s.removeClass(Av + "off " + Av + "on") } return function () { if (Au) { if (!Aa.get("slideshow")) { u.unbind(D, Ar); Ar() } } else { if (Aa.get("slideshow") && An[1]) { Au = true; u.one(D, Ar); if (Aa.get("slideshowAuto")) { Aq() } else { Ap() } K.show() } } } }()); function m(Au) { var Ar; if (!Aj) { Ar = o(Au).data(j); Aa = new Ah(Au, Ar); z(Aa.get("rel")); if (!A) { A = p = true; U(Aa.get("className")); s.css({ visibility: "hidden", display: "block", opacity: "" }); V = Ag(P, "LoadedContent", "width:0; height:0; overflow:hidden; visibility:hidden"); C.css({ width: "", height: "" }).append(V); g = J.height() + w.height() + C.outerHeight(true) - C.height(); c = N.width() + Af.width() + C.outerWidth(true) - C.width(); Ac = V.outerHeight(true); i = V.outerWidth(true); var Ap = e(Aa.get("initialWidth"), "x"); var Av = e(Aa.get("initialHeight"), "y"); var At = Aa.get("maxWidth"); var As = Aa.get("maxHeight"); Aa.w = (At !== false ? Math.min(Ap, e(At, "x")) : Ap) - i - c; Aa.h = (As !== false ? Math.min(Av, e(As, "y")) : Av) - Ac - g; V.css({ width: "", height: Aa.h }); r.position(); x(R); Aa.get("onOpen"); E.add(B).hide(); s.focus(); if (Aa.get("trapFocus")) { if (y.addEventListener) { y.addEventListener("focus", L, true); u.one(k, function () { y.removeEventListener("focus", L, true) }) } } if (Aa.get("returnFocus")) { u.one(k, function () { o(Aa.el).focus() }) } } var Aq = parseFloat(Aa.get("opacity")); Z.css({ opacity: Aq === Aq ? Aq : "", cursor: Aa.get("overlayClose") ? "pointer" : "", visibility: "visible" }).show(); if (Aa.get("closeButton")) { Ao.html(Aa.get("close")).appendTo(C) } else { Ao.appendTo("
") } d() } } function l() { if (!s) { q = false; F = o(Ab); s = Ag(P).attr({ id: j, "class": o.support.opacity === false ? G + "IE" : "", role: "dialog", tabindex: "-1" }).hide(); Z = Ag(P, "Overlay").hide(); Ad = o([Ag(P, "LoadingOverlay")[0], Ag(P, "LoadingGraphic")[0]]); f = Ag(P, "Wrapper"); C = Ag(P, "Content").append(B = Ag(P, "Title"), a = Ag(P, "Current"), n = o('