PageSourceSearch

https://www.target-nehberg.de/themes/rt360/js/jquery.colorbox-min.js?v=1.x

js target-nehberg.de collected 2026-10-02 12:00:43 UTC 21,262 bytes, 739 lines download raw bytes

1/*!
2	Colorbox 1.6.4
3	license: MIT
4	http://www.jacklmoore.com/colorbox
5*/
6(function (t, e, i) {
7  function n(i, n, o) {
8    var r = e.createElement(i);
9    return n && (r.id = Z + n), o && (r.style.cssText = o), t(r);
10  }
11  function o() {
12    return i.innerHeight ? i.innerHeight : t(i).height();
13  }
14  function r(e, i) {
15    i !== Object(i) && (i = {}),
16      (this.cache = {}),
17      (this.el = e),
18      (this.value = function (e) {
19        var n;
20        return (
21          void 0 === this.cache[e] &&
22            ((n = t(this.el).attr("data-cbox-" + e)),
23            void 0 !== n
24              ? (this.cache[e] = n)
25              : void 0 !== i[e]
26              ? (this.cache[e] = i[e])
27              : void 0 !== X[e] && (this.cache[e] = X[e])),
28          this.cache[e]
29        );
30      }),
31      (this.get = function (e) {
32        var i = this.value(e);
33        return t.isFunction(i) ? i.call(this.el, this) : i;
34      });
35  }
36  function h(t) {
37    var e = W.length,
38      i = (A + t) % e;
39    return 0 > i ? e + i : i;
40  }
41  function a(t, e) {
42    return Math.round(
43      (/%/.test(t) ? ("x" === e ? E.width() : o()) / 100 : 1) * parseInt(t, 10)
44    );
45  }
46  function s(t, e) {
47    return t.get("photo") || t.get("photoRegex").test(e);
48  }
49  function l(t, e) {
50    return t.get("retinaUrl") && i.devicePixelRatio > 1
51      ? e.replace(t.get("photoRegex"), t.get("retinaSuffix"))
52      : e;
53  }
54  function d(t) {
55    "contains" in x[0] &&
56      !x[0].contains(t.target) &&
57      t.target !== v[0] &&
58      (t.stopPropagation(), x.focus());
59  }
60  function c(t) {
61    c.str !== t && (x.add(v).removeClass(c.str).addClass(t), (c.str = t));
62  }
63  function g(e) {
64    (A = 0),
65      e && e !== !1 && "nofollow" !== e
66        ? ((W = t("." + te).filter(function () {
67            var i = t.data(this, Y),
68              n = new r(this, i);
69            return n.get("rel") === e;
70          })),
71          (A = W.index(_.el)),
72          -1 === A && ((W = W.add(_.el)), (A = W.length - 1)))
73        : (W = t(_.el));
74  }
75  function u(i) {
76    t(e).trigger(i), ae.triggerHandler(i);
77  }
78  function f(i) {
79    var o;
80    if (!G) {
81      if (((o = t(i).data(Y)), (_ = new r(i, o)), g(_.get("rel")), !U)) {
82        (U = $ = !0),
83          c(_.get("className")),
84          x.css({ visibility: "hidden", display: "block", opacity: "" }),
85          (I = n(
86            se,
87            "LoadedContent",
88            "width:0; height:0; overflow:hidden; visibility:hidden"
89          )),
90          b.css({ width: "", height: "" }).append(I),
91          (j = T.height() + k.height() + b.outerHeight(!0) - b.height()),
92          (D = C.width() + H.width() + b.outerWidth(!0) - b.width()),
93          (N = I.outerHeight(!0)),
94          (z = I.outerWidth(!0));
95        var h = a(_.get("initialWidth"), "x"),
96          s = a(_.get("initialHeight"), "y"),
97          l = _.get("maxWidth"),
98          f = _.get("maxHeight");
99        (_.w = Math.max((l !== !1 ? Math.min(h, a(l, "x")) : h) - z - D, 0)),
100          (_.h = Math.max((f !== !1 ? Math.min(s, a(f, "y")) : s) - N - j, 0)),
101          I.css({ width: "", height: _.h }),
102          J.position(),
103          u(ee),
104          _.get("onOpen"),
105          O.add(F).hide(),
106          x.focus(),
107          _.get("trapFocus") &&
108            e.addEventListener &&
109            (e.addEventListener("focus", d, !0),
110            ae.one(re, function () {
111              e.removeEventListener("focus", d, !0);
112            })),
113          _.get("returnFocus") &&
114            ae.one(re, function () {
115              t(_.el).focus();
116            });
117      }
118      var p = parseFloat(_.get("opacity"));
119      v
120        .css({
121          opacity: p === p ? p : "",
122          cursor: _.get("overlayClose") ? "pointer" : "",
123          visibility: "visible",
124        })
125        .show(),
126        _.get("closeButton")
127          ? B.html(_.get("close")).appendTo(b)
128          : B.appendTo("<div/>"),
129        w();
130    }
131  }
132  function p() {
133    x ||
134      ((V = !1),
135      (E = t(i)),
136      (x = n(se)
137        .attr({
138          id: Y,
139          class: t.support.opacity === !1 ? Z + "IE" : "",
140          role: "dialog",
141          tabindex: "-1",
142        })
143        .hide()),
144      (v = n(se, "Overlay").hide()),
145      (L = t([n(se, "LoadingOverlay")[0], n(se, "LoadingGraphic")[0]])),
146      (y = n(se, "Wrapper")),
147      (b = n(se, "Content").append(
148        (F = n(se, "Title")),
149        (R = n(se, "Current")),
150        (P = t('<button type="button"/>').attr({ id: Z + "Previous" })),
151        (K = t('<button type="button"/>').attr({ id: Z + "Next" })),
152        (S = t('<button type="button"/>').attr({ id: Z + "Slideshow" })),
153        L
154      )),
155      (B = t('<button type="button"/>').attr({ id: Z + "Close" })),
156      y
157        .append(
158          n(se).append(
159            n(se, "TopLeft"),
160            (T = n(se, "TopCenter")),
161            n(se, "TopRight")
162          ),
163          n(se, !1, "clear:left").append(
164            (C = n(se, "MiddleLeft")),
165            b,
166            (H = n(se, "MiddleRight"))
167          ),
168          n(se, !1, "clear:left").append(
169            n(se, "BottomLeft"),
170            (k = n(se, "BottomCenter")),
171            n(se, "BottomRight")
172          )
173        )
174        .find("div div")
175        .css({ float: "left" }),
176      (M = n(
177        se,
178        !1,
179        "position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"
180      )),
181      (O = K.add(P).add(R).add(S))),
182      e.body && !x.parent().length && t(e.body).append(v, x.append(y, M));
183  }
184  function m() {
185    function i(t) {
186      t.which > 1 ||
187        t.shiftKey ||
188        t.altKey ||
189        t.metaKey ||
190        t.ctrlKey ||
191        (t.preventDefault(), f(this));
192    }
193    return x
194      ? (V ||
195          ((V = !0),
196          K.click(function () {
197            J.next();
198          }),
199          P.click(function () {
200            J.prev();
201          }),
202          B.click(function () {
203            J.close();
204          }),
205          v.click(function () {
206            _.get("overlayClose") && J.close();
207          }),
208          t(e).bind("keydown." + Z, function (t) {
209            var e = t.keyCode;
210            U && _.get("escKey") && 27 === e && (t.preventDefault(), J.close()),
211              U &&
212                _.get("arrowKey") &&
213                W[1] &&
214                !t.altKey &&
215                (37 === e
216                  ? (t.preventDefault(), P.click())
217                  : 39 === e && (t.preventDefault(), K.click()));
218          }),
219          t.isFunction(t.fn.on)
220            ? t(e).on("click." + Z, "." + te, i)
221            : t("." + te).live("click." + Z, i)),
222        !0)
223      : !1;
224  }
225  function w() {
226    var e,
227      o,
228      r,
229      h = J.prep,
230      d = ++le;
231    if (
232      (($ = !0),
233      (q = !1),
234      u(he),
235      u(ie),
236      _.get("onLoad"),
237      (_.h = _.get("height")
238        ? a(_.get("height"), "y") - N - j
239        : _.get("innerHeight") && a(_.get("innerHeight"), "y")),
240      (_.w = _.get("width")
241        ? a(_.get("width"), "x") - z - D
242        : _.get("innerWidth") && a(_.get("innerWidth"), "x")),
243      (_.mw = _.w),
244      (_.mh = _.h),
245      _.get("maxWidth") &&
246        ((_.mw = a(_.get("maxWidth"), "x") - z - D),
247        (_.mw = _.w && _.w < _.mw ? _.w : _.mw)),
248      _.get("maxHeight") &&
249        ((_.mh = a(_.get("maxHeight"), "y") - N - j),
250        (_.mh = _.h && _.h < _.mh ? _.h : _.mh)),
251      (e = _.get("href")),
252      (Q = setTimeout(function () {
253        L.show();
254      }, 100)),
255      _.get("inline"))
256    ) {
257      var c = t(e).eq(0);
258      (r = t("<div>").hide().insertBefore(c)),
259        ae.one(he, function () {
260          r.replaceWith(c);
261        }),
262        h(c);
263    } else
264      _.get("iframe")
265        ? h(" ")
266        : _.get("html")
267        ? h(_.get("html"))
268        : s(_, e)
269        ? ((e = l(_, e)),
270          (q = _.get("createImg")),
271          t(q)
272            .addClass(Z + "Photo")
273            .bind("error." + Z, function () {
274              h(n(se, "Error").html(_.get("imgError")));
275            })
276            .one("load", function () {
277              d === le &&
278                setTimeout(function () {
279                  var e;
280                  _.get("retinaImage") &&
281                    i.devicePixelRatio > 1 &&
282                    ((q.height = q.height / i.devicePixelRatio),
283                    (q.width = q.width / i.devicePixelRatio)),
284                    _.get("scalePhotos") &&
285                      ((o = function () {
286                        (q.height -= q.height * e), (q.width -= q.width * e);
287                      }),
288                      _.mw &&
289                        q.width > _.mw &&
290                        ((e = (q.width - _.mw) / q.width), o()),
291                      _.mh &&
292                        q.height > _.mh &&
293                        ((e = (q.height - _.mh) / q.height), o())),
294                    _.h &&
295                      (q.style.marginTop =
296                        Math.max(_.mh - q.height, 0) / 2 + "px"),
297                    W[1] &&
298                      (_.get("loop") || W[A + 1]) &&
299                      ((q.style.cursor = "pointer"),
300                      t(q).bind("click." + Z, function () {
301                        J.next();
302                      })),
303                    (q.style.width = q.width + "px"),
304                    (q.style.height = q.height + "px"),
305                    h(q);
306                }, 1);
307            }),
308          (q.src = e))
309        : e &&
310          M.load(e, _.get("data"), function (e, i) {
311            d === le &&
312              h(
313                "error" === i
314                  ? n(se, "Error").html(_.get("xhrError"))
315                  : t(this).contents()
316              );
317          });
318  }
319  var v,
320    x,
321    y,
322    b,
323    T,
324    C,
325    H,
326    k,
327    W,
328    E,
329    I,
330    M,
331    L,
332    F,
333    R,
334    S,
335    K,
336    P,
337    B,
338    O,
339    _,
340    j,
341    D,
342    N,
343    z,
344    A,
345    q,
346    U,
347    $,
348    G,
349    Q,
350    J,
351    V,
352    X = {
353      html: !1,
354      photo: !1,
355      iframe: !1,
356      inline: !1,
357      transition: "elastic",
358      speed: 300,
359      fadeOut: 300,
360      width: !1,
361      initialWidth: "600",
362      innerWidth: !1,
363      maxWidth: !1,
364      height: !1,
365      initialHeight: "450",
366      innerHeight: !1,
367      maxHeight: !1,
368      scalePhotos: !0,
369      scrolling: !0,
370      opacity: 0.9,
371      preloading: !0,
372      className: !1,
373      overlayClose: !0,
374      escKey: !0,
375      arrowKey: !0,
376      top: !1,
377      bottom: !1,
378      left: !1,
379      right: !1,
380      fixed: !1,
381      data: void 0,
382      closeButton: !0,
383      fastIframe: !0,
384      open: !1,
385      reposition: !0,
386      loop: !0,
387      slideshow: !1,
388      slideshowAuto: !0,
389      slideshowSpeed: 2500,
390      slideshowStart: "start slideshow",
391      slideshowStop: "stop slideshow",
392      photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
393      retinaImage: !1,
394      retinaUrl: !1,
395      retinaSuffix: "@2x.$1",
396      current: "image {current} of {total}",
397      previous: "previous",
398      next: "next",
399      close: "close",
400      xhrError: "This content failed to load.",
401      imgError: "This image failed to load.",
402      returnFocus: !0,
403      trapFocus: !0,
404      onOpen: !1,
405      onLoad: !1,
406      onComplete: !1,
407      onCleanup: !1,
408      onClosed: !1,
409      rel: function () {
410        return this.rel;
411      },
412      href: function () {
413        return t(this).attr("href");
414      },
415      title: function () {
416        return this.title;
417      },
418      createImg: function () {
419        var e = new Image(),
420          i = t(this).data("cbox-img-attrs");
421        return (
422          "object" == typeof i &&
423            t.each(i, function (t, i) {
424              e[t] = i;
425            }),
426          e
427        );
428      },
429      createIframe: function () {
430        var i = e.createElement("iframe"),
431          n = t(this).data("cbox-iframe-attrs");
432        return (
433          "object" == typeof n &&
434            t.each(n, function (t, e) {
435              i[t] = e;
436            }),
437          "frameBorder" in i && (i.frameBorder = 0),
438          "allowTransparency" in i && (i.allowTransparency = "true"),
439          (i.name = new Date().getTime()),
440          (i.allowFullscreen = !0),
441          i
442        );
443      },
444    },
445    Y = "colorbox",
446    Z = "cbox",
447    te = Z + "Element",
448    ee = Z + "_open",
449    ie = Z + "_load",
450    ne = Z + "_complete",
451    oe = Z + "_cleanup",
452    re = Z + "_closed",
453    he = Z + "_purge",
454    ae = t("<a/>"),
455    se = "div",
456    le = 0,
457    de = {},
458    ce = (function () {
459      function t() {
460        clearTimeout(h);
461      }
462      function e() {
463        (_.get("loop") || W[A + 1]) &&
464          (t(), (h = setTimeout(J.next, _.get("slideshowSpeed"))));
465      }
466      function i() {
467        S.html(_.get("slideshowStop")).unbind(s).one(s, n),
468          ae.bind(ne, e).bind(ie, t),
469          x.removeClass(a + "off").addClass(a + "on");
470      }
471      function n() {
472        t(),
473          ae.unbind(ne, e).unbind(ie, t),
474          S.html(_.get("slideshowStart"))
475            .unbind(s)
476            .one(s, function () {
477              J.next(), i();
478            }),
479          x.removeClass(a + "on").addClass(a + "off");
480      }
481      function o() {
482        (r = !1),
483          S.hide(),
484          t(),
485          ae.unbind(ne, e).unbind(ie, t),
486          x.removeClass(a + "off " + a + "on");
487      }
488      var r,
489        h,
490        a = Z + "Slideshow_",
491        s = "click." + Z;
492      return function () {
493        r
494          ? _.get("slideshow") || (ae.unbind(oe, o), o())
495          : _.get("slideshow") &&
496            W[1] &&
497            ((r = !0),
498            ae.one(oe, o),
499            _.get("slideshowAuto") ? i() : n(),
500            S.show());
501      };
502    })();
503  t[Y] ||
504    (t(p),
505    (J = t.fn[Y] = t[Y] = function (e, i) {
506      var n,
507        o = this;
508      return (
509        (e = e || {}),
510        t.isFunction(o) && ((o = t("<a/>")), (e.open = !0)),
511        o[0]
512          ? (p(),
513            m() &&
514              (i && (e.onComplete = i),
515              o
516                .each(function () {
517                  var i = t.data(this, Y) || {};
518                  t.data(this, Y, t.extend(i, e));
519                })
520                .addClass(te),
521              (n = new r(o[0], e)),
522              n.get("open") && f(o[0])),
523            o)
524          : o
525      );
526    }),
527    (J.position = function (e, i) {
528      function n() {
529        (T[0].style.width = k[0].style.width = b[0].style.width =
530          parseInt(x[0].style.width, 10) - D + "px"),
531          (b[0].style.height = C[0].style.height = H[0].style.height =
532            parseInt(x[0].style.height, 10) - j + "px");
533      }
534      var r,
535        h,
536        s,
537        l = 0,
538        d = 0,
539        c = x.offset();
540      if (
541        (E.unbind("resize." + Z),
542        x.css({ top: -9e4, left: -9e4 }),
543        (h = E.scrollTop()),
544        (s = E.scrollLeft()),
545        _.get("fixed")
546          ? ((c.top -= h), (c.left -= s), x.css({ position: "fixed" }))
547          : ((l = h), (d = s), x.css({ position: "absolute" })),
548        (d +=
549          _.get("right") !== !1
550            ? Math.max(E.width() - _.w - z - D - a(_.get("right"), "x"), 0)
551            : _.get("left") !== !1
552            ? a(_.get("left"), "x")
553            : Math.round(Math.max(E.width() - _.w - z - D, 0) / 2)),
554        (l +=
555          _.get("bottom") !== !1
556            ? Math.max(o() - _.h - N - j - a(_.get("bottom"), "y"), 0)
557            : _.get("top") !== !1
558            ? a(_.get("top"), "y")
559            : Math.round(Math.max(o() - _.h - N - j, 0) / 2)),
560        x.css({ top: c.top, left: c.left, visibility: "visible" }),
561        (y[0].style.width = y[0].style.height = "9999px"),
562        (r = { width: _.w + z + D, height: _.h + N + j, top: l, left: d }),
563        e)
564      ) {
565        var g = 0;
566        t.each(r, function (t) {
567          return r[t] !== de[t] ? ((g = e), void 0) : void 0;
568        }),
569          (e = g);
570      }
571      (de = r),
572        e || x.css(r),
573        x.dequeue().animate(r, {
574          duration: e || 0,
575          complete: function () {
576            n(),
577              ($ = !1),
578              (y[0].style.width = _.w + z + D + "px"),
579              (y[0].style.height = _.h + N + j + "px"),
580              _.get("reposition") &&
581                setTimeout(function () {
582                  E.bind("resize." + Z, J.position);
583                }, 1),
584              t.isFunction(i) && i();
585          },
586          step: n,
587        });
588    }),
589    (J.resize = function (t) {
590      var e;
591      U &&
592        ((t = t || {}),
593        t.width && (_.w = a(t.width, "x") - z - D),
594        t.innerWidth && (_.w = a(t.innerWidth, "x")),
595        I.css({ width: _.w }),
596        t.height && (_.h = a(t.height, "y") - N - j),
597        t.innerHeight && (_.h = a(t.innerHeight, "y")),
598        t.innerHeight ||
599          t.height ||
600          ((e = I.scrollTop()), I.css({ height: "auto" }), (_.h = I.height())),
601        I.css({ height: _.h }),
602        e && I.scrollTop(e),
603        J.position("none" === _.get("transition") ? 0 : _.get("speed")));
604    }),
605    (J.prep = function (i) {
606      function o() {
607        return (
608          (_.w = _.w || I.width()), (_.w = _.mw && _.mw < _.w ? _.mw : _.w), _.w
609        );
610      }
611      function a() {
612        return (
613          (_.h = _.h || I.height()),
614          (_.h = _.mh && _.mh < _.h ? _.mh : _.h),
615          _.h
616        );
617      }
618      if (U) {
619        var d,
620          g = "none" === _.get("transition") ? 0 : _.get("speed");
621        I.remove(),
622          (I = n(se, "LoadedContent").append(i)),
623          I.hide()
624            .appendTo(M.show())
625            .css({
626              width: o(),
627              overflow: _.get("scrolling") ? "auto" : "hidden",
628            })
629            .css({ height: a() })
630            .prependTo(b),
631          M.hide(),
632          t(q).css({ float: "none" }),
633          c(_.get("className")),
634          (d = function () {
635            function i() {
636              t.support.opacity === !1 && x[0].style.removeAttribute("filter");
637            }
638            var n,
639              o,
640              a = W.length;
641            U &&
642              ((o = function () {
643                clearTimeout(Q), L.hide(), u(ne), _.get("onComplete");
644              }),
645              F.html(_.get("title")).show(),
646              I.show(),
647              a > 1
648                ? ("string" == typeof _.get("current") &&
649                    R.html(
650                      _.get("current")
651                        .replace("{current}", A + 1)
652                        .replace("{total}", a)
653                    ).show(),
654                  K[_.get("loop") || a - 1 > A ? "show" : "hide"]().html(
655                    _.get("next")
656                  ),
657                  P[_.get("loop") || A ? "show" : "hide"]().html(
658                    _.get("previous")
659                  ),
660                  ce(),
661                  _.get("preloading") &&
662                    t.each([h(-1), h(1)], function () {
663                      var i,
664                        n = W[this],
665                        o = new r(n, t.data(n, Y)),
666                        h = o.get("href");
667                      h &&
668                        s(o, h) &&
669                        ((h = l(o, h)),
670                        (i = e.createElement("img")),
671                        (i.src = h));
672                    }))
673                : O.hide(),
674              _.get("iframe")
675                ? ((n = _.get("createIframe")),
676                  _.get("scrolling") || (n.scrolling = "no"),
677                  t(n)
678                    .attr({ src: _.get("href"), class: Z + "Iframe" })
679                    .one("load", o)
680                    .appendTo(I),
681                  ae.one(he, function () {
682                    n.src = "//about:blank";
683                  }),
684                  _.get("fastIframe") && t(n).trigger("load"))
685                : o(),
686              "fade" === _.get("transition") ? x.fadeTo(g, 1, i) : i());
687          }),
688          "fade" === _.get("transition")
689            ? x.fadeTo(g, 0, function () {
690                J.position(0, d);
691              })
692            : J.position(g, d);
693      }
694    }),
695    (J.next = function () {
696      !$ && W[1] && (_.get("loop") || W[A + 1]) && ((A = h(1)), f(W[A]));
697    }),
698    (J.prev = function () {
699      !$ && W[1] && (_.get("loop") || A) && ((A = h(-1)), f(W[A]));
700    }),
701    (J.close = function () {
702      U &&
703        !G &&
704        ((G = !0),
705        (U = !1),
706        u(oe),
707        _.get("onCleanup"),
708        E.unbind("." + Z),
709        v.fadeTo(_.get("fadeOut") || 0, 0),
710        x.stop().fadeTo(_.get("fadeOut") || 0, 0, function () {
711          x.hide(),
712            v.hide(),
713            u(he),
714            I.remove(),
715            setTimeout(function () {
716              (G = !1), u(re), _.get("onClosed");
717            }, 1);
718        }));
719    }),
720    (J.remove = function () {
721      x &&
722        (x.stop(),
723        t[Y].close(),
724        x.stop(!1, !0).remove(),
725        v.remove(),
726        (G = !1),
727        (x = null),
728        t("." + te)
729          .removeData(Y)
730          .removeClass(te),
731        t(e)
732          .unbind("click." + Z)
733          .unbind("keydown." + Z));
734    }),
735    (J.element = function () {
736      return t(_.el);
737    }),
738    (J.settings = X));
739})(jQuery, document, window);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.