Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Magnific Popup - v0.9.9 - 2013-12-27
- http://dimsemenov.com/plugins/magnific-popup/
- Copyright (c) 2013 Dmitry Semenov; */
- jQuery.easing.jswing = jQuery.easing.swing;
- jQuery.extend(jQuery.easing, {
- def: "easeOutQuad", swing: function (a, b, c, d, h) {
- return jQuery.easing[jQuery.easing.def](a, b, c, d, h)
- }, easeInQuad: function (a, b, c, d, h) {
- return d * (b /= h) * b + c
- }, easeOutQuad: function (a, b, c, d, h) {
- return -d * (b /= h) * (b - 2) + c
- }, easeInOutQuad: function (a, b, c, d, h) {
- return 1 > (b /= h / 2) ? d / 2 * b * b + c : -d / 2 * (--b * (b - 2) - 1) + c
- }, easeInCubic: function (a, b, c, d, h) {
- return d * (b /= h) * b * b + c
- }, easeOutCubic: function (a, b, c, d, h) {
- return d * ((b = b / h - 1) * b * b + 1) + c
- }, easeInOutCubic: function (a, b, c, d, h) {
- return 1 > (b /= h / 2) ? d / 2 * b * b * b + c :
- d / 2 * ((b -= 2) * b * b + 2) + c
- }, easeInQuart: function (a, b, c, d, h) {
- return d * (b /= h) * b * b * b + c
- }, easeOutQuart: function (a, b, c, d, h) {
- return -d * ((b = b / h - 1) * b * b * b - 1) + c
- }, easeInOutQuart: function (a, b, c, d, h) {
- return 1 > (b /= h / 2) ? d / 2 * b * b * b * b + c : -d / 2 * ((b -= 2) * b * b * b - 2) + c
- }, easeInQuint: function (a, b, c, d, h) {
- return d * (b /= h) * b * b * b * b + c
- }, easeOutQuint: function (a, b, c, d, h) {
- return d * ((b = b / h - 1) * b * b * b * b + 1) + c
- }, easeInOutQuint: function (a, b, c, d, h) {
- return 1 > (b /= h / 2) ? d / 2 * b * b * b * b * b + c : d / 2 * ((b -= 2) * b * b * b * b + 2) + c
- }, easeInSine: function (a, b, c, d, h) {
- return -d * Math.cos(b /
- h * (Math.PI / 2)) + d + c
- }, easeOutSine: function (a, b, c, d, h) {
- return d * Math.sin(b / h * (Math.PI / 2)) + c
- }, easeInOutSine: function (a, b, c, d, h) {
- return -d / 2 * (Math.cos(Math.PI * b / h) - 1) + c
- }, easeInExpo: function (a, b, c, d, h) {
- return 0 == b ? c : d * Math.pow(2, 10 * (b / h - 1)) + c
- }, easeOutExpo: function (a, b, c, d, h) {
- return b == h ? c + d : d * (-Math.pow(2, -10 * b / h) + 1) + c
- }, easeInOutExpo: function (a, b, c, d, h) {
- return 0 == b ? c : b == h ? c + d : 1 > (b /= h / 2) ? d / 2 * Math.pow(2, 10 * (b - 1)) + c : d / 2 * (-Math.pow(2, -10 * --b) + 2) + c
- }, easeInCirc: function (a, b, c, d, h) {
- return -d * (Math.sqrt(1 - (b /= h) *
- b) - 1) + c
- }, easeOutCirc: function (a, b, c, d, h) {
- return d * Math.sqrt(1 - (b = b / h - 1) * b) + c
- }, easeInOutCirc: function (a, b, c, d, h) {
- return 1 > (b /= h / 2) ? -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, h) {
- a = 1.70158;
- var f = 0, p = d;
- if (0 == b) return c;
- if (1 == (b /= h)) return c + d;
- f || (f = .3 * h);
- p < Math.abs(d) ? (p = d, a = f / 4) : a = f / (2 * Math.PI) * Math.asin(d / p);
- return -(p * Math.pow(2, 10 * --b) * Math.sin(2 * (b * h - a) * Math.PI / f)) + c
- }, easeOutElastic: function (a, b, c, d, h) {
- a = 1.70158;
- var f = 0, p = d;
- if (0 == b) return c;
- if (1 == (b /=
- h)) return c + d;
- f || (f = .3 * h);
- p < Math.abs(d) ? (p = d, a = f / 4) : a = f / (2 * Math.PI) * Math.asin(d / p);
- return p * Math.pow(2, -10 * b) * Math.sin(2 * (b * h - a) * Math.PI / f) + d + c
- }, easeInOutElastic: function (a, b, c, d, h) {
- a = 1.70158;
- var f = 0, p = d;
- if (0 == b) return c;
- if (2 == (b /= h / 2)) return c + d;
- f || (f = .3 * h * 1.5);
- p < Math.abs(d) ? (p = d, a = f / 4) : a = f / (2 * Math.PI) * Math.asin(d / p);
- return 1 > b ? -.5 * p * Math.pow(2, 10 * --b) * Math.sin(2 * (b * h - a) * Math.PI / f) + c : .5 * p * Math.pow(2, -10 * --b) * Math.sin(2 * (b * h - a) * Math.PI / f) + d + c
- }, easeInBack: function (a, b, c, d, h, f) {
- void 0 == f && (f = 1.70158);
- return d * (b /= h) * b * ((f + 1) * b - f) + c
- }, easeOutBack: function (a, b, c, d, h, f) {
- void 0 == f && (f = 1.70158);
- return d * ((b = b / h - 1) * b * ((f + 1) * b + f) + 1) + c
- }, easeInOutBack: function (a, b, c, d, h, f) {
- void 0 == f && (f = 1.70158);
- return 1 > (b /= h / 2) ? 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, h) {
- return d - jQuery.easing.easeOutBounce(a, h - b, 0, d, h) + c
- }, easeOutBounce: function (a, b, c, d, h) {
- return (b /= h) < 1 / 2.75 ? 7.5625 * d * b * b + c : b < 2 / 2.75 ? d * (7.5625 * (b -= 1.5 / 2.75) * b + .75) + c : b < 2.5 / 2.75 ? 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, h) {
- return b < h / 2 ? .5 * jQuery.easing.easeInBounce(a, 2 * b, 0, d, h) + c : .5 * jQuery.easing.easeOutBounce(a, 2 * b - h, 0, d, h) + .5 * d + c
- }
- });
- (function (a) {
- a.fn.supersubs = function (b) {
- var c = a.extend({}, a.fn.supersubs.defaults, b);
- return this.each(function () {
- var b = a(this), h = a.meta ? a.extend({}, c, b.data()) : c;
- setTimeout(function (b) {
- var c = b.find(".sub-menu").show(), d = a('<li id="menu-fontsize">—</li>').css({
- padding: 0,
- position: "absolute",
- top: "-999em",
- width: "auto"
- }).appendTo(b)[0].clientWidth;
- a("#menu-fontsize").remove();
- c.each(function (b) {
- b = a(this);
- var c = b.children(), f = c.children("a"), p = c.css("white-space", "nowrap").css("float");
- b.add(c).add(f).css({
- "float": "none",
- width: "auto"
- });
- f = b[0].clientWidth / d;
- f += h.extraWidth;
- f > h.maxWidth ? f = h.maxWidth : f < h.minWidth && (f = h.minWidth);
- f += "em";
- h.applyMin ? b.css("min-width", f) : b.css("width", f);
- c.css({"float": p, width: "100%", "white-space": "normal"}).each(function () {
- var b = a(this).children("ul"), c = void 0 !== b.css("left") ? "left" : "right";
- b.css(c, "100%")
- });
- b.parent().hasClass("tdb-menu-item-inactive") && b.parent().removeClass("tdb-menu-item-inactive")
- }).hide()
- }, 500, b)
- })
- };
- a.fn.supersubs.defaults = {minWidth: 9, maxWidth: 25, extraWidth: 0, applyMin: !1}
- })(jQuery);
- (function (a) {
- var b = 0, c = 0, d = 0, h = 0, f = "ontouchstart" in window || 0 < navigator.msMaxTouchPoints,
- p = "onorientationchange" in window, G = !1, W = !1, P = !1, X = !1, B = !1, v = "pointer", x = "pointer",
- T = [], U = [], pa = [], Y = [], D = [], ba = [], H = [], q = [], w = [], ca = [], ja = [], k = {
- showScrollbar: function (b, c) {
- b.scrollbarHide && a("." + c).css({
- opacity: b.scrollbarOpacity,
- filter: "alpha(opacity:" + 100 * b.scrollbarOpacity + ")"
- })
- }, hideScrollbar: function (a, b, e, c, d, g, f, h, p, q) {
- if (a.scrollbar && a.scrollbarHide) for (var l = e; l < e + 25; l++) b[b.length] = k.hideScrollbarIntervalTimer(10 *
- l, c[e], (e + 24 - l) / 24, d, g, f, h, p, q, a)
- }, hideScrollbarInterval: function (b, c, e, d, f, g, p, q, G) {
- h = -1 * b / w[q] * (f - g - p - d);
- k.setSliderOffset("." + e, h);
- a("." + e).css({
- opacity: G.scrollbarOpacity * c,
- filter: "alpha(opacity:" + G.scrollbarOpacity * c * 100 + ")"
- })
- }, slowScrollHorizontalInterval: function (b, c, e, d, f, g, p, G, ka, Q, L, A, N, t, z, r, v, n, F) {
- if (F.infiniteSlider) {
- if (e <= -1 * w[r] || e <= -1 * ca[r]) {
- var l = a(b).width();
- if (e <= -1 * ca[r]) {
- var E = -1 * L[0];
- a(c).each(function (b) {
- k.setSliderOffset(a(c)[b], E + v);
- b < A.length && (A[b] = -1 * E);
- E += z[b]
- });
- e += -1 *
- A[0];
- q[r] = -1 * A[0] + v;
- w[r] = q[r] + l - g;
- H[r] = 0
- }
- for (; e <= -1 * w[r];) {
- var y = 0, m = k.getSliderOffset(a(c[0]), "x");
- a(c).each(function (a) {
- k.getSliderOffset(this, "x") < m && (m = k.getSliderOffset(this, "x"), y = a)
- });
- N = q[r] + l;
- k.setSliderOffset(a(c)[y], N);
- q[r] = -1 * A[1] + v;
- w[r] = q[r] + l - g;
- A.splice(0, 1);
- A.splice(A.length, 0, -1 * N + v);
- H[r]++
- }
- }
- if (e >= -1 * q[r] || 0 <= e) {
- l = a(b).width();
- if (0 < e) for (E = -1 * L[0], a(c).each(function (b) {
- k.setSliderOffset(a(c)[b], E + v);
- b < A.length && (A[b] = -1 * E);
- E += z[b]
- }), e -= -1 * A[0], q[r] = -1 * A[0] + v, w[r] = q[r] + l - g, H[r] = t; 0 <
- -1 * A[0] - l + v;) {
- var O = 0, C = k.getSliderOffset(a(c[0]), "x");
- a(c).each(function (a) {
- k.getSliderOffset(this, "x") > C && (C = k.getSliderOffset(this, "x"), O = a)
- });
- N = q[r] - z[O];
- k.setSliderOffset(a(c)[O], N);
- A.splice(0, 0, -1 * N + v);
- A.splice(A.length - 1, 1);
- q[r] = -1 * A[0] + v;
- w[r] = q[r] + l - g;
- H[r]--;
- D[r]++
- }
- for (; e > -1 * q[r];) O = 0, C = k.getSliderOffset(a(c[0]), "x"), a(c).each(function (a) {
- k.getSliderOffset(this, "x") > C && (C = k.getSliderOffset(this, "x"), O = a)
- }), N = q[r] - z[O], k.setSliderOffset(a(c)[O], N), A.splice(0, 0, -1 * N + v), A.splice(A.length - 1, 1),
- q[r] = -1 * A[0] + v, w[r] = q[r] + l - g, H[r]--
- }
- }
- L = !1;
- g = k.calcActiveOffset(F, e, A, g, H[r], t, Q, r);
- N = (g + H[r] + t) % t;
- F.infiniteSlider ? N != ba[r] && (L = !0) : g != D[r] && (L = !0);
- if (L && (t = new k.args("change", F, b, a(b).children(":eq(" + N + ")"), N, n), a(b).parent().data("args", t), "" != F.onSlideChange)) F.onSlideChange(t);
- D[r] = g;
- ba[r] = N;
- e = Math.floor(e);
- if (r != a(b).parent().data("args").data.sliderNumber) return !0;
- k.setSliderOffset(b, e);
- F.scrollbar && (h = Math.floor((-1 * e - q[r] + v) / (w[r] - q[r] + v) * (p - G - f)), b = f - ka, e >= -1 * q[r] + v ? (b = f - ka - -1 * h, k.setSliderOffset(a("." +
- d), 0)) : (e <= -1 * w[r] + 1 && (b = p - G - ka - h), k.setSliderOffset(a("." + d), h)), a("." + d).css({width: b + "px"}))
- }, slowScrollHorizontal: function (b, c, e, d, f, g, h, p, v, G, L, A, N, t, z, r, x, n, F, J, R) {
- var l = k.getSliderOffset(b, "x");
- g = [];
- var E = 0, y = 25 / 1024 * p;
- frictionCoefficient = R.frictionCoefficient;
- elasticFrictionCoefficient = R.elasticFrictionCoefficient;
- snapFrictionCoefficient = R.snapFrictionCoefficient;
- f > R.snapVelocityThreshold && R.snapToChildren && !F ? E = 1 : f < -1 * R.snapVelocityThreshold && R.snapToChildren && !F && (E = -1);
- f < -1 * y ? f = -1 * y : f >
- y && (f = y);
- a(b)[0] !== a(n)[0] && (E *= -1, f *= -2);
- n = H[z];
- if (R.infiniteSlider) var m = q[z], O = w[z];
- F = [];
- y = [];
- for (var C = 0; C < N.length; C++) F[C] = N[C], C < c.length && (y[C] = k.getSliderOffset(a(c[C]), "x"));
- for (; 1 < f || -1 > f;) {
- f *= frictionCoefficient;
- l += f;
- (l > -1 * q[z] || l < -1 * w[z]) && !R.infiniteSlider && (f *= elasticFrictionCoefficient, l += f);
- if (R.infiniteSlider) {
- if (l <= -1 * O) {
- O = a(b).width();
- var Q = 0, ka = y[0];
- for (C = 0; C < y.length; C++) y[C] < ka && (ka = y[C], Q = C);
- C = m + O;
- y[Q] = C;
- m = -1 * F[1] + J;
- O = m + O - p;
- F.splice(0, 1);
- F.splice(F.length, 0, -1 * C + J);
- n++
- }
- if (l >=
- -1 * m) {
- O = a(b).width();
- Q = 0;
- ka = y[0];
- for (C = 0; C < y.length; C++) y[C] > ka && (ka = y[C], Q = C);
- C = m - t[Q];
- y[Q] = C;
- F.splice(0, 0, -1 * C + J);
- F.splice(F.length - 1, 1);
- m = -1 * F[0] + J;
- O = m + O - p;
- n--
- }
- }
- g[g.length] = l
- }
- y = !1;
- f = k.calcActiveOffset(R, l, F, p, n, x, D[z], z);
- m = (f + n + x) % x;
- R.snapToChildren && (R.infiniteSlider ? m != ba[z] && (y = !0) : f != D[z] && (y = !0), 0 > E && !y ? (f++, f >= N.length && !R.infiniteSlider && (f = N.length - 1)) : 0 < E && !y && (f--, 0 > f && !R.infiniteSlider && (f = 0)));
- if (R.snapToChildren || (l > -1 * q[z] || l < -1 * w[z]) && !R.infiniteSlider) {
- (l > -1 * q[z] || l < -1 * w[z]) && !R.infiniteSlider ?
- g.splice(0, g.length) : (g.splice(.1 * g.length, g.length), l = 0 < g.length ? g[g.length - 1] : l);
- for (; l < F[f] - .5 || l > F[f] + .5;) l = (l - F[f]) * snapFrictionCoefficient + F[f], g[g.length] = l;
- g[g.length] = F[f]
- }
- E = 1;
- 0 != g.length % 2 && (E = 0);
- for (l = 0; l < e.length; l++) clearTimeout(e[l]);
- n = (f + n + x) % x;
- m = 0;
- for (l = E; l < g.length; l += 2) if (l == E || 1 < Math.abs(g[l] - m) || l >= g.length - 2) m = g[l], e[e.length] = k.slowScrollHorizontalIntervalTimer(10 * l, b, c, g[l], d, h, p, v, G, L, f, A, N, r, x, t, z, J, n, R);
- m = (f + H[z] + x) % x;
- "" != R.onSlideComplete && 1 < g.length && (e[e.length] = k.onSlideCompleteTimer(10 *
- (l + 1), R, b, a(b).children(":eq(" + m + ")"), n, z));
- e[e.length] = k.updateBackfaceVisibilityTimer(10 * (l + 1), c, z, x, R);
- Y[z] = e;
- k.hideScrollbar(R, e, l, g, d, h, p, G, L, z)
- }, onSlideComplete: function (b, c, e, d, f) {
- e = new k.args("complete", b, a(c), e, d, d);
- a(c).parent().data("args", e);
- if ("" != b.onSlideComplete) b.onSlideComplete(e)
- }, getSliderOffset: function (b, c) {
- c = "x" == c ? 4 : 5;
- if (!G || W || P) b = parseInt(a(b).css("left"), 10); else {
- for (var e = ["-webkit-transform", "-moz-transform", "transform"], d, f = 0; f < e.length; f++) if (void 0 != a(b).css(e[f]) &&
- 0 < a(b).css(e[f]).length) {
- d = a(b).css(e[f]).split(",");
- break
- }
- b = void 0 == d[c] ? 0 : parseInt(d[c], 10)
- }
- return b
- }, setSliderOffset: function (b, c) {
- c = parseInt(c, 10);
- !G || W || P ? a(b).css({left: c + "px"}) : a(b).css({
- msTransform: "matrix(1,0,0,1," + c + ",0)",
- webkitTransform: "matrix(1,0,0,1," + c + ",0)",
- MozTransform: "matrix(1,0,0,1," + c + ",0)",
- transform: "matrix(1,0,0,1," + c + ",0)"
- })
- }, setBrowserInfo: function () {
- null != navigator.userAgent.match("WebKit") ? (v = "-webkit-grab", x = "-webkit-grabbing") : null != navigator.userAgent.match("Gecko") ?
- (B = !0, v = "move", x = "-moz-grabbing") : null != navigator.userAgent.match("MSIE 7") ? X = W = !0 : null != navigator.userAgent.match("MSIE 8") ? X = P = !0 : null != navigator.userAgent.match("MSIE 9") && (X = !0)
- }, has3DTransform: function () {
- var b = !1, c = a("<div />").css({
- msTransform: "matrix(1,1,1,1,1,1)",
- webkitTransform: "matrix(1,1,1,1,1,1)",
- MozTransform: "matrix(1,1,1,1,1,1)",
- transform: "matrix(1,1,1,1,1,1)"
- });
- "" == c.attr("style") ? b = !1 : B && 21 <= parseInt(navigator.userAgent.split("/")[3], 10) ? b = !1 : void 0 != c.attr("style") && (b = !0);
- return b
- },
- getSlideNumber: function (a, b, e) {
- return (a - H[b] + e) % e
- }, calcActiveOffset: function (a, b, e, c, d, g, f, h) {
- d = !1;
- a = [];
- var l;
- b > e[0] && (l = 0);
- b < e[e.length - 1] && (l = g - 1);
- for (g = 0; g < e.length; g++) e[g] <= b && e[g] > b - c && (d || e[g] == b || (a[a.length] = e[g - 1]), a[a.length] = e[g], d = !0);
- 0 == a.length && (a[0] = e[e.length - 1]);
- for (g = d = 0; g < a.length; g++) f = Math.abs(b - a[g]), f < c && (d = a[g], c = f);
- for (g = 0; g < e.length; g++) d == e[g] && (l = g);
- return l
- }, changeSlide: function (b, c, e, d, f, g, h, p, q, v, G, A, x, t, z, r, w, n) {
- k.autoSlidePause(t);
- for (var l = 0; l < d.length; l++) clearTimeout(d[l]);
- var E = Math.ceil(n.autoSlideTransTimer / 10) + 1, y = k.getSliderOffset(c, "x"), m = A[b];
- m -= y;
- var O = b - (D[t] + H[t] + r) % r;
- if (n.infiniteSlider) {
- b = (b - H[t] + 2 * r) % r;
- l = !1;
- 0 == b && 2 == r && (b = r, A[b] = A[b - 1] - a(e).eq(0).outerWidth(!0), l = !0);
- m = A[b];
- m -= y;
- var C = [A[b] - a(c).width(), A[b] + a(c).width()];
- l && A.splice(A.length - 1, 1);
- for (l = 0; l < C.length; l++) Math.abs(C[l] - y) < Math.abs(m) && (m = C[l] - y)
- }
- 0 > m && -1 == O ? m += a(c).width() : 0 < m && 1 == O && (m -= a(c).width());
- O = [];
- k.showScrollbar(n, f);
- for (l = 0; l <= E; l++) C = l, C /= E, C--, C = y + m * (Math.pow(C, 5) + 1), O[O.length] =
- C;
- E = (b + H[t] + r) % r;
- for (l = y = 0; l < O.length; l++) {
- if (0 == l || 1 < Math.abs(O[l] - y) || l >= O.length - 2) y = O[l], d[l] = k.slowScrollHorizontalIntervalTimer(10 * (l + 1), c, e, O[l], f, g, h, p, q, v, b, G, A, z, r, x, t, w, E, n);
- 0 == l && "" != n.onSlideStart && (m = (D[t] + H[t] + r) % r, n.onSlideStart(new k.args("start", n, c, a(c).children(":eq(" + m + ")"), m, b)))
- }
- y = !1;
- n.infiniteSlider ? E != ba[t] && (y = !0) : b != D[t] && (y = !0);
- y && "" != n.onSlideComplete && (d[d.length] = k.onSlideCompleteTimer(10 * (l + 1), n, c, a(c).children(":eq(" + E + ")"), E, t));
- Y[t] = d;
- k.hideScrollbar(n, d, l, O, f, g,
- h, q, v, t);
- k.autoSlide(c, e, d, f, g, h, p, q, v, G, A, x, t, z, r, w, n)
- }, changeOffset: function (b, c, e, d, f, g, h, p, v, G, x, A, N, t, z, r, T, n) {
- k.autoSlidePause(t);
- for (var l = 0; l < d.length; l++) clearTimeout(d[l]);
- n.infiniteSlider || (b = b > -1 * q[t] + T ? -1 * q[t] + T : b, b = b < -1 * w[t] ? -1 * w[t] : b);
- var E = Math.ceil(n.autoSlideTransTimer / 10) + 1, y = k.getSliderOffset(c, "x");
- l = (k.calcActiveOffset(n, b, A, h, H, r, D[t], t) + H[t] + r) % r;
- var m = A.slice();
- if (n.snapToChildren && !n.infiniteSlider) b = A[l]; else if (n.infiniteSlider && n.snapToChildren) {
- for (; b >= m[0];) m.splice(0,
- 0, m[r - 1] + a(c).width()), m.splice(r, 1);
- for (; b <= m[r - 1];) m.splice(r, 0, m[0] - a(c).width()), m.splice(0, 1);
- l = k.calcActiveOffset(n, b, m, h, H, r, D[t], t);
- b = m[l]
- }
- var O = b - y;
- b = [];
- k.showScrollbar(n, f);
- for (m = 0; m <= E; m++) {
- var C = m;
- C /= E;
- C--;
- C = y + O * (Math.pow(C, 5) + 1);
- b[b.length] = C
- }
- E = (l + H[t] + r) % r;
- for (m = y = 0; m < b.length; m++) {
- if (0 == m || 1 < Math.abs(b[m] - y) || m >= b.length - 2) y = b[m], d[m] = k.slowScrollHorizontalIntervalTimer(10 * (m + 1), c, e, b[m], f, g, h, p, v, G, l, x, A, z, r, N, t, T, E, n);
- 0 == m && "" != n.onSlideStart && (E = (D[t] + H[t] + r) % r, n.onSlideStart(new k.args("start",
- n, c, a(c).children(":eq(" + E + ")"), E, l)))
- }
- y = !1;
- n.infiniteSlider ? E != ba[t] && (y = !0) : l != D[t] && (y = !0);
- y && "" != n.onSlideComplete && (d[d.length] = k.onSlideCompleteTimer(10 * (m + 1), n, c, a(c).children(":eq(" + E + ")"), E, t));
- Y[t] = d;
- k.hideScrollbar(n, d, m, b, f, g, h, v, G, t);
- k.autoSlide(c, e, d, f, g, h, p, v, G, x, A, N, t, z, r, T, n)
- }, autoSlide: function (a, b, e, c, d, g, f, h, p, q, v, G, x, t, z, r, w) {
- if (!U[x].autoSlide) return !1;
- k.autoSlidePause(x);
- T[x] = setTimeout(function () {
- !w.infiniteSlider && D[x] > v.length - 1 && (D[x] -= z);
- k.changeSlide(D[x] + H[x] + 1, a, b, e,
- c, d, g, f, h, p, q, v, G, x, t, z, r, w);
- k.autoSlide(a, b, e, c, d, g, f, h, p, q, v, G, x, t, z, r, w)
- }, w.autoSlideTimer + w.autoSlideTransTimer)
- }, autoSlidePause: function (a) {
- clearTimeout(T[a])
- }, isUnselectable: function (b, c) {
- return "" != c.unselectableSelector && 1 == a(b).closest(c.unselectableSelector).length ? !0 : !1
- }, slowScrollHorizontalIntervalTimer: function (a, b, e, c, d, g, f, h, p, q, v, x, G, t, z, r, w, n, F, D) {
- return setTimeout(function () {
- k.slowScrollHorizontalInterval(b, e, c, d, g, f, h, p, q, v, x, G, t, z, r, w, n, F, D)
- }, a)
- }, onSlideCompleteTimer: function (a,
- b, e, c, d, g) {
- return setTimeout(function () {
- k.onSlideComplete(b, e, c, d, g)
- }, a)
- }, hideScrollbarIntervalTimer: function (a, b, e, c, d, g, f, h, p, q) {
- return setTimeout(function () {
- k.hideScrollbarInterval(b, e, c, d, g, f, h, p, q)
- }, a)
- }, updateBackfaceVisibilityTimer: function (a, b, e, c, d) {
- return setTimeout(function () {
- k.updateBackfaceVisibility(b, e, c, d)
- }, a)
- }, updateBackfaceVisibility: function (b, c, e, d) {
- c = (D[c] + H[c] + e) % e;
- for (var l = [], g = 0; g < 2 * d.hardwareAccelBuffer; g++) {
- var f = k.mod(c + g - d.hardwareAccelBuffer, e);
- if ("visible" == a(b).eq(f).css("-webkit-backface-visibility")) {
- l[l.length] =
- f;
- var h = k.mod(f + 2 * d.hardwareAccelBuffer, e), m = k.mod(f - 2 * d.hardwareAccelBuffer, e);
- a(b).eq(f).css("-webkit-backface-visibility", "hidden");
- -1 == l.indexOf(m) && a(b).eq(m).css("-webkit-backface-visibility", "");
- -1 == l.indexOf(h) && a(b).eq(h).css("-webkit-backface-visibility", "")
- }
- }
- }, mod: function (a, b) {
- a %= b;
- return 0 > a ? a + b : a
- }, args: function (b, c, e, d, f, g) {
- this.prevSlideNumber = void 0 == a(e).parent().data("args") ? void 0 : a(e).parent().data("args").prevSlideNumber;
- this.prevSlideObject = void 0 == a(e).parent().data("args") ?
- void 0 : a(e).parent().data("args").prevSlideObject;
- this.targetSlideNumber = g + 1;
- this.targetSlideObject = a(e).children(":eq(" + g + ")");
- this.slideChanged = !1;
- "load" == b ? this.targetSlideObject = this.targetSlideNumber = void 0 : "start" == b ? this.targetSlideObject = this.targetSlideNumber = void 0 : "change" == b ? (this.slideChanged = !0, this.prevSlideNumber = void 0 == a(e).parent().data("args") ? c.startAtSlide : a(e).parent().data("args").currentSlideNumber, this.prevSlideObject = a(e).children(":eq(" + this.prevSlideNumber + ")")) : "complete" ==
- b && (this.slideChanged = a(e).parent().data("args").slideChanged);
- this.settings = c;
- this.data = a(e).parent().data("iosslider");
- this.sliderObject = e;
- this.sliderContainerObject = a(e).parent();
- this.currentSlideObject = d;
- this.currentSlideNumber = f + 1;
- this.currentSliderOffset = -1 * k.getSliderOffset(e, "x")
- }, preventDrag: function (a) {
- a.preventDefault()
- }, preventClick: function (a) {
- a.stopImmediatePropagation();
- return !1
- }, enableClick: function () {
- return !0
- }
- };
- k.setBrowserInfo();
- var da = {
- init: function (y, m) {
- G = k.has3DTransform();
- var e =
- a.extend(!0, {
- elasticPullResistance: .6,
- frictionCoefficient: .92,
- elasticFrictionCoefficient: .6,
- snapFrictionCoefficient: .92,
- snapToChildren: !1,
- snapSlideCenter: !1,
- startAtSlide: 1,
- scrollbar: !1,
- scrollbarDrag: !1,
- scrollbarHide: !0,
- scrollbarPaging: !1,
- scrollbarLocation: "top",
- scrollbarContainer: "",
- scrollbarOpacity: .4,
- scrollbarHeight: "4px",
- scrollbarBorder: "0",
- scrollbarMargin: "5px",
- scrollbarBackground: "#000",
- scrollbarBorderRadius: "100px",
- scrollbarShadow: "0 0 0 #000",
- scrollbarElasticPullResistance: .9,
- desktopClickDrag: !1,
- keyboardControls: !1,
- tabToAdvance: !1,
- responsiveSlideContainer: !0,
- responsiveSlides: !0,
- navSlideSelector: "",
- navPrevSelector: "",
- navNextSelector: "",
- autoSlideToggleSelector: "",
- autoSlide: !1,
- autoSlideTimer: 5E3,
- autoSlideTransTimer: 750,
- autoSlideHoverPause: !0,
- infiniteSlider: !1,
- snapVelocityThreshold: 5,
- slideStartVelocityThreshold: 0,
- horizontalSlideLockThreshold: 5,
- verticalSlideLockThreshold: 3,
- hardwareAccelBuffer: 5,
- stageCSS: {position: "relative", top: "0", left: "0", overflow: "hidden", zIndex: 1},
- unselectableSelector: "",
- onSliderLoaded: "",
- onSliderUpdate: "",
- onSliderResize: "",
- onSlideStart: "",
- onSlideChange: "",
- onSlideComplete: ""
- }, y);
- void 0 == m && (m = this);
- return a(m).each(function (l) {
- function E() {
- k.autoSlidePause(g);
- ya = a(K).find("a");
- Da = a(K).find("[onclick]");
- sa = a(K).find("*");
- a(F).css("width", "");
- a(F).css("height", "");
- a(K).css("width", "");
- I = a(K).children().not("script").get();
- oa = [];
- S = [];
- e.responsiveSlides && a(I).css("width", "100%");
- w[g] = 0;
- u = [];
- r = a(F).parent().width();
- J = a(F).outerWidth(!0);
- e.responsiveSlideContainer && (J =
- a(F).outerWidth(!0) > r ? r : a(F).width());
- a(F).css({
- position: e.stageCSS.position,
- top: e.stageCSS.top,
- left: e.stageCSS.left,
- overflow: e.stageCSS.overflow,
- zIndex: e.stageCSS.zIndex,
- webkitPerspective: 1E3,
- webkitBackfaceVisibility: "hidden",
- msTouchAction: "pan-y",
- width: J
- });
- a(e.unselectableSelector).css({cursor: "default"});
- for (var b = 0; b < I.length; b++) {
- oa[b] = a(I[b]).width();
- S[b] = a(I[b]).outerWidth(!0);
- var c = S[b];
- e.responsiveSlides && (S[b] > J ? (c = J + -1 * (S[b] - oa[b]), oa[b] = c, S[b] = J) : c = oa[b], a(I[b]).css({width: c}));
- a(I[b]).css({
- overflow: "hidden",
- position: "absolute"
- });
- u[b] = -1 * w[g];
- w[g] = w[g] + c + (S[b] - oa[b])
- }
- e.snapSlideCenter && (n = .5 * (J - S[0]), e.responsiveSlides && S[0] > J && (n = 0));
- ca[g] = 2 * w[g];
- for (b = 0; b < I.length; b++) k.setSliderOffset(a(I[b]), -1 * u[b] + w[g] + n), u[b] -= w[g];
- if (!e.infiniteSlider && !e.snapSlideCenter) {
- for (b = 0; b < u.length && !(u[b] <= -1 * (2 * w[g] - J)); b++) Ea = b;
- u.splice(Ea + 1, u.length);
- u[u.length] = -1 * (2 * w[g] - J)
- }
- for (b = 0; b < u.length; b++) Z[b] = u[b];
- wa && (U[g].startAtSlide = U[g].startAtSlide > u.length ? u.length : U[g].startAtSlide, e.infiniteSlider ? (U[g].startAtSlide =
- (U[g].startAtSlide - 1 + M) % M, D[g] = U[g].startAtSlide) : (U[g].startAtSlide = 0 > U[g].startAtSlide - 1 ? u.length - 1 : U[g].startAtSlide, D[g] = U[g].startAtSlide - 1), ba[g] = D[g]);
- q[g] = w[g] + n;
- a(K).css({
- position: "relative",
- cursor: v,
- webkitPerspective: "0",
- webkitBackfaceVisibility: "hidden",
- width: w[g] + "px"
- });
- fa = w[g];
- w[g] = 2 * w[g] - J + 2 * n;
- (ha = fa + n < J || 0 == J ? !0 : !1) && a(K).css({cursor: "default"});
- T = a(F).parent().outerHeight(!0);
- R = a(F).height();
- e.responsiveSlideContainer && (R = R > T ? T : R);
- a(F).css({height: R});
- k.setSliderOffset(K, u[D[g]]);
- if (e.infiniteSlider && !ha) {
- b = k.getSliderOffset(a(K), "x");
- for (c = (H[g] + M) % M * -1; 0 > c;) {
- var d = 0, l = k.getSliderOffset(a(I[0]), "x");
- a(I).each(function (a) {
- k.getSliderOffset(this, "x") < l && (l = k.getSliderOffset(this, "x"), d = a)
- });
- var f = q[g] + fa;
- k.setSliderOffset(a(I)[d], f);
- q[g] = -1 * u[1] + n;
- w[g] = q[g] + fa - J;
- u.splice(0, 1);
- u.splice(u.length, 0, -1 * f + n);
- c++
- }
- for (; 0 < -1 * u[0] - fa + n && e.snapSlideCenter && wa;) {
- var h = 0, E = k.getSliderOffset(a(I[0]), "x");
- a(I).each(function (a) {
- k.getSliderOffset(this, "x") > E && (E = k.getSliderOffset(this, "x"),
- h = a)
- });
- f = q[g] - S[h];
- k.setSliderOffset(a(I)[h], f);
- u.splice(0, 0, -1 * f + n);
- u.splice(u.length - 1, 1);
- q[g] = -1 * u[0] + n;
- w[g] = q[g] + fa - J;
- H[g]--;
- D[g]++
- }
- for (; b <= -1 * w[g];) d = 0, l = k.getSliderOffset(a(I[0]), "x"), a(I).each(function (a) {
- k.getSliderOffset(this, "x") < l && (l = k.getSliderOffset(this, "x"), d = a)
- }), f = q[g] + fa, k.setSliderOffset(a(I)[d], f), q[g] = -1 * u[1] + n, w[g] = q[g] + fa - J, u.splice(0, 1), u.splice(u.length, 0, -1 * f + n), H[g]++, D[g]--
- }
- k.setSliderOffset(K, u[D[g]]);
- k.updateBackfaceVisibility(I, g, M, e);
- e.desktopClickDrag || a(K).css({cursor: "default"});
- e.scrollbar && (a("." + Q).css({
- margin: e.scrollbarMargin,
- overflow: "hidden",
- display: "none"
- }), a("." + Q + " ." + L).css({border: e.scrollbarBorder}), B = parseInt(a("." + Q).css("marginLeft")) + parseInt(a("." + Q).css("marginRight")), V = parseInt(a("." + Q + " ." + L).css("borderLeftWidth"), 10) + parseInt(a("." + Q + " ." + L).css("borderRightWidth"), 10), t = "" != e.scrollbarContainer ? a(e.scrollbarContainer).width() : J, z = J / fa * (t - B), e.scrollbarHide || (xa = e.scrollbarOpacity), a("." + Q).css({
- position: "absolute",
- left: 0,
- width: t - B + "px",
- margin: e.scrollbarMargin
- }),
- "top" == e.scrollbarLocation ? a("." + Q).css("top", "0") : a("." + Q).css("bottom", "0"), a("." + Q + " ." + L).css({
- borderRadius: e.scrollbarBorderRadius,
- background: e.scrollbarBackground,
- height: e.scrollbarHeight,
- width: z - V + "px",
- minWidth: e.scrollbarHeight,
- border: e.scrollbarBorder,
- webkitPerspective: 1E3,
- webkitBackfaceVisibility: "hidden",
- position: "relative",
- opacity: xa,
- filter: "alpha(opacity:" + 100 * xa + ")",
- boxShadow: e.scrollbarShadow
- }), k.setSliderOffset(a("." + Q + " ." + L), Math.floor((-1 * u[D[g]] - q[g] + n) / (w[g] - q[g] + n) * (t - B - z))),
- a("." + Q).css({display: "block"}), A = a("." + Q + " ." + L), N = a("." + Q));
- e.scrollbarDrag && !ha && a("." + Q + " ." + L).css({cursor: v});
- e.infiniteSlider && (aa = (w[g] + J) / 3);
- "" != e.navSlideSelector && a(e.navSlideSelector).each(function (b) {
- a(this).css({cursor: "pointer"});
- a(this).unbind(ea).bind(ea, function (c) {
- "touchstart" == c.type ? a(this).unbind("click.iosSliderEvent") : a(this).unbind("touchstart.iosSliderEvent");
- ea = c.type + ".iosSliderEvent";
- k.changeSlide(b, K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e)
- })
- });
- "" != e.navPrevSelector && (a(e.navPrevSelector).css({cursor: "pointer"}),
- a(e.navPrevSelector).unbind(ea).bind(ea, function (b) {
- "touchstart" == b.type ? a(this).unbind("click.iosSliderEvent") : a(this).unbind("touchstart.iosSliderEvent");
- ea = b.type + ".iosSliderEvent";
- b = (D[g] + H[g] + M) % M;
- (0 < b || e.infiniteSlider) && k.changeSlide(b - 1, K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e)
- }));
- "" != e.navNextSelector && (a(e.navNextSelector).css({cursor: "pointer"}), a(e.navNextSelector).unbind(ea).bind(ea, function (b) {
- "touchstart" == b.type ? a(this).unbind("click.iosSliderEvent") : a(this).unbind("touchstart.iosSliderEvent");
- ea = b.type + ".iosSliderEvent";
- b = (D[g] + H[g] + M) % M;
- (b < u.length - 1 || e.infiniteSlider) && k.changeSlide(b + 1, K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e)
- }));
- e.autoSlide && !ha && "" != e.autoSlideToggleSelector && (a(e.autoSlideToggleSelector).css({cursor: "pointer"}), a(e.autoSlideToggleSelector).unbind(ea).bind(ea, function (b) {
- "touchstart" == b.type ? a(this).unbind("click.iosSliderEvent") : a(this).unbind("touchstart.iosSliderEvent");
- ea = b.type + ".iosSliderEvent";
- qa ? (k.autoSlide(K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e), qa = !1, a(e.autoSlideToggleSelector).removeClass("on")) :
- (k.autoSlidePause(g), qa = !0, a(e.autoSlideToggleSelector).addClass("on"))
- }));
- k.autoSlide(K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e);
- a(F).bind("mouseleave.iosSliderEvent", function () {
- if (qa) return !0;
- k.autoSlide(K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e)
- });
- a(F).bind("touchend.iosSliderEvent", function () {
- if (qa) return !0;
- k.autoSlide(K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e)
- });
- e.autoSlideHoverPause && a(F).bind("mouseenter.iosSliderEvent", function () {
- k.autoSlidePause(g)
- });
- a(F).data("iosslider", {
- obj: Fa,
- settings: e,
- scrollerNode: K,
- slideNodes: I,
- numberOfSlides: M,
- centeredSlideOffset: n,
- sliderNumber: g,
- originalOffsets: Z,
- childrenOffsets: u,
- sliderMax: w[g],
- scrollbarClass: L,
- scrollbarWidth: z,
- scrollbarStageWidth: t,
- stageWidth: J,
- scrollMargin: B,
- scrollBorder: V,
- infiniteSliderOffset: H[g],
- infiniteSliderWidth: aa,
- slideNodeOuterWidths: S,
- shortContent: ha
- });
- wa = !1;
- return !0
- }
- b++;
- var g = b, m = [];
- U[g] = a.extend({}, e);
- q[g] = 0;
- w[g] = 0;
- var y = [0, 0], G = [0, 0], Q = "scrollbarBlock" + b, L = "scrollbar" + b, A, N, t, z, r, T, n = 0,
- F = a(this), J, R, B, V, Ca, wa = !0;
- l = -1;
- var u, Z = [], xa = 0, la = 0, Ga = 0, K = a(this).children(":first-child"),
- I, oa, S, M = a(K).children().not("script").length, ia = !1, Ea = 0, za = !1, ta = void 0, aa;
- H[g] = 0;
- var ha = !1, qa = !1;
- pa[g] = !1;
- var ma, ua = !1, ra = !1, ea = "touchstart.iosSliderEvent click.iosSliderEvent", fa, ya, Da, sa;
- ja[g] = !1;
- Y[g] = [];
- e.scrollbarDrag && (e.scrollbar = !0, e.scrollbarHide = !1);
- var Fa = a(this);
- if (void 0 != Fa.data("iosslider")) return !0;
- 14.2 <= parseInt(a().jquery.split(".").join(""), 10) ? a(this).delegate("img", "dragstart.iosSliderEvent", function (a) {
- a.preventDefault()
- }) : a(this).find("img").bind("dragstart.iosSliderEvent",
- function (a) {
- a.preventDefault()
- });
- e.infiniteSlider && (e.scrollbar = !1);
- e.infiniteSlider && 1 == M && (e.infiniteSlider = !1);
- e.scrollbar && ("" != e.scrollbarContainer ? a(e.scrollbarContainer).append("<div class = '" + Q + "'><div class = '" + L + "'></div></div>") : a(K).parent().append("<div class = '" + Q + "'><div class = '" + L + "'></div></div>"));
- if (!E()) return !0;
- a(this).find("a").bind("mousedown", k.preventDrag);
- a(this).find("[onclick]").bind("click", k.preventDrag).each(function () {
- a(this).data("onclick", this.onclick)
- });
- l = k.calcActiveOffset(e,
- k.getSliderOffset(a(K), "x"), u, J, H[g], M, void 0, g);
- l = (l + H[g] + M) % M;
- l = new k.args("load", e, K, a(K).children(":eq(" + l + ")"), l, l);
- a(F).data("args", l);
- if ("" != e.onSliderLoaded) e.onSliderLoaded(l);
- e.scrollbarPaging && e.scrollbar && !ha && (a(N).css("cursor", "pointer"), a(N).bind("click.iosSliderEvent", function (b) {
- this == b.target && (b.pageX > a(A).offset().left ? da.nextPage(F) : da.prevPage(F))
- }));
- if (U[g].responsiveSlides || U[g].responsiveSlideContainer) l = p ? "orientationchange" : "resize", a(window).bind(l + ".iosSliderEvent-" + g,
- function () {
- setTimeout(function () {
- if (!E()) return !0;
- var b = a(F).data("args");
- if ("" !== e.onSliderResize) e.onSliderResize(b)
- }, 50)
- });
- !e.keyboardControls && !e.tabToAdvance || ha || a(document).bind("keydown.iosSliderEvent", function (a) {
- W || P || (a = a.originalEvent);
- if ("INPUT" == a.target.nodeName || "TEXTAREA" == a.target.nodeName || ja[g]) return !0;
- if (37 == a.keyCode && e.keyboardControls) a.preventDefault(), a = (D[g] + H[g] + M) % M, (0 < a || e.infiniteSlider) && k.changeSlide(a - 1, K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e); else if (39 == a.keyCode &&
- e.keyboardControls || 9 == a.keyCode && e.tabToAdvance) a.preventDefault(), a = (D[g] + H[g] + M) % M, (a < u.length - 1 || e.infiniteSlider) && k.changeSlide(a + 1, K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e)
- });
- if (f || e.desktopClickDrag) {
- var na = !1, Aa = !1;
- l = a(K);
- var va = a(K), Ba = !1;
- e.scrollbarDrag && (l = l.add(A), va = va.add(N));
- a(l).bind("mousedown.iosSliderEvent touchstart.iosSliderEvent", function (b) {
- a(window).one("scroll.iosSliderEvent", function (a) {
- na = !1
- });
- if (na) return !0;
- na = !0;
- Aa = !1;
- "touchstart" == b.type ? a(va).unbind("mousedown.iosSliderEvent") :
- a(va).unbind("touchstart.iosSliderEvent");
- if (ja[g] || ha || (Ba = k.isUnselectable(b.target, e))) return ia = na = !1, !0;
- ma = a(this)[0] === a(A)[0] ? A : K;
- W || P || (b = b.originalEvent);
- k.autoSlidePause(g);
- sa.unbind(".disableClick");
- if ("touchstart" == b.type) eventX = b.touches[0].pageX, eventY = b.touches[0].pageY; else {
- if (window.getSelection) window.getSelection().empty ? window.getSelection().empty() : window.getSelection().removeAllRanges && window.getSelection().removeAllRanges(); else if (document.selection) if (P) try {
- document.selection.empty()
- } catch (Ia) {
- } else document.selection.empty();
- eventX = b.pageX;
- eventY = b.pageY;
- za = !0;
- ta = K;
- a(this).css({cursor: x})
- }
- y = [0, 0];
- G = [0, 0];
- c = 0;
- ia = !1;
- for (b = 0; b < m.length; b++) clearTimeout(m[b]);
- b = k.getSliderOffset(K, "x");
- b > -1 * q[g] + n + fa ? (b = -1 * q[g] + n + fa, k.setSliderOffset(a("." + L), b), a("." + L).css({width: z - V + "px"})) : b < -1 * w[g] && (b = -1 * w[g], k.setSliderOffset(a("." + L), t - B - z), a("." + L).css({width: z - V + "px"}));
- b = a(this)[0] === a(A)[0] ? q[g] : 0;
- la = -1 * (k.getSliderOffset(this, "x") - eventX - b);
- k.getSliderOffset(this, "y");
- y[1] = eventX;
- G[1] = eventY;
- ra = !1
- });
- a(document).bind("touchmove.iosSliderEvent mousemove.iosSliderEvent",
- function (b) {
- W || P || (b = b.originalEvent);
- if (ja[g] || ha || Ba || !na) return !0;
- var l = 0;
- if ("touchmove" == b.type) eventX = b.touches[0].pageX, eventY = b.touches[0].pageY; else {
- if (window.getSelection) window.getSelection().empty || window.getSelection().removeAllRanges && window.getSelection().removeAllRanges(); else if (document.selection) if (P) try {
- document.selection.empty()
- } catch (Ja) {
- } else document.selection.empty();
- eventX = b.pageX;
- eventY = b.pageY;
- if (!za || !X && ("undefined" != typeof b.webkitMovementX || "undefined" != typeof b.webkitMovementY) &&
- 0 === b.webkitMovementY && 0 === b.webkitMovementX) return !0
- }
- y[0] = y[1];
- y[1] = eventX;
- c = (y[1] - y[0]) / 2;
- G[0] = G[1];
- G[1] = eventY;
- d = (G[1] - G[0]) / 2;
- if (!ia) {
- var f = (D[g] + H[g] + M) % M;
- f = new k.args("start", e, K, a(K).children(":eq(" + f + ")"), f, void 0);
- a(F).data("args", f);
- if ("" != e.onSlideStart) e.onSlideStart(f)
- }
- (d > e.verticalSlideLockThreshold || d < -1 * e.verticalSlideLockThreshold) && "touchmove" == b.type && !ia && (ua = !0);
- (c > e.horizontalSlideLockThreshold || c < -1 * e.horizontalSlideLockThreshold) && "touchmove" == b.type && b.preventDefault();
- if (c >
- e.slideStartVelocityThreshold || c < -1 * e.slideStartVelocityThreshold) ia = !0;
- if (ia && !ua) {
- f = k.getSliderOffset(K, "x");
- var E = a(ma)[0] === a(A)[0] ? q[g] : n,
- m = a(ma)[0] === a(A)[0] ? (q[g] - w[g] - n) / (t - B - z) : 1,
- p = a(ma)[0] === a(A)[0] ? e.scrollbarElasticPullResistance : e.elasticPullResistance,
- r = e.snapSlideCenter && a(ma)[0] === a(A)[0] ? 0 : n,
- O = e.snapSlideCenter && a(ma)[0] === a(A)[0] ? n : 0;
- "touchmove" == b.type && (Ga != b.touches.length && (la = -1 * f + eventX), Ga = b.touches.length);
- if (e.infiniteSlider) {
- if (f <= -1 * w[g]) {
- var v = a(K).width();
- if (f <= -1 * ca[g]) {
- var x =
- -1 * Z[0];
- a(I).each(function (b) {
- k.setSliderOffset(a(I)[b], x + n);
- b < u.length && (u[b] = -1 * x);
- x += S[b]
- });
- la -= -1 * u[0];
- q[g] = -1 * u[0] + n;
- w[g] = q[g] + v - J;
- H[g] = 0
- } else {
- var C = 0, Q = k.getSliderOffset(a(I[0]), "x");
- a(I).each(function (a) {
- k.getSliderOffset(this, "x") < Q && (Q = k.getSliderOffset(this, "x"), C = a)
- });
- p = q[g] + v;
- k.setSliderOffset(a(I)[C], p);
- q[g] = -1 * u[1] + n;
- w[g] = q[g] + v - J;
- u.splice(0, 1);
- u.splice(u.length, 0, -1 * p + n);
- H[g]++
- }
- }
- if (f >= -1 * q[g] || 0 <= f) if (v = a(K).width(), 0 <= f) for (x = -1 * Z[0], a(I).each(function (b) {
- k.setSliderOffset(a(I)[b],
- x + n);
- b < u.length && (u[b] = -1 * x);
- x += S[b]
- }), la += -1 * u[0], q[g] = -1 * u[0] + n, w[g] = q[g] + v - J, H[g] = M; 0 < -1 * u[0] - v + n;) {
- var T = 0, N = k.getSliderOffset(a(I[0]), "x");
- a(I).each(function (a) {
- k.getSliderOffset(this, "x") > N && (N = k.getSliderOffset(this, "x"), T = a)
- });
- p = q[g] - S[T];
- k.setSliderOffset(a(I)[T], p);
- u.splice(0, 0, -1 * p + n);
- u.splice(u.length - 1, 1);
- q[g] = -1 * u[0] + n;
- w[g] = q[g] + v - J;
- H[g]--;
- D[g]++
- } else T = 0, N = k.getSliderOffset(a(I[0]), "x"), a(I).each(function (a) {
- k.getSliderOffset(this, "x") > N && (N = k.getSliderOffset(this, "x"), T = a)
- }), p = q[g] -
- S[T], k.setSliderOffset(a(I)[T], p), u.splice(0, 0, -1 * p + n), u.splice(u.length - 1, 1), q[g] = -1 * u[0] + n, w[g] = q[g] + v - J, H[g]--
- } else v = a(K).width(), f > -1 * q[g] + n && (l = (q[g] + -1 * (la - E - eventX + r) * m - E) * p * -1 / m), f < -1 * w[g] && (l = (w[g] + O + -1 * (la - E - eventX) * m - E) * p * -1 / m);
- k.setSliderOffset(K, -1 * (la - E - eventX - l) * m - E + O);
- e.scrollbar && (k.showScrollbar(e, L), h = Math.floor((la - eventX - l - q[g] + r) / (w[g] - q[g] + n) * (t - B - z) * m), f = z, 0 >= h ? (f = z - V - -1 * h, k.setSliderOffset(a("." + L), 0), a("." + L).css({width: f + "px"})) : h >= t - B - V - z ? (f = t - B - V - h, k.setSliderOffset(a("." +
- L), h), a("." + L).css({width: f + "px"})) : k.setSliderOffset(a("." + L), h));
- "touchmove" == b.type && (Ca = b.touches[0].pageX);
- b = !1;
- l = k.calcActiveOffset(e, -1 * (la - eventX - l), u, J, H[g], M, void 0, g);
- f = (l + H[g] + M) % M;
- e.infiniteSlider ? f != ba[g] && (b = !0) : l != D[g] && (b = !0);
- if (b) {
- D[g] = l;
- ba[g] = f;
- ra = !0;
- f = new k.args("change", e, K, a(K).children(":eq(" + f + ")"), f, f);
- a(F).data("args", f);
- if ("" != e.onSlideChange) e.onSlideChange(f);
- k.updateBackfaceVisibility(I, g, M, e)
- }
- }
- });
- var Ha = a(window);
- if (P || W) Ha = a(document);
- a(l).bind("touchcancel.iosSliderEvent touchend.iosSliderEvent",
- function (a) {
- a = a.originalEvent;
- if (Aa) return !1;
- Aa = !0;
- if (ja[g] || ha || Ba) return !0;
- if (0 != a.touches.length) for (var b = 0; b < a.touches.length; b++) a.touches[b].pageX == Ca && k.slowScrollHorizontal(K, I, m, L, c, d, z, J, t, B, V, Z, u, S, g, aa, M, ma, ra, n, e); else k.slowScrollHorizontal(K, I, m, L, c, d, z, J, t, B, V, Z, u, S, g, aa, M, ma, ra, n, e);
- na = ua = !1;
- return !0
- });
- a(Ha).bind("mouseup.iosSliderEvent-" + g, function (b) {
- ia ? ya.unbind("click.disableClick").bind("click.disableClick", k.preventClick) : ya.unbind("click.disableClick").bind("click.disableClick",
- k.enableClick);
- Da.each(function () {
- this.onclick = function (b) {
- if (ia) return !1;
- a(this).data("onclick") && a(this).data("onclick").call(this, b || window.event)
- };
- this.onclick = a(this).data("onclick")
- });
- 1.8 <= parseFloat(a().jquery) ? sa.each(function () {
- var b = a._data(this, "events");
- if (void 0 != b && void 0 != b.click && "iosSliderEvent" != b.click[0].namespace) {
- if (!ia) return !1;
- a(this).one("click.disableClick", k.preventClick);
- b = a._data(this, "events").click;
- var e = b.pop();
- b.splice(0, 0, e)
- }
- }) : 1.6 <= parseFloat(a().jquery) && sa.each(function () {
- var b =
- a(this).data("events");
- if (void 0 != b && void 0 != b.click && "iosSliderEvent" != b.click[0].namespace) {
- if (!ia) return !1;
- a(this).one("click.disableClick", k.preventClick);
- b = a(this).data("events").click;
- var e = b.pop();
- b.splice(0, 0, e)
- }
- });
- if (!pa[g]) {
- if (ha) return !0;
- e.desktopClickDrag && a(K).css({cursor: v});
- e.scrollbarDrag && a(A).css({cursor: v});
- za = !1;
- if (void 0 == ta) return !0;
- k.slowScrollHorizontal(ta, I, m, L, c, d, z, J, t, B, V, Z, u, S, g, aa, M, ma, ra, n, e);
- ta = void 0
- }
- na = ua = !1
- })
- }
- })
- }, destroy: function (b, c) {
- void 0 == c && (c = this);
- return a(c).each(function () {
- var e =
- a(this), c = e.data("iosslider");
- if (void 0 == c) return !1;
- void 0 == b && (b = !0);
- k.autoSlidePause(c.sliderNumber);
- pa[c.sliderNumber] = !0;
- a(window).unbind(".iosSliderEvent-" + c.sliderNumber);
- a(document).unbind(".iosSliderEvent-" + c.sliderNumber);
- a(document).unbind("keydown.iosSliderEvent");
- a(this).unbind(".iosSliderEvent");
- a(this).children(":first-child").unbind(".iosSliderEvent");
- a(this).children(":first-child").children().unbind(".iosSliderEvent");
- a(c.settings.scrollbarBlockNode).unbind(".iosSliderEvent");
- b &&
- (a(this).attr("style", ""), a(this).children(":first-child").attr("style", ""), a(this).children(":first-child").children().attr("style", ""), a(c.settings.navSlideSelector).attr("style", ""), a(c.settings.navPrevSelector).attr("style", ""), a(c.settings.navNextSelector).attr("style", ""), a(c.settings.autoSlideToggleSelector).attr("style", ""), a(c.settings.unselectableSelector).attr("style", ""));
- c.settings.scrollbar && a(".scrollbarBlock" + c.sliderNumber).remove();
- c = Y[c.sliderNumber];
- for (var d = 0; d < c.length; d++) clearTimeout(c[d]);
- e.removeData("iosslider");
- e.removeData("args")
- })
- }, update: function (b) {
- void 0 == b && (b = this);
- return a(b).each(function () {
- var b = a(this), e = b.data("iosslider");
- if (void 0 == e) return !1;
- e.settings.startAtSlide = b.data("args").currentSlideNumber;
- da.destroy(!1, this);
- 1 != e.numberOfSlides && e.settings.infiniteSlider && (e.settings.startAtSlide = (D[e.sliderNumber] + 1 + H[e.sliderNumber] + e.numberOfSlides) % e.numberOfSlides);
- da.init(e.settings, this);
- b = new k.args("update", e.settings, e.scrollerNode, a(e.scrollerNode).children(":eq(" +
- (e.settings.startAtSlide - 1) + ")"), e.settings.startAtSlide - 1, e.settings.startAtSlide - 1);
- a(e.stageNode).data("args", b);
- if ("" != e.settings.onSliderUpdate) e.settings.onSliderUpdate(b)
- })
- }, addSlide: function (b, c) {
- return this.each(function () {
- var e = a(this), d = e.data("iosslider");
- if (void 0 == d) return !1;
- 0 == a(d.scrollerNode).children().length ? (a(d.scrollerNode).append(b), e.data("args").currentSlideNumber = 1) : d.settings.infiniteSlider ? (1 == c ? a(d.scrollerNode).children(":eq(0)").before(b) : a(d.scrollerNode).children(":eq(" +
- (c - 2) + ")").after(b), -1 > H[d.sliderNumber] && D[d.sliderNumber]--, e.data("args").currentSlideNumber >= c && D[d.sliderNumber]++) : (c <= d.numberOfSlides ? a(d.scrollerNode).children(":eq(" + (c - 1) + ")").before(b) : a(d.scrollerNode).children(":eq(" + (c - 2) + ")").after(b), e.data("args").currentSlideNumber >= c && e.data("args").currentSlideNumber++);
- e.data("iosslider").numberOfSlides++;
- da.update(this)
- })
- }, removeSlide: function (b) {
- return this.each(function () {
- var c = a(this), e = c.data("iosslider");
- if (void 0 == e) return !1;
- a(e.scrollerNode).children(":eq(" +
- (b - 1) + ")").remove();
- D[e.sliderNumber] > b - 1 && D[e.sliderNumber]--;
- c.data("iosslider").numberOfSlides--;
- da.update(this)
- })
- }, goToSlide: function (b, c, e) {
- void 0 == e && (e = this);
- return a(e).each(function () {
- var e = a(this).data("iosslider");
- if (void 0 == e || e.shortContent) return !1;
- b = b > e.childrenOffsets.length ? e.childrenOffsets.length - 1 : b - 1;
- void 0 != c && (e.settings.autoSlideTransTimer = c);
- k.changeSlide(b, a(e.scrollerNode), a(e.slideNodes), Y[e.sliderNumber], e.scrollbarClass, e.scrollbarWidth, e.stageWidth, e.scrollbarStageWidth,
- e.scrollMargin, e.scrollBorder, e.originalOffsets, e.childrenOffsets, e.slideNodeOuterWidths, e.sliderNumber, e.infiniteSliderWidth, e.numberOfSlides, e.centeredSlideOffset, e.settings)
- })
- }, prevSlide: function (b) {
- return this.each(function () {
- var c = a(this).data("iosslider");
- if (void 0 == c || c.shortContent) return !1;
- var e = (D[c.sliderNumber] + H[c.sliderNumber] + c.numberOfSlides) % c.numberOfSlides;
- void 0 != b && (c.settings.autoSlideTransTimer = b);
- (0 < e || c.settings.infiniteSlider) && k.changeSlide(e - 1, a(c.scrollerNode), a(c.slideNodes),
- Y[c.sliderNumber], c.scrollbarClass, c.scrollbarWidth, c.stageWidth, c.scrollbarStageWidth, c.scrollMargin, c.scrollBorder, c.originalOffsets, c.childrenOffsets, c.slideNodeOuterWidths, c.sliderNumber, c.infiniteSliderWidth, c.numberOfSlides, c.centeredSlideOffset, c.settings);
- D[c.sliderNumber] = e
- })
- }, nextSlide: function (b) {
- return this.each(function () {
- var c = a(this).data("iosslider");
- if (void 0 == c || c.shortContent) return !1;
- var e = (D[c.sliderNumber] + H[c.sliderNumber] + c.numberOfSlides) % c.numberOfSlides;
- void 0 != b && (c.settings.autoSlideTransTimer =
- b);
- (e < c.childrenOffsets.length - 1 || c.settings.infiniteSlider) && k.changeSlide(e + 1, a(c.scrollerNode), a(c.slideNodes), Y[c.sliderNumber], c.scrollbarClass, c.scrollbarWidth, c.stageWidth, c.scrollbarStageWidth, c.scrollMargin, c.scrollBorder, c.originalOffsets, c.childrenOffsets, c.slideNodeOuterWidths, c.sliderNumber, c.infiniteSliderWidth, c.numberOfSlides, c.centeredSlideOffset, c.settings);
- D[c.sliderNumber] = e
- })
- }, prevPage: function (b, c) {
- void 0 == c && (c = this);
- return a(c).each(function () {
- var c = a(this).data("iosslider");
- if (void 0 == c) return !1;
- var d = k.getSliderOffset(c.scrollerNode, "x") + c.stageWidth;
- void 0 != b && (c.settings.autoSlideTransTimer = b);
- k.changeOffset(d, a(c.scrollerNode), a(c.slideNodes), Y[c.sliderNumber], c.scrollbarClass, c.scrollbarWidth, c.stageWidth, c.scrollbarStageWidth, c.scrollMargin, c.scrollBorder, c.originalOffsets, c.childrenOffsets, c.slideNodeOuterWidths, c.sliderNumber, c.infiniteSliderWidth, c.numberOfSlides, c.centeredSlideOffset, c.settings)
- })
- }, nextPage: function (b, c) {
- void 0 == c && (c = this);
- return a(c).each(function () {
- var c =
- a(this).data("iosslider");
- if (void 0 == c) return !1;
- var d = k.getSliderOffset(c.scrollerNode, "x") - c.stageWidth;
- void 0 != b && (c.settings.autoSlideTransTimer = b);
- k.changeOffset(d, a(c.scrollerNode), a(c.slideNodes), Y[c.sliderNumber], c.scrollbarClass, c.scrollbarWidth, c.stageWidth, c.scrollbarStageWidth, c.scrollMargin, c.scrollBorder, c.originalOffsets, c.childrenOffsets, c.slideNodeOuterWidths, c.sliderNumber, c.infiniteSliderWidth, c.numberOfSlides, c.centeredSlideOffset, c.settings)
- })
- }, lock: function () {
- return this.each(function () {
- var b =
- a(this).data("iosslider");
- if (void 0 == b || b.shortContent) return !1;
- a(b.scrollerNode).css({cursor: "default"});
- ja[b.sliderNumber] = !0
- })
- }, unlock: function () {
- return this.each(function () {
- var b = a(this).data("iosslider");
- if (void 0 == b || b.shortContent) return !1;
- a(b.scrollerNode).css({cursor: v});
- ja[b.sliderNumber] = !1
- })
- }, getData: function () {
- return this.each(function () {
- var b = a(this).data("iosslider");
- return void 0 == b || b.shortContent ? !1 : b
- })
- }, autoSlidePause: function () {
- return this.each(function () {
- var b = a(this).data("iosslider");
- if (void 0 == b || b.shortContent) return !1;
- U[b.sliderNumber].autoSlide = !1;
- k.autoSlidePause(b.sliderNumber);
- return b
- })
- }, autoSlidePlay: function () {
- return this.each(function () {
- var b = a(this).data("iosslider");
- if (void 0 == b || b.shortContent) return !1;
- U[b.sliderNumber].autoSlide = !0;
- k.autoSlide(a(b.scrollerNode), a(b.slideNodes), Y[b.sliderNumber], b.scrollbarClass, b.scrollbarWidth, b.stageWidth, b.scrollbarStageWidth, b.scrollMargin, b.scrollBorder, b.originalOffsets, b.childrenOffsets, b.slideNodeOuterWidths, b.sliderNumber,
- b.infiniteSliderWidth, b.numberOfSlides, b.centeredSlideOffset, b.settings);
- return b
- })
- }
- };
- a.fn.iosSlider = function (b) {
- if (da[b]) return da[b].apply(this, Array.prototype.slice.call(arguments, 1));
- if ("object" !== typeof b && b) a.error("invalid method call!"); else return da.init.apply(this, arguments)
- }
- })(jQuery);
- (function (a) {
- var b, c, d, h, f, p, G, W = function () {
- }, P = !!window.jQuery, X = a(window), B = function (a, c) {
- b.ev.on("mfp" + a + ".mfp", c)
- }, v = function (b, c, d, f) {
- var e = document.createElement("div");
- return e.className = "mfp-" + b, d && (e.innerHTML = d), f ? c && c.appendChild(e) : (e = a(e), c && e.appendTo(c)), e
- }, x = function (c, d) {
- b.ev.triggerHandler("mfp" + 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]))
- }, T = function (c) {
- return c === G && b.currTemplate.closeBtn || (b.currTemplate.closeBtn =
- a(b.st.closeMarkup.replace("%title%", b.st.tClose)), G = c), b.currTemplate.closeBtn
- }, U = function () {
- a.magnificPopup.instance || (b = new W, b.init(), a.magnificPopup.instance = b)
- }, pa = function () {
- var b = document.createElement("p").style, a = ["ms", "O", "Moz", "Webkit"];
- if (void 0 !== b.transition) return !0;
- for (; a.length;) if (a.pop() + "Transition" in b) return !0;
- return !1
- };
- W.prototype = {
- constructor: W, 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 = pa();
- b.probablyMobile = b.isAndroid || b.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent);
- h = a(document);
- b.popupsCache = {}
- }, open: function (c) {
- d || (d = a(document.body));
- var e;
- if (!1 === c.isObj) {
- b.items = c.items.toArray();
- b.index = 0;
- var f, g = c.items;
- for (e = 0; g.length > e; e++) if (f = g[e], f.parsed && (f = f.el[0]), f === c.el[0]) {
- b.index = e;
- 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 = [];
- p = "";
- b.ev = c.mainEl && c.mainEl.length ? c.mainEl.eq(0) : h;
- 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 = v("bg").on("click.mfp", function () {
- b.close()
- }), b.wrap = v("wrap").attr("tabindex", -1).on("click.mfp", function (a) {
- b._checkIfClose(a.target) && b.close()
- }), b.container = v("container", b.wrap));
- b.contentContainer = v("content");
- b.st.preloader && (b.preloader = v("preloader", b.container, b.st.tLoading));
- f = a.magnificPopup.modules;
- for (e = 0; f.length > e; e++) g = f[e], g = g.charAt(0).toUpperCase() + g.slice(1), b["init" + g].call(b);
- x("BeforeOpen");
- b.st.showCloseBtn && (b.st.closeBtnInside ? (B("MarkupParse",
- function (b, a, c, e) {
- c.close_replaceWith = T(e.type)
- }), p += " mfp-close-btn-in") : b.wrap.append(T()));
- b.st.alignTop && (p += " mfp-align-top");
- b.fixedContentPos ? b.wrap.css({
- overflow: b.st.overflowY,
- overflowX: "hidden",
- overflowY: b.st.overflowY
- }) : b.wrap.css({top: X.scrollTop(), position: "absolute"});
- (!1 === b.st.fixedBgPos || "auto" === b.st.fixedBgPos && !b.fixedContentPos) && b.bgOverlay.css({
- height: h.height(),
- position: "absolute"
- });
- b.st.enableEscapeKey && h.on("keyup.mfp", function (a) {
- 27 === a.keyCode && b.close()
- });
- X.on("resize.mfp",
- function () {
- b.updateSize()
- });
- b.st.closeOnContentClick || (p += " mfp-auto-cursor");
- p && b.wrap.addClass(p);
- e = b.wH = X.height();
- f = {};
- b.fixedContentPos && b._hasScrollBar(e) && (g = b._getScrollbarSize()) && (f.marginRight = g);
- b.fixedContentPos && (b.isIE7 ? a("body, html").css("overflow", "hidden") : f.overflow = "hidden");
- g = b.st.mainClass;
- return b.isIE7 && (g += " mfp-ie7"), g && b._addClassToMFP(g), b.updateItemHTML(), x("BuildControls"), a("html").css(f), b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo || d), b._lastFocusedEl = document.activeElement,
- setTimeout(function () {
- b.content ? (b._addClassToMFP("mfp-ready"), b._setFocus()) : b.bgOverlay.addClass("mfp-ready");
- h.on("focusin.mfp", b._onFocusIn)
- }, 16), b.isOpen = !0, b.updateSize(e), x("Open"), c
- }, close: function () {
- b.isOpen && (x("BeforeClose"), b.isOpen = !1, b.st.removalDelay && !b.isLowIE && b.supportsTransition ? (b._addClassToMFP("mfp-removing"), setTimeout(function () {
- b._close()
- }, b.st.removalDelay)) : b._close())
- }, _close: function () {
- x("Close");
- var c = "mfp-removing mfp-ready ";
- if (b.bgOverlay.detach(), b.wrap.detach(),
- b.container.empty(), b.st.mainClass && (c += b.st.mainClass + " "), b._removeClassFromMFP(c), b.fixedContentPos) c = {marginRight: ""}, b.isIE7 ? a("body, html").css("overflow", "") : c.overflow = "", a("html").css(c);
- h.off("keyup.mfp focusin.mfp");
- b.ev.off(".mfp");
- 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 && !0 !== b.currTemplate[b.currItem.type] || 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;
- x("AfterClose")
- }, updateSize: function (a) {
- b.isIOS ? (a = document.documentElement.clientWidth / window.innerWidth * window.innerHeight, b.wrap.css("height", a), b.wH = a) : b.wH = a || X.height();
- b.fixedContentPos || b.wrap.css("height", b.wH);
- x("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 (x("BeforeChange",
- [b.currItem ? b.currItem.type : "", d]), b.currItem = c, !b.currTemplate[d]) {
- var h = b.st[d] ? b.st[d].markup : !1;
- x("FirstMarkupParse", h);
- b.currTemplate[d] = h ? a(h) : !0
- }
- f && f !== c.type && b.container.removeClass("mfp-" + f + "-holder");
- h = b["get" + d.charAt(0).toUpperCase() + d.slice(1)](c, b.currTemplate[d]);
- b.appendContent(h, d);
- c.preloaded = !0;
- x("Change", c);
- f = c.type;
- b.container.prepend(b.contentContainer);
- x("AfterChange")
- }, appendContent: function (a, c) {
- (b.content = a) ? b.st.showCloseBtn && b.st.closeBtnInside && !0 === b.currTemplate[c] ?
- b.content.find(".mfp-close").length || b.content.append(T()) : b.content = a : b.content = "";
- x("BeforeAppend");
- b.container.addClass("mfp-" + c + "-holder");
- b.contentContainer.append(b.content)
- }, parseEl: function (c) {
- var e, d = b.items[c];
- if (d.tagName ? d = {el: a(d)} : (e = d.type, d = {data: d, src: d.src}), d.el) {
- for (var f = b.types, h = 0; f.length > h; h++) if (d.el.hasClass("mfp-" + f[h])) {
- e = f[h];
- 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,
- x("ElementParse", d), b.items[c]
- }, addGroup: function (a, c) {
- var e = function (e) {
- e.mfpEl = this;
- b._openClick(e, a, c)
- };
- c || (c = {});
- c.mainEl = a;
- c.items ? (c.isObj = !0, a.off("click.magnificPopup").on("click.magnificPopup", e)) : (c.isObj = !1, c.delegate ? a.off("click.magnificPopup").on("click.magnificPopup", c.delegate, e) : (c.items = a, a.off("click.magnificPopup").on("click.magnificPopup", e)))
- }, _openClick: function (c, d, f) {
- if ((void 0 !== f.midClick ? f.midClick : a.magnificPopup.defaults.midClick) || 2 !== c.which && !c.ctrlKey && !c.metaKey) {
- var e =
- void 0 !== f.disableOn ? f.disableOn : a.magnificPopup.defaults.disableOn;
- if (e) if (a.isFunction(e)) {
- if (!e.call(b)) return !0
- } else if (e > X.width()) return !0;
- c.type && (c.preventDefault(), b.isOpen && c.stopPropagation());
- f.el = a(c.mfpEl);
- f.delegate && (f.items = d.find(f.delegate));
- b.open(f)
- }
- }, updateStatus: function (a, d) {
- b.preloader && (c !== a && b.container.removeClass("mfp-s-" + c), d || "loading" !== a || (d = b.st.tLoading), d = {
- status: a,
- text: d
- }, x("UpdateStatus", d), a = d.status, d = d.text, b.preloader.html(d), b.preloader.find("a").on("click",
- function (a) {
- a.stopImmediatePropagation()
- }), b.container.addClass("mfp-s-" + a), c = a)
- }, _checkIfClose: function (c) {
- if (!a(c).hasClass("mfp-prevent-close")) {
- var e = b.st.closeOnContentClick, d = b.st.closeOnBgClick;
- if (e && d || !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 (e) return !0
- } else if (d && a.contains(document, c)) return !0;
- return !1
- }
- }, _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 ? h.height() : document.body.scrollHeight) > (a || X.height())
- }, _setFocus: function () {
- (b.st.focus ? b.content.find(b.st.focus).eq(0) : b.wrap).focus()
- }, _onFocusIn: function (c) {
- return c.target === b.wrap[0] || a.contains(b.wrap[0], c.target) ? void 0 : (b._setFocus(), !1)
- }, _parseMarkup: function (b, c, d) {
- var e;
- d.data && (c = a.extend(d.data, c));
- x("MarkupParse", [b, c, d]);
- a.each(c, function (a, c) {
- if (void 0 === c || !1 === c) return !0;
- if (e = a.split("_"), 1 < e.length) {
- if (a = b.find(".mfp-" +
- e[0]), 0 < a.length) {
- var d = e[1];
- "replaceWith" === d ? a[0] !== c[0] && a.replaceWith(c) : "img" === d ? a.is("img") ? a.attr("src", c) : a.replaceWith('<img src="' + c + '" class="' + a.attr("class") + '" />') : a.attr(e[1], c)
- }
- } else b.find(".mfp-" + 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: W.prototype, modules: [], open: function (b, c) {
- return U(), 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,
- prependTo: null,
- 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) {
- U();
- var d = a(this);
- if ("string" == typeof c) if ("open" === c) {
- var e, f = P ? d.data("magnificPopup") : d[0].magnificPopup, h = parseInt(arguments[1], 10) ||
- 0;
- f.items ? e = f.items[h] : (e = d, f.delegate && (e = e.find(f.delegate)), e = e.eq(h));
- 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), P ? d.data("magnificPopup", c) : d[0].magnificPopup = c, b.addGroup(d, c);
- return d
- };
- var Y, D, ba, H = function () {
- ba && (D.after(ba.addClass(Y)).detach(), ba = null)
- };
- a.magnificPopup.registerModule("inline", {
- options: {hiddenClass: "hide", markup: "", tNotFound: "Content not found"}, proto: {
- initInline: function () {
- b.types.push("inline");
- B("Close.inline", function () {
- H()
- })
- }, getInline: function (c, d) {
- if (H(), c.src) {
- d = b.st.inline;
- var e = a(c.src);
- if (e.length) {
- var f = e[0].parentNode;
- f && f.tagName && (D || (Y = d.hiddenClass, D = v(Y), Y = "mfp-" + Y), ba = e.after(D).detach().removeClass(Y));
- b.updateStatus("ready")
- } else b.updateStatus("error", d.tNotFound), e = a("<div>");
- return c.inlineElement = e, e
- }
- return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d
- }
- }
- });
- var q, w = function () {
- q && d.removeClass(q);
- b.req && b.req.abort()
- };
- a.magnificPopup.registerModule("ajax", {
- options: {
- settings: null,
- cursor: "mfp-ajax-cur", tError: '<a href="%url%">The content</a> could not be loaded.'
- }, proto: {
- initAjax: function () {
- b.types.push("ajax");
- q = b.st.ajax.cursor;
- B("Close.ajax", w);
- B("BeforeChange.ajax", w)
- }, getAjax: function (c) {
- q && d.addClass(q);
- b.updateStatus("loading");
- var e = a.extend({
- url: c.src, success: function (e, f, h) {
- e = {data: e, xhr: h};
- x("ParseAjax", e);
- b.appendContent(a(e.data), "ajax");
- c.finished = !0;
- q && d.removeClass(q);
- b._setFocus();
- setTimeout(function () {
- b.wrap.addClass("mfp-ready")
- }, 16);
- b.updateStatus("ready");
- x("AjaxContentAdded")
- }, error: function () {
- q && d.removeClass(q);
- 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 ca, ja = 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><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></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;
- b.types.push("image");
- B("Open.image", function () {
- "image" === b.currItem.type && a.cursor && d.addClass(a.cursor)
- });
- B("Close.image", function () {
- a.cursor && d.removeClass(a.cursor);
- X.off("resize.mfp")
- });
- B("Resize.image", b.resizeImage);
- b.isLowIE && B("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, ca && clearInterval(ca), a.isCheckingImgSize = !1, x("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) {
- ca && clearInterval(ca);
- ca = setInterval(function () {
- return 0 < d.naturalWidth ? (b._onImageHasSize(a), void 0) : (200 < c && clearInterval(ca),
- 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, x("ImageLoadComplete")) : (e++, 200 > e ? setTimeout(f, 100) : h()))
- }, h = function () {
- c && (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("error", l.tError.replace("%url%", c.src))), c.hasSize = !0, c.loaded = !0, c.loadError = !0)
- }, l = b.st.image, p = d.find(".mfp-img");
- if (p.length) {
- var k = document.createElement("img");
- k.className = "mfp-img";
- c.img = a(k).on("load.mfploader", f).on("error.mfploader", h);
- k.src = c.src;
- p.is("img") && (c.img = c.img.clone());
- k = c.img[0];
- 0 < k.naturalWidth ? c.hasSize = !0 : k.width || (c.hasSize = !1)
- }
- return b._parseMarkup(d, {
- title: ja(c),
- img_replaceWith: c.img
- }, c), b.resizeImage(), c.hasSize ? (ca && clearInterval(ca), c.loadError ? (d.addClass("mfp-loading"), b.updateStatus("error", l.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 k;
- 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;
- if (c.enabled && b.supportsTransition) {
- var d, f, h = c.duration, p = function (a) {
- a = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image");
- var b = {
- position: "fixed",
- zIndex: 9999, left: 0, top: 0, "-webkit-backface-visibility": "hidden"
- };
- return b["-webkit-transition"] = b["-moz-transition"] = b["-o-transition"] = b.transition = "all " + c.duration / 1E3 + "s " + c.easing, a.css(b), a
- }, k = function () {
- b.content.css("visibility", "visible")
- };
- B("BuildControls.zoom", function () {
- if (b._allowZoom()) {
- if (clearTimeout(d), b.content.css("visibility", "hidden"), a = b._getItemToZoom(), !a) return k(), void 0;
- f = p(a);
- f.css(b._getOffset());
- b.wrap.append(f);
- d = setTimeout(function () {
- f.css(b._getOffset(!0));
- d = setTimeout(function () {
- k();
- setTimeout(function () {
- f.remove();
- a = f = null;
- x("ZoomAnimationEnded")
- }, 16)
- }, h)
- }, 16)
- }
- });
- B("BeforeClose.zoom", function () {
- if (b._allowZoom()) {
- if (clearTimeout(d), b.st.removalDelay = h, !a) {
- if (a = b._getItemToZoom(), !a) return;
- f = p(a)
- }
- f.css(b._getOffset(!0));
- b.wrap.append(f);
- b.content.css("visibility", "hidden");
- setTimeout(function () {
- f.css(b._getOffset())
- }, 16)
- }
- });
- B("Close.zoom", 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 = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem);
- c = d.offset();
- var e = parseInt(d.css("padding-top"), 10), f = parseInt(d.css("padding-bottom"), 10);
- c.top -= a(window).scrollTop() - e;
- d = {width: d.width(), height: (P ? d.innerHeight() : d[0].offsetHeight) - f - e};
- return (void 0 === k && (k = void 0 !== document.createElement("p").style.MozTransform), k) ? d["-moz-transform"] = d.transform = "translate(" + c.left + "px," + c.top + "px)" : (d.left = c.left, d.top = c.top), d
- }
- }
- });
- var da = function (a) {
- if (b.currTemplate.iframe) {
- var c =
- b.currTemplate.iframe.find("iframe");
- c.length && (a || (c[0].src = "//about:blank"), b.isIE8 && c.css("display", a ? "block" : "none"))
- }
- };
- a.magnificPopup.registerModule("iframe", {
- 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("iframe");
- B("BeforeChange", function (a, b, c) {
- b !== c && ("iframe" === b ? da() : "iframe" === c && da(!0))
- });
- B("Close.iframe", function () {
- da()
- })
- }, getIframe: function (c, d) {
- var e = c.src, f = b.st.iframe;
- a.each(f.patterns, function () {
- return -1 < e.indexOf(this.index) ? (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 h =
- {};
- return f.srcAction && (h[f.srcAction] = e), b._parseMarkup(d, h, c), b.updateStatus("ready"), d
- }
- }
- });
- var y = function (a) {
- var c = b.items.length;
- return a > c - 1 ? a - c : 0 > a ? c + a : a
- }, m = function (a, b, c) {
- return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, 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 = !!a.fn.mfpFastClick;
- return b.direction = !0, c && c.enabled ? (p += " mfp-gallery", B("Open.mfp-gallery", function () {
- c.navigateByImgClick && b.wrap.on("click.mfp-gallery", ".mfp-img", function () {
- return 1 < b.items.length ? (b.next(), !1) : void 0
- });
- h.on("keydown.mfp-gallery", function (a) {
- 37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next()
- })
- }), B("UpdateStatus.mfp-gallery", function (a, c) {
- c.text && (c.text = m(c.text, b.currItem.index, b.items.length))
- }),
- B("MarkupParse.mfp-gallery", function (a, d, e, f) {
- a = b.items.length;
- e.counter = 1 < a ? m(c.tCounter, f.index, a) : ""
- }), B("BuildControls.mfp-gallery", function () {
- if (1 < b.items.length && c.arrows && !b.arrowLeft) {
- var e = c.arrowMarkup,
- f = b.arrowLeft = a(e.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass("mfp-prevent-close");
- e = b.arrowRight = a(e.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass("mfp-prevent-close");
- var h = d ? "mfpFastClick" : "click";
- f[h](function () {
- b.prev()
- });
- e[h](function () {
- b.next()
- });
- b.isIE7 && (v("b", f[0], !1, !0), v("a", f[0], !1, !0), v("b", e[0], !1, !0), v("a", e[0], !1, !0));
- b.container.append(f.add(e))
- }
- }), B("Change.mfp-gallery", function () {
- b._preloadTimeout && clearTimeout(b._preloadTimeout);
- b._preloadTimeout = setTimeout(function () {
- b.preloadNearbyImages();
- b._preloadTimeout = null
- }, 16)
- }), B("Close.mfp-gallery", function () {
- h.off(".mfp-gallery");
- b.wrap.off("click.mfp-gallery");
- b.arrowLeft && d && b.arrowLeft.add(b.arrowRight).destroyMfpFastClick();
- b.arrowRight = b.arrowLeft = null
- }), void 0) : !1
- }, next: function () {
- b.direction =
- !0;
- b.index = y(b.index + 1);
- b.updateItemHTML()
- }, prev: function () {
- b.direction = !1;
- b.index = y(b.index - 1);
- b.updateItemHTML()
- }, goTo: function (a) {
- b.direction = a >= b.index;
- b.index = a;
- b.updateItemHTML()
- }, preloadNearbyImages: function () {
- var a = b.st.gallery.preload;
- var c = Math.min(a[0], b.items.length), d = Math.min(a[1], b.items.length);
- for (a = 1; (b.direction ? d : c) >= a; a++) b._preloadItem(b.index + a);
- for (a = 1; (b.direction ? c : d) >= a; a++) b._preloadItem(b.index - a)
- }, _preloadItem: function (c) {
- if (c = y(c), !b.items[c].preloaded) {
- var d = b.items[c];
- d.parsed || (d = b.parseEl(c));
- x("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;
- x("LazyLoadError", d)
- }).attr("src", d.src));
- d.preloaded = !0
- }
- }
- }
- });
- a.magnificPopup.registerModule("retina", {
- options: {
- replaceSrc: function (a) {
- return a.src.replace(/\.\w+$/, function (a) {
- return "@2x" + a
- })
- }, ratio: 1
- }, proto: {
- initRetina: function () {
- if (1 < window.devicePixelRatio) {
- var a = b.st.retina, c = a.ratio;
- c = isNaN(c) ?
- c() : c;
- 1 < c && (B("ImageHasSize.retina", function (a, b) {
- b.img.css({"max-width": b.img[0].naturalWidth / c, width: "100%"})
- }), B("ElementParse.retina", function (b, d) {
- d.src = a.replaceSrc(d, c)
- }))
- }
- }
- }
- });
- (function () {
- var b = "ontouchstart" in window, c = function () {
- X.off("touchmove" + d + " touchend" + d)
- }, d = ".mfpFastClick";
- a.fn.mfpFastClick = function (f) {
- return a(this).each(function () {
- var e, h = a(this);
- if (b) {
- var g, p, k, l, m, v;
- h.on("touchstart" + d, function (a) {
- l = !1;
- v = 1;
- m = a.originalEvent ? a.originalEvent.touches[0] : a.touches[0];
- p = m.clientX;
- k = m.clientY;
- X.on("touchmove" + d, function (a) {
- m = a.originalEvent ? a.originalEvent.touches : a.touches;
- v = m.length;
- m = m[0];
- (10 < Math.abs(m.clientX - p) || 10 < Math.abs(m.clientY - k)) && (l = !0, c())
- }).on("touchend" + d, function (a) {
- c();
- l || 1 < v || (e = !0, a.preventDefault(), clearTimeout(g), g = setTimeout(function () {
- e = !1
- }, 1E3), f())
- })
- })
- }
- h.on("click" + d, function () {
- e || f()
- })
- })
- };
- a.fn.destroyMfpFastClick = function () {
- a(this).off("touchstart" + d + " click" + d);
- b && X.off("touchmove" + d + " touchend" + d)
- }
- })();
- U()
- })(window.jQuery || window.Zepto);
- (function (a, b, c) {
- function d(a) {
- var b = {}, d = /^jQuery\d+$/;
- c.each(a.attributes, function (a, c) {
- c.specified && !d.test(c.name) && (b[c.name] = c.value)
- });
- return b
- }
- function h(a, b) {
- var d = c(this);
- if (this.value == d.attr("placeholder") && d.hasClass("placeholder")) if (d.data("placeholder-password")) {
- d = d.hide().next().show().attr("id", d.removeAttr("id").data("placeholder-id"));
- if (!0 === a) return d[0].value = b;
- d.focus()
- } else this.value = "", d.removeClass("placeholder"), this == p() && this.select()
- }
- function f() {
- var a = c(this), b = this.id;
- if ("" == this.value) {
- if ("password" == this.type) {
- if (!a.data("placeholder-textinput")) {
- try {
- var f = a.clone().attr({type: "text"})
- } catch (U) {
- f = c("<input>").attr(c.extend(d(this), {type: "text"}))
- }
- f.removeAttr("name").data({
- "placeholder-password": a,
- "placeholder-id": b
- }).bind("focus.placeholder", h);
- a.data({"placeholder-textinput": f, "placeholder-id": b}).before(f)
- }
- a = a.removeAttr("id").hide().prev().attr("id", b).show()
- }
- a.addClass("placeholder");
- a[0].value = a.attr("placeholder")
- } else a.removeClass("placeholder")
- }
- function p() {
- try {
- return b.activeElement
- } catch (v) {
- }
- }
- var G = "placeholder" in b.createElement("input"), W = "placeholder" in b.createElement("textarea"), P = c.fn,
- X = c.valHooks, B = c.propHooks;
- G && W ? (P = P.placeholder = function () {
- return this
- }, P.input = P.textarea = !0) : (P = P.placeholder = function () {
- this.filter((G ? "textarea" : ":input") + "[placeholder]").not(".placeholder").bind({
- "focus.placeholder": h,
- "blur.placeholder": f
- }).data("placeholder-enabled", !0).trigger("blur.placeholder");
- return this
- }, P.input = G, P.textarea = W, P = {
- get: function (a) {
- var b = c(a), d = b.data("placeholder-password");
- return d ? d[0].value : b.data("placeholder-enabled") && b.hasClass("placeholder") ? "" : a.value
- }, set: function (a, b) {
- var d = c(a), G = d.data("placeholder-password");
- if (G) return G[0].value = b;
- if (!d.data("placeholder-enabled")) return a.value = b;
- "" == b ? (a.value = b, a != p() && f.call(a)) : d.hasClass("placeholder") ? h.call(a, !0, b) || (a.value = b) : a.value = b;
- return d
- }
- }, G || (X.input = P, B.value = P), W || (X.textarea = P, B.value = P), c(function () {
- c(b).delegate("form", "submit.placeholder", function () {
- var a = c(".placeholder", this).each(h);
- setTimeout(function () {
- a.each(f)
- },
- 10)
- })
- }), c(a).bind("beforeunload.placeholder", function () {
- c(".placeholder").each(function () {
- this.value = ""
- })
- }))
- })(this, document, jQuery);
- (function () {
- for (var a = 0, b = ["ms", "moz", "webkit", "o"], c = 0; c < b.length && !window.requestAnimationFrame; ++c) window.requestAnimationFrame = window[b[c] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[b[c] + "CancelAnimationFrame"] || window[b[c] + "CancelRequestAnimationFrame"];
- window.requestAnimationFrame || (window.requestAnimationFrame = function (b, c) {
- var d = (new Date).getTime(), h = Math.max(0, 16 - (d - a));
- c = window.setTimeout(function () {
- b(d + h)
- }, h);
- a = d + h;
- return c
- });
- window.cancelAnimationFrame || (window.cancelAnimationFrame =
- function (a) {
- clearTimeout(a)
- })
- })();
- var tdDetect = {};
- (function () {
- tdDetect = {
- isIe8: !1,
- isIe9: !1,
- isIe10: !1,
- isIe11: !1,
- isIe: !1,
- isSafari: !1,
- isChrome: !1,
- isIpad: !1,
- isTouchDevice: !1,
- hasHistory: !1,
- isPhoneScreen: !1,
- isIos: !1,
- isAndroid: !1,
- isOsx: !1,
- isFirefox: !1,
- isWinOs: !1,
- isMobileDevice: !1,
- htmlJqueryObj: null,
- runIsPhoneScreen: function () {
- (768 > jQuery(window).width() || 768 > jQuery(window).height()) && !1 === tdDetect.isIpad ? tdDetect.isPhoneScreen = !0 : tdDetect.isPhoneScreen = !1
- },
- set: function (a, b) {
- tdDetect[a] = b
- }
- };
- tdDetect.htmlJqueryObj = jQuery("html");
- -1 !== navigator.appVersion.indexOf("Win") &&
- tdDetect.set("isWinOs", !0);
- "ontouchstart" in window && !tdDetect.isWinOs && tdDetect.set("isTouchDevice", !0);
- tdDetect.htmlJqueryObj.is(".ie8") && (tdDetect.set("isIe8", !0), tdDetect.set("isIe", !0));
- tdDetect.htmlJqueryObj.is(".ie9") && (tdDetect.set("isIe9", !0), tdDetect.set("isIe", !0));
- -1 < navigator.userAgent.indexOf("MSIE 10.0") && (tdDetect.set("isIe10", !0), tdDetect.set("isIe", !0));
- navigator.userAgent.match(/Trident.*rv:11\./) && tdDetect.set("isIe11", !0);
- window.history && window.history.pushState && tdDetect.set("hasHistory",
- !0);
- -1 !== navigator.userAgent.indexOf("Safari") && -1 === navigator.userAgent.indexOf("Chrome") && tdDetect.set("isSafari", !0);
- /chrom(e|ium)/.test(navigator.userAgent.toLowerCase()) && tdDetect.set("isChrome", !0);
- null !== navigator.userAgent.match(/iPad/i) && tdDetect.set("isIpad", !0);
- /(iPad|iPhone|iPod)/g.test(navigator.userAgent) && tdDetect.set("isIos", !0);
- /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && tdDetect.set("isMobileDevice", !0);
- tdDetect.runIsPhoneScreen();
- -1 < navigator.userAgent.toLowerCase().indexOf("android") && tdDetect.set("isAndroid", !0);
- -1 !== navigator.userAgent.indexOf("Mac OS X") && tdDetect.set("isOsx", !0);
- -1 !== navigator.userAgent.indexOf("Firefox") && tdDetect.set("isFirefox", !0)
- })();
- var tdViewport = {};
- (function () {
- tdViewport = {
- INTERVAL_INITIAL_INDEX: -1,
- _currentIntervalIndex: tdViewport.INTERVAL_INITIAL_INDEX,
- _intervalList: [],
- init: function () {
- if ("undefined" !== typeof window.td_viewport_interval_list && Array === window.td_viewport_interval_list.constructor) {
- for (var a = 0; a < window.td_viewport_interval_list.length; a++) {
- var b = new tdViewport.item, c = window.td_viewport_interval_list[a];
- if (!c.hasOwnProperty("limitBottom") || !c.hasOwnProperty("sidebarWidth")) break;
- b.limitBottom = c.limitBottom;
- b.sidebarWidth = c.sidebarWidth;
- tdViewport._items.push(b)
- }
- tdViewport.detectChanges()
- }
- },
- getCurrentIntervalIndex: function () {
- return tdViewport._currentIntervalIndex
- },
- setIntervalList: function (a) {
- tdViewport._intervalList = a
- },
- getIntervalList: function () {
- return tdViewport._intervalList
- },
- getCurrentIntervalItem: function () {
- return tdViewport.INTERVAL_INITIAL_INDEX === tdViewport._currentIntervalIndex || 0 === tdViewport._currentIntervalIndex ? null : tdViewport._items[tdViewport._currentIntervalIndex - 1]
- },
- _items: [],
- item: function () {
- this.sidebarWidth = this.limitBottom =
- void 0
- },
- detectChanges: function () {
- var a = !1, b = 0;
- var c = !0 === tdDetect.isSafari ? this._safariWiewPortWidth.getRealWidth() : Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
- for (var d = 0; d < tdViewport._items.length; d++) {
- if (c <= tdViewport._items[d].limitBottom) {
- b !== tdViewport._currentIntervalIndex && (tdViewport._currentIntervalIndex = b, a = !0, tdViewport.log("changing viewport " + tdViewport._currentIntervalIndex + " ~ " + c));
- break
- }
- b++
- }
- !1 === a && b !== tdViewport._currentIntervalIndex && (tdViewport._currentIntervalIndex =
- b, a = !0, tdViewport.log("changing viewport " + tdViewport._currentIntervalIndex + " ~ " + c));
- return a
- },
- _safariWiewPortWidth: {
- divAdded: !1, divJqueryObject: "", getRealWidth: function () {
- !1 === this.divAdded && (this.divJqueryObject = jQuery("<div>").css({
- height: "1px",
- position: "absolute",
- top: "-1px",
- left: "0",
- right: "0",
- visibility: "hidden",
- "z-index": "-1"
- }), this.divJqueryObject.appendTo("body"), this.divAdded = !0);
- return this.divJqueryObject.width()
- }
- },
- log: function (a) {
- }
- };
- tdViewport.init()
- })();
- var tdUtil = {};
- (function () {
- tdUtil = {
- email_pattern: /^[a-zA-Z0-9][a-zA-Z0-9_\.-]{0,}[a-zA-Z0-9]@[a-zA-Z0-9][a-zA-Z0-9_\.-]{0,}[a-z0-9][\.][a-z0-9]{2,4}$/,
- stopBubble: function (a) {
- a && a.stopPropagation ? a.stopPropagation() : window.event.cancelBubble = !0
- },
- isEmail: function (a) {
- return tdUtil.email_pattern.test(a)
- },
- imageMoveClassToFigure: function (a) {
- jQuery("figure ." + a).each(function () {
- jQuery(this).parents("figure:first").addClass(a);
- jQuery(this).removeClass(a)
- })
- },
- getBackendVar: function (a) {
- return "undefined" === typeof window[a] ?
- "" : window[a]
- },
- isUndefined: function (a) {
- return void 0 === a
- },
- scrollToElement: function (a, b) {
- tdIsScrollingAnimation = !0;
- jQuery("html, body").stop();
- a = a.offset().top > jQuery(document).height() - jQuery(window).height() ? jQuery(document).height() - jQuery(window).height() : a.offset().top;
- jQuery("html, body").animate({scrollTop: a}, {
- duration: b, easing: "easeInOutQuart", complete: function () {
- tdIsScrollingAnimation = !1
- }
- })
- },
- scrollIntoView: function (a) {
- tdIsScrollingAnimation = !0;
- if (!0 !== tdDetect.isMobileDevice) {
- jQuery("html, body").stop();
- a = a.find("img").offset().top;
- a -= 150;
- var b = Math.abs(jQuery(window).scrollTop() - a) / 5;
- jQuery("html, body").animate({scrollTop: a}, {
- duration: 1100 + b,
- easing: "easeInOutQuart",
- complete: function () {
- tdIsScrollingAnimation = !1
- }
- })
- }
- },
- scrollToPosition: function (a, b) {
- if (window.location !== window.parent.location) {
- var c = jQuery(window.parent.document), d = c.find("#" + jQuery("html").attr("id")).offset().top;
- tdIsScrollingAnimation = !0;
- c.find("html, body").stop();
- c.find("html, body").animate({scrollTop: d + a}, {
- duration: b, easing: "easeInOutQuart",
- complete: function () {
- tdIsScrollingAnimation = !1
- }
- })
- } else tdIsScrollingAnimation = !0, jQuery("html, body").stop(), jQuery("html, body").animate({scrollTop: a}, {
- duration: b,
- easing: "easeInOutQuart",
- complete: function () {
- tdIsScrollingAnimation = !1
- }
- })
- },
- tdMoveY: function (a, b) {
- b = "translate3d(0px," + b + "px, 0px)";
- a.style["-webkit-transform"] = b;
- a.style["-moz-transform"] = b;
- a.style["-ms-transform"] = b;
- a.style["-o-transform"] = b;
- a.style.transform = b
- },
- isValidUrl: function (a) {
- return /^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i.test(a) ?
- !0 : !1
- },
- round: function (a, b, c) {
- b = Math.pow(10, b | 0);
- a *= b;
- var d = 0 < a | -(0 > a);
- var h = a % 1 === .5 * d;
- var f = Math.floor(a);
- if (h) switch (c) {
- case "PHP_ROUND_HALF_DOWN":
- a = f + (0 > d);
- break;
- case "PHP_ROUND_HALF_EVEN":
- a = f + f % 2 * d;
- break;
- case "PHP_ROUND_HALF_ODD":
- a = f + !(f % 2);
- break;
- default:
- a = f + (0 < d)
- }
- return (h ? a : Math.round(a)) / b
- },
- b64EncodeUnicode: function (a) {
- return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g, function (a, c) {
- return String.fromCharCode("0x" + c)
- }))
- },
- b64DecodeUnicode: function (a) {
- return decodeURIComponent(atob(a))
- },
- isBase64Encoded: function (a) {
- return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/.test(a)
- },
- isInViewport: function (a, b) {
- b = void 0 === b ? 0 : b;
- var c = a.offset().top;
- a = c + a.outerHeight();
- var d = jQuery(window).scrollTop(), h = d + jQuery(window).height();
- return a > d && c < h - b
- }
- }
- })();
- var tdAffix = {};
- (function () {
- tdAffix = {
- allow_scroll: !0,
- menu_selector: "",
- menu_wrap_selector: "",
- tds_snap_menu: "",
- tds_snap_menu_logo: "",
- is_menu_affix_height_computed: !1,
- is_menu_affix_height_on_mobile_computed: !1,
- menu_affix_height: 0,
- menu_affix_height_on_mobile: 0,
- main_menu_height: 0,
- top_offset: 0,
- menu_offset: 0,
- is_requestAnimationFrame_running: !1,
- is_menu_affix: !1,
- is_top_menu: !1,
- menu_offset_max_hit: !1,
- menu_offset_min_hit: !0,
- scroll_window_scrollTop_last: 0,
- init: function (a) {
- tdAffix.menu_selector = a.menu_selector;
- tdAffix.menu_wrap_selector =
- a.menu_wrap_selector;
- tdAffix.tds_snap_menu = a.tds_snap_menu;
- tdAffix.tds_snap_menu_logo = a.tds_snap_menu_logo;
- tdAffix.menu_affix_height = a.menu_affix_height;
- tdAffix.menu_affix_height_on_mobile = a.menu_affix_height_on_mobile;
- jQuery(tdAffix.menu_selector).length && jQuery(tdAffix.menu_wrap_selector).length && tdAffix.tds_snap_menu && (tdDetect.isFirefox && (tdAffix.compute_wrapper(), tdAffix.compute_top()), jQuery().ready(function () {
- tdAffix.compute_wrapper();
- tdAffix.compute_top()
- }), jQuery(window).on("load", function () {
- tdAffix.compute_wrapper();
- tdAffix.compute_top();
- setTimeout(function () {
- tdAffix.compute_top()
- }, 1E3)
- }))
- },
- _get_menu_affix_height: function () {
- if (!0 === tdDetect.isPhoneScreen) return !tdAffix.is_menu_affix_height_on_mobile_computed && tdAffix.is_menu_affix && (tdAffix.is_menu_affix_height_on_mobile_computed = !0, tdAffix.menu_affix_height_on_mobile = jQuery(tdAffix.menu_selector).height()), tdAffix.menu_affix_height_on_mobile;
- !tdAffix.is_menu_affix_height_computed && tdAffix.is_menu_affix && (tdAffix.is_menu_affix_height_computed = !0, tdAffix.menu_affix_height =
- jQuery(tdAffix.menu_selector).height(), "smart_snap_always" === tdAffix.tds_snap_menu && (tdAffix.top_offset = tdAffix.menu_affix_height));
- return tdAffix.menu_affix_height
- },
- td_events_scroll: function (a) {
- if (tdAffix.allow_scroll && tdAffix.tds_snap_menu) {
- var b = "";
- if ("snap" !== tdAffix.tds_snap_menu && ("smart_snap_mobile" !== tdAffix.tds_snap_menu || !0 === tdDetect.isPhoneScreen)) {
- var c = 0;
- a !== tdAffix.scroll_window_scrollTop_last && (b = a > tdAffix.scroll_window_scrollTop_last ? "down" : "up", c = Math.abs(a - tdAffix.scroll_window_scrollTop_last));
- tdAffix.scroll_window_scrollTop_last = a
- }
- "" !== tdAffix.tds_snap_menu && "" !== tdAffix.tds_snap_menu_logo && jQuery(".td-main-menu-logo").addClass("td-logo-sticky");
- if (a > tdAffix.top_offset + (tdAffix.main_menu_height / 2 - tdAffix._get_menu_affix_height() / 2) || !0 === tdAffix.is_menu_affix && "smart_snap_always" === tdAffix.tds_snap_menu && a > tdAffix.top_offset - tdAffix._get_menu_affix_height() || !0 === tdAffix.is_top_menu) {
- var d = jQuery(tdAffix.menu_selector);
- d.length && tdAffix._affix_on(d);
- "snap" === tdAffix.tds_snap_menu || "smart_snap_mobile" ===
- tdAffix.tds_snap_menu && !1 === tdDetect.isPhoneScreen || d.length && (!1 === tdAffix.menu_offset_max_hit && "down" === b || !1 === tdAffix.menu_offset_min_hit && "up" === b) && window.requestAnimationFrame(function () {
- var f = 0;
- 0 < a && ("down" === b ? (f = tdAffix.menu_offset - c, f < -tdAffix._get_menu_affix_height() && (f = -tdAffix._get_menu_affix_height())) : "up" === b && (f = tdAffix.menu_offset + c, 0 < f && (f = 0)));
- tdUtil.tdMoveY(d[0], f);
- tdAffix.menu_offset_min_hit = 0 === f ? !0 : !1;
- f === -tdAffix._get_menu_affix_height() ? (tdAffix.menu_offset_max_hit = !0,
- (!0 === tdDetect.isIos || tdDetect.isSafari) && d.hide(), "" !== tdAffix.tds_snap_menu_logo && jQuery(".td-main-menu-logo").addClass("td-logo-sticky")) : (tdAffix.menu_offset_max_hit = !1, (!0 === tdDetect.isIos || tdDetect.isSafari) && d.show());
- tdAffix.menu_offset = f
- }, d[0])
- } else {
- var h = jQuery(tdAffix.menu_selector);
- h.length && tdAffix._affix_off(h)
- }
- }
- },
- compute_top: function () {
- jQuery(tdAffix.menu_wrap_selector).length && (tdAffix.top_offset = jQuery(tdAffix.menu_wrap_selector).offset().top, "smart_snap_always" === tdAffix.tds_snap_menu &&
- (tdAffix.top_offset += tdAffix.menu_affix_height), tdAffix.is_top_menu = 1 === tdAffix.top_offset ? !0 : !1, tdAffix.td_events_scroll(jQuery(window).scrollTop()))
- },
- compute_wrapper: function () {
- jQuery(tdAffix.menu_selector).hasClass("td-affix") ? (jQuery(tdAffix.menu_selector).removeClass("td-affix"), tdAffix.main_menu_height = jQuery(tdAffix.menu_selector).height(), jQuery(tdAffix.menu_selector).addClass("td-affix")) : tdAffix.main_menu_height = jQuery(tdAffix.menu_selector).height();
- jQuery(tdAffix.menu_wrap_selector).css("height",
- tdAffix.main_menu_height)
- },
- _affix_on: function (a) {
- !1 === tdAffix.is_menu_affix ? ("smart_snap_always" === tdAffix.tds_snap_menu && !0 !== tdDetect.isPhoneScreen && a.css("visibility", "hidden"), tdAffix.menu_offset = -tdAffix.top_offset, a.addClass("td-affix"), jQuery("body").addClass("body-td-affix"), tdAffix.is_menu_affix = !0) : !0 !== tdDetect.isPhoneScreen && a.css("visibility", "")
- },
- _affix_off: function (a) {
- !0 === tdAffix.is_menu_affix && (jQuery(tdAffix.menu_selector).removeClass("td-affix"), "" === tdAffix.tds_snap_menu_logo &&
- jQuery(".td-main-menu-logo").removeClass("td-logo-sticky"), jQuery("body").removeClass("body-td-affix"), tdAffix.is_menu_affix = !1, tdUtil.tdMoveY(a[0], 0), (!0 === tdDetect.isIos || tdDetect.isSafari) && a.show())
- }
- }
- })();
- "use strict";
- jQuery().ready(function () {
- function a(a) {
- tdScrollToClass.resetItems();
- a.each(function () {
- var a = new tdScrollToClass.item;
- a.handlerObj = jQuery(this);
- tdScrollToClass.addItem(a)
- });
- tdScrollToClass.manageActiveClasses()
- }
- function b() {
- var b = jQuery("[data-scroll-to-class]"), c = !1;
- b.each(function () {
- var a = jQuery(this), b = !1;
- tdScrollToClass.items.forEach(function (c) {
- c.handlerObj.data("td-block-uid") === a.data("td-block-uid") && (b = !0)
- });
- b || (c = !0)
- });
- c && a(b)
- }
- td_retina();
- td_mobile_menu_toogle();
- td_resize_videos();
- jQuery("input, textarea").placeholder();
- td_more_articles_box.init();
- td_smart_lists_magnific_popup();
- td_smart_list_dropdown();
- if ("undefined" !== typeof tdsDateFormat && "undefined" !== typeof window.td_date_i18n) {
- var c = Math.floor((new Date).getTime() / 1E3);
- c = td_date_i18n(tdsDateFormat, c);
- jQuery(".td_data_time").text(c)
- }
- td_comments_form_validation();
- b();
- window.location !== window.parent.location && setInterval(function () {
- jQuery("[data-scroll-to-class]").length && b()
- }, 1E3)
- });
- function td_smart_list_dropdown() {
- jQuery(".td-smart-list-dropdown").on("change", function () {
- window.location = this.value
- })
- }
- var td_more_articles_box = {
- is_box_visible: !1, cookie: "", distance_from_top: 400, init: function () {
- td_more_articles_box.cookie = td_read_site_cookie("td-cookie-more-articles");
- !isNaN(parseInt(tds_more_articles_on_post_pages_distance_from_top)) && isFinite(tds_more_articles_on_post_pages_distance_from_top) && 0 < parseInt(tds_more_articles_on_post_pages_distance_from_top) ? td_more_articles_box.distance_from_top = parseInt(tds_more_articles_on_post_pages_distance_from_top) : td_more_articles_box.distance_from_top = 400;
- jQuery(".td-close-more-articles-box").click(function () {
- jQuery(".td-more-articles-box").removeClass("td-front-end-display-block");
- jQuery(".td-more-articles-box").hide();
- !isNaN(parseInt(tds_more_articles_on_post_time_to_wait)) && isFinite(tds_more_articles_on_post_time_to_wait) && td_set_cookies_life(["td-cookie-more-articles", "hide-more-articles-box", 864E5 * parseInt(tds_more_articles_on_post_time_to_wait)])
- })
- }, td_events_scroll: function (a) {
- tdIsScrollingAnimation || "show" != tdUtil.getBackendVar("tds_more_articles_on_post_enable") ||
- "hide-more-articles-box" == td_more_articles_box.cookie || (a > td_more_articles_box.distance_from_top ? !1 === td_more_articles_box.is_box_visible && (jQuery(".td-more-articles-box").addClass("td-front-end-display-block"), td_more_articles_box.is_box_visible = !0) : !0 === td_more_articles_box.is_box_visible && (jQuery(".td-more-articles-box").removeClass("td-front-end-display-block"), td_more_articles_box.is_box_visible = !1))
- }
- }, td_resize_timer_id;
- jQuery(window).resize(function () {
- clearTimeout(td_resize_timer_id);
- td_resize_timer_id = setTimeout(function () {
- td_done_resizing()
- }, 200)
- });
- function td_done_resizing() {
- td_resize_videos()
- }
- function td_resize_videos() {
- jQuery(document).find('iframe[src*="youtube.com"]').each(function () {
- var a = jQuery(this).parent().parent().parent(),
- b = jQuery(this).parent().hasClass("td_wrapper_playlist_player_vimeo"),
- c = a.hasClass("vc_video-aspect-ratio-43");
- a = a.hasClass("vc_video-aspect-ratio-235");
- b || c || a || (b = jQuery(this), b.attr("width", "100%"), c = b.width(), b.css("height", .5625 * c, "important"))
- });
- jQuery(document).find('iframe[src*="vimeo.com"]').each(function () {
- var a = jQuery(this).parent().parent().parent(),
- b = jQuery(this).parent().hasClass("td_wrapper_playlist_player_vimeo"),
- c = a.hasClass("vc_video-aspect-ratio-43");
- a = a.hasClass("vc_video-aspect-ratio-235");
- b || c || a || (b = jQuery(this), b.attr("width", "100%"), c = b.width(), b.css("height", .5625 * c, "important"))
- });
- jQuery(document).find('iframe[src*="dailymotion.com"]').each(function () {
- var a = jQuery(this).parent().parent().parent(), b = a.hasClass("vc_video-aspect-ratio-43");
- a = a.hasClass("vc_video-aspect-ratio-235");
- b || a || (b = jQuery(this), b.attr("width", "100%"), a = b.width(),
- b.css("height", .6 * a, "important"))
- })
- }
- function td_mobile_menu() {
- }
- function td_mobile_menu_toogle() {
- jQuery("#td-top-mobile-toggle a, #td-top-mobile-toggle span, .td-mobile-close span, .tdb-mobile-menu-button").click(function () {
- "disabled" !== window.tdMobileMenu && (jQuery("body").hasClass("td-menu-mob-open-menu") ? jQuery("body").removeClass("td-menu-mob-open-menu") : jQuery("body").addClass("td-menu-mob-open-menu"))
- });
- jQuery(document).find("#td-mobile-nav .menu-item-has-children").each(function (a) {
- a = "td_mobile_submenu td_mobile_elem_with_submenu_" + a;
- jQuery(this).addClass(a);
- jQuery(this).children("a").addClass("td-link-element-after");
- jQuery(this).click(function (a) {
- var b = jQuery(a.target);
- !b.length || !b.hasClass("td-element-after") && !b.hasClass("td-link-element-after") || "#" !== b.attr("href") && void 0 !== b.attr("href") || (a.preventDefault(), a.stopPropagation(), jQuery(this).toggleClass("td-sub-menu-open"))
- })
- })
- }
- function td_retina() {
- 1 < window.devicePixelRatio && (jQuery(".td-retina").each(function (a) {
- a = jQuery(this).attr("src").replace(".png", "@2x.png");
- a = a.replace(".jpg", "@2x.jpg");
- jQuery(this).attr("src", a)
- }), jQuery(".td-retina-data").each(function (a) {
- jQuery(this).attr("src", jQuery(this).data("retina"));
- jQuery(this).addClass("td-retina-version")
- }))
- }
- tdDetect.isTouchDevice || "" == tdUtil.getBackendVar("td_ad_background_click_link") || jQuery("body").click(function (a) {
- a = jQuery(a.target ? a.target : a.srcElement);
- if (a.hasClass("td-outer-container") || a.hasClass("td-theme-wrap") || a.hasClass("td-header-wrap") || "tdb-autoload-article" === a.attr("id")) "_blank" == td_ad_background_click_target ? window.open(td_ad_background_click_link) : location.href = td_ad_background_click_link
- });
- function td_read_site_cookie(a) {
- a = escape(a) + "=";
- for (var b = document.cookie.split(";"), c = 0; c < b.length; c++) {
- for (var d = b[c]; " " == d.charAt(0);) d = d.substring(1, d.length);
- if (0 == d.indexOf(a)) return unescape(d.substring(a.length, d.length))
- }
- return null
- }
- function td_set_cookies_life(a) {
- var b = new Date;
- b.setTime(b.getTime() + a[2]);
- document.cookie = a[0] + "=" + a[1] + "; expires=" + b.toGMTString() + "; path=/"
- }
- function td_delete_site_cookie(a) {
- document.cookie = a + "=; Max-Age=-99999999; path=/"
- }
- var tdIsScrollingAnimation = !1, td_mouse_wheel_or_touch_moved = !1;
- jQuery(document).bind("mousewheel DOMMouseScroll MozMousePixelScroll", function (a) {
- !1 !== tdIsScrollingAnimation && (tdIsScrollingAnimation = !1, td_mouse_wheel_or_touch_moved = !0, jQuery("html, body").stop())
- });
- document.addEventListener && document.addEventListener("touchmove", function (a) {
- !1 !== tdIsScrollingAnimation && (tdIsScrollingAnimation = !1, td_mouse_wheel_or_touch_moved = !0, jQuery("html, body").stop())
- }, !1);
- jQuery(".td-read-down a").click(function (a) {
- a.preventDefault();
- tdUtil.scrollToPosition(jQuery(".td-full-screen-header-image-wrap").height(), 1200)
- });
- function td_post_template_6_title() {
- function a() {
- d = jQuery(document).scrollTop();
- if (950 >= d) {
- var a = 1 - d / 800;
- !0 === tdDetect.isIe8 && (a = 1);
- a = Math.round(100 * a) / 100;
- b.style.opacity = a;
- tdUtil.tdMoveY(c, --Math.round(d / 4));
- h = -Math.round(d / 8);
- tdUtil.tdMoveY(b, -h)
- }
- f = !1
- }
- var b = document.getElementById("td_parallax_header_6"), c = document.getElementById("td-full-screen-header-image"),
- d = "", h;
- jQuery(window).scroll(function () {
- !1 === f && window.requestAnimationFrame(a);
- f = !0
- });
- var f = !1
- }
- function td_smart_lists_magnific_popup() {
- jQuery(".td-lightbox-enabled").magnificPopup({
- delegate: "a",
- type: "image",
- tLoading: "Loading image #%curr%...",
- mainClass: "mfp-img-mobile",
- gallery: {
- enabled: !0,
- navigateByImgClick: !0,
- preload: [0, 1],
- tCounter: tdUtil.getBackendVar("td_magnific_popup_translation_tCounter")
- },
- image: {
- tError: "<a href='%url%'>The image #%curr%</a> could not be loaded.", titleSrc: function (a) {
- return a.el.attr("data-caption")
- }
- },
- zoom: {
- enabled: !0, duration: 300, opener: function (a) {
- return a.find("img")
- }
- },
- callbacks: {
- change: function (a) {
- if ("" != a.el[0].id) {
- var b = a.el[0].id.split("_");
- jQuery(".td-iosSlider").iosSlider("goToSlide", parseInt(b[1]) + 1)
- } else tdModalImageLastEl = a.el, setTimeout(function () {
- tdUtil.scrollIntoView(a.el)
- }, 100)
- }, beforeClose: function () {
- "" != tdModalImageLastEl && tdUtil.scrollIntoView(tdModalImageLastEl)
- }
- }
- });
- jQuery("[data-mfp-src]").on("click", function (a) {
- a.preventDefault();
- if ("undefined" === typeof window.parent.tdcAdminSettings) return a = jQuery(this), a.hasClass("td-mfp-loaded") || (a.addClass("td-mfp-loaded"),
- a.magnificPopup({
- preloader: !0,
- tLoading: "Loading url #%curr%...",
- type: "iframe",
- markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe></div>',
- iframe: {
- patterns: {
- youtube: {
- index: "youtube.com/", id: function (a) {
- return (a = a.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&\?]{11,11}).*/)) && 2 <= a.length ? a[2] : null
- }, src: "//www.youtube.com/embed/%id%?autoplay=1"
- }, vimeo: {index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1"}
- },
- srcAction: "iframe_src"
- }
- })), a.magnificPopup("open"), !1
- })
- }
- function td_get_document_width() {
- var a = 0;
- self.innerHeight ? a = self.innerWidth : document.documentElement && document.documentElement.clientHeight ? a = document.documentElement.clientWidth : document.body && (a = document.body.clientWidth);
- return a
- }
- function td_get_document_height() {
- var a = 0;
- self.innerHeight ? a = self.innerHeight : document.documentElement && document.documentElement.clientHeight ? a = document.documentElement.clientHeight : document.body && (a = document.body.clientHeight);
- return a
- }
- function td_comments_form_validation() {
- if ("show" === tdUtil.getBackendVar("tds_captcha")) {
- var a = jQuery("#g-recaptcha-response");
- if (1 === a.length) {
- var b = a.attr("data-sitekey");
- grecaptcha.ready(function () {
- grecaptcha.execute(b, {action: "validate_captcha"}).then(function (a) {
- document.getElementById("g-recaptcha-response").value = a
- })
- })
- }
- }
- jQuery(".comment-form").on("submit", function (a) {
- var b = jQuery(this), c = !1;
- jQuery(a.target).find(":input").each(function () {
- var d = jQuery(this);
- d.attr("aria-required") && ("" === d.val() ?
- (a.preventDefault(), b.addClass("td-comment-form-warnings"), "comment" === d.attr("id") ? (b.find(".td-warning-comment").show(200), d.css("border", "1px solid #ff7a7a"), c = !0) : "author" === d.attr("id") ? (b.find(".td-warning-author").show(200), d.css("border", "1px solid #ff7a7a"), c = !0) : "email" === d.attr("id") && (b.find(".td-warning-email").show(200), d.css("border", "1px solid #ff7a7a"), c = !0)) : "email" === d.attr("id") && !1 === tdUtil.isEmail(d.val()) && (a.preventDefault(), b.addClass("td-comment-form-warnings"), b.find(".td-warning-email-error").show(200),
- c = !0))
- });
- if ("show" === tdUtil.getBackendVar("tds_captcha")) {
- var f = jQuery("#g-recaptcha-response");
- !1 === c && f.length && "" !== f.val() && (a.preventDefault(), f = {
- action: "td_ajax_submit_captcha",
- token: f.val().trim()
- }, jQuery.ajax({type: "POST", url: td_ajax_url, data: f}).success(function (a) {
- a = jQuery.parseJSON(a);
- !0 === a.success ? b.unbind("submit").submit() : !1 === a.success && (b.addClass("td-comment-form-warnings"), "score failed" === a.error ? b.find(".td-warning-captcha-score").show(200) : (b.find(".td-warning-captcha").show(200),
- b.find(".td-warning-captcha-score").hide(200)))
- }))
- }
- });
- jQuery("form#commentform :input").each(function () {
- var a = jQuery(this).parent().parent(), b = jQuery(this);
- b.focus(function () {
- "comment" === b.attr("id") ? (a.find(".td-warning-comment").hide(200), a.find(".td-warning-captcha").hide(200), b.css("border", "1px solid #e1e1e1")) : "author" === b.attr("id") ? (a.find(".td-warning-author").hide(200), a.find(".td-warning-captcha").hide(200), b.css("border", "1px solid #e1e1e1")) : "email" === b.attr("id") && (a.find(".td-warning-email").hide(200),
- a.find(".td-warning-email-error").hide(200), a.find(".td-warning-captcha").hide(200), b.css("border", "1px solid #e1e1e1"))
- })
- })
- }
- jQuery(window).on("load", function () {
- var a = td_read_site_cookie("td-cookie-scroll-to-class"), b = td_read_site_cookie("td-cookie-scroll-offset");
- if ("undefined" !== typeof a && null !== a) {
- td_set_cookies_life(["td-cookie-scroll-to-class", "", 1]);
- td_set_cookies_life(["td-cookie-scroll-offset", "", 1]);
- var c = jQuery("." + a);
- if (c.length) {
- c = c.offset();
- var d = 400 * Math.floor(Math.abs(c.top) / 100);
- 1500 < d ? d = 1500 : 500 > d && (d = 500);
- var h = 0;
- "undefined" !== typeof b && null !== b && (h = parseInt(b));
- tdUtil.scrollToPosition(c.top + h, d);
- a = jQuery('[data-scroll-to-class="' +
- a + '"]');
- a.length && (a = a.parent().parent("li.menu-item"), a.length && (a.siblings(".current-menu-item").removeClass("current-menu-item"), a.addClass("current-menu-item")))
- }
- }
- });
- "undefined" !== typeof window.td_fb_login_enabled && jQuery.ajax({
- type: "POST", url: td_ajax_url, data: {action: "td_ajax_fb_login_get_credentials"}, success: function (a) {
- var b = jQuery.parseJSON(a);
- "" === b.error && (window.fbAsyncInit = function () {
- FB.init({appId: b.app_id, cookie: !0, xfbml: !0, version: "v13.0"});
- FB.AppEvents.logPageView()
- }, function (a, b, h) {
- var c = a.getElementsByTagName(b)[0];
- a.getElementById(h) || (a = a.createElement(b), a.id = h, a.src = "https://connect.facebook.net/en_US/sdk.js", c.parentNode.insertBefore(a, c))
- }(document,
- "script", "facebook-jssdk"))
- }
- });
- var tdBlocks = {};
- (function () {
- function a() {
- function a(a, b) {
- !0 === d && a.target === h ? window.location = a.target : (d = !0, h = a.target, a.preventDefault(), setTimeout(function () {
- d = !1
- }, 300), c(a, b))
- }
- function c(a, b) {
- a = b.data("td_block_id");
- var c = tdBlocks.tdGetBlockObjById(a);
- c.is_ajax_running = !0;
- jQuery(".mega-menu-sub-cat-" + a).removeClass("cur-sub-cat");
- b.addClass("cur-sub-cat");
- c.td_filter_value = b.data("td_filter_value");
- c.td_current_page = 1;
- tdBlocks.tdAjaxDoBlockRequest(c, "mega_menu")
- }
- jQuery(".td_block_wrap").on("click", ".td-ajax-next-page",
- function (a) {
- a.preventDefault();
- a = tdBlocks.tdGetBlockObjById(jQuery(this).data("td_block_id"));
- jQuery(this).hasClass("ajax-page-disabled") || !0 === a.is_ajax_running || (a.is_ajax_running = !0, a.td_current_page++, tdBlocks.tdAjaxDoBlockRequest(a, "next"))
- });
- jQuery(".td_block_wrap").on("click", ".td-ajax-prev-page", function (a) {
- a.preventDefault();
- a = tdBlocks.tdGetBlockObjById(jQuery(this).data("td_block_id"));
- jQuery(this).hasClass("ajax-page-disabled") || !0 === a.is_ajax_running || (a.is_ajax_running = !0, a.td_current_page--,
- tdBlocks.tdAjaxDoBlockRequest(a, "back"))
- });
- "undefined" !== typeof window.Hammer && jQuery(".td_with_ajax_pagination_next_prev_swipe:not(.tdb_header_mega_menu)").hammer().bind("swipeleft swiperight", function (a) {
- var b = jQuery(this), c = tdBlocks.tdGetBlockObjById(b.data("td-block-uid"));
- switch (a.type) {
- case "swipeleft":
- if (b.find(".td-ajax-next-page").hasClass("ajax-page-disabled") || !0 === c.is_ajax_running) break;
- c.is_ajax_running = !0;
- c.td_current_page++;
- tdBlocks.tdAjaxDoBlockRequest(c, "next");
- break;
- case "swiperight":
- b.find(".td-ajax-prev-page").hasClass("ajax-page-disabled") ||
- !0 === c.is_ajax_running || (c.is_ajax_running = !0, c.td_current_page--, tdBlocks.tdAjaxDoBlockRequest(c, "prev"))
- }
- });
- jQuery(document).on("click", ".td-load-more-wrap .td_ajax_load_more_js", function (a) {
- a.preventDefault();
- jQuery(this).hasClass("ajax-page-disabled") || (jQuery(this).css("visibility", "hidden"), a = tdBlocks.tdGetBlockObjById(jQuery(this).data("td_block_id")), a.td_current_page++, tdBlocks.tdAjaxDoBlockRequest(a, "load_more"), a.max_num_pages <= a.td_current_page && jQuery(this).addClass("ajax-page-disabled"))
- });
- if (tdDetect.isMobileDevice) jQuery(".td-pulldown-filter-display-option").on("click", function () {
- var a = jQuery(this).data("td_block_id");
- jQuery("#td_pulldown_" + a).addClass("td-pulldown-filter-list-open");
- a = jQuery("#td_pulldown_" + a + "_list");
- a.removeClass("fadeOut");
- a.addClass("td_animated td_fadeIn")
- }); else jQuery(".td-pulldown-filter-display-option").hover(function () {
- var a = jQuery(this).data("td_block_id");
- jQuery("#td_pulldown_" + a).addClass("td-pulldown-filter-list-open");
- a = jQuery("#td_pulldown_" + a + "_list");
- a.removeClass("fadeOut");
- a.addClass("td_animated td_fadeIn");
- a.css("visibility", "visible")
- }, function () {
- var a = jQuery(this).data("td_block_id");
- jQuery("#td_pulldown_" + a).removeClass("td-pulldown-filter-list-open")
- });
- jQuery(".td-related-title a").on("click", function (a) {
- a.preventDefault();
- jQuery(".td-related-title").children("a").removeClass("td-cur-simple-item");
- jQuery(this).addClass("td-cur-simple-item");
- a = jQuery(this).data("td_block_id");
- a = tdBlocks.tdGetBlockObjById(a);
- a.td_filter_value = jQuery(this).data("td_filter_value");
- a.td_current_page = 1;
- tdBlocks.tdAjaxDoBlockRequest(a, "pull_down")
- });
- var d = !1, h = "";
- if (tdDetect.isTouchDevice) jQuery(".block-mega-child-cats a").click(function (b) {
- a(b, jQuery(this))
- }, !1).each(function (b, c) {
- c.addEventListener("touchend", function (b) {
- a(b, jQuery(this))
- }, !1)
- }); else jQuery("body").on("mouseenter", ".block-mega-child-cats a", function (a) {
- c(a, jQuery(this))
- });
- jQuery("body").on("click", ".td-subcat-item a", function (a) {
- a.preventDefault();
- a = tdBlocks.tdGetBlockObjById(jQuery(this).data("td_block_id"));
- !0 !== a.is_ajax_running && (a.is_ajax_running = !0, jQuery("." + jQuery(this).data("td_block_id")).find(".td-cur-simple-item").removeClass("td-cur-simple-item"), jQuery(this).addClass("td-cur-simple-item"), a.td_filter_value = jQuery(this).data("td_filter_value"), a.td_current_page = 1, tdBlocks.tdAjaxDoBlockRequest(a, "pull_down"))
- });
- jQuery(".td-pulldown-filter-link").on("click", function (a) {
- a.preventDefault();
- var b = jQuery(this).data("td_block_id");
- jQuery("#" + b).find(".iosSlider").iosSlider("destroy");
- var c = tdBlocks.tdGetBlockObjById(b);
- !0 !== c.is_ajax_running && (c.is_ajax_running = !0, c.td_filter_value = jQuery(this).data("td_filter_value"), jQuery("." + jQuery(this).data("td_block_id")).find(".td-cur-simple-item").removeClass("td-cur-simple-item"), jQuery(this).addClass("td-cur-simple-item"), c.td_current_page = 1, jQuery("#td_pulldown_" + b).removeClass("td-pulldown-filter-list-open"), tdBlocks.tdAjaxDoBlockRequest(c, "pull_down"), tdDetect.isMobileDevice && tdUtil.stopBubble(a))
- })
- }
- jQuery().ready(function () {
- a()
- });
- tdBlocks = {
- tdPullDownFilterChangeValue: function (a,
- c) {
- jQuery("#td-pulldown-" + a + "-val").html(c)
- }, tdAjaxDoBlockRequest: function (a, c) {
- var b = JSON.stringify(a);
- if (tdLocalCache.exist(b)) return tdBlocks.tdBlockAjaxLoadingStart(a, !0, c), tdBlocks.tdAjaxBlockProcessResponse(tdLocalCache.get(b), c), "td_woo_products_loop" === a.block_type && jQuery(document).trigger("td_woo_ajax_block_update", [a, c, tdLocalCache.get(b)]), "cache_hit";
- tdBlocks.tdBlockAjaxLoadingStart(a, !1, c);
- var h = {
- action: "td_ajax_block",
- td_atts: a.atts,
- td_block_id: a.id,
- td_column_number: a.td_column_number,
- td_current_page: a.td_current_page,
- block_type: a.block_type,
- td_filter_value: a.td_filter_value,
- td_user_action: a.td_user_action,
- td_magic_token: tdBlockNonce
- };
- if ("td_woo_products_loop" === a.block_type) {
- -1 === td_ajax_url.indexOf("td_woo_ajax=1") && (td_ajax_url += "&td_woo_ajax=1");
- var f = JSON.parse(a.atts);
- "undefined" !== typeof f.ajax_pagination && "numbered" === f.ajax_pagination && (h.td_request_uri = window.location.pathname + window.location.search)
- }
- jQuery.ajax({
- type: "POST", url: td_ajax_url, cache: !0, data: h, success: function (d,
- f, h) {
- tdLocalCache.set(b, d);
- tdBlocks.tdAjaxBlockProcessResponse(d, c);
- "td_woo_products_loop" === a.block_type && jQuery(document).trigger("td_woo_ajax_block_update", [a, c, d]);
- d = jQuery("." + a.id).find("audio");
- d.length && d.mediaelementplayer()
- }, error: function (a, b, c) {
- console.log(c)
- }
- })
- }, tdAjaxBlockProcessResponse: function (a, c) {
- a = jQuery.parseJSON(a);
- if ("load_more" === c || "infinite_load" === c) {
- if ("undefined" !== typeof window.tdSmartSidebar) for (var b = 0; b < tdSmartSidebar.items.length; b++) "case_3_bottom_of_content" ===
- tdSmartSidebar.items[b].sidebar_state && (tdSmartSidebar.items[b].sidebar_state = "case_1_fixed_down");
- jQuery(a.td_data).appendTo("#" + a.td_block_id)
- } else jQuery("#" + a.td_block_id).html(a.td_data);
- !0 === a.td_hide_prev ? jQuery("#prev-page-" + a.td_block_id).addClass("ajax-page-disabled") : jQuery("#prev-page-" + a.td_block_id).removeClass("ajax-page-disabled");
- !0 === a.td_hide_next ? jQuery("#next-page-" + a.td_block_id).addClass("ajax-page-disabled") : jQuery("#next-page-" + a.td_block_id).removeClass("ajax-page-disabled");
- b = tdBlocks.tdGetBlockObjById(a.td_block_id);
- "slide" === b.block_type && jQuery("#" + a.td_block_id + " .slide-wrap-active-first").addClass("slide-wrap-active");
- b.is_ajax_running = !1;
- tdBlocks.tdBlockAjaxLoadingEnd(a, b, c)
- }, tdBlockAjaxLoadingStart: function (a, c, d) {
- var b = jQuery("#" + a.id);
- jQuery("." + a.id + " .td-loader-gif").remove();
- b.removeClass("td_fadeInRight td_fadeInLeft td_fadeInDown td_fadeInUp td_animated_xlong");
- b.addClass("td_block_inner_overflow");
- var f = b.height();
- b.css("height", f);
- !1 === c && ("load_more" ===
- d ? (b.parent().append('<div class="td-loader-gif td-loader-infinite td-loader-blocks-load-more td-loader-animation-start"></div>'), tdLoadingBox.init(a.header_color ? a.header_color : tds_theme_color_site_wide), setTimeout(function () {
- jQuery(".td-loader-gif").removeClass("td-loader-animation-start").addClass("td-loader-animation-mid")
- }, 50)) : "infinite_load" === d ? (b.parent().append('<div class="td-loader-gif td-loader-infinite td-loader-animation-start"></div>'), tdLoadingBox.init(a.header_color ? a.header_color :
- tds_theme_color_site_wide), setTimeout(function () {
- jQuery(".td-loader-gif").removeClass("td-loader-animation-start").addClass("td-loader-animation-mid")
- }, 50)) : (b.parent().append('<div class="td-loader-gif td-loader-animation-start"></div>'), tdLoadingBox.init(a.header_color ? a.header_color : tds_theme_color_site_wide), setTimeout(function () {
- jQuery(".td-loader-gif").removeClass("td-loader-animation-start").addClass("td-loader-animation-mid")
- }, 50), b.addClass("td_animated_long td_fadeOut_to_1")))
- }, tdBlockAjaxLoadingEnd: function (a,
- c, d) {
- jQuery("." + c.id + " .td-loader-gif").removeClass("td-loader-animation-mid").addClass("td-loader-animation-end");
- setTimeout(function () {
- jQuery("." + c.id + " .td-loader-gif").remove();
- tdLoadingBox.stop()
- }, 400);
- var b = jQuery("#" + c.id);
- b.removeClass("td_animated_long td_fadeOut_to_1");
- if (!0 === tdAnimationStack.activated) var f = tdAnimationStack.SORTED_METHOD.sort_left_to_right;
- switch (d) {
- case "next":
- b.addClass("td_animated_xlong td_fadeInRight");
- void 0 !== f && (f = tdAnimationStack.SORTED_METHOD.sort_right_to_left);
- break;
- case "back":
- b.addClass("td_animated_xlong td_fadeInLeft");
- break;
- case "pull_down":
- var p = JSON.parse(c.atts);
- "undefined" !== typeof p.ajax_pagination && "infinite" === p.ajax_pagination && (tdInfiniteLoader.computeTopDistances(), tdInfiniteLoader.enable_is_visible_callback(c.id));
- b.addClass("td_animated_xlong td_fadeInDown");
- break;
- case "mega_menu":
- b.addClass("td_animated_xlong td_fadeInDown");
- break;
- case "load_more":
- setTimeout(function () {
- jQuery("." + c.id + " .td_ajax_load_more_js").css("visibility", "visible")
- },
- 500);
- break;
- case "infinite_load":
- setTimeout(function () {
- tdInfiniteLoader.computeTopDistances();
- "" !== a.td_data && tdInfiniteLoader.enable_is_visible_callback(c.id)
- }, 500), setTimeout(function () {
- tdInfiniteLoader.computeTopDistances()
- }, 1E3), setTimeout(function () {
- tdInfiniteLoader.computeTopDistances()
- }, 1500)
- }
- setTimeout(function () {
- jQuery(".td_block_inner_overflow").removeClass("td_block_inner_overflow");
- b.css("height", "auto");
- "undefined" !== typeof window.tdSmartSidebar && tdSmartSidebar.compute()
- }, 200);
- "undefined" !==
- typeof window.tdSmartSidebar && setTimeout(function () {
- tdSmartSidebar.compute()
- }, 500);
- void 0 !== f && setTimeout(function () {
- "mega_menu" !== d && "back" !== d && "pull_down" !== d || "" === JSON.parse(tdBlocksArray[0].atts).td_ajax_preloading ? tdAnimationStack.check_for_new_items("#" + c.id + " .td-animation-stack", f, !0, !1) : tdAnimationStack.check_for_new_items("#" + c.id + " .td-animation-stack", f, !0, !0)
- }, 200)
- }, tdGetBlockIndex: function (a) {
- var b = 0, d = 0;
- jQuery.each(tdBlocksArray, function (c, f) {
- if (f.id === a) return d = b, !1;
- b++
- });
- return d
- },
- tdGetBlockObjById: function (a) {
- return tdBlocksArray[tdBlocks.tdGetBlockIndex(a)]
- }
- }
- })();
- "use strict";
- var td_history = {
- td_history_change_event: !1, init: function () {
- window.addEventListener("popstate", function (a) {
- td_history.td_history_change_event = !0;
- "undefined" != typeof a.state && null != a.state && jQuery("#" + a.state.slide_id).iosSlider("goToSlide", a.state.current_slide)
- })
- }, replace_history_entry: function (a) {
- !1 !== tdDetect.hasHistory && history.replaceState(a, null)
- }, add_history_entry: function (a, b, c) {
- if (!1 !== tdDetect.hasHistory) if ("" == c) history.pushState(a, null, null); else {
- var d = td_history.get_query_parameter("p");
- "" != d ? 1 == c ? history.pushState(a, null, "?p=" + d) : history.pushState(a, null, "?p=" + d + "&" + b + "=" + c) : 1 == c ? history.pushState(a, null, td_history.get_mod_rewrite_base_url()) : history.pushState(a, null, td_history.get_mod_rewrite_base_url() + c + "/")
- }
- }, get_mod_rewrite_base_url: function () {
- var a = document.URL;
- "/" == a.charAt(a.length - 1) && (a = a.slice(0, -1));
- return !1 === td_history.get_mod_rewrite_pagination(document.URL) ? document.URL : a.substring(0, a.lastIndexOf("/")) + "/"
- }, get_mod_rewrite_pagination: function () {
- var a = document.URL;
- "/" == a.charAt(a.length - 1) && (a = a.slice(0, -1));
- a = a.substring(a.lastIndexOf("/") + 1, a.length);
- return td_history.isInt(a) ? a : !1
- }, get_current_page: function (a) {
- if ("" != td_history.get_query_parameter("p")) return a = td_history.get_query_parameter(a), "" != a ? a : 1;
- a = td_history.get_mod_rewrite_pagination();
- return !1 !== a ? a : 1
- }, isInt: function (a) {
- return 0 === a % 1
- }, get_query_parameter: function (a) {
- a = a.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
- a = (new RegExp("[\\?&]" + a + "=([^&#]*)")).exec(location.search);
- return null == a ? "" :
- decodeURIComponent(a[1].replace(/\+/g, " "))
- }, slide_changed_callback: function (a) {
- if (!0 === td_history.td_history_change_event) td_history.td_history_change_event = !1; else {
- var b = a.currentSlideNumber;
- a = a.sliderContainerObject.attr("id");
- td_history.add_history_entry({current_slide: b, slide_id: a}, "slide", b)
- }
- }
- };
- window.history && window.history.pushState && td_history.init();
- var tdHeader = {};
- (function () {
- tdHeader = {
- _selectorHeaderDesktop: ".td-header-desktop-wrap",
- _selectorHeaderDesktopSticky: ".td-header-desktop-sticky-wrap",
- _selectorHeaderMobile: ".td-header-mobile-wrap",
- _selectorHeaderMobileSticky: ".td-header-mobile-sticky-wrap",
- _selectorDataHeaderDesktop: "tdc_header_desktop",
- _selectorDataHeaderDesktopSticky: "tdc_header_desktop_sticky",
- _selectorDataHeaderMobile: "tdc_header_mobile",
- _selectorDataHeaderMobileSticky: "tdc_header_mobile_sticky",
- $_headerDesktop: void 0,
- $_headerDesktopSticky: void 0,
- $_mobileDesktop: void 0,
- $_mobileDesktopSticky: void 0,
- _headerDesktopHeight: void 0,
- _headerDesktopStickyHeight: void 0,
- _headerMobileHeight: void 0,
- _headerMobileStickyHeight: void 0,
- _headerDesktopStickyGap: 0,
- _headerMobileStickyGap: 0,
- _previousScrollPosition: 0,
- _isMobile: !1,
- _isInitialized: !1,
- init: function () {
- !tdHeader._isInitialized && (tdHeader.$_headerDesktop = jQuery(tdHeader._selectorHeaderDesktop), tdHeader.$_headerDesktopSticky = jQuery(tdHeader._selectorHeaderDesktopSticky), tdHeader.$_headerMobile = jQuery(tdHeader._selectorHeaderMobile),
- tdHeader.$_headerMobileSticky = jQuery(tdHeader._selectorHeaderMobileSticky), tdHeader.$_headerDesktopSticky.length || tdHeader.$_headerMobileSticky.length) && (window !== window.top && (tdHeader.$_headerDesktop.removeClass("tdc-zone-sticky-invisible tdc-zone-sticky-inactive"), tdHeader.$_headerDesktopSticky.removeClass("tdc-zone-sticky-invisible tdc-zone-sticky-inactive"), tdHeader.$_headerMobile.removeClass("tdc-zone-sticky-invisible tdc-zone-sticky-inactive"), tdHeader.$_headerMobileSticky.removeClass("tdc-zone-sticky-invisible tdc-zone-sticky-inactive")),
- tdHeader.checkSizes(), tdHeader._isInitialized = !0)
- },
- computeItems: function () {
- if (tdHeader._isInitialized) {
- tdHeader._isMobile ? (tdHeader.$_headerDesktop.hide(), tdHeader.$_headerDesktopSticky.hide(), tdHeader.$_headerMobile.show(), tdHeader.$_headerMobileSticky.show(), tdHeader.$_headerMobileSticky.hasClass("td-header-stop-transition") && tdHeader.$_headerMobileSticky.removeClass("td-header-stop-transition"), tdHeader._headerMobileHeight < tdEvents.scroll_window_scrollTop ? tdHeader.$_headerMobileSticky.find(".tdc_zone:first").hasClass("td-header-sticky-smart") ?
- tdHeader._previousScrollPosition < tdEvents.scroll_window_scrollTop ? (tdHeader.$_headerMobileSticky.hasClass("td-header-active") && tdHeader.doExtra(), tdHeader.$_headerMobileSticky.removeClass("td-header-active")) : (tdHeader.$_headerMobileSticky.hasClass("td-header-active") || tdHeader.doExtra(), tdHeader.$_headerMobileSticky.addClass("td-header-active")) : (tdHeader.$_headerMobileSticky.hasClass("td-header-active") || tdHeader.doExtra(), tdHeader.$_headerMobile.removeClass("td-header-active"), tdHeader.$_headerMobileSticky.addClass("td-header-active")) :
- (tdHeader.$_headerMobile.hasClass("td-header-active") && tdHeader.$_headerMobileSticky.addClass("td-header-stop-transition"), tdHeader.$_headerMobileSticky.hasClass("td-header-active") && tdHeader.doExtra(), tdHeader.$_headerMobile.addClass("td-header-active"), tdHeader.$_headerMobileSticky.removeClass("td-header-active"))) : (tdHeader.$_headerDesktop.show(), tdHeader.$_headerDesktopSticky.show(), tdHeader.$_headerMobile.hide(), tdHeader.$_headerMobileSticky.hide(), tdHeader.$_headerDesktopSticky.hasClass("td-header-stop-transition") &&
- tdHeader.$_headerDesktopSticky.removeClass("td-header-stop-transition"), tdHeader.$_headerDesktopSticky.find(".tdc_zone:first").hasClass("td-header-sticky-smart") ? tdHeader._previousScrollPosition < tdEvents.scroll_window_scrollTop ? tdHeader._headerDesktopHeight < tdEvents.scroll_window_scrollTop && (tdHeader.$_headerDesktopSticky.hasClass("td-header-active") && tdHeader.doExtra(), tdHeader.$_headerDesktop.addClass("td-header-active"), tdHeader.$_headerDesktopSticky.removeClass("td-header-active")) : tdHeader._previousScrollPosition >
- tdEvents.scroll_window_scrollTop && (tdHeader._headerDesktopHeight + parseInt(tdHeader._headerDesktopStickyGap) < tdEvents.scroll_window_scrollTop ? (tdHeader.$_headerDesktopSticky.hasClass("td-header-active") || tdHeader.doExtra(), tdHeader.$_headerDesktop.removeClass("td-header-active"), tdHeader.$_headerDesktopSticky.addClass("td-header-active")) : (tdHeader._headerDesktopHeight > tdEvents.scroll_window_scrollTop && tdHeader.$_headerDesktop.hasClass("td-header-active") && tdHeader.$_headerDesktopSticky.addClass("td-header-stop-transition"),
- tdHeader.$_headerDesktopSticky.hasClass("td-header-active") && tdHeader.doExtra(), tdHeader.$_headerDesktop.addClass("td-header-active"), tdHeader.$_headerDesktopSticky.removeClass("td-header-active"))) : tdHeader._previousScrollPosition < tdEvents.scroll_window_scrollTop ? tdHeader._headerDesktopHeight < tdEvents.scroll_window_scrollTop ? (tdHeader.$_headerDesktopSticky.hasClass("td-header-active") || tdHeader.doExtra(), tdHeader.$_headerDesktop.removeClass("td-header-active"), tdHeader.$_headerDesktopSticky.addClass("td-header-active")) :
- (tdHeader.$_headerDesktop.hasClass("td-header-active") && tdHeader.$_headerDesktopSticky.addClass("td-header-stop-transition"), tdHeader.$_headerDesktopSticky.hasClass("td-header-active") && tdHeader.doExtra(), tdHeader.$_headerDesktop.addClass("td-header-active"), tdHeader.$_headerDesktopSticky.removeClass("td-header-active")) : tdHeader._previousScrollPosition > tdEvents.scroll_window_scrollTop && (tdHeader._headerDesktopHeight + parseInt(tdHeader._headerDesktopStickyGap) < tdEvents.scroll_window_scrollTop ? (tdHeader.$_headerDesktopSticky.hasClass("td-header-active") ||
- tdHeader.doExtra(), tdHeader.$_headerDesktop.removeClass("td-header-active"), tdHeader.$_headerDesktopSticky.addClass("td-header-active")) : (tdHeader._headerDesktopHeight > tdEvents.scroll_window_scrollTop && tdHeader.$_headerDesktop.hasClass("td-header-active") && tdHeader.$_headerDesktopSticky.addClass("td-header-stop-transition"), tdHeader.$_headerDesktopSticky.hasClass("td-header-active") || tdHeader.doExtra(), tdHeader.$_headerDesktop.addClass("td-header-active"), tdHeader.$_headerDesktopSticky.removeClass("td-header-active"))));
- if (window.parent === window.top && "undefined" !== typeof window.name && "tdc-live-iframe" === window.name && "undefined" !== typeof window.parent.tdcSidebar) {
- var a = tdHeader.getActiveHeaderSelector();
- if ("undefined" === typeof tdHeader.previousActiveHeaderSelector || a !== tdHeader.previousActiveHeaderSelector) tdHeader.previousActiveHeaderSelector = a, window.parent.tdcSidebar.$_tdcZone.find(".tdc-zone").removeClass("tdc-zone-active"), "undefined" !== typeof tdHeader.timeoutHeaderTemplate && clearTimeout(tdHeader.timeoutHeaderTemplate),
- tdHeader.timeoutHeaderTemplate = setTimeout(function () {
- window.parent.tdcSidebar.$_tdcZone.find('.tdc-zone[data-type="' + a + '"]').addClass("tdc-zone-active");
- 0 > a.indexOf("sticky") && window.parent.tdcSidebar.setForcedHeaderZone(void 0);
- window.parent.tdcState.isHeaderSticky() ? tdHeader.$_headerDesktopSticky.addClass("tdc-zone-sticky-active").removeClass("tdc-zone-sticky-inactive") : tdHeader.$_headerDesktopSticky.addClass("tdc-zone-sticky-inactive").removeClass("tdc-zone-sticky-active");
- window.parent.tdcState.isMobileHeaderSticky() ?
- tdHeader.$_headerMobileSticky.addClass("tdc-zone-sticky-active").removeClass("tdc-zone-sticky-inactive") : tdHeader.$_headerMobileSticky.addClass("tdc-zone-sticky-inactive").removeClass("tdc-zone-sticky-active");
- tdHeader._isMobile ? tdHeader.$_headerMobileSticky.hasClass("tdc-zone-sticky-active") ? tdHeader.$_headerMobileSticky.removeClass("tdc-zone-sticky-invisible") : tdHeader.$_headerMobileSticky.hasClass("tdc-zone-sticky-inactive") && tdHeader.$_headerMobileSticky.addClass("tdc-zone-sticky-invisible") :
- tdHeader.$_headerDesktopSticky.hasClass("tdc-zone-sticky-active") ? tdHeader.$_headerDesktopSticky.removeClass("tdc-zone-sticky-invisible") : tdHeader.$_headerDesktopSticky.hasClass("tdc-zone-sticky-inactive") && tdHeader.$_headerDesktopSticky.addClass("tdc-zone-sticky-invisible")
- }, 250)
- }
- tdHeader._previousScrollPosition = tdEvents.scroll_window_scrollTop
- }
- },
- scroll: function () {
- tdHeader.computeItems()
- },
- resize: function () {
- tdHeader.checkSizes();
- tdHeader.computeItems()
- },
- checkSizes: function () {
- if (tdHeader._isInitialized) {
- tdHeader._headerDesktopHeight =
- tdHeader.$_headerDesktop.outerHeight(!0);
- tdHeader._headerDesktopStickyHeight = tdHeader.$_headerDesktopSticky.outerHeight(!0);
- tdHeader._headerMobileHeight = tdHeader.$_headerMobile.outerHeight(!0);
- tdHeader._headerMobileStickyHeight = tdHeader.$_headerMobileSticky.outerHeight(!0);
- var a = tdHeader.$_headerDesktopSticky.find(".tdc_zone:first").data("sticky-offset");
- "undefined" !== typeof a && (tdHeader._headerDesktopStickyGap = a);
- tdHeader._isMobile = 768 > tdEvents.window_innerWidth
- }
- },
- getFixedHeaderHeight: function () {
- if (tdHeader._isInitialized) return tdHeader.checkSizes(),
- tdHeader._isMobile ? tdHeader._headerMobileHeight : tdHeader._headerDesktopHeight
- },
- getActiveHeaderSelector: function () {
- if (tdHeader._isInitialized) return tdHeader._isMobile ? tdHeader.$_headerMobileSticky.hasClass("td-header-active") ? tdHeader._selectorDataHeaderMobileSticky : tdHeader._selectorDataHeaderMobile : tdHeader.$_headerDesktopSticky.hasClass("td-header-active") ? tdHeader._selectorDataHeaderDesktopSticky : tdHeader._selectorDataHeaderDesktop
- },
- doExtra: function () {
- "undefined" !== typeof window.tdbSearch && "undefined" !==
- typeof window.tdbSearch.hideAllItems && window.tdbSearch.hideAllItems()
- }
- };
- jQuery(window).on("load", function () {
- tdHeader.init();
- tdHeader.resize()
- })
- })();
- var tdCustomEvents = {};
- (function () {
- tdCustomEvents = {
- _callback_scroll: function () {
- "undefined" !== typeof window.tdAnimationScroll && tdAnimationScroll.compute_all_items()
- }, _callback_resize: function () {
- }, _lazy_callback_scroll_100: function () {
- !0 === tdAnimationStack.activated && tdAnimationStack.td_events_scroll()
- }, _lazy_callback_scroll_500: function () {
- }, _lazy_callback_resize_100: function () {
- tdPullDown.td_events_resize();
- "undefined" !== typeof window.tdBackstr && tdBackstr.td_events_resize();
- "undefined" !== typeof window.tdAnimationScroll && tdAnimationScroll.td_events_resize()
- },
- _lazy_callback_resize_500: function () {
- !0 === tdAnimationStack.activated && tdAnimationStack.td_events_resize();
- if ("undefined" !== typeof window.tdAnimationScroll) {
- for (var a = 0; a < td_backstretch_items.length; a++) tdAnimationScroll.reinitialize_item(td_backstretch_items[a], !0), td_compute_backstretch_item(td_backstretch_items[a]);
- tdAnimationScroll.compute_all_items();
- jQuery("body").find(".tdc-video-inner-wrapper").each(function () {
- var a = jQuery(this), c = a.find("iframe");
- if (c.length) {
- var d = c.attr("aspect-ratio");
- if ("undefined" !== typeof d) {
- var h = a.width();
- a = a.height();
- var f = a / h;
- d < f ? c.css({width: a / d, height: a}) : d > f && c.css({width: "100%", height: d * h})
- }
- }
- });
- for (a = 0; a < tdAnimationScroll.items.length; a++) "undefined" !== typeof tdAnimationScroll.items[a].td_video_parallax && tdAnimationScroll.reinitialize_item(tdAnimationScroll.items[a], !0)
- }
- }
- }
- })();
- var tdEvents = {};
- (function () {
- tdEvents = {
- scroll_event_slow_run: !1,
- scroll_event_medium_run: !1,
- resize_event_slow_run: !1,
- resize_event_medium_run: !1,
- scroll_window_scrollTop: 0,
- window_pageYOffset: window.pageYOffset,
- window_innerHeight: window.innerHeight,
- window_innerWidth: window.innerWidth,
- init: function () {
- jQuery(window).scroll(function () {
- tdEvents.scroll_event_slow_run = !0;
- tdEvents.scroll_event_medium_run = !0;
- tdEvents.scroll_window_scrollTop = jQuery(window).scrollTop();
- tdEvents.window_pageYOffset = window.pageYOffset;
- tdAffix.td_events_scroll(tdEvents.scroll_window_scrollTop);
- "undefined" !== typeof window.tdSmartSidebar && tdSmartSidebar.td_events_scroll(tdEvents.scroll_window_scrollTop);
- tdCustomEvents._callback_scroll();
- tdHeader.scroll();
- tdShowVideo.scroll();
- "undefined" !== typeof window.tdToTop && tdToTop.td_events_scroll(tdEvents.scroll_window_scrollTop)
- });
- jQuery(window).resize(function () {
- tdEvents.resize_event_slow_run = !0;
- tdEvents.resize_event_medium_run = !0;
- tdEvents.window_innerHeight = window.innerHeight;
- tdEvents.window_innerWidth = window.innerWidth;
- tdCustomEvents._callback_resize();
- tdHeader.resize()
- });
- setInterval(function () {
- tdViewport.detectChanges();
- tdEvents.scroll_event_medium_run && (tdEvents.scroll_event_medium_run = !1, "undefined" !== typeof window.tdInfiniteLoader && tdInfiniteLoader.computeEvents(), tdCustomEvents._lazy_callback_scroll_100());
- tdEvents.resize_event_medium_run && (tdEvents.resize_event_medium_run = !1, "undefined" !== typeof window.tdSmartSidebar && tdSmartSidebar.td_events_resize(), tdCustomEvents._lazy_callback_resize_100())
- }, 100);
- setInterval(function () {
- tdEvents.scroll_event_slow_run &&
- (tdEvents.scroll_event_slow_run = !1, td_more_articles_box.td_events_scroll(tdEvents.scroll_window_scrollTop), tdCustomEvents._lazy_callback_scroll_500());
- tdEvents.resize_event_slow_run && (tdEvents.resize_event_slow_run = !1, tdAffix.compute_wrapper(), tdAffix.compute_top(), tdDetect.runIsPhoneScreen(), tdCustomEvents._lazy_callback_resize_500())
- }, 500)
- }
- };
- tdEvents.init()
- })();
- var tdPullDown = {};
- (function () {
- tdPullDown = {
- _view_port_interval_index: tdViewport.INTERVAL_INITIAL_INDEX, items: [], item: function () {
- this.container_jquery_obj = this.vertical_jquery_obj = this.horizontal_jquery_obj = this.blockUid = "";
- this.isTdbMenu = !1;
- this.horizontal_max_width = this.horizontal_no_items_css_class = this.horizontal_element_css_class = this.sub_icon = this.main_sub_icon = "";
- this.minimum_elements = 1;
- this.excluded_jquery_elements = [];
- this._horizontal_extra_space = 1;
- this._horizontal_elements = [];
- this._vertical_elements = [];
- this._vertical_ul_jquery_obj =
- "";
- this._vertical_jquery_obj_outer_width = 0;
- this._is_initialized = !1
- }, init: function () {
- tdPullDown._view_port_interval_index = tdViewport.getCurrentIntervalIndex();
- tdPullDown.items = []
- }, add_item: function (a) {
- if (1 !== a.vertical_jquery_obj.length) throw"item.vertical_jquery_obj is more or less than one: " + a.vertical_jquery_obj.length;
- if (1 !== a.horizontal_jquery_obj.length) throw"item.horizontal_jquery_obj is more or less than one: " + a.horizontal_jquery_obj.length;
- if (1 !== a.container_jquery_obj.length) throw"item.container_jquery_obj is more or less than one: " +
- a.container_jquery_obj.length;
- if ("" === a.horizontal_element_css_class) throw"item.horizontal_element_css_class is empty";
- tdPullDown.items.push(a);
- tdPullDown._initialize_item(a);
- tdPullDown._compute_item(a)
- }, deleteItem: function (a) {
- for (var b = 0; b < tdPullDown.items.length; b++) if (tdPullDown.items[b].blockUid === a) return tdPullDown.items.splice(b, 1), !0;
- return !1
- }, unloadItem: function (a) {
- for (var b = 0; b < tdPullDown.items.length; b++) if (tdPullDown.items[b].blockUid === a) {
- for (var c = 0; c < tdPullDown.items[b]._vertical_elements.length; c++) tdPullDown.items[b]._vertical_elements[c].jquery_object.detach().appendTo(tdPullDown.items[b].horizontal_jquery_obj);
- tdPullDown.deleteItem(a);
- return !0
- }
- return !1
- }, _initialize_item: function (a) {
- if (!0 !== a._is_initialized) if (a._vertical_ul_jquery_obj = a.vertical_jquery_obj.find("ul:first"), 0 === a._vertical_ul_jquery_obj.length) tdPullDown.log("Item can' be initialized. The vertical list doesn't have an 'ul' container"); else {
- var b = null, c = null;
- a.horizontal_jquery_obj.find("." + a.horizontal_element_css_class + ":visible").each(function (d, f) {
- b = jQuery(f);
- b.css("-webkit-transition", "opacity 0.2s");
- b.css("-moz-transition", "opacity 0.2s");
- b.css("-o-transition", "opacity 0.2s");
- b.css("transition", "opacity 0.2s");
- b.css("opacity", "1");
- c = {jquery_object: b, calculated_width: b.outerWidth(!0)};
- a._horizontal_elements.push(c)
- });
- a._vertical_jquery_obj_outer_width = a.vertical_jquery_obj.outerWidth(!0);
- a.vertical_jquery_obj.css("display", "none");
- var d = a.horizontal_jquery_obj.css("padding-left");
- void 0 !== d && "" !== d && (a._horizontal_extra_space += parseInt(d.replace("px", "")));
- d = a.horizontal_jquery_obj.css("padding-right");
- void 0 !== d && "" !== d && (a._horizontal_extra_space +=
- parseInt(d.replace("px", "")));
- d = a.horizontal_jquery_obj.css("margin-left");
- void 0 !== d && "" !== d && (a._horizontal_extra_space += parseInt(d.replace("px", "")));
- d = a.horizontal_jquery_obj.css("margin-right");
- void 0 !== d && "" !== d && (a._horizontal_extra_space += parseInt(d.replace("px", "")));
- d = a.horizontal_jquery_obj.css("border-left");
- void 0 !== d && "" !== d && (a._horizontal_extra_space += parseInt(d.replace("px", "")));
- d = a.horizontal_jquery_obj.css("border-right");
- void 0 !== d && "" !== d && (a._horizontal_extra_space += parseInt(d.replace("px",
- "")));
- a._is_initialized = !0
- }
- }, _get_horizontal_elements_width: function (a) {
- for (var b = 0, c = a._horizontal_elements.length - 1; 0 <= c; c--) b += a._horizontal_elements[c].calculated_width;
- return b
- }, _reinitialize_all_items: function () {
- for (var a = tdPullDown.items.length - 1; 0 <= a; a--) tdPullDown._reinitialize_item(tdPullDown.items[a])
- }, _reinitialize_item: function (a) {
- if (!1 !== a._is_initialized) {
- a._is_initialized = !1;
- a.horizontal_jquery_obj.html(a.horizontal_jquery_obj.html() + a._vertical_ul_jquery_obj.html());
- if (a.isTdbMenu) {
- var b =
- a.horizontal_jquery_obj.find("> .tdb-normal-menu.menu-item-has-children");
- b.length && b.each(function () {
- var b = jQuery(this);
- tdPullDown._change_sub_icon_horiz_elements(a, b)
- })
- }
- a._vertical_ul_jquery_obj.html("");
- a._horizontal_elements = [];
- a._vertical_elements = [];
- a._horizontal_extra_space = 1;
- tdPullDown._initialize_item(a)
- }
- }, _compute_item: function (a) {
- if (!1 !== a._is_initialized) {
- tdPullDown._prepare_horizontal_header(a, !0);
- var b = 0, c = a.container_jquery_obj.width();
- if (void 0 !== c && "" !== c) {
- b = c;
- if ("" !== a.horizontal_max_width) {
- var d =
- parseInt(a.horizontal_max_width.replace("px", ""));
- c > d && (b = d)
- }
- for (c = a.excluded_jquery_elements.length - 1; 0 <= c; c--) b -= a.excluded_jquery_elements[c].outerWidth(!0)
- }
- 0 < a._vertical_elements.length && (b -= a._vertical_jquery_obj_outer_width);
- b -= tdPullDown._get_horizontal_elements_width(a);
- for (b -= a._horizontal_extra_space; 0 > b;) {
- if (0 !== a.minimum_elements && a._horizontal_elements.length <= a.minimum_elements) {
- tdPullDown._make_all_elements_vertical(a);
- tdPullDown._prepare_horizontal_header(a);
- return
- }
- 0 === a._vertical_elements.length &&
- (b -= a._vertical_jquery_obj_outer_width);
- d = tdPullDown._make_element_vertical(a);
- b += d.calculated_width
- }
- if (0 !== a.minimum_elements && 0 === a._horizontal_elements.length && 0 < a._vertical_elements.length && b >= a._vertical_elements[0].calculated_width) {
- for (d = c = 0; d < a.minimum_elements && d < a._vertical_elements.length; d++) c += a._vertical_elements[d].calculated_width;
- for (var h = 0, f = a.minimum_elements; 0 < f && 0 < a._vertical_elements.length && b >= c;) if (d = tdPullDown._make_element_horizontal(a), null !== d) h += d.calculated_width, f--;
- else {
- tdPullDown._prepare_horizontal_header(a);
- return
- }
- b -= h
- }
- for (; (0 < a._horizontal_elements.length || 0 === a._horizontal_elements.length && 0 === a.minimum_elements) && 0 < a._vertical_elements.length && b >= a._vertical_elements[0].calculated_width;) if (d = tdPullDown._make_element_horizontal(a), null !== d) b -= d.calculated_width; else {
- tdPullDown._prepare_horizontal_header(a);
- return
- }
- 1 === a._vertical_elements.length && b + a._vertical_jquery_obj_outer_width >= a._vertical_elements[0].calculated_width && tdPullDown._make_element_horizontal(a);
- tdPullDown._add_no_items_class(a);
- tdPullDown._prepare_horizontal_header(a)
- }
- }, _prepare_horizontal_header: function (a, b) {
- var c = a.horizontal_jquery_obj.parent().siblings(".block-title:first");
- 1 === c.length && (c = c.find("span:first"), 1 === c.length && ("undefined" !== typeof b && !0 === b ? c.css("margin-right", 0) : 0 === a._horizontal_elements.length ? c.css("margin-right", a._vertical_jquery_obj_outer_width + "px") : c.css("margin-right", 0)))
- }, _compute_all_items: function () {
- for (var a = tdPullDown.items.length - 1; 0 <= a; a--) tdPullDown.items[a].constructor ===
- tdPullDown.item && tdPullDown._compute_item(tdPullDown.items[a])
- }, _make_element_horizontal: function (a) {
- if (!1 === a._is_initialized || 0 === a._vertical_elements.length) return null;
- var b = a._vertical_elements.shift(), c = b.jquery_object;
- 0 === a._vertical_elements.length && a.vertical_jquery_obj.css("display", "none");
- a._horizontal_elements.push(b);
- c.css("opacity", "0");
- c.detach().appendTo(a.horizontal_jquery_obj);
- !0 === a.isTdbMenu && c.hasClass("menu-item-has-children") && c.hasClass("tdb-normal-menu") && tdPullDown._change_sub_icon_horiz_elements(a,
- c);
- setTimeout(function () {
- b.jquery_object.css("opacity", "1")
- }, 50);
- return b
- }, _change_sub_icon_horiz_elements: function (a, b) {
- b = b.find("> a");
- var c = b.find(".tdb-sub-menu-icon");
- c.length ? "" !== a.main_sub_icon ? c.replaceWith(a.main_sub_icon) : c.remove() : "" !== a.main_sub_icon && b.append(a.main_sub_icon)
- }, _make_element_vertical: function (a) {
- if (!1 === a._is_initialized || 0 === a._horizontal_elements.length) return null;
- var b = a._horizontal_elements.pop(), c = b.jquery_object;
- 0 === a._vertical_elements.length && a.vertical_jquery_obj.css("display",
- "");
- a._vertical_elements.unshift(b);
- c.detach().prependTo(a._vertical_ul_jquery_obj);
- !0 === a.isTdbMenu && c.hasClass("menu-item-has-children") && c.hasClass("tdb-normal-menu") && tdPullDown._change_sub_icon_vert_elements(a, c);
- return b
- }, _change_sub_icon_vert_elements: function (a, b) {
- b = b.find("> a");
- var c = b.find(".tdb-sub-menu-icon");
- c.length ? "" !== a.sub_icon ? c.replaceWith(a.sub_icon) : c.remove() : "" !== a.sub_icon && b.append(a.sub_icon)
- }, _make_all_elements_vertical: function (a) {
- for (; 0 < a._horizontal_elements.length;) tdPullDown._make_element_vertical(a);
- tdPullDown._add_no_items_class(a)
- }, _add_no_items_class: function (a) {
- "" !== a.horizontal_no_items_css_class && (0 === a._horizontal_elements.length ? a.horizontal_jquery_obj.addClass(a.horizontal_no_items_css_class) : 0 < a._horizontal_elements.length && a.horizontal_jquery_obj.removeClass(a.horizontal_no_items_css_class))
- }, td_events_resize: function () {
- 0 !== tdPullDown.items.length && (tdPullDown._view_port_interval_index !== tdViewport.getCurrentIntervalIndex() ? (tdPullDown._view_port_interval_index = tdViewport.getCurrentIntervalIndex(),
- "undefined" !== typeof tdPullDown.reinitTimeout && clearTimeout(tdPullDown.reinitTimeout), tdPullDown.reinitTimeout = setTimeout(function () {
- tdPullDown._reinitialize_all_items();
- tdPullDown._compute_all_items()
- }, 100)) : tdPullDown._compute_all_items())
- }, log: function (a) {
- }
- };
- tdPullDown.init()
- })();
- var tdShowVideo = {};
- (function () {
- tdShowVideo = {
- _isInitialized: !1,
- _isApiYoutubeLoaded: !1,
- _isApiVimeoLoaded: !1,
- items: [],
- _$clearZone: void 0,
- _$body: void 0,
- _refLeft: !1,
- _hDist: void 0,
- _refBottom: !1,
- _vDist: void 0,
- _width: 450,
- _playingOne: !1,
- _pauseHidden: !1,
- _runFixed: !1,
- _bodyClass: "td-sticky-video",
- item: function () {
- this.id = void 0;
- this.inlineHeight = this.inlineWidth = 0;
- this.$wrapper = this.player = this.initialOffsetTop = void 0;
- this.inModal = this.inViewport = this.moved = !1;
- this.wrapperHeightBeforeFixed = void 0;
- this.playerStarted = !1;
- this.internalStatus =
- this.playerType = this.parentFixIndexClass = this.restoreFixIndexClass = void 0
- },
- loadApiYoutube: function () {
- if (!tdShowVideo._isApiYoutubeLoaded) {
- var a = document.createElement("script");
- a.src = "https://www.youtube.com/iframe_api";
- var b = document.getElementsByTagName("script")[0];
- b.parentNode.insertBefore(a, b);
- tdShowVideo._isApiYoutubeLoaded = !0
- }
- },
- loadApiVimeo: function () {
- if (!tdShowVideo._isApiVimeoLoaded) {
- var a = document.createElement("script");
- a.src = "https://player.vimeo.com/api/player.js";
- var b = document.getElementsByTagName("script")[0];
- b.parentNode.insertBefore(a, b);
- tdShowVideo._isApiVimeoLoaded = !0
- }
- },
- init: function () {
- tdShowVideo._isInitialized || ("undefined" !== typeof window.tds_video_scroll && "" !== window.tds_video_scroll && (tdShowVideo._runFixed = !0), "undefined" !== typeof window.tds_video_position_h && "" !== window.tds_video_position_h && (tdShowVideo._refLeft = !0), "undefined" !== typeof window.tds_video_position_v && "" !== window.tds_video_position_v && (tdShowVideo._refBottom = !0), "undefined" !== typeof window.tds_video_distance_h && "" !== window.tds_video_distance_h &&
- (tdShowVideo._hDist = parseInt(window.tds_video_distance_h.trim(), 10)), "undefined" !== typeof window.tds_video_distance_v && "" !== window.tds_video_distance_v && (tdShowVideo._vDist = parseInt(window.tds_video_distance_v.trim(), 10)), "undefined" !== typeof window.tds_video_width && "" !== window.tds_video_width && (tdShowVideo._width = parseInt(window.tds_video_width.trim(), 10)), "undefined" !== typeof window.tds_video_playing_one && "" !== window.tds_video_playing_one && (tdShowVideo._playingOne = !0), "undefined" !== typeof window.tds_video_pause_hidden &&
- "" !== window.tds_video_pause_hidden && (tdShowVideo._pauseHidden = !0), tdShowVideo._$clearZone = jQuery('<div class="td-close-video-fixed"><i class="td-icon-modal-close"></i></div>'), tdShowVideo._$body = jQuery("body"), tdShowVideo._$body.append(tdShowVideo._$clearZone).on("click", ".td-close-video-fixed", function (a) {
- var b = jQuery(this).data("item-id");
- "undefined" !== typeof b && tdShowVideo.items.forEach(function (a) {
- b === a.id && (tdShowVideo._clearPlayerStarted(), tdShowVideo._movePlayerFromZone(a), tdShowVideo._pauseHidden &&
- tdShowVideo._pausePlayer(a))
- })
- }), this._isInitialized = !0)
- },
- addItem: function (a) {
- tdShowVideo._isInitialized && a.constructor === tdShowVideo.item && tdShowVideo.items.push(a)
- },
- scroll: function () {
- tdShowVideo._isInitialized && tdShowVideo._checkItems()
- },
- _checkItems: function () {
- tdShowVideo._isInitialized && (tdShowVideo._runFixed && tdShowVideo.items.forEach(function (a) {
- !0 !== tdDetect.isPhoneScreen && (tdShowVideo._getReplacer(a).insertBefore(a.$wrapper.parent()), tdShowVideo._isItemInViewport(a) ? tdShowVideo._movePlayerFromZone(a) :
- tdShowVideo._movePlayerToZone(a))
- }), setTimeout(function () {
- tdShowVideo._pauseHidden && tdShowVideo._pauseOtherPlayers()
- }, 500))
- },
- _movePlayerToZone: function (a) {
- if ("youtube" === a.playerType) {
- if (!tdShowVideo._isInitialized || a.moved || "undefined" === typeof a.player || "undefined" === typeof a.player.getPlayerState || a.player.getPlayerState() !== YT.PlayerState.PLAYING || "undefined" === typeof a.playerStarted) return !1
- } else if ("vimeo" === a.playerType) {
- if (!tdShowVideo._isInitialized || a.moved || "undefined" === typeof a.player ||
- "undefined" === typeof a.internalStatus || "VIMEO_PLAYING" !== a.internalStatus || "undefined" === typeof a.playerStarted) return !1
- } else if ("video" === a.playerType) {
- if (!tdShowVideo._isInitialized || a.moved || "undefined" === typeof a.player || "undefined" === typeof a.internalStatus || "VIDEO_PLAYING" !== a.internalStatus || "undefined" === typeof a.playerStarted) return !1
- } else if ("undefined" === typeof a.playerType) return !1;
- tdShowVideo._clearPlayerStarted(a);
- tdShowVideo._clearZone();
- var b = a.$wrapper.data("id");
- "undefined" === typeof b &&
- (b = tdShowVideo._getUniqueId(), a.$wrapper.data("id", b), a.id = b);
- "undefined" === typeof a.initialOffsetTop && (a.initialOffsetTop = a.$wrapper.offset().top);
- a.wrapperHeightBeforeFixed = a.$wrapper.height();
- a.$wrapper.parent().addClass("td-video-fixed");
- tdShowVideo._showReplacer(a);
- tdShowVideo._refLeft && a.$wrapper.parent().addClass("td-video-fixed-left");
- tdShowVideo._refBottom && a.$wrapper.parent().addClass("td-video-fixed-bottom");
- b = "width:" + tdShowVideo._width + "px !important;";
- b += "height:" + tdShowVideo._width *
- a.inlineHeight / a.inlineWidth + "px !important;";
- "undefined" !== typeof tdShowVideo._hDist && (b = tdShowVideo._refLeft ? b + ("left:" + tdShowVideo._hDist + "px !important;") : b + ("right:" + tdShowVideo._hDist + "px !important;"));
- "undefined" !== typeof tdShowVideo._vDist && (b = tdShowVideo._refBottom ? b + ("bottom:" + tdShowVideo._vDist + "px !important;") : b + ("top:" + tdShowVideo._vDist + "px !important;"));
- a.$wrapper.css("width", tdShowVideo._width);
- a.$wrapper.css("height", "100%");
- a.$wrapper.parent().attr("style", b);
- a.$wrapper.closest(".tdb-block-inner").hasClass("td-fix-index") ?
- (a.$wrapper.closest(".tdb-block-inner").removeClass("td-fix-index"), a.restoreFixIndexClass = !0, a.parentFixIndexClass = "tdb-block-inner") : a.$wrapper.closest(".td_block_inner").hasClass("td-fix-index") && (a.$wrapper.closest(".td_block_inner").removeClass("td-fix-index"), a.restoreFixIndexClass = !0, a.parentFixIndexClass = "td_block_inner");
- tdShowVideo._$clearZone.data("item-id", a.id);
- tdShowVideo._$clearZone.show();
- tdShowVideo._$clearZone.prependTo(a.$wrapper.parent());
- tdShowVideo._addBodyClass();
- return a.moved =
- !0
- },
- _movePlayerFromZone: function (a) {
- if (!tdShowVideo._isInitialized || !a.moved) return !1;
- a.$wrapper.parent().removeClass("td-video-fixed");
- tdShowVideo._hideReplacer(a);
- tdShowVideo._refLeft && a.$wrapper.parent().removeClass("td-video-fixed-left");
- tdShowVideo._refBottom && a.$wrapper.parent().removeClass("td-video-fixed-bottom");
- a.$wrapper.parent().removeAttr("style");
- a.$wrapper.css("width", "");
- "undefined" !== typeof a.wrapperHeightBeforeFixed && a.$wrapper.css("height", a.wrapperHeightBeforeFixed + "px");
- "undefined" !==
- typeof a.restoreFixIndexClass && (a.$wrapper.closest("." + a.parentFixIndexClass).addClass("td-fix-index"), delete a.restoreFixIndexClass, delete a.parentFixIndexClass);
- tdShowVideo._$clearZone.appendTo(tdShowVideo._$body);
- tdShowVideo._$clearZone.hide();
- tdShowVideo._removeBodyClass();
- a.moved = !1;
- return !0
- },
- _addBodyClass: function () {
- tdShowVideo._$body.addClass(tdShowVideo._bodyClass)
- },
- _removeBodyClass: function () {
- tdShowVideo._$body.removeClass(tdShowVideo._bodyClass)
- },
- _isItemInViewport: function (a) {
- var b = a.initialOffsetTop;
- "undefined" === typeof b && (b = a.$wrapper.offset().top, a.initialOffsetTop = b);
- return b >= tdEvents.scroll_window_scrollTop && b <= tdEvents.scroll_window_scrollTop + tdEvents.window_innerHeight || b + a.inlineHeight >= tdEvents.scroll_window_scrollTop && b + a.inlineHeight <= tdEvents.scroll_window_scrollTop + tdEvents.window_innerHeight ? !0 : !1
- },
- _isItemInModal: function (a) {
- return a.inModal
- },
- _pauseOtherPlayers: function () {
- tdShowVideo.items.forEach(function (a) {
- tdShowVideo._isItemInViewport(a) || a.moved || "undefined" !== typeof a.player &&
- ("youtube" === a.playerType && "undefined" !== typeof a.player.getPlayerState && a.player.getPlayerState() === YT.PlayerState.PLAYING ? a.player.pauseVideo() : "vimeo" === a.playerType && "undefined" !== typeof a.internalStatus && "VIMEO_PLAYING" === a.internalStatus ? a.player.pause() : "video" === a.playerType && "undefined" !== typeof a.internalStatus && "VIDEO_PLAYING" === a.internalStatus && a.player.pause())
- })
- },
- _pauseModalPlayers: function () {
- tdShowVideo.items.forEach(function (a) {
- tdShowVideo._isItemInModal(a) && tdShowVideo._pausePlayer(a)
- })
- },
- _pausePlayer: function (a) {
- "undefined" !== typeof a.player && ("youtube" === a.playerType && "undefined" !== typeof a.player.getPlayerState && a.player.getPlayerState() === YT.PlayerState.PLAYING ? a.player.pauseVideo() : "vimeo" === a.playerType && "undefined" !== typeof a.internalStatus && "VIMEO_PLAYING" === a.internalStatus ? a.player.pause() : "video" === a.playerType && "undefined" !== typeof a.internalStatus && "VIDEO_PLAYING" === a.internalStatus && a.player.pause())
- },
- _clearZone: function () {
- tdShowVideo._isInitialized && tdShowVideo.items.forEach(function (a) {
- tdShowVideo._movePlayerFromZone(a,
- !0)
- })
- },
- _clearPlayerStarted: function (a) {
- tdShowVideo.items.forEach(function (b) {
- "undefined" !== typeof a ? b !== a && "undefined" !== typeof b.playerStarted && delete b.playerStarted : "undefined" !== typeof b.playerStarted && delete b.playerStarted
- })
- },
- _getReplacer: function (a) {
- if (tdShowVideo._isInitialized) {
- if ("undefined" !== typeof a.$replacer) return a.$replacer;
- a.$replacer = jQuery('<div class="td-video-replacer" data-id="' + a.$wrapper.data("id") + '" style="position: absolute; visibility: hidden; width:' + a.inlineWidth + "px;height:" +
- a.inlineHeight + 'px"></div>');
- return a.$replacer
- }
- },
- _showReplacer: function (a) {
- tdShowVideo._isInitialized && tdShowVideo._getReplacer(a).css("position", "relative")
- },
- _hideReplacer: function (a) {
- tdShowVideo._isInitialized && tdShowVideo._getReplacer(a).css("position", "absolute")
- },
- _getUniqueId: function () {
- return "uid_" + Math.floor(1E4 * Math.random() + 1) + "_" + Math.floor(100 * Math.random() + 1)
- },
- addPlayerStarted: function (a) {
- tdShowVideo._isInitialized && tdShowVideo.items.forEach(function (b) {
- b.player === a ? b.playerStarted = !0 :
- tdShowVideo._playingOne && ("youtube" === b.playerType && "undefined" !== typeof b.player ? b.player.pauseVideo() : "vimeo" === b.playerType && "undefined" !== typeof b.player ? b.player.pause() : "video" === b.playerType && "undefined" !== typeof b.player && b.player.pause(), b.playerStarted = !1)
- })
- },
- clearPlayerStarted: function (a) {
- tdShowVideo._isInitialized && tdShowVideo.items.forEach(function (b) {
- b.player === a && "undefined" !== typeof b.playerStarted && delete b.playerStarted
- })
- },
- onYoutubeReadyEvent: function (a) {
- tdShowVideo._isInitialized &&
- a.target.setPlaybackQuality("hd720")
- },
- onYoutubeStateChangeEvent: function (a) {
- if (tdShowVideo._isInitialized) switch (a.target.getPlayerState()) {
- case YT.PlayerState.PLAYING:
- tdShowVideo.addPlayerStarted(a.target);
- break;
- case YT.PlayerState.ENDED:
- tdShowVideo.clearPlayerStarted(a.target)
- }
- }
- }
- })();
- window.onYouTubeIframeAPIReady = function () {
- tdShowVideo.init();
- jQuery(".td-youtube-player, .wp-block-embed-youtube iframe, .tdm-popup-modal-wrap .youtube-embed").each(function () {
- var a = jQuery(this), b = new tdShowVideo.item;
- b.playerType = "youtube";
- b.inlineWidth = a.outerWidth();
- b.inlineHeight = a.outerHeight();
- b.$wrapper = a;
- a.closest(".tdm-popup-modal-wrap").length && (b.inModal = !0);
- a = a.data("video_id") ? a.data("video_id") : "";
- b.player = new YT.Player(this, {
- height: "720", width: "960", videoId: a, events: {
- onReady: tdShowVideo.onYoutubeReadyEvent,
- onStateChange: tdShowVideo.onYoutubeStateChangeEvent
- }
- });
- tdShowVideo.addItem(b)
- })
- };
- jQuery(window).on("load", function () {
- "undefined" !== typeof window.tdYoutubePlayers && tdYoutubePlayers.players.length && (tdShowVideo.init(), tdYoutubePlayers.players.forEach(function (a) {
- var b = new tdShowVideo.item;
- b.playerType = "youtube";
- b.inlineWidth = a.jqPlayerWrapper.outerWidth();
- b.inlineHeight = a.jqPlayerWrapper.outerHeight();
- b.$wrapper = a.jqPlayerWrapper;
- b.player = a.tdYtPlayer;
- tdShowVideo.addItem(b)
- }))
- });
- jQuery(window).on("load", function () {
- var a = jQuery('.wpb_video_wrapper iframe[src*="vimeo.com"], .wp-block-embed-vimeo iframe[src*="vimeo.com"], .tdm-popup-modal-wrap iframe[src*="vimeo.com"]');
- a.length && (tdShowVideo.init(), a.each(function (a) {
- var b = jQuery(this), d = new tdShowVideo.item;
- d.playerType = "vimeo";
- d.inlineWidth = b.outerWidth();
- d.inlineHeight = b.outerHeight();
- d.$wrapper = b;
- d.id = a;
- b.closest(".tdm-popup-modal-wrap").length && (d.inModal = !0);
- d.player = new Vimeo.Player(this);
- d.player.on("play", function () {
- d.internalStatus =
- "VIMEO_PLAYING";
- tdShowVideo.addPlayerStarted(d.player)
- });
- d.player.on("pause", function () {
- d.internalStatus = void 0
- });
- d.player.on("ended", function (a) {
- d.internalStatus = void 0;
- tdShowVideo.clearPlayerStarted(d.player)
- });
- tdShowVideo.addItem(d)
- }))
- });
- jQuery(window).ready(function () {
- var a = !1;
- if ("undefined" !== typeof window.tds_video_scroll && "" !== window.tds_video_scroll || "undefined" !== typeof window.tds_video_playing_one && "" !== window.tds_video_playing_one || "undefined" !== typeof window.tds_video_pause_hidden && "" !== window.tds_video_pause_hidden || jQuery(".tdm-popup-modal-wrap .youtube-embed").length) a = !0;
- a && jQuery(".td-youtube-player, .wp-block-embed-youtube iframe, .tdm-popup-modal-wrap .youtube-embed").length && tdShowVideo.loadApiYoutube();
- jQuery('.wpb_video_wrapper iframe[src*="vimeo.com"], .wp-block-embed-vimeo iframe[src*="vimeo.com"], iframe[src*="vimeo.com"]').length &&
- tdShowVideo.loadApiVimeo();
- a = jQuery("video");
- a.length && (tdShowVideo.init(), a.each(function (a) {
- var b = jQuery(this), d = new tdShowVideo.item;
- d.playerType = "video";
- d.inlineWidth = b.outerWidth();
- d.inlineHeight = b.outerHeight();
- d.$wrapper = b;
- d.id = a;
- b.closest(".tdm-popup-modal-wrap").length && (d.inModal = !0);
- d.player = this;
- d.player.addEventListener("play", function (a) {
- d.internalStatus = "VIDEO_PLAYING";
- tdShowVideo.addPlayerStarted(d.player)
- }, !0);
- d.player.addEventListener("pause", function (a) {
- d.internalStatus = void 0;
- tdShowVideo.addPlayerStarted(d.player)
- }, !0);
- d.player.addEventListener("ended", function (a) {
- d.internalStatus = void 0;
- tdShowVideo.addPlayerStarted(d.player)
- }, !0);
- tdShowVideo.addItem(d)
- }))
- });
- var tdAnimationStack = {};
- (function () {
- tdAnimationStack = {
- _animation_css_class1: "",
- _animation_css_class2: "",
- _animation_default_effect: "type0",
- activated: !1,
- _ready_for_initialization: !0,
- _ready_init_timeout: void 0,
- max_waiting_for_init: 3E3,
- _specific_selectors: "",
- _general_selectors: "",
- live_load_items: !1,
- is_ready_init: !1,
- ready_init: function () {
- tdAnimationStack.is_ready_init || (tdAnimationStack.is_ready_init = !0, tdDetect.isIe8 || tdDetect.isIe9 || 0 < jQuery(".vc_images_carousel").length ? (tdAnimationStack._ready_for_initialization = !1, void 0 !==
- window.td_animation_stack_effect && ("" === window.td_animation_stack_effect && (window.td_animation_stack_effect = tdAnimationStack._animation_default_effect), jQuery("body").removeClass("td-animation-stack-" + window.td_animation_stack_effect))) : void 0 === window.tds_animation_stack || void 0 === window.td_animation_stack_effect ? tdAnimationStack._ready_for_initialization = !1 : (void 0 !== window.td_animation_stack_specific_selectors && (tdAnimationStack._specific_selectors = window.td_animation_stack_specific_selectors),
- "" === window.td_animation_stack_effect && (window.td_animation_stack_effect = tdAnimationStack._animation_default_effect), tdAnimationStack._animation_css_class1 = "td-animation-stack-" + window.td_animation_stack_effect + "-1", tdAnimationStack._animation_css_class2 = "td-animation-stack-" + window.td_animation_stack_effect + "-2", void 0 !== window.td_animation_stack_general_selectors && (tdAnimationStack._general_selectors = window.td_animation_stack_general_selectors), jQuery(tdAnimationStack._general_selectors).addClass(tdAnimationStack._animation_css_class1),
- tdAnimationStack._ready_init_timeout = setTimeout(function () {
- tdAnimationStack.log("%c _ready_init_timeout run ", "background: red; color: white;");
- if (!0 !== tdAnimationStack.activated) {
- tdAnimationStack._ready_for_initialization = !1;
- jQuery(tdAnimationStack._general_selectors).not("." + tdAnimationStack._animation_css_class2).removeClass(tdAnimationStack._animation_css_class1);
- var a = jQuery(".td-animation-stack, .post").find(tdAnimationStack._specific_selectors);
- tdAnimationStack.log("_ready_init_timeout found elements: " +
- a.length);
- a.each(function (a, c) {
- a = jQuery(c).data("type");
- c = jQuery(c);
- tdAnimationStack.log("type: " + a);
- tdAnimationStack.log("src: " + c.data("img-url"));
- switch (a) {
- case "image_tag":
- void 0 !== c.data("img-retina-url") && !0 === tdAnimationStack._isHighDensity() ? c.attr("src", c.data("img-retina-url")) : c.attr("src", c.data("img-url"));
- break;
- case "css_image":
- void 0 !== c.data("img-retina-url") && !0 === tdAnimationStack._isHighDensity() ? c.attr("style", "background-image: url(" + c.data("img-retina-url") + ")") : c.attr("style",
- "background-image: url(" + c.data("img-url") + ")")
- }
- });
- void 0 !== window.td_animation_stack_effect && jQuery("body").removeClass("td-animation-stack-" + window.td_animation_stack_effect)
- }
- }, tdAnimationStack.max_waiting_for_init)))
- },
- _ITEM_TO_VIEW_PORT: {ITEM_ABOVE_VIEW_PORT: 0, ITEM_IN_VIEW_PORT: 1, ITEM_UNDER_VIEW_PORT: 2},
- SORTED_METHOD: {
- sort_left_to_right: function (a, b) {
- return a.offset_top > b.offset_top ? 1 : a.offset_top < b.offset_top ? -1 : a._order > b._order ? 1 : a._order < b._order ? -1 : 0
- }, sort_right_to_left: function (a, b) {
- return a.offset_top >
- b.offset_top || !(a.offset_top < b.offset_top || a._order > b._order) && a._order < b._order ? 1 : -1
- }
- },
- _order: 0,
- interval: 70,
- min_interval: 17,
- max_interval: 40,
- _current_interval: void 0,
- _items_in_view_port: [],
- _items_above_view_port: [],
- items: [],
- item: function () {
- this.itemImgRetinaSrc = this.itemType = this.itemSrc = this._order = this.jqueryObj = this.offset_bottom_to_top = this.offset_top = void 0
- },
- _initialize_item: function (a) {
- a._order = tdAnimationStack._order++;
- a.offset_top = a.jqueryObj.offset().top;
- a.offset_bottom_to_top = a.offset_top +
- a.jqueryObj.height()
- },
- check_for_new_items: function (a, b, c, d) {
- if (!1 !== tdAnimationStack.activated && !1 !== tdAnimationStack._ready_for_initialization) {
- void 0 === a && (a = "");
- var h = [];
- jQuery(tdAnimationStack._general_selectors).not("." + tdAnimationStack._animation_css_class2).addClass(tdAnimationStack._animation_css_class1);
- var f = jQuery(a + ", .post").find(tdAnimationStack._specific_selectors).filter(function () {
- return jQuery(this).hasClass(tdAnimationStack._animation_css_class1)
- });
- f.each(function (a, b) {
- a = new tdAnimationStack.item;
- a.jqueryObj = jQuery(b);
- a.itemSrc = jQuery(b).data("img-url");
- a.itemType = jQuery(b).data("type");
- void 0 !== jQuery(b).data("img-retina-url") && (a.itemImgRetinaSrc = jQuery(b).data("img-retina-url"));
- tdAnimationStack._initialize_item(a);
- h.push(a)
- });
- !0 === d ? (tdAnimationStack.log("%c live load items ", "background: brown; color: white;"), tdAnimationStack._precompute_items(h, b, c), tdAnimationStack.compute_items(d)) : (tdAnimationStack.log("%c preload items ", "background: brown; color: white;"), function () {
- for (var a =
- !0, d = 0; d < h.length; d++) if (!1 === f[d].complete) {
- a = !1;
- break
- }
- if (!1 === a) {
- var W = (new Date).getTime();
- tdAnimationStack.log("TIMER - started");
- var P = setInterval(function () {
- var d;
- if ((new Date).getTime() - W > tdAnimationStack.max_waiting_for_init) for (clearInterval(P), d = 0; d < h.length; d++) h[d].jqueryObj.removeClass(tdAnimationStack._animation_css_class1), h[d].jqueryObj.addClass(tdAnimationStack._animation_css_class2); else {
- a = !0;
- for (d = 0; d < h.length; d++) if (!1 === f[d].complete) {
- a = !1;
- break
- }
- !0 === a && (clearInterval(P), tdAnimationStack.log("TIMER - stopped"),
- tdAnimationStack._precompute_items(h, b, c), tdAnimationStack.compute_items(!1))
- }
- }, 100)
- } else tdAnimationStack._precompute_items(h, b, c), tdAnimationStack.compute_items(!1)
- }());
- tdAnimationStack.log("checked for new items finished")
- }
- },
- _precompute_items: function (a, b, c) {
- a.sort(b);
- if (!0 === c) for (; 0 < a.length;) tdAnimationStack.log("add item 1 : " + a.length), tdAnimationStack._items_in_view_port.push(a.shift()); else for (; 0 < a.length;) tdAnimationStack.log("add item 2 : " + a.length), tdAnimationStack.items.push(a.shift())
- },
- init: function () {
- tdAnimationStack.ready_init();
- void 0 === window.tds_animation_stack ? tdAnimationStack.log("%c theme lazy loading animation is off! ", "background: #eb4026;") : (tdAnimationStack.log("%c theme lazy loading animation is on! ", "background: #03c04a; color: #fff;"), !1 !== tdAnimationStack._ready_for_initialization && (clearTimeout(tdAnimationStack._ready_init_timeout), tdAnimationStack.activated = !0, tdAnimationStack.check_for_new_items(".td-animation-stack", tdAnimationStack.SORTED_METHOD.sort_left_to_right,
- !1, !0)))
- },
- reinit: function () {
- !1 !== tdAnimationStack._ready_for_initialization && (tdAnimationStack.items = [], tdAnimationStack._items_in_view_port = [], tdAnimationStack._items_above_view_port = [], tdAnimationStack.init())
- },
- compute_items: function (a) {
- if (!1 !== tdAnimationStack.activated && !1 !== tdAnimationStack._ready_for_initialization) {
- for (tdAnimationStack._separate_items(); 0 < tdAnimationStack._items_above_view_port.length;) {
- tdAnimationStack.log("animation - above the view port");
- var b = tdAnimationStack._items_above_view_port.shift();
- !0 === a ? (tdAnimationStack._load_item(b, !1), tdAnimationStack.log("%c item above view port - loaded ", "background: #fef24e; color: #000;")) : (b.jqueryObj.removeClass(tdAnimationStack._animation_css_class1), b.jqueryObj.addClass(tdAnimationStack._animation_css_class2))
- }
- 0 < tdAnimationStack._items_in_view_port.length && (clearInterval(tdAnimationStack._current_interval), b = tdAnimationStack._get_item_from_view_port(), !0 === a ? (tdAnimationStack._load_item(b, !1), tdAnimationStack.log("%c item in view port - loaded ",
- "background: #fef24e; color: #000;")) : (b.jqueryObj.removeClass(tdAnimationStack._animation_css_class1), b.jqueryObj.addClass(tdAnimationStack._animation_css_class2)), 0 < tdAnimationStack._items_in_view_port.length && (tdAnimationStack.log("start animation timer"), tdAnimationStack._to_timer(tdAnimationStack._get_right_interval(1 / tdAnimationStack._items_in_view_port.length * tdAnimationStack.interval), a)))
- }
- },
- _to_timer: function (a, b) {
- tdAnimationStack._current_interval = setInterval(function () {
- if (0 < tdAnimationStack._items_in_view_port.length) {
- var c =
- tdAnimationStack._get_item_from_view_port();
- tdAnimationStack.log("animation at interval: " + a);
- !0 === b ? (tdAnimationStack._load_item(c, !1), tdAnimationStack.log("%c item above view port - loaded > _to_timer ", "background: #3895d3; color: #fff;")) : (c.jqueryObj.removeClass(tdAnimationStack._animation_css_class1), c.jqueryObj.addClass(tdAnimationStack._animation_css_class2));
- clearInterval(tdAnimationStack._current_interval);
- 0 < tdAnimationStack._items_in_view_port.length && tdAnimationStack._to_timer(tdAnimationStack._get_right_interval(1 /
- tdAnimationStack._items_in_view_port.length * tdAnimationStack.interval), b)
- }
- }, a)
- },
- _get_item_from_view_port: function () {
- return tdAnimationStack._items_in_view_port.shift()
- },
- _get_right_interval: function (a) {
- return a < tdAnimationStack.min_interval ? tdAnimationStack.min_interval : a > tdAnimationStack.max_interval ? tdAnimationStack.max_interval : a
- },
- _item_to_view_port: function (a) {
- tdAnimationStack.log("position item relative to the view port >> yOffset " + tdEvents.window_pageYOffset + " | xOffset " + tdEvents.window_innerHeight +
- " : " + a.offset_top);
- return tdEvents.window_pageYOffset + tdEvents.window_innerHeight + 200 < a.offset_top ? tdAnimationStack._ITEM_TO_VIEW_PORT.ITEM_UNDER_VIEW_PORT : tdEvents.window_pageYOffset + tdEvents.window_innerHeight + 200 >= a.offset_top && tdEvents.window_pageYOffset <= a.offset_bottom_to_top ? tdAnimationStack._ITEM_TO_VIEW_PORT.ITEM_IN_VIEW_PORT : tdAnimationStack._ITEM_TO_VIEW_PORT.ITEM_ABOVE_VIEW_PORT
- },
- _separate_items: function () {
- if (0 !== tdAnimationStack.items.length) for (tdAnimationStack.log("%c _separate_items - total items: " +
- tdAnimationStack.items.length + " ", "background: #999da0; color: #fff;"); 0 < tdAnimationStack.items.length;) switch (tdAnimationStack._item_to_view_port(tdAnimationStack.items[0])) {
- case tdAnimationStack._ITEM_TO_VIEW_PORT.ITEM_ABOVE_VIEW_PORT:
- tdAnimationStack._items_above_view_port.push(tdAnimationStack.items.shift());
- break;
- case tdAnimationStack._ITEM_TO_VIEW_PORT.ITEM_IN_VIEW_PORT:
- tdAnimationStack._items_in_view_port.push(tdAnimationStack.items.shift());
- break;
- case tdAnimationStack._ITEM_TO_VIEW_PORT.ITEM_UNDER_VIEW_PORT:
- tdAnimationStack.log("after separation items >> above: " +
- tdAnimationStack._items_above_view_port.length + " in: " + tdAnimationStack._items_in_view_port.length + " under: " + tdAnimationStack.items.length);
- return
- }
- },
- _load_item: function (a, b) {
- if (void 0 === a.itemSrc) tdAnimationStack.log("%c item with no data url ", "background: #fc6600; color: #fff;"), a.jqueryObj.removeClass(tdAnimationStack._animation_css_class1), a.jqueryObj.addClass(tdAnimationStack._animation_css_class2); else if (b = a.itemType, void 0 !== b) switch (b) {
- case "image_tag":
- tdAnimationStack.log("%c image tag ",
- "background: #3ded97; color: #fff;");
- a.jqueryObj.data("complete", !1);
- if (void 0 !== a.itemImgRetinaSrc && !0 === tdAnimationStack._isHighDensity()) a.jqueryObj.attr("src", a.itemImgRetinaSrc).on("load", function () {
- a.jqueryObj.data("complete", !0)
- }); else a.jqueryObj.attr("src", a.itemSrc).on("load", function () {
- a.jqueryObj.data("complete", !0)
- });
- var c = (new Date).getTime(), d = setInterval(function () {
- var b = new Date;
- !0 === a.jqueryObj.data("complete") ? (clearInterval(d), a.jqueryObj.removeClass(tdAnimationStack._animation_css_class1),
- a.jqueryObj.addClass(tdAnimationStack._animation_css_class2)) : b.getTime() - c > tdAnimationStack.max_waiting_for_init && (clearInterval(d), a.jqueryObj.removeClass(tdAnimationStack._animation_css_class1), a.jqueryObj.addClass(tdAnimationStack._animation_css_class2))
- }, 100);
- break;
- case "css_image":
- a.jqueryObj.data("complete", !1);
- tdAnimationStack.log("%c image tag ", "background: #3ded97; color: #fff;");
- if (void 0 !== a.itemImgRetinaSrc && !0 === tdAnimationStack._isHighDensity()) jQuery("<img/>").attr("src", a.itemImgRetinaSrc).on("load",
- function () {
- jQuery(this).remove();
- a.jqueryObj.data("complete", !0)
- }); else jQuery("<img/>").attr("src", a.itemSrc).on("load", function () {
- jQuery(this).remove();
- a.jqueryObj.data("complete", !0)
- });
- var h = (new Date).getTime(), f = setInterval(function () {
- var b = new Date;
- !0 === a.jqueryObj.data("complete") ? (void 0 !== a.itemImgRetinaSrc && !0 === tdAnimationStack._isHighDensity() ? a.jqueryObj.attr("style", 'background-image: url("' + a.itemImgRetinaSrc + '")') : a.jqueryObj.attr("style", 'background-image: url("' + a.itemSrc + '")'),
- clearInterval(f), a.jqueryObj.removeClass(tdAnimationStack._animation_css_class1), a.jqueryObj.addClass(tdAnimationStack._animation_css_class2)) : b.getTime() - h > tdAnimationStack.max_waiting_for_init && (clearInterval(f), void 0 !== a.itemImgRetinaSrc && !0 === tdAnimationStack._isHighDensity() ? a.jqueryObj.attr("style", 'background-image: url("' + a.itemImgRetinaSrc + '")') : a.jqueryObj.attr("style", 'background-image: url("' + a.itemSrc + '")'), a.jqueryObj.removeClass(tdAnimationStack._animation_css_class1), a.jqueryObj.addClass(tdAnimationStack._animation_css_class2))
- },
- 100)
- }
- },
- td_events_scroll: function () {
- tdAnimationStack.compute_items(!0)
- },
- td_events_resize: function () {
- clearInterval(tdAnimationStack._current_interval);
- tdAnimationStack.reinit()
- },
- log: function (a, b) {
- },
- _isHighDensity: function () {
- return window.matchMedia && (window.matchMedia("only screen and (min-resolution: 124dpi), only screen and (min-resolution: 1.3dppx), only screen and (min-resolution: 48.8dpcm)").matches || window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3)").matches) ||
- window.devicePixelRatio && 1.3 < window.devicePixelRatio
- },
- _isRetina: function () {
- return (window.matchMedia && (window.matchMedia("only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx), only screen and (min-resolution: 75.6dpcm)").matches || window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min--moz-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)").matches) || window.devicePixelRatio &&
- 2 <= window.devicePixelRatio) && /(iPad|iPhone|iPod)/g.test(navigator.userAgent)
- }
- }
- })();
- "use strict";
- tdAffix.init({
- menu_selector: ".td-header-menu-wrap",
- menu_wrap_selector: ".td-header-menu-wrap-full",
- tds_snap_menu: tdUtil.getBackendVar("tds_snap_menu"),
- tds_snap_menu_logo: tdUtil.getBackendVar("tds_logo_on_sticky"),
- menu_affix_height: 48,
- menu_affix_height_on_mobile: 54
- });
- jQuery(window).on("load", function () {
- if ("undefined" !== typeof window.tdStickyRow) {
- var a = function () {
- var a = jQuery(".tdc-row-is-sticky"), d = !1;
- a.each(function () {
- var a = jQuery(this), b = !1;
- tdStickyRow.items.forEach(function (c) {
- c.rowUid === a.attr("id") && (b = !0)
- });
- b || (d = !0)
- });
- if (d) b(a); else if (a.length === tdStickyRow.items.length) {
- for (var h = !0, f = 0; f < a.length; f++) jQuery(a[f]).attr("id") !== tdStickyRow.items[f].rowUid && (h = !1);
- h || b(a)
- } else b(a)
- }, b = function (a) {
- tdStickyRow.resetItems();
- a.each(function () {
- var a = jQuery(this),
- b = a.attr("id"), c = new tdStickyRow.item;
- c.rowUid = b;
- c.jQueryObj = jQuery("#" + b);
- a.hasClass("tdc-rist-bottom") && (c.position = "bottom");
- tdStickyRow.addItem(c)
- });
- tdStickyRow.manageStickies()
- };
- a();
- window.location !== window.parent.location && setInterval(function () {
- jQuery(".tdc-row-is-sticky").length && a()
- }, 1E3)
- }
- });
- jQuery(window).on("load", function () {
- var a = jQuery(".td-dm-input");
- a.on("change", function (b) {
- b.target.checked ? (jQuery("body").addClass("is_dark"), a.prop("checked", !0)) : (jQuery("body").removeClass("is_dark"), a.prop("checked", !1));
- jQuery.ajax({type: "POST", url: td_ajax_url, data: {action: "td_ajax_dark_mode"}})
- })
- });
- window.addEventListener("DOMContentLoaded", function () {
- if ("enabled" === tdUtil.getBackendVar("tds_smart_sidebar") && "undefined" !== typeof window.tdSmartSidebar) {
- jQuery(".td-ss-row").each(function () {
- var a = new tdSmartSidebar.item, c = jQuery(this).children(".td-pb-span8").find(".wpb_wrapper:first"),
- d = jQuery(this).children(".td-pb-span4").find(".wpb_wrapper:first");
- 0 < c.length && 0 < d.length && (a.sidebar_jquery_obj = d, a.content_jquery_obj = c, tdSmartSidebar.add_item(a))
- });
- if (0 < jQuery(".td-ss-main-content").length &&
- 0 < jQuery(".td-ss-main-sidebar").length) {
- var a = new tdSmartSidebar.item;
- a.sidebar_jquery_obj = jQuery(".td-ss-main-sidebar");
- a.content_jquery_obj = jQuery(".td-ss-main-content");
- tdSmartSidebar.add_item(a)
- }
- tdSmartSidebar.td_events_resize()
- }
- });
- jQuery(window).on("load", function () {
- [{".vc_row": ".vc_column"}, {".vc_row_inner": ".vc_column_inner"}].forEach(function (a) {
- for (var b in a) {
- var c = a[b];
- jQuery(b).each(function () {
- var a = [], b;
- jQuery(this).children(c).each(function (c, d) {
- c = jQuery(d);
- if (c.hasClass("td-is-sticky")) a.push(c.find(".wpb_wrapper:first")); else if ("undefined" === typeof b || b.outerHeight(!0) < c.outerHeight(!0)) b = c.find(".wpb_wrapper:first")
- });
- a.length && "undefined" !== typeof b && "undefined" !== typeof window.tdSmartSidebar && a.forEach(function (a) {
- var c =
- new tdSmartSidebar.item;
- c.sidebar_jquery_obj = a;
- c.content_jquery_obj = b;
- c.enabled_on = JSON.parse(window.atob(a.data("sticky-enabled-on")));
- c.offset = a.data("sticky-offset");
- c.is_width_auto = JSON.parse(window.atob(a.data("sticky-is-width-auto")));
- tdSmartSidebar.add_item(c)
- })
- })
- }
- });
- "undefined" !== typeof window.tdSmartSidebar && tdSmartSidebar.td_events_resize()
- });
- jQuery(window).on("load", function () {
- jQuery(".td-subcat-filter").each(function (a, b) {
- a = jQuery(b);
- b = a.find(".td-subcat-list:first");
- var c = new tdPullDown.item;
- c.blockUid = a.parent().parent().data("td-block-uid");
- c.horizontal_jquery_obj = b;
- c.vertical_jquery_obj = a.find(".td-subcat-dropdown:first");
- c.horizontal_element_css_class = "td-subcat-item";
- c.container_jquery_obj = b.closest(".td-block-title-wrap");
- c.excluded_jquery_elements = [c.container_jquery_obj.find(".td-pulldown-size")];
- tdPullDown.add_item(c)
- });
- jQuery(".td-category-siblings").each(function (a,
- b) {
- a = jQuery(b);
- b = a.find(".td-category:first");
- var c = new tdPullDown.item;
- c.blockUid = a.parent().parent().data("td-block-uid");
- c.horizontal_jquery_obj = b;
- c.vertical_jquery_obj = a.find(".td-subcat-dropdown:first");
- c.horizontal_element_css_class = "entry-category";
- c.container_jquery_obj = b.parents(".td-category-siblings:first");
- tdPullDown.add_item(c)
- })
- });
- function td_compute_parallax_background(a) {
- a = jQuery(a);
- var b = Math.round(.2 * a.height()), c = -1 * b, d = new tdAnimationScroll.item;
- d.jqueryObj = a;
- d.add_item_property("move_y", 0, 100, c, b, "");
- d.animation_callback = function () {
- var a = parseFloat(d.computed_item_properties.move_y).toFixed();
- d.jqueryObj.css({
- "-webkit-transform": "translate3d(0px," + a + "px, 0px) scale(1.2)",
- transform: "translate3d(0px," + a + "px, 0px) scale(1.2)"
- });
- d.redraw = !1;
- d.td_video_parallax = !0
- };
- tdAnimationScroll.add_item(d)
- }
- function td_compute_backstretch_item(a) {
- var b = 100 * (tdEvents.window_innerHeight - a.offset_top) / (tdEvents.window_innerHeight + a.full_height),
- c = 100 * tdEvents.window_innerHeight / (tdEvents.window_innerHeight + a.full_height), d = a.offset_top / 4;
- 0 == d && (d = 100);
- var h = d / 1.2 * (100 - b) / (c - b);
- c = -d / 2 + .5;
- a.remove_item_property("move_y");
- a.add_item_property("move_y", b, 100, c, h, "");
- var f = parseFloat(1 + Math.abs(d) / a.full_height).toFixed(2);
- delete a.animation_callback;
- a.animation_callback = function () {
- var b = parseFloat(a.computed_item_properties.move_y).toFixed();
- a.jqueryObj.css({
- left: "50%",
- "-webkit-transform": "translate3d(-50%," + b + "px, 0px) scale(" + f + "," + f + ")",
- transform: "translate3d(-50%," + b + "px, 0px) scale(" + f + "," + f + ")"
- });
- a.redraw = !1
- }
- }
- var td_backstretch_items = [];
- jQuery(window).ready(function () {
- "undefined" !== typeof window.tdAnimationScroll && (jQuery(".td-backstretch").each(function (a, b) {
- jQuery(b).hasClass("not-parallax") || (a = new tdAnimationScroll.item, a.jqueryObj = jQuery(b), a.wrapper_jquery_obj = a.jqueryObj.parent(), tdAnimationScroll.add_item(a), td_backstretch_items.push(a), td_compute_backstretch_item(a))
- }), jQuery(".td-parallax-header").each(function (a, b) {
- var c = new tdAnimationScroll.item;
- c.jqueryObj = jQuery(b);
- c.add_item_property("move_y", 50, 100, 0, 100, "");
- c.add_item_property("opacity",
- 50, 100, 1, 0, "");
- c.animation_callback = function () {
- var a = parseFloat(c.computed_item_properties.move_y).toFixed(),
- b = parseFloat(c.computed_item_properties.opacity);
- c.jqueryObj.css({
- "-webkit-transform": "translate3d(0px," + a + "px, 0px)",
- transform: "translate3d(0px," + a + "px, 0px)"
- });
- c.jqueryObj.css("transform", "translate3d(0px," + a + "px, 0px)");
- c.jqueryObj.css("opacity", b);
- c.redraw = !1
- };
- tdAnimationScroll.add_item(c)
- }), tdAnimationScroll.compute_all_items(), setTimeout(function () {
- jQuery(".tdc-video-parallax-wrapper").each(function (a,
- b) {
- td_compute_parallax_background(b)
- });
- tdAnimationScroll.compute_all_items()
- }, 300));
- tdAnimationStack.ready_init()
- });
- jQuery(window).on("load", function () {
- jQuery("body").addClass("td-js-loaded");
- window.tdAnimationStack.init()
- });
- jQuery(window).ready(function () {
- jQuery(".td_smart_list_1 a, .td_smart_list_3 a").on("click", function (a) {
- if (a.target === a.currentTarget) {
- var b = jQuery(this).attr("target"), c = jQuery(this)[0].hasAttribute("download"),
- d = jQuery(this).attr("href");
- c || ("_blank" == b ? (a.preventDefault(), window.open(d)) : window.location.href !== d && tdUtil.isValidUrl(d) && (window.location.href = d))
- }
- });
- jQuery(".td_block_trending_now").each(function () {
- var a = new tdTrendingNow.item, b = jQuery(this).find(".td-trending-now-wrapper").data("start"),
- c = 0;
- a.blockUid = jQuery(this).data("td-block-uid");
- "manual" !== b && (a.trendingNowAutostart = b);
- jQuery("#" + a.blockUid + " .td-trending-now-post").each(function () {
- a.trendingNowPosts[c] = jQuery(this);
- c++
- });
- "undefined" === typeof a.trendingNowPosts || 1 > a.trendingNowPosts.length || tdTrendingNow.addItem(a)
- });
- jQuery(".td-trending-now-nav-left").on("click", function (a) {
- a.preventDefault();
- a = jQuery(this).data("block-id");
- tdTrendingNow.itemPrev(a)
- });
- jQuery(".td-trending-now-nav-right").on("click", function (a) {
- a.preventDefault();
- a = jQuery(this).data("block-id");
- tdTrendingNow.itemNext(a)
- })
- });
- var tdConfirm;
- (function (a, b) {
- tdConfirm = {
- _isInitialized: !1,
- mediaUploadLoaded: !1,
- _$content: b,
- _$confirmYes: b,
- _$confirmNo: b,
- _$infoContent: b,
- _$body: b,
- init: function () {
- tdConfirm._$body = a("body");
- tdConfirm._$content = a('<div id="td-confirm" style="display: none;"><div class="td-confirm-info"></div><div class="td-confirm-buttons"><button type="button" class="td-confirm-yes">Yes</button><button type="button" class="td-confirm-no">No</button></div></div>');
- tdConfirm._$infoContent = tdConfirm._$content.find(".td-confirm-info");
- tdConfirm._$confirmYes = tdConfirm._$content.find("button.td-confirm-yes");
- tdConfirm._$confirmNo = tdConfirm._$content.find("button.td-confirm-no");
- tdConfirm._$body.append(tdConfirm._$content)
- },
- close: function () {
- tb_remove()
- },
- modal: function (b) {
- tdConfirm.init();
- "undefined" === typeof b.url && (b.url = "#TB_inline?inlineId=td-confirm&width=480");
- if ("undefined" === typeof b.objectContext || null === b.objectContext) b.objectContext = window;
- "undefined" === typeof b.htmlInfoContent && (b.htmlInfoContent = "");
- "undefined" === typeof b.textYes ?
- tdConfirm._$confirmYes.html("Ok") : tdConfirm._$confirmYes.html(b.textYes);
- "undefined" !== typeof b.switchButtons && !0 === b.switchButtons && tdConfirm._$confirmNo.insertBefore(tdConfirm._$confirmYes);
- tdConfirm._$infoContent.html(b.htmlInfoContent);
- "undefined" !== typeof b.hideNoButton && !0 === b.hideNoButton ? tdConfirm._$confirmNo.hide() : (tdConfirm._$confirmNo.show(), tdConfirm._$confirmNo.unbind(), tdConfirm._$confirmNo.on("click", function () {
- "undefined" !== typeof b.callbackNo && b.callbackNo.apply(b.objectContext,
- b.argsNo);
- tb_remove();
- return !1
- }), "undefined" === typeof b.textNo ? tdConfirm._$confirmNo.html("No") : tdConfirm._$confirmNo.html(b.textNo));
- if ("undefined" === typeof b.callbackYes) tdConfirm._$confirmYes.on("click", function () {
- tb_remove();
- return !0
- }); else tdConfirm._$confirmYes.off("click"), tdConfirm._$confirmYes.on("click", function () {
- b.callbackYes.apply(b.objectContext, b.argsYes);
- return !0
- });
- tdConfirm._$body.addClass("td-thickbox-loading");
- tb_show(b.caption, b.url);
- "undefined" !== typeof b.offOverlayClick && !0 ===
- b.offOverlayClick && a("#TB_overlay").off("click");
- var c = a("#TB_window");
- "undefined" !== typeof b.hideCloseButton && !0 === b.hideCloseButton && c.find("#TB_closeWindowButton").hide();
- c.addClass("td-thickbox");
- tdConfirm._$body.removeClass("td-thickbox-loading");
- tdConfirm._$content.remove()
- },
- showModalOk: function (b, d, h, f, p) {
- tdConfirm.init();
- "undefined" === typeof p && (p = "#TB_inline?inlineId=td-confirm&width=480");
- if ("undefined" === typeof f || null === f) f = window;
- "undefined" === typeof d && (d = "");
- tdConfirm._$infoContent.html(d);
- tdConfirm._$confirmNo.hide();
- tdConfirm._$confirmYes.html("Ok");
- if ("undefined" === typeof h) tdConfirm._$confirmYes.on("click", function () {
- tb_remove();
- return !0
- }); else tdConfirm._$confirmYes.on("click", function () {
- tdConfirm._$confirmYes.off("click");
- h.apply(f);
- return !0
- });
- tdConfirm._$body.addClass("td-thickbox-loading");
- tb_show(b, p);
- a("#TB_overlay").off("click");
- b = a("#TB_window");
- b.find("#TB_closeWindowButton").remove();
- !0 === tdConfirm.mediaUploadLoaded && (tdConfirm.fixPosition(), a(window).resize(function () {
- tdConfirm.fixPosition()
- }));
- b.addClass("td-thickbox");
- tdConfirm._$body.removeClass("td-thickbox-loading");
- tdConfirm._$content.remove()
- },
- fixPosition: function () {
- var b = a("#TB_window"), d = "undefined" === typeof document.body.style.maxHeight;
- b.css({marginLeft: "-" + parseInt(TB_WIDTH / 2, 10) + "px", width: TB_WIDTH + "px"});
- d || b.css({marginTop: +parseInt(TB_HEIGHT / 2, 10) + "px"});
- b.css("z-index", "170001");
- a("#TB_overlay").css("z-index", "170000")
- },
- showModal: function (b, d, h, f, p, G) {
- tdConfirm.init();
- "undefined" === typeof G && (G = "#TB_inline?inlineId=td-confirm&width=480");
- "undefined" === typeof d && (d = window);
- "undefined" === typeof p && (p = "");
- tdConfirm._$infoContent.html(p);
- tdConfirm._$confirmYes.unbind();
- if ("undefined" === typeof h) tdConfirm._$confirmYes.on("click", function () {
- tb_remove();
- return !0
- }); else "undefined" === typeof f && (f = []), tdConfirm._$confirmYes.on("click", function () {
- h.apply(d, f)
- });
- tdConfirm._$confirmNo.show();
- tdConfirm._$confirmNo.unbind();
- tdConfirm._$confirmNo.on("click", function () {
- tb_remove();
- return !1
- });
- tdConfirm._$body.addClass("td-thickbox-loading");
- tb_show(b,
- G);
- a("#TB_window").addClass("td-thickbox");
- tdConfirm._$body.removeClass("td-thickbox-loading");
- tdConfirm._$content.remove()
- }
- }
- })(jQuery);
Add Comment
Please, Sign In to add comment