Guest User

Untitled

a guest
May 12th, 2025
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 237.63 KB | None | 0 0
  1. /*
  2. Magnific Popup - v0.9.9 - 2013-12-27
  3. http://dimsemenov.com/plugins/magnific-popup/
  4. Copyright (c) 2013 Dmitry Semenov; */
  5. jQuery.easing.jswing = jQuery.easing.swing;
  6. jQuery.extend(jQuery.easing, {
  7. def: "easeOutQuad", swing: function (a, b, c, d, h) {
  8. return jQuery.easing[jQuery.easing.def](a, b, c, d, h)
  9. }, easeInQuad: function (a, b, c, d, h) {
  10. return d * (b /= h) * b + c
  11. }, easeOutQuad: function (a, b, c, d, h) {
  12. return -d * (b /= h) * (b - 2) + c
  13. }, easeInOutQuad: function (a, b, c, d, h) {
  14. return 1 > (b /= h / 2) ? d / 2 * b * b + c : -d / 2 * (--b * (b - 2) - 1) + c
  15. }, easeInCubic: function (a, b, c, d, h) {
  16. return d * (b /= h) * b * b + c
  17. }, easeOutCubic: function (a, b, c, d, h) {
  18. return d * ((b = b / h - 1) * b * b + 1) + c
  19. }, easeInOutCubic: function (a, b, c, d, h) {
  20. return 1 > (b /= h / 2) ? d / 2 * b * b * b + c :
  21. d / 2 * ((b -= 2) * b * b + 2) + c
  22. }, easeInQuart: function (a, b, c, d, h) {
  23. return d * (b /= h) * b * b * b + c
  24. }, easeOutQuart: function (a, b, c, d, h) {
  25. return -d * ((b = b / h - 1) * b * b * b - 1) + c
  26. }, easeInOutQuart: function (a, b, c, d, h) {
  27. return 1 > (b /= h / 2) ? d / 2 * b * b * b * b + c : -d / 2 * ((b -= 2) * b * b * b - 2) + c
  28. }, easeInQuint: function (a, b, c, d, h) {
  29. return d * (b /= h) * b * b * b * b + c
  30. }, easeOutQuint: function (a, b, c, d, h) {
  31. return d * ((b = b / h - 1) * b * b * b * b + 1) + c
  32. }, easeInOutQuint: function (a, b, c, d, h) {
  33. return 1 > (b /= h / 2) ? d / 2 * b * b * b * b * b + c : d / 2 * ((b -= 2) * b * b * b * b + 2) + c
  34. }, easeInSine: function (a, b, c, d, h) {
  35. return -d * Math.cos(b /
  36. h * (Math.PI / 2)) + d + c
  37. }, easeOutSine: function (a, b, c, d, h) {
  38. return d * Math.sin(b / h * (Math.PI / 2)) + c
  39. }, easeInOutSine: function (a, b, c, d, h) {
  40. return -d / 2 * (Math.cos(Math.PI * b / h) - 1) + c
  41. }, easeInExpo: function (a, b, c, d, h) {
  42. return 0 == b ? c : d * Math.pow(2, 10 * (b / h - 1)) + c
  43. }, easeOutExpo: function (a, b, c, d, h) {
  44. return b == h ? c + d : d * (-Math.pow(2, -10 * b / h) + 1) + c
  45. }, easeInOutExpo: function (a, b, c, d, h) {
  46. 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
  47. }, easeInCirc: function (a, b, c, d, h) {
  48. return -d * (Math.sqrt(1 - (b /= h) *
  49. b) - 1) + c
  50. }, easeOutCirc: function (a, b, c, d, h) {
  51. return d * Math.sqrt(1 - (b = b / h - 1) * b) + c
  52. }, easeInOutCirc: function (a, b, c, d, h) {
  53. return 1 > (b /= h / 2) ? -d / 2 * (Math.sqrt(1 - b * b) - 1) + c : d / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + c
  54. }, easeInElastic: function (a, b, c, d, h) {
  55. a = 1.70158;
  56. var f = 0, p = d;
  57. if (0 == b) return c;
  58. if (1 == (b /= h)) return c + d;
  59. f || (f = .3 * h);
  60. p < Math.abs(d) ? (p = d, a = f / 4) : a = f / (2 * Math.PI) * Math.asin(d / p);
  61. return -(p * Math.pow(2, 10 * --b) * Math.sin(2 * (b * h - a) * Math.PI / f)) + c
  62. }, easeOutElastic: function (a, b, c, d, h) {
  63. a = 1.70158;
  64. var f = 0, p = d;
  65. if (0 == b) return c;
  66. if (1 == (b /=
  67. h)) return c + d;
  68. f || (f = .3 * h);
  69. p < Math.abs(d) ? (p = d, a = f / 4) : a = f / (2 * Math.PI) * Math.asin(d / p);
  70. return p * Math.pow(2, -10 * b) * Math.sin(2 * (b * h - a) * Math.PI / f) + d + c
  71. }, easeInOutElastic: function (a, b, c, d, h) {
  72. a = 1.70158;
  73. var f = 0, p = d;
  74. if (0 == b) return c;
  75. if (2 == (b /= h / 2)) return c + d;
  76. f || (f = .3 * h * 1.5);
  77. p < Math.abs(d) ? (p = d, a = f / 4) : a = f / (2 * Math.PI) * Math.asin(d / p);
  78. 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
  79. }, easeInBack: function (a, b, c, d, h, f) {
  80. void 0 == f && (f = 1.70158);
  81. return d * (b /= h) * b * ((f + 1) * b - f) + c
  82. }, easeOutBack: function (a, b, c, d, h, f) {
  83. void 0 == f && (f = 1.70158);
  84. return d * ((b = b / h - 1) * b * ((f + 1) * b + f) + 1) + c
  85. }, easeInOutBack: function (a, b, c, d, h, f) {
  86. void 0 == f && (f = 1.70158);
  87. 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
  88. }, easeInBounce: function (a, b, c, d, h) {
  89. return d - jQuery.easing.easeOutBounce(a, h - b, 0, d, h) + c
  90. }, easeOutBounce: function (a, b, c, d, h) {
  91. 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 -=
  92. 2.25 / 2.75) * b + .9375) + c : d * (7.5625 * (b -= 2.625 / 2.75) * b + .984375) + c
  93. }, easeInOutBounce: function (a, b, c, d, h) {
  94. 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
  95. }
  96. });
  97. (function (a) {
  98. a.fn.supersubs = function (b) {
  99. var c = a.extend({}, a.fn.supersubs.defaults, b);
  100. return this.each(function () {
  101. var b = a(this), h = a.meta ? a.extend({}, c, b.data()) : c;
  102. setTimeout(function (b) {
  103. var c = b.find(".sub-menu").show(), d = a('<li id="menu-fontsize">&#8212;</li>').css({
  104. padding: 0,
  105. position: "absolute",
  106. top: "-999em",
  107. width: "auto"
  108. }).appendTo(b)[0].clientWidth;
  109. a("#menu-fontsize").remove();
  110. c.each(function (b) {
  111. b = a(this);
  112. var c = b.children(), f = c.children("a"), p = c.css("white-space", "nowrap").css("float");
  113. b.add(c).add(f).css({
  114. "float": "none",
  115. width: "auto"
  116. });
  117. f = b[0].clientWidth / d;
  118. f += h.extraWidth;
  119. f > h.maxWidth ? f = h.maxWidth : f < h.minWidth && (f = h.minWidth);
  120. f += "em";
  121. h.applyMin ? b.css("min-width", f) : b.css("width", f);
  122. c.css({"float": p, width: "100%", "white-space": "normal"}).each(function () {
  123. var b = a(this).children("ul"), c = void 0 !== b.css("left") ? "left" : "right";
  124. b.css(c, "100%")
  125. });
  126. b.parent().hasClass("tdb-menu-item-inactive") && b.parent().removeClass("tdb-menu-item-inactive")
  127. }).hide()
  128. }, 500, b)
  129. })
  130. };
  131. a.fn.supersubs.defaults = {minWidth: 9, maxWidth: 25, extraWidth: 0, applyMin: !1}
  132. })(jQuery);
  133. (function (a) {
  134. var b = 0, c = 0, d = 0, h = 0, f = "ontouchstart" in window || 0 < navigator.msMaxTouchPoints,
  135. p = "onorientationchange" in window, G = !1, W = !1, P = !1, X = !1, B = !1, v = "pointer", x = "pointer",
  136. T = [], U = [], pa = [], Y = [], D = [], ba = [], H = [], q = [], w = [], ca = [], ja = [], k = {
  137. showScrollbar: function (b, c) {
  138. b.scrollbarHide && a("." + c).css({
  139. opacity: b.scrollbarOpacity,
  140. filter: "alpha(opacity:" + 100 * b.scrollbarOpacity + ")"
  141. })
  142. }, hideScrollbar: function (a, b, e, c, d, g, f, h, p, q) {
  143. if (a.scrollbar && a.scrollbarHide) for (var l = e; l < e + 25; l++) b[b.length] = k.hideScrollbarIntervalTimer(10 *
  144. l, c[e], (e + 24 - l) / 24, d, g, f, h, p, q, a)
  145. }, hideScrollbarInterval: function (b, c, e, d, f, g, p, q, G) {
  146. h = -1 * b / w[q] * (f - g - p - d);
  147. k.setSliderOffset("." + e, h);
  148. a("." + e).css({
  149. opacity: G.scrollbarOpacity * c,
  150. filter: "alpha(opacity:" + G.scrollbarOpacity * c * 100 + ")"
  151. })
  152. }, slowScrollHorizontalInterval: function (b, c, e, d, f, g, p, G, ka, Q, L, A, N, t, z, r, v, n, F) {
  153. if (F.infiniteSlider) {
  154. if (e <= -1 * w[r] || e <= -1 * ca[r]) {
  155. var l = a(b).width();
  156. if (e <= -1 * ca[r]) {
  157. var E = -1 * L[0];
  158. a(c).each(function (b) {
  159. k.setSliderOffset(a(c)[b], E + v);
  160. b < A.length && (A[b] = -1 * E);
  161. E += z[b]
  162. });
  163. e += -1 *
  164. A[0];
  165. q[r] = -1 * A[0] + v;
  166. w[r] = q[r] + l - g;
  167. H[r] = 0
  168. }
  169. for (; e <= -1 * w[r];) {
  170. var y = 0, m = k.getSliderOffset(a(c[0]), "x");
  171. a(c).each(function (a) {
  172. k.getSliderOffset(this, "x") < m && (m = k.getSliderOffset(this, "x"), y = a)
  173. });
  174. N = q[r] + l;
  175. k.setSliderOffset(a(c)[y], N);
  176. q[r] = -1 * A[1] + v;
  177. w[r] = q[r] + l - g;
  178. A.splice(0, 1);
  179. A.splice(A.length, 0, -1 * N + v);
  180. H[r]++
  181. }
  182. }
  183. if (e >= -1 * q[r] || 0 <= e) {
  184. l = a(b).width();
  185. if (0 < e) for (E = -1 * L[0], a(c).each(function (b) {
  186. k.setSliderOffset(a(c)[b], E + v);
  187. b < A.length && (A[b] = -1 * E);
  188. E += z[b]
  189. }), e -= -1 * A[0], q[r] = -1 * A[0] + v, w[r] = q[r] + l - g, H[r] = t; 0 <
  190. -1 * A[0] - l + v;) {
  191. var O = 0, C = k.getSliderOffset(a(c[0]), "x");
  192. a(c).each(function (a) {
  193. k.getSliderOffset(this, "x") > C && (C = k.getSliderOffset(this, "x"), O = a)
  194. });
  195. N = q[r] - z[O];
  196. k.setSliderOffset(a(c)[O], N);
  197. A.splice(0, 0, -1 * N + v);
  198. A.splice(A.length - 1, 1);
  199. q[r] = -1 * A[0] + v;
  200. w[r] = q[r] + l - g;
  201. H[r]--;
  202. D[r]++
  203. }
  204. for (; e > -1 * q[r];) O = 0, C = k.getSliderOffset(a(c[0]), "x"), a(c).each(function (a) {
  205. k.getSliderOffset(this, "x") > C && (C = k.getSliderOffset(this, "x"), O = a)
  206. }), N = q[r] - z[O], k.setSliderOffset(a(c)[O], N), A.splice(0, 0, -1 * N + v), A.splice(A.length - 1, 1),
  207. q[r] = -1 * A[0] + v, w[r] = q[r] + l - g, H[r]--
  208. }
  209. }
  210. L = !1;
  211. g = k.calcActiveOffset(F, e, A, g, H[r], t, Q, r);
  212. N = (g + H[r] + t) % t;
  213. F.infiniteSlider ? N != ba[r] && (L = !0) : g != D[r] && (L = !0);
  214. 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);
  215. D[r] = g;
  216. ba[r] = N;
  217. e = Math.floor(e);
  218. if (r != a(b).parent().data("args").data.sliderNumber) return !0;
  219. k.setSliderOffset(b, e);
  220. 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("." +
  221. d), 0)) : (e <= -1 * w[r] + 1 && (b = p - G - ka - h), k.setSliderOffset(a("." + d), h)), a("." + d).css({width: b + "px"}))
  222. }, slowScrollHorizontal: function (b, c, e, d, f, g, h, p, v, G, L, A, N, t, z, r, x, n, F, J, R) {
  223. var l = k.getSliderOffset(b, "x");
  224. g = [];
  225. var E = 0, y = 25 / 1024 * p;
  226. frictionCoefficient = R.frictionCoefficient;
  227. elasticFrictionCoefficient = R.elasticFrictionCoefficient;
  228. snapFrictionCoefficient = R.snapFrictionCoefficient;
  229. f > R.snapVelocityThreshold && R.snapToChildren && !F ? E = 1 : f < -1 * R.snapVelocityThreshold && R.snapToChildren && !F && (E = -1);
  230. f < -1 * y ? f = -1 * y : f >
  231. y && (f = y);
  232. a(b)[0] !== a(n)[0] && (E *= -1, f *= -2);
  233. n = H[z];
  234. if (R.infiniteSlider) var m = q[z], O = w[z];
  235. F = [];
  236. y = [];
  237. for (var C = 0; C < N.length; C++) F[C] = N[C], C < c.length && (y[C] = k.getSliderOffset(a(c[C]), "x"));
  238. for (; 1 < f || -1 > f;) {
  239. f *= frictionCoefficient;
  240. l += f;
  241. (l > -1 * q[z] || l < -1 * w[z]) && !R.infiniteSlider && (f *= elasticFrictionCoefficient, l += f);
  242. if (R.infiniteSlider) {
  243. if (l <= -1 * O) {
  244. O = a(b).width();
  245. var Q = 0, ka = y[0];
  246. for (C = 0; C < y.length; C++) y[C] < ka && (ka = y[C], Q = C);
  247. C = m + O;
  248. y[Q] = C;
  249. m = -1 * F[1] + J;
  250. O = m + O - p;
  251. F.splice(0, 1);
  252. F.splice(F.length, 0, -1 * C + J);
  253. n++
  254. }
  255. if (l >=
  256. -1 * m) {
  257. O = a(b).width();
  258. Q = 0;
  259. ka = y[0];
  260. for (C = 0; C < y.length; C++) y[C] > ka && (ka = y[C], Q = C);
  261. C = m - t[Q];
  262. y[Q] = C;
  263. F.splice(0, 0, -1 * C + J);
  264. F.splice(F.length - 1, 1);
  265. m = -1 * F[0] + J;
  266. O = m + O - p;
  267. n--
  268. }
  269. }
  270. g[g.length] = l
  271. }
  272. y = !1;
  273. f = k.calcActiveOffset(R, l, F, p, n, x, D[z], z);
  274. m = (f + n + x) % x;
  275. 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)));
  276. if (R.snapToChildren || (l > -1 * q[z] || l < -1 * w[z]) && !R.infiniteSlider) {
  277. (l > -1 * q[z] || l < -1 * w[z]) && !R.infiniteSlider ?
  278. g.splice(0, g.length) : (g.splice(.1 * g.length, g.length), l = 0 < g.length ? g[g.length - 1] : l);
  279. for (; l < F[f] - .5 || l > F[f] + .5;) l = (l - F[f]) * snapFrictionCoefficient + F[f], g[g.length] = l;
  280. g[g.length] = F[f]
  281. }
  282. E = 1;
  283. 0 != g.length % 2 && (E = 0);
  284. for (l = 0; l < e.length; l++) clearTimeout(e[l]);
  285. n = (f + n + x) % x;
  286. m = 0;
  287. 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);
  288. m = (f + H[z] + x) % x;
  289. "" != R.onSlideComplete && 1 < g.length && (e[e.length] = k.onSlideCompleteTimer(10 *
  290. (l + 1), R, b, a(b).children(":eq(" + m + ")"), n, z));
  291. e[e.length] = k.updateBackfaceVisibilityTimer(10 * (l + 1), c, z, x, R);
  292. Y[z] = e;
  293. k.hideScrollbar(R, e, l, g, d, h, p, G, L, z)
  294. }, onSlideComplete: function (b, c, e, d, f) {
  295. e = new k.args("complete", b, a(c), e, d, d);
  296. a(c).parent().data("args", e);
  297. if ("" != b.onSlideComplete) b.onSlideComplete(e)
  298. }, getSliderOffset: function (b, c) {
  299. c = "x" == c ? 4 : 5;
  300. if (!G || W || P) b = parseInt(a(b).css("left"), 10); else {
  301. for (var e = ["-webkit-transform", "-moz-transform", "transform"], d, f = 0; f < e.length; f++) if (void 0 != a(b).css(e[f]) &&
  302. 0 < a(b).css(e[f]).length) {
  303. d = a(b).css(e[f]).split(",");
  304. break
  305. }
  306. b = void 0 == d[c] ? 0 : parseInt(d[c], 10)
  307. }
  308. return b
  309. }, setSliderOffset: function (b, c) {
  310. c = parseInt(c, 10);
  311. !G || W || P ? a(b).css({left: c + "px"}) : a(b).css({
  312. msTransform: "matrix(1,0,0,1," + c + ",0)",
  313. webkitTransform: "matrix(1,0,0,1," + c + ",0)",
  314. MozTransform: "matrix(1,0,0,1," + c + ",0)",
  315. transform: "matrix(1,0,0,1," + c + ",0)"
  316. })
  317. }, setBrowserInfo: function () {
  318. null != navigator.userAgent.match("WebKit") ? (v = "-webkit-grab", x = "-webkit-grabbing") : null != navigator.userAgent.match("Gecko") ?
  319. (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)
  320. }, has3DTransform: function () {
  321. var b = !1, c = a("<div />").css({
  322. msTransform: "matrix(1,1,1,1,1,1)",
  323. webkitTransform: "matrix(1,1,1,1,1,1)",
  324. MozTransform: "matrix(1,1,1,1,1,1)",
  325. transform: "matrix(1,1,1,1,1,1)"
  326. });
  327. "" == c.attr("style") ? b = !1 : B && 21 <= parseInt(navigator.userAgent.split("/")[3], 10) ? b = !1 : void 0 != c.attr("style") && (b = !0);
  328. return b
  329. },
  330. getSlideNumber: function (a, b, e) {
  331. return (a - H[b] + e) % e
  332. }, calcActiveOffset: function (a, b, e, c, d, g, f, h) {
  333. d = !1;
  334. a = [];
  335. var l;
  336. b > e[0] && (l = 0);
  337. b < e[e.length - 1] && (l = g - 1);
  338. 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);
  339. 0 == a.length && (a[0] = e[e.length - 1]);
  340. for (g = d = 0; g < a.length; g++) f = Math.abs(b - a[g]), f < c && (d = a[g], c = f);
  341. for (g = 0; g < e.length; g++) d == e[g] && (l = g);
  342. return l
  343. }, changeSlide: function (b, c, e, d, f, g, h, p, q, v, G, A, x, t, z, r, w, n) {
  344. k.autoSlidePause(t);
  345. for (var l = 0; l < d.length; l++) clearTimeout(d[l]);
  346. var E = Math.ceil(n.autoSlideTransTimer / 10) + 1, y = k.getSliderOffset(c, "x"), m = A[b];
  347. m -= y;
  348. var O = b - (D[t] + H[t] + r) % r;
  349. if (n.infiniteSlider) {
  350. b = (b - H[t] + 2 * r) % r;
  351. l = !1;
  352. 0 == b && 2 == r && (b = r, A[b] = A[b - 1] - a(e).eq(0).outerWidth(!0), l = !0);
  353. m = A[b];
  354. m -= y;
  355. var C = [A[b] - a(c).width(), A[b] + a(c).width()];
  356. l && A.splice(A.length - 1, 1);
  357. for (l = 0; l < C.length; l++) Math.abs(C[l] - y) < Math.abs(m) && (m = C[l] - y)
  358. }
  359. 0 > m && -1 == O ? m += a(c).width() : 0 < m && 1 == O && (m -= a(c).width());
  360. O = [];
  361. k.showScrollbar(n, f);
  362. for (l = 0; l <= E; l++) C = l, C /= E, C--, C = y + m * (Math.pow(C, 5) + 1), O[O.length] =
  363. C;
  364. E = (b + H[t] + r) % r;
  365. for (l = y = 0; l < O.length; l++) {
  366. 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);
  367. 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)))
  368. }
  369. y = !1;
  370. n.infiniteSlider ? E != ba[t] && (y = !0) : b != D[t] && (y = !0);
  371. y && "" != n.onSlideComplete && (d[d.length] = k.onSlideCompleteTimer(10 * (l + 1), n, c, a(c).children(":eq(" + E + ")"), E, t));
  372. Y[t] = d;
  373. k.hideScrollbar(n, d, l, O, f, g,
  374. h, q, v, t);
  375. k.autoSlide(c, e, d, f, g, h, p, q, v, G, A, x, t, z, r, w, n)
  376. }, changeOffset: function (b, c, e, d, f, g, h, p, v, G, x, A, N, t, z, r, T, n) {
  377. k.autoSlidePause(t);
  378. for (var l = 0; l < d.length; l++) clearTimeout(d[l]);
  379. n.infiniteSlider || (b = b > -1 * q[t] + T ? -1 * q[t] + T : b, b = b < -1 * w[t] ? -1 * w[t] : b);
  380. var E = Math.ceil(n.autoSlideTransTimer / 10) + 1, y = k.getSliderOffset(c, "x");
  381. l = (k.calcActiveOffset(n, b, A, h, H, r, D[t], t) + H[t] + r) % r;
  382. var m = A.slice();
  383. if (n.snapToChildren && !n.infiniteSlider) b = A[l]; else if (n.infiniteSlider && n.snapToChildren) {
  384. for (; b >= m[0];) m.splice(0,
  385. 0, m[r - 1] + a(c).width()), m.splice(r, 1);
  386. for (; b <= m[r - 1];) m.splice(r, 0, m[0] - a(c).width()), m.splice(0, 1);
  387. l = k.calcActiveOffset(n, b, m, h, H, r, D[t], t);
  388. b = m[l]
  389. }
  390. var O = b - y;
  391. b = [];
  392. k.showScrollbar(n, f);
  393. for (m = 0; m <= E; m++) {
  394. var C = m;
  395. C /= E;
  396. C--;
  397. C = y + O * (Math.pow(C, 5) + 1);
  398. b[b.length] = C
  399. }
  400. E = (l + H[t] + r) % r;
  401. for (m = y = 0; m < b.length; m++) {
  402. 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);
  403. 0 == m && "" != n.onSlideStart && (E = (D[t] + H[t] + r) % r, n.onSlideStart(new k.args("start",
  404. n, c, a(c).children(":eq(" + E + ")"), E, l)))
  405. }
  406. y = !1;
  407. n.infiniteSlider ? E != ba[t] && (y = !0) : l != D[t] && (y = !0);
  408. y && "" != n.onSlideComplete && (d[d.length] = k.onSlideCompleteTimer(10 * (m + 1), n, c, a(c).children(":eq(" + E + ")"), E, t));
  409. Y[t] = d;
  410. k.hideScrollbar(n, d, m, b, f, g, h, v, G, t);
  411. k.autoSlide(c, e, d, f, g, h, p, v, G, x, A, N, t, z, r, T, n)
  412. }, autoSlide: function (a, b, e, c, d, g, f, h, p, q, v, G, x, t, z, r, w) {
  413. if (!U[x].autoSlide) return !1;
  414. k.autoSlidePause(x);
  415. T[x] = setTimeout(function () {
  416. !w.infiniteSlider && D[x] > v.length - 1 && (D[x] -= z);
  417. k.changeSlide(D[x] + H[x] + 1, a, b, e,
  418. c, d, g, f, h, p, q, v, G, x, t, z, r, w);
  419. k.autoSlide(a, b, e, c, d, g, f, h, p, q, v, G, x, t, z, r, w)
  420. }, w.autoSlideTimer + w.autoSlideTransTimer)
  421. }, autoSlidePause: function (a) {
  422. clearTimeout(T[a])
  423. }, isUnselectable: function (b, c) {
  424. return "" != c.unselectableSelector && 1 == a(b).closest(c.unselectableSelector).length ? !0 : !1
  425. }, slowScrollHorizontalIntervalTimer: function (a, b, e, c, d, g, f, h, p, q, v, x, G, t, z, r, w, n, F, D) {
  426. return setTimeout(function () {
  427. k.slowScrollHorizontalInterval(b, e, c, d, g, f, h, p, q, v, x, G, t, z, r, w, n, F, D)
  428. }, a)
  429. }, onSlideCompleteTimer: function (a,
  430. b, e, c, d, g) {
  431. return setTimeout(function () {
  432. k.onSlideComplete(b, e, c, d, g)
  433. }, a)
  434. }, hideScrollbarIntervalTimer: function (a, b, e, c, d, g, f, h, p, q) {
  435. return setTimeout(function () {
  436. k.hideScrollbarInterval(b, e, c, d, g, f, h, p, q)
  437. }, a)
  438. }, updateBackfaceVisibilityTimer: function (a, b, e, c, d) {
  439. return setTimeout(function () {
  440. k.updateBackfaceVisibility(b, e, c, d)
  441. }, a)
  442. }, updateBackfaceVisibility: function (b, c, e, d) {
  443. c = (D[c] + H[c] + e) % e;
  444. for (var l = [], g = 0; g < 2 * d.hardwareAccelBuffer; g++) {
  445. var f = k.mod(c + g - d.hardwareAccelBuffer, e);
  446. if ("visible" == a(b).eq(f).css("-webkit-backface-visibility")) {
  447. l[l.length] =
  448. f;
  449. var h = k.mod(f + 2 * d.hardwareAccelBuffer, e), m = k.mod(f - 2 * d.hardwareAccelBuffer, e);
  450. a(b).eq(f).css("-webkit-backface-visibility", "hidden");
  451. -1 == l.indexOf(m) && a(b).eq(m).css("-webkit-backface-visibility", "");
  452. -1 == l.indexOf(h) && a(b).eq(h).css("-webkit-backface-visibility", "")
  453. }
  454. }
  455. }, mod: function (a, b) {
  456. a %= b;
  457. return 0 > a ? a + b : a
  458. }, args: function (b, c, e, d, f, g) {
  459. this.prevSlideNumber = void 0 == a(e).parent().data("args") ? void 0 : a(e).parent().data("args").prevSlideNumber;
  460. this.prevSlideObject = void 0 == a(e).parent().data("args") ?
  461. void 0 : a(e).parent().data("args").prevSlideObject;
  462. this.targetSlideNumber = g + 1;
  463. this.targetSlideObject = a(e).children(":eq(" + g + ")");
  464. this.slideChanged = !1;
  465. "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" ==
  466. b && (this.slideChanged = a(e).parent().data("args").slideChanged);
  467. this.settings = c;
  468. this.data = a(e).parent().data("iosslider");
  469. this.sliderObject = e;
  470. this.sliderContainerObject = a(e).parent();
  471. this.currentSlideObject = d;
  472. this.currentSlideNumber = f + 1;
  473. this.currentSliderOffset = -1 * k.getSliderOffset(e, "x")
  474. }, preventDrag: function (a) {
  475. a.preventDefault()
  476. }, preventClick: function (a) {
  477. a.stopImmediatePropagation();
  478. return !1
  479. }, enableClick: function () {
  480. return !0
  481. }
  482. };
  483. k.setBrowserInfo();
  484. var da = {
  485. init: function (y, m) {
  486. G = k.has3DTransform();
  487. var e =
  488. a.extend(!0, {
  489. elasticPullResistance: .6,
  490. frictionCoefficient: .92,
  491. elasticFrictionCoefficient: .6,
  492. snapFrictionCoefficient: .92,
  493. snapToChildren: !1,
  494. snapSlideCenter: !1,
  495. startAtSlide: 1,
  496. scrollbar: !1,
  497. scrollbarDrag: !1,
  498. scrollbarHide: !0,
  499. scrollbarPaging: !1,
  500. scrollbarLocation: "top",
  501. scrollbarContainer: "",
  502. scrollbarOpacity: .4,
  503. scrollbarHeight: "4px",
  504. scrollbarBorder: "0",
  505. scrollbarMargin: "5px",
  506. scrollbarBackground: "#000",
  507. scrollbarBorderRadius: "100px",
  508. scrollbarShadow: "0 0 0 #000",
  509. scrollbarElasticPullResistance: .9,
  510. desktopClickDrag: !1,
  511. keyboardControls: !1,
  512. tabToAdvance: !1,
  513. responsiveSlideContainer: !0,
  514. responsiveSlides: !0,
  515. navSlideSelector: "",
  516. navPrevSelector: "",
  517. navNextSelector: "",
  518. autoSlideToggleSelector: "",
  519. autoSlide: !1,
  520. autoSlideTimer: 5E3,
  521. autoSlideTransTimer: 750,
  522. autoSlideHoverPause: !0,
  523. infiniteSlider: !1,
  524. snapVelocityThreshold: 5,
  525. slideStartVelocityThreshold: 0,
  526. horizontalSlideLockThreshold: 5,
  527. verticalSlideLockThreshold: 3,
  528. hardwareAccelBuffer: 5,
  529. stageCSS: {position: "relative", top: "0", left: "0", overflow: "hidden", zIndex: 1},
  530. unselectableSelector: "",
  531. onSliderLoaded: "",
  532. onSliderUpdate: "",
  533. onSliderResize: "",
  534. onSlideStart: "",
  535. onSlideChange: "",
  536. onSlideComplete: ""
  537. }, y);
  538. void 0 == m && (m = this);
  539. return a(m).each(function (l) {
  540. function E() {
  541. k.autoSlidePause(g);
  542. ya = a(K).find("a");
  543. Da = a(K).find("[onclick]");
  544. sa = a(K).find("*");
  545. a(F).css("width", "");
  546. a(F).css("height", "");
  547. a(K).css("width", "");
  548. I = a(K).children().not("script").get();
  549. oa = [];
  550. S = [];
  551. e.responsiveSlides && a(I).css("width", "100%");
  552. w[g] = 0;
  553. u = [];
  554. r = a(F).parent().width();
  555. J = a(F).outerWidth(!0);
  556. e.responsiveSlideContainer && (J =
  557. a(F).outerWidth(!0) > r ? r : a(F).width());
  558. a(F).css({
  559. position: e.stageCSS.position,
  560. top: e.stageCSS.top,
  561. left: e.stageCSS.left,
  562. overflow: e.stageCSS.overflow,
  563. zIndex: e.stageCSS.zIndex,
  564. webkitPerspective: 1E3,
  565. webkitBackfaceVisibility: "hidden",
  566. msTouchAction: "pan-y",
  567. width: J
  568. });
  569. a(e.unselectableSelector).css({cursor: "default"});
  570. for (var b = 0; b < I.length; b++) {
  571. oa[b] = a(I[b]).width();
  572. S[b] = a(I[b]).outerWidth(!0);
  573. var c = S[b];
  574. 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}));
  575. a(I[b]).css({
  576. overflow: "hidden",
  577. position: "absolute"
  578. });
  579. u[b] = -1 * w[g];
  580. w[g] = w[g] + c + (S[b] - oa[b])
  581. }
  582. e.snapSlideCenter && (n = .5 * (J - S[0]), e.responsiveSlides && S[0] > J && (n = 0));
  583. ca[g] = 2 * w[g];
  584. for (b = 0; b < I.length; b++) k.setSliderOffset(a(I[b]), -1 * u[b] + w[g] + n), u[b] -= w[g];
  585. if (!e.infiniteSlider && !e.snapSlideCenter) {
  586. for (b = 0; b < u.length && !(u[b] <= -1 * (2 * w[g] - J)); b++) Ea = b;
  587. u.splice(Ea + 1, u.length);
  588. u[u.length] = -1 * (2 * w[g] - J)
  589. }
  590. for (b = 0; b < u.length; b++) Z[b] = u[b];
  591. wa && (U[g].startAtSlide = U[g].startAtSlide > u.length ? u.length : U[g].startAtSlide, e.infiniteSlider ? (U[g].startAtSlide =
  592. (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]);
  593. q[g] = w[g] + n;
  594. a(K).css({
  595. position: "relative",
  596. cursor: v,
  597. webkitPerspective: "0",
  598. webkitBackfaceVisibility: "hidden",
  599. width: w[g] + "px"
  600. });
  601. fa = w[g];
  602. w[g] = 2 * w[g] - J + 2 * n;
  603. (ha = fa + n < J || 0 == J ? !0 : !1) && a(K).css({cursor: "default"});
  604. T = a(F).parent().outerHeight(!0);
  605. R = a(F).height();
  606. e.responsiveSlideContainer && (R = R > T ? T : R);
  607. a(F).css({height: R});
  608. k.setSliderOffset(K, u[D[g]]);
  609. if (e.infiniteSlider && !ha) {
  610. b = k.getSliderOffset(a(K), "x");
  611. for (c = (H[g] + M) % M * -1; 0 > c;) {
  612. var d = 0, l = k.getSliderOffset(a(I[0]), "x");
  613. a(I).each(function (a) {
  614. k.getSliderOffset(this, "x") < l && (l = k.getSliderOffset(this, "x"), d = a)
  615. });
  616. var f = q[g] + fa;
  617. k.setSliderOffset(a(I)[d], f);
  618. q[g] = -1 * u[1] + n;
  619. w[g] = q[g] + fa - J;
  620. u.splice(0, 1);
  621. u.splice(u.length, 0, -1 * f + n);
  622. c++
  623. }
  624. for (; 0 < -1 * u[0] - fa + n && e.snapSlideCenter && wa;) {
  625. var h = 0, E = k.getSliderOffset(a(I[0]), "x");
  626. a(I).each(function (a) {
  627. k.getSliderOffset(this, "x") > E && (E = k.getSliderOffset(this, "x"),
  628. h = a)
  629. });
  630. f = q[g] - S[h];
  631. k.setSliderOffset(a(I)[h], f);
  632. u.splice(0, 0, -1 * f + n);
  633. u.splice(u.length - 1, 1);
  634. q[g] = -1 * u[0] + n;
  635. w[g] = q[g] + fa - J;
  636. H[g]--;
  637. D[g]++
  638. }
  639. for (; b <= -1 * w[g];) d = 0, l = k.getSliderOffset(a(I[0]), "x"), a(I).each(function (a) {
  640. k.getSliderOffset(this, "x") < l && (l = k.getSliderOffset(this, "x"), d = a)
  641. }), 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]--
  642. }
  643. k.setSliderOffset(K, u[D[g]]);
  644. k.updateBackfaceVisibility(I, g, M, e);
  645. e.desktopClickDrag || a(K).css({cursor: "default"});
  646. e.scrollbar && (a("." + Q).css({
  647. margin: e.scrollbarMargin,
  648. overflow: "hidden",
  649. display: "none"
  650. }), 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({
  651. position: "absolute",
  652. left: 0,
  653. width: t - B + "px",
  654. margin: e.scrollbarMargin
  655. }),
  656. "top" == e.scrollbarLocation ? a("." + Q).css("top", "0") : a("." + Q).css("bottom", "0"), a("." + Q + " ." + L).css({
  657. borderRadius: e.scrollbarBorderRadius,
  658. background: e.scrollbarBackground,
  659. height: e.scrollbarHeight,
  660. width: z - V + "px",
  661. minWidth: e.scrollbarHeight,
  662. border: e.scrollbarBorder,
  663. webkitPerspective: 1E3,
  664. webkitBackfaceVisibility: "hidden",
  665. position: "relative",
  666. opacity: xa,
  667. filter: "alpha(opacity:" + 100 * xa + ")",
  668. boxShadow: e.scrollbarShadow
  669. }), k.setSliderOffset(a("." + Q + " ." + L), Math.floor((-1 * u[D[g]] - q[g] + n) / (w[g] - q[g] + n) * (t - B - z))),
  670. a("." + Q).css({display: "block"}), A = a("." + Q + " ." + L), N = a("." + Q));
  671. e.scrollbarDrag && !ha && a("." + Q + " ." + L).css({cursor: v});
  672. e.infiniteSlider && (aa = (w[g] + J) / 3);
  673. "" != e.navSlideSelector && a(e.navSlideSelector).each(function (b) {
  674. a(this).css({cursor: "pointer"});
  675. a(this).unbind(ea).bind(ea, function (c) {
  676. "touchstart" == c.type ? a(this).unbind("click.iosSliderEvent") : a(this).unbind("touchstart.iosSliderEvent");
  677. ea = c.type + ".iosSliderEvent";
  678. k.changeSlide(b, K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e)
  679. })
  680. });
  681. "" != e.navPrevSelector && (a(e.navPrevSelector).css({cursor: "pointer"}),
  682. a(e.navPrevSelector).unbind(ea).bind(ea, function (b) {
  683. "touchstart" == b.type ? a(this).unbind("click.iosSliderEvent") : a(this).unbind("touchstart.iosSliderEvent");
  684. ea = b.type + ".iosSliderEvent";
  685. b = (D[g] + H[g] + M) % M;
  686. (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)
  687. }));
  688. "" != e.navNextSelector && (a(e.navNextSelector).css({cursor: "pointer"}), a(e.navNextSelector).unbind(ea).bind(ea, function (b) {
  689. "touchstart" == b.type ? a(this).unbind("click.iosSliderEvent") : a(this).unbind("touchstart.iosSliderEvent");
  690. ea = b.type + ".iosSliderEvent";
  691. b = (D[g] + H[g] + M) % M;
  692. (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)
  693. }));
  694. e.autoSlide && !ha && "" != e.autoSlideToggleSelector && (a(e.autoSlideToggleSelector).css({cursor: "pointer"}), a(e.autoSlideToggleSelector).unbind(ea).bind(ea, function (b) {
  695. "touchstart" == b.type ? a(this).unbind("click.iosSliderEvent") : a(this).unbind("touchstart.iosSliderEvent");
  696. ea = b.type + ".iosSliderEvent";
  697. 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")) :
  698. (k.autoSlidePause(g), qa = !0, a(e.autoSlideToggleSelector).addClass("on"))
  699. }));
  700. k.autoSlide(K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e);
  701. a(F).bind("mouseleave.iosSliderEvent", function () {
  702. if (qa) return !0;
  703. k.autoSlide(K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e)
  704. });
  705. a(F).bind("touchend.iosSliderEvent", function () {
  706. if (qa) return !0;
  707. k.autoSlide(K, I, m, L, z, J, t, B, V, Z, u, S, g, aa, M, n, e)
  708. });
  709. e.autoSlideHoverPause && a(F).bind("mouseenter.iosSliderEvent", function () {
  710. k.autoSlidePause(g)
  711. });
  712. a(F).data("iosslider", {
  713. obj: Fa,
  714. settings: e,
  715. scrollerNode: K,
  716. slideNodes: I,
  717. numberOfSlides: M,
  718. centeredSlideOffset: n,
  719. sliderNumber: g,
  720. originalOffsets: Z,
  721. childrenOffsets: u,
  722. sliderMax: w[g],
  723. scrollbarClass: L,
  724. scrollbarWidth: z,
  725. scrollbarStageWidth: t,
  726. stageWidth: J,
  727. scrollMargin: B,
  728. scrollBorder: V,
  729. infiniteSliderOffset: H[g],
  730. infiniteSliderWidth: aa,
  731. slideNodeOuterWidths: S,
  732. shortContent: ha
  733. });
  734. wa = !1;
  735. return !0
  736. }
  737.  
  738. b++;
  739. var g = b, m = [];
  740. U[g] = a.extend({}, e);
  741. q[g] = 0;
  742. w[g] = 0;
  743. var y = [0, 0], G = [0, 0], Q = "scrollbarBlock" + b, L = "scrollbar" + b, A, N, t, z, r, T, n = 0,
  744. F = a(this), J, R, B, V, Ca, wa = !0;
  745. l = -1;
  746. var u, Z = [], xa = 0, la = 0, Ga = 0, K = a(this).children(":first-child"),
  747. I, oa, S, M = a(K).children().not("script").length, ia = !1, Ea = 0, za = !1, ta = void 0, aa;
  748. H[g] = 0;
  749. var ha = !1, qa = !1;
  750. pa[g] = !1;
  751. var ma, ua = !1, ra = !1, ea = "touchstart.iosSliderEvent click.iosSliderEvent", fa, ya, Da, sa;
  752. ja[g] = !1;
  753. Y[g] = [];
  754. e.scrollbarDrag && (e.scrollbar = !0, e.scrollbarHide = !1);
  755. var Fa = a(this);
  756. if (void 0 != Fa.data("iosslider")) return !0;
  757. 14.2 <= parseInt(a().jquery.split(".").join(""), 10) ? a(this).delegate("img", "dragstart.iosSliderEvent", function (a) {
  758. a.preventDefault()
  759. }) : a(this).find("img").bind("dragstart.iosSliderEvent",
  760. function (a) {
  761. a.preventDefault()
  762. });
  763. e.infiniteSlider && (e.scrollbar = !1);
  764. e.infiniteSlider && 1 == M && (e.infiniteSlider = !1);
  765. 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>"));
  766. if (!E()) return !0;
  767. a(this).find("a").bind("mousedown", k.preventDrag);
  768. a(this).find("[onclick]").bind("click", k.preventDrag).each(function () {
  769. a(this).data("onclick", this.onclick)
  770. });
  771. l = k.calcActiveOffset(e,
  772. k.getSliderOffset(a(K), "x"), u, J, H[g], M, void 0, g);
  773. l = (l + H[g] + M) % M;
  774. l = new k.args("load", e, K, a(K).children(":eq(" + l + ")"), l, l);
  775. a(F).data("args", l);
  776. if ("" != e.onSliderLoaded) e.onSliderLoaded(l);
  777. e.scrollbarPaging && e.scrollbar && !ha && (a(N).css("cursor", "pointer"), a(N).bind("click.iosSliderEvent", function (b) {
  778. this == b.target && (b.pageX > a(A).offset().left ? da.nextPage(F) : da.prevPage(F))
  779. }));
  780. if (U[g].responsiveSlides || U[g].responsiveSlideContainer) l = p ? "orientationchange" : "resize", a(window).bind(l + ".iosSliderEvent-" + g,
  781. function () {
  782. setTimeout(function () {
  783. if (!E()) return !0;
  784. var b = a(F).data("args");
  785. if ("" !== e.onSliderResize) e.onSliderResize(b)
  786. }, 50)
  787. });
  788. !e.keyboardControls && !e.tabToAdvance || ha || a(document).bind("keydown.iosSliderEvent", function (a) {
  789. W || P || (a = a.originalEvent);
  790. if ("INPUT" == a.target.nodeName || "TEXTAREA" == a.target.nodeName || ja[g]) return !0;
  791. 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 &&
  792. 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)
  793. });
  794. if (f || e.desktopClickDrag) {
  795. var na = !1, Aa = !1;
  796. l = a(K);
  797. var va = a(K), Ba = !1;
  798. e.scrollbarDrag && (l = l.add(A), va = va.add(N));
  799. a(l).bind("mousedown.iosSliderEvent touchstart.iosSliderEvent", function (b) {
  800. a(window).one("scroll.iosSliderEvent", function (a) {
  801. na = !1
  802. });
  803. if (na) return !0;
  804. na = !0;
  805. Aa = !1;
  806. "touchstart" == b.type ? a(va).unbind("mousedown.iosSliderEvent") :
  807. a(va).unbind("touchstart.iosSliderEvent");
  808. if (ja[g] || ha || (Ba = k.isUnselectable(b.target, e))) return ia = na = !1, !0;
  809. ma = a(this)[0] === a(A)[0] ? A : K;
  810. W || P || (b = b.originalEvent);
  811. k.autoSlidePause(g);
  812. sa.unbind(".disableClick");
  813. if ("touchstart" == b.type) eventX = b.touches[0].pageX, eventY = b.touches[0].pageY; else {
  814. if (window.getSelection) window.getSelection().empty ? window.getSelection().empty() : window.getSelection().removeAllRanges && window.getSelection().removeAllRanges(); else if (document.selection) if (P) try {
  815. document.selection.empty()
  816. } catch (Ia) {
  817. } else document.selection.empty();
  818. eventX = b.pageX;
  819. eventY = b.pageY;
  820. za = !0;
  821. ta = K;
  822. a(this).css({cursor: x})
  823. }
  824. y = [0, 0];
  825. G = [0, 0];
  826. c = 0;
  827. ia = !1;
  828. for (b = 0; b < m.length; b++) clearTimeout(m[b]);
  829. b = k.getSliderOffset(K, "x");
  830. 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"}));
  831. b = a(this)[0] === a(A)[0] ? q[g] : 0;
  832. la = -1 * (k.getSliderOffset(this, "x") - eventX - b);
  833. k.getSliderOffset(this, "y");
  834. y[1] = eventX;
  835. G[1] = eventY;
  836. ra = !1
  837. });
  838. a(document).bind("touchmove.iosSliderEvent mousemove.iosSliderEvent",
  839. function (b) {
  840. W || P || (b = b.originalEvent);
  841. if (ja[g] || ha || Ba || !na) return !0;
  842. var l = 0;
  843. if ("touchmove" == b.type) eventX = b.touches[0].pageX, eventY = b.touches[0].pageY; else {
  844. if (window.getSelection) window.getSelection().empty || window.getSelection().removeAllRanges && window.getSelection().removeAllRanges(); else if (document.selection) if (P) try {
  845. document.selection.empty()
  846. } catch (Ja) {
  847. } else document.selection.empty();
  848. eventX = b.pageX;
  849. eventY = b.pageY;
  850. if (!za || !X && ("undefined" != typeof b.webkitMovementX || "undefined" != typeof b.webkitMovementY) &&
  851. 0 === b.webkitMovementY && 0 === b.webkitMovementX) return !0
  852. }
  853. y[0] = y[1];
  854. y[1] = eventX;
  855. c = (y[1] - y[0]) / 2;
  856. G[0] = G[1];
  857. G[1] = eventY;
  858. d = (G[1] - G[0]) / 2;
  859. if (!ia) {
  860. var f = (D[g] + H[g] + M) % M;
  861. f = new k.args("start", e, K, a(K).children(":eq(" + f + ")"), f, void 0);
  862. a(F).data("args", f);
  863. if ("" != e.onSlideStart) e.onSlideStart(f)
  864. }
  865. (d > e.verticalSlideLockThreshold || d < -1 * e.verticalSlideLockThreshold) && "touchmove" == b.type && !ia && (ua = !0);
  866. (c > e.horizontalSlideLockThreshold || c < -1 * e.horizontalSlideLockThreshold) && "touchmove" == b.type && b.preventDefault();
  867. if (c >
  868. e.slideStartVelocityThreshold || c < -1 * e.slideStartVelocityThreshold) ia = !0;
  869. if (ia && !ua) {
  870. f = k.getSliderOffset(K, "x");
  871. var E = a(ma)[0] === a(A)[0] ? q[g] : n,
  872. m = a(ma)[0] === a(A)[0] ? (q[g] - w[g] - n) / (t - B - z) : 1,
  873. p = a(ma)[0] === a(A)[0] ? e.scrollbarElasticPullResistance : e.elasticPullResistance,
  874. r = e.snapSlideCenter && a(ma)[0] === a(A)[0] ? 0 : n,
  875. O = e.snapSlideCenter && a(ma)[0] === a(A)[0] ? n : 0;
  876. "touchmove" == b.type && (Ga != b.touches.length && (la = -1 * f + eventX), Ga = b.touches.length);
  877. if (e.infiniteSlider) {
  878. if (f <= -1 * w[g]) {
  879. var v = a(K).width();
  880. if (f <= -1 * ca[g]) {
  881. var x =
  882. -1 * Z[0];
  883. a(I).each(function (b) {
  884. k.setSliderOffset(a(I)[b], x + n);
  885. b < u.length && (u[b] = -1 * x);
  886. x += S[b]
  887. });
  888. la -= -1 * u[0];
  889. q[g] = -1 * u[0] + n;
  890. w[g] = q[g] + v - J;
  891. H[g] = 0
  892. } else {
  893. var C = 0, Q = k.getSliderOffset(a(I[0]), "x");
  894. a(I).each(function (a) {
  895. k.getSliderOffset(this, "x") < Q && (Q = k.getSliderOffset(this, "x"), C = a)
  896. });
  897. p = q[g] + v;
  898. k.setSliderOffset(a(I)[C], p);
  899. q[g] = -1 * u[1] + n;
  900. w[g] = q[g] + v - J;
  901. u.splice(0, 1);
  902. u.splice(u.length, 0, -1 * p + n);
  903. H[g]++
  904. }
  905. }
  906. if (f >= -1 * q[g] || 0 <= f) if (v = a(K).width(), 0 <= f) for (x = -1 * Z[0], a(I).each(function (b) {
  907. k.setSliderOffset(a(I)[b],
  908. x + n);
  909. b < u.length && (u[b] = -1 * x);
  910. x += S[b]
  911. }), 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;) {
  912. var T = 0, N = k.getSliderOffset(a(I[0]), "x");
  913. a(I).each(function (a) {
  914. k.getSliderOffset(this, "x") > N && (N = k.getSliderOffset(this, "x"), T = a)
  915. });
  916. p = q[g] - S[T];
  917. k.setSliderOffset(a(I)[T], p);
  918. u.splice(0, 0, -1 * p + n);
  919. u.splice(u.length - 1, 1);
  920. q[g] = -1 * u[0] + n;
  921. w[g] = q[g] + v - J;
  922. H[g]--;
  923. D[g]++
  924. } else T = 0, N = k.getSliderOffset(a(I[0]), "x"), a(I).each(function (a) {
  925. k.getSliderOffset(this, "x") > N && (N = k.getSliderOffset(this, "x"), T = a)
  926. }), p = q[g] -
  927. 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]--
  928. } 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);
  929. k.setSliderOffset(K, -1 * (la - E - eventX - l) * m - E + O);
  930. 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("." +
  931. L), h), a("." + L).css({width: f + "px"})) : k.setSliderOffset(a("." + L), h));
  932. "touchmove" == b.type && (Ca = b.touches[0].pageX);
  933. b = !1;
  934. l = k.calcActiveOffset(e, -1 * (la - eventX - l), u, J, H[g], M, void 0, g);
  935. f = (l + H[g] + M) % M;
  936. e.infiniteSlider ? f != ba[g] && (b = !0) : l != D[g] && (b = !0);
  937. if (b) {
  938. D[g] = l;
  939. ba[g] = f;
  940. ra = !0;
  941. f = new k.args("change", e, K, a(K).children(":eq(" + f + ")"), f, f);
  942. a(F).data("args", f);
  943. if ("" != e.onSlideChange) e.onSlideChange(f);
  944. k.updateBackfaceVisibility(I, g, M, e)
  945. }
  946. }
  947. });
  948. var Ha = a(window);
  949. if (P || W) Ha = a(document);
  950. a(l).bind("touchcancel.iosSliderEvent touchend.iosSliderEvent",
  951. function (a) {
  952. a = a.originalEvent;
  953. if (Aa) return !1;
  954. Aa = !0;
  955. if (ja[g] || ha || Ba) return !0;
  956. 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);
  957. na = ua = !1;
  958. return !0
  959. });
  960. a(Ha).bind("mouseup.iosSliderEvent-" + g, function (b) {
  961. ia ? ya.unbind("click.disableClick").bind("click.disableClick", k.preventClick) : ya.unbind("click.disableClick").bind("click.disableClick",
  962. k.enableClick);
  963. Da.each(function () {
  964. this.onclick = function (b) {
  965. if (ia) return !1;
  966. a(this).data("onclick") && a(this).data("onclick").call(this, b || window.event)
  967. };
  968. this.onclick = a(this).data("onclick")
  969. });
  970. 1.8 <= parseFloat(a().jquery) ? sa.each(function () {
  971. var b = a._data(this, "events");
  972. if (void 0 != b && void 0 != b.click && "iosSliderEvent" != b.click[0].namespace) {
  973. if (!ia) return !1;
  974. a(this).one("click.disableClick", k.preventClick);
  975. b = a._data(this, "events").click;
  976. var e = b.pop();
  977. b.splice(0, 0, e)
  978. }
  979. }) : 1.6 <= parseFloat(a().jquery) && sa.each(function () {
  980. var b =
  981. a(this).data("events");
  982. if (void 0 != b && void 0 != b.click && "iosSliderEvent" != b.click[0].namespace) {
  983. if (!ia) return !1;
  984. a(this).one("click.disableClick", k.preventClick);
  985. b = a(this).data("events").click;
  986. var e = b.pop();
  987. b.splice(0, 0, e)
  988. }
  989. });
  990. if (!pa[g]) {
  991. if (ha) return !0;
  992. e.desktopClickDrag && a(K).css({cursor: v});
  993. e.scrollbarDrag && a(A).css({cursor: v});
  994. za = !1;
  995. if (void 0 == ta) return !0;
  996. k.slowScrollHorizontal(ta, I, m, L, c, d, z, J, t, B, V, Z, u, S, g, aa, M, ma, ra, n, e);
  997. ta = void 0
  998. }
  999. na = ua = !1
  1000. })
  1001. }
  1002. })
  1003. }, destroy: function (b, c) {
  1004. void 0 == c && (c = this);
  1005. return a(c).each(function () {
  1006. var e =
  1007. a(this), c = e.data("iosslider");
  1008. if (void 0 == c) return !1;
  1009. void 0 == b && (b = !0);
  1010. k.autoSlidePause(c.sliderNumber);
  1011. pa[c.sliderNumber] = !0;
  1012. a(window).unbind(".iosSliderEvent-" + c.sliderNumber);
  1013. a(document).unbind(".iosSliderEvent-" + c.sliderNumber);
  1014. a(document).unbind("keydown.iosSliderEvent");
  1015. a(this).unbind(".iosSliderEvent");
  1016. a(this).children(":first-child").unbind(".iosSliderEvent");
  1017. a(this).children(":first-child").children().unbind(".iosSliderEvent");
  1018. a(c.settings.scrollbarBlockNode).unbind(".iosSliderEvent");
  1019. b &&
  1020. (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", ""));
  1021. c.settings.scrollbar && a(".scrollbarBlock" + c.sliderNumber).remove();
  1022. c = Y[c.sliderNumber];
  1023. for (var d = 0; d < c.length; d++) clearTimeout(c[d]);
  1024. e.removeData("iosslider");
  1025. e.removeData("args")
  1026. })
  1027. }, update: function (b) {
  1028. void 0 == b && (b = this);
  1029. return a(b).each(function () {
  1030. var b = a(this), e = b.data("iosslider");
  1031. if (void 0 == e) return !1;
  1032. e.settings.startAtSlide = b.data("args").currentSlideNumber;
  1033. da.destroy(!1, this);
  1034. 1 != e.numberOfSlides && e.settings.infiniteSlider && (e.settings.startAtSlide = (D[e.sliderNumber] + 1 + H[e.sliderNumber] + e.numberOfSlides) % e.numberOfSlides);
  1035. da.init(e.settings, this);
  1036. b = new k.args("update", e.settings, e.scrollerNode, a(e.scrollerNode).children(":eq(" +
  1037. (e.settings.startAtSlide - 1) + ")"), e.settings.startAtSlide - 1, e.settings.startAtSlide - 1);
  1038. a(e.stageNode).data("args", b);
  1039. if ("" != e.settings.onSliderUpdate) e.settings.onSliderUpdate(b)
  1040. })
  1041. }, addSlide: function (b, c) {
  1042. return this.each(function () {
  1043. var e = a(this), d = e.data("iosslider");
  1044. if (void 0 == d) return !1;
  1045. 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(" +
  1046. (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++);
  1047. e.data("iosslider").numberOfSlides++;
  1048. da.update(this)
  1049. })
  1050. }, removeSlide: function (b) {
  1051. return this.each(function () {
  1052. var c = a(this), e = c.data("iosslider");
  1053. if (void 0 == e) return !1;
  1054. a(e.scrollerNode).children(":eq(" +
  1055. (b - 1) + ")").remove();
  1056. D[e.sliderNumber] > b - 1 && D[e.sliderNumber]--;
  1057. c.data("iosslider").numberOfSlides--;
  1058. da.update(this)
  1059. })
  1060. }, goToSlide: function (b, c, e) {
  1061. void 0 == e && (e = this);
  1062. return a(e).each(function () {
  1063. var e = a(this).data("iosslider");
  1064. if (void 0 == e || e.shortContent) return !1;
  1065. b = b > e.childrenOffsets.length ? e.childrenOffsets.length - 1 : b - 1;
  1066. void 0 != c && (e.settings.autoSlideTransTimer = c);
  1067. k.changeSlide(b, a(e.scrollerNode), a(e.slideNodes), Y[e.sliderNumber], e.scrollbarClass, e.scrollbarWidth, e.stageWidth, e.scrollbarStageWidth,
  1068. e.scrollMargin, e.scrollBorder, e.originalOffsets, e.childrenOffsets, e.slideNodeOuterWidths, e.sliderNumber, e.infiniteSliderWidth, e.numberOfSlides, e.centeredSlideOffset, e.settings)
  1069. })
  1070. }, prevSlide: function (b) {
  1071. return this.each(function () {
  1072. var c = a(this).data("iosslider");
  1073. if (void 0 == c || c.shortContent) return !1;
  1074. var e = (D[c.sliderNumber] + H[c.sliderNumber] + c.numberOfSlides) % c.numberOfSlides;
  1075. void 0 != b && (c.settings.autoSlideTransTimer = b);
  1076. (0 < e || c.settings.infiniteSlider) && k.changeSlide(e - 1, a(c.scrollerNode), a(c.slideNodes),
  1077. 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);
  1078. D[c.sliderNumber] = e
  1079. })
  1080. }, nextSlide: function (b) {
  1081. return this.each(function () {
  1082. var c = a(this).data("iosslider");
  1083. if (void 0 == c || c.shortContent) return !1;
  1084. var e = (D[c.sliderNumber] + H[c.sliderNumber] + c.numberOfSlides) % c.numberOfSlides;
  1085. void 0 != b && (c.settings.autoSlideTransTimer =
  1086. b);
  1087. (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);
  1088. D[c.sliderNumber] = e
  1089. })
  1090. }, prevPage: function (b, c) {
  1091. void 0 == c && (c = this);
  1092. return a(c).each(function () {
  1093. var c = a(this).data("iosslider");
  1094. if (void 0 == c) return !1;
  1095. var d = k.getSliderOffset(c.scrollerNode, "x") + c.stageWidth;
  1096. void 0 != b && (c.settings.autoSlideTransTimer = b);
  1097. 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)
  1098. })
  1099. }, nextPage: function (b, c) {
  1100. void 0 == c && (c = this);
  1101. return a(c).each(function () {
  1102. var c =
  1103. a(this).data("iosslider");
  1104. if (void 0 == c) return !1;
  1105. var d = k.getSliderOffset(c.scrollerNode, "x") - c.stageWidth;
  1106. void 0 != b && (c.settings.autoSlideTransTimer = b);
  1107. 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)
  1108. })
  1109. }, lock: function () {
  1110. return this.each(function () {
  1111. var b =
  1112. a(this).data("iosslider");
  1113. if (void 0 == b || b.shortContent) return !1;
  1114. a(b.scrollerNode).css({cursor: "default"});
  1115. ja[b.sliderNumber] = !0
  1116. })
  1117. }, unlock: function () {
  1118. return this.each(function () {
  1119. var b = a(this).data("iosslider");
  1120. if (void 0 == b || b.shortContent) return !1;
  1121. a(b.scrollerNode).css({cursor: v});
  1122. ja[b.sliderNumber] = !1
  1123. })
  1124. }, getData: function () {
  1125. return this.each(function () {
  1126. var b = a(this).data("iosslider");
  1127. return void 0 == b || b.shortContent ? !1 : b
  1128. })
  1129. }, autoSlidePause: function () {
  1130. return this.each(function () {
  1131. var b = a(this).data("iosslider");
  1132. if (void 0 == b || b.shortContent) return !1;
  1133. U[b.sliderNumber].autoSlide = !1;
  1134. k.autoSlidePause(b.sliderNumber);
  1135. return b
  1136. })
  1137. }, autoSlidePlay: function () {
  1138. return this.each(function () {
  1139. var b = a(this).data("iosslider");
  1140. if (void 0 == b || b.shortContent) return !1;
  1141. U[b.sliderNumber].autoSlide = !0;
  1142. 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,
  1143. b.infiniteSliderWidth, b.numberOfSlides, b.centeredSlideOffset, b.settings);
  1144. return b
  1145. })
  1146. }
  1147. };
  1148. a.fn.iosSlider = function (b) {
  1149. if (da[b]) return da[b].apply(this, Array.prototype.slice.call(arguments, 1));
  1150. if ("object" !== typeof b && b) a.error("invalid method call!"); else return da.init.apply(this, arguments)
  1151. }
  1152. })(jQuery);
  1153. (function (a) {
  1154. var b, c, d, h, f, p, G, W = function () {
  1155. }, P = !!window.jQuery, X = a(window), B = function (a, c) {
  1156. b.ev.on("mfp" + a + ".mfp", c)
  1157. }, v = function (b, c, d, f) {
  1158. var e = document.createElement("div");
  1159. return e.className = "mfp-" + b, d && (e.innerHTML = d), f ? c && c.appendChild(e) : (e = a(e), c && e.appendTo(c)), e
  1160. }, x = function (c, d) {
  1161. b.ev.triggerHandler("mfp" + c, d);
  1162. 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]))
  1163. }, T = function (c) {
  1164. return c === G && b.currTemplate.closeBtn || (b.currTemplate.closeBtn =
  1165. a(b.st.closeMarkup.replace("%title%", b.st.tClose)), G = c), b.currTemplate.closeBtn
  1166. }, U = function () {
  1167. a.magnificPopup.instance || (b = new W, b.init(), a.magnificPopup.instance = b)
  1168. }, pa = function () {
  1169. var b = document.createElement("p").style, a = ["ms", "O", "Moz", "Webkit"];
  1170. if (void 0 !== b.transition) return !0;
  1171. for (; a.length;) if (a.pop() + "Transition" in b) return !0;
  1172. return !1
  1173. };
  1174. W.prototype = {
  1175. constructor: W, init: function () {
  1176. var c = navigator.appVersion;
  1177. b.isIE7 = -1 !== c.indexOf("MSIE 7.");
  1178. b.isIE8 = -1 !== c.indexOf("MSIE 8.");
  1179. b.isLowIE = b.isIE7 ||
  1180. b.isIE8;
  1181. b.isAndroid = /android/gi.test(c);
  1182. b.isIOS = /iphone|ipad|ipod/gi.test(c);
  1183. b.supportsTransition = pa();
  1184. b.probablyMobile = b.isAndroid || b.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent);
  1185. h = a(document);
  1186. b.popupsCache = {}
  1187. }, open: function (c) {
  1188. d || (d = a(document.body));
  1189. var e;
  1190. if (!1 === c.isObj) {
  1191. b.items = c.items.toArray();
  1192. b.index = 0;
  1193. var f, g = c.items;
  1194. for (e = 0; g.length > e; e++) if (f = g[e], f.parsed && (f = f.el[0]), f === c.el[0]) {
  1195. b.index = e;
  1196. break
  1197. }
  1198. } else b.items = a.isArray(c.items) ?
  1199. c.items : [c.items], b.index = c.index || 0;
  1200. if (b.isOpen) return b.updateItemHTML(), void 0;
  1201. b.types = [];
  1202. p = "";
  1203. b.ev = c.mainEl && c.mainEl.length ? c.mainEl.eq(0) : h;
  1204. c.key ? (b.popupsCache[c.key] || (b.popupsCache[c.key] = {}), b.currTemplate = b.popupsCache[c.key]) : b.currTemplate = {};
  1205. b.st = a.extend(!0, {}, a.magnificPopup.defaults, c);
  1206. b.fixedContentPos = "auto" === b.st.fixedContentPos ? !b.probablyMobile : b.st.fixedContentPos;
  1207. b.st.modal && (b.st.closeOnContentClick = !1, b.st.closeOnBgClick = !1, b.st.showCloseBtn = !1, b.st.enableEscapeKey = !1);
  1208. b.bgOverlay || (b.bgOverlay = v("bg").on("click.mfp", function () {
  1209. b.close()
  1210. }), b.wrap = v("wrap").attr("tabindex", -1).on("click.mfp", function (a) {
  1211. b._checkIfClose(a.target) && b.close()
  1212. }), b.container = v("container", b.wrap));
  1213. b.contentContainer = v("content");
  1214. b.st.preloader && (b.preloader = v("preloader", b.container, b.st.tLoading));
  1215. f = a.magnificPopup.modules;
  1216. for (e = 0; f.length > e; e++) g = f[e], g = g.charAt(0).toUpperCase() + g.slice(1), b["init" + g].call(b);
  1217. x("BeforeOpen");
  1218. b.st.showCloseBtn && (b.st.closeBtnInside ? (B("MarkupParse",
  1219. function (b, a, c, e) {
  1220. c.close_replaceWith = T(e.type)
  1221. }), p += " mfp-close-btn-in") : b.wrap.append(T()));
  1222. b.st.alignTop && (p += " mfp-align-top");
  1223. b.fixedContentPos ? b.wrap.css({
  1224. overflow: b.st.overflowY,
  1225. overflowX: "hidden",
  1226. overflowY: b.st.overflowY
  1227. }) : b.wrap.css({top: X.scrollTop(), position: "absolute"});
  1228. (!1 === b.st.fixedBgPos || "auto" === b.st.fixedBgPos && !b.fixedContentPos) && b.bgOverlay.css({
  1229. height: h.height(),
  1230. position: "absolute"
  1231. });
  1232. b.st.enableEscapeKey && h.on("keyup.mfp", function (a) {
  1233. 27 === a.keyCode && b.close()
  1234. });
  1235. X.on("resize.mfp",
  1236. function () {
  1237. b.updateSize()
  1238. });
  1239. b.st.closeOnContentClick || (p += " mfp-auto-cursor");
  1240. p && b.wrap.addClass(p);
  1241. e = b.wH = X.height();
  1242. f = {};
  1243. b.fixedContentPos && b._hasScrollBar(e) && (g = b._getScrollbarSize()) && (f.marginRight = g);
  1244. b.fixedContentPos && (b.isIE7 ? a("body, html").css("overflow", "hidden") : f.overflow = "hidden");
  1245. g = b.st.mainClass;
  1246. 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,
  1247. setTimeout(function () {
  1248. b.content ? (b._addClassToMFP("mfp-ready"), b._setFocus()) : b.bgOverlay.addClass("mfp-ready");
  1249. h.on("focusin.mfp", b._onFocusIn)
  1250. }, 16), b.isOpen = !0, b.updateSize(e), x("Open"), c
  1251. }, close: function () {
  1252. b.isOpen && (x("BeforeClose"), b.isOpen = !1, b.st.removalDelay && !b.isLowIE && b.supportsTransition ? (b._addClassToMFP("mfp-removing"), setTimeout(function () {
  1253. b._close()
  1254. }, b.st.removalDelay)) : b._close())
  1255. }, _close: function () {
  1256. x("Close");
  1257. var c = "mfp-removing mfp-ready ";
  1258. if (b.bgOverlay.detach(), b.wrap.detach(),
  1259. 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);
  1260. h.off("keyup.mfp focusin.mfp");
  1261. b.ev.off(".mfp");
  1262. b.wrap.attr("class", "mfp-wrap").removeAttr("style");
  1263. b.bgOverlay.attr("class", "mfp-bg");
  1264. b.container.attr("class", "mfp-container");
  1265. !b.st.showCloseBtn || b.st.closeBtnInside && !0 !== b.currTemplate[b.currItem.type] || b.currTemplate.closeBtn && b.currTemplate.closeBtn.detach();
  1266. b._lastFocusedEl && a(b._lastFocusedEl).focus();
  1267. b.currItem = null;
  1268. b.content = null;
  1269. b.currTemplate = null;
  1270. b.prevHeight = 0;
  1271. x("AfterClose")
  1272. }, updateSize: function (a) {
  1273. b.isIOS ? (a = document.documentElement.clientWidth / window.innerWidth * window.innerHeight, b.wrap.css("height", a), b.wH = a) : b.wH = a || X.height();
  1274. b.fixedContentPos || b.wrap.css("height", b.wH);
  1275. x("Resize")
  1276. }, updateItemHTML: function () {
  1277. var c = b.items[b.index];
  1278. b.contentContainer.detach();
  1279. b.content && b.content.detach();
  1280. c.parsed || (c = b.parseEl(b.index));
  1281. var d = c.type;
  1282. if (x("BeforeChange",
  1283. [b.currItem ? b.currItem.type : "", d]), b.currItem = c, !b.currTemplate[d]) {
  1284. var h = b.st[d] ? b.st[d].markup : !1;
  1285. x("FirstMarkupParse", h);
  1286. b.currTemplate[d] = h ? a(h) : !0
  1287. }
  1288. f && f !== c.type && b.container.removeClass("mfp-" + f + "-holder");
  1289. h = b["get" + d.charAt(0).toUpperCase() + d.slice(1)](c, b.currTemplate[d]);
  1290. b.appendContent(h, d);
  1291. c.preloaded = !0;
  1292. x("Change", c);
  1293. f = c.type;
  1294. b.container.prepend(b.contentContainer);
  1295. x("AfterChange")
  1296. }, appendContent: function (a, c) {
  1297. (b.content = a) ? b.st.showCloseBtn && b.st.closeBtnInside && !0 === b.currTemplate[c] ?
  1298. b.content.find(".mfp-close").length || b.content.append(T()) : b.content = a : b.content = "";
  1299. x("BeforeAppend");
  1300. b.container.addClass("mfp-" + c + "-holder");
  1301. b.contentContainer.append(b.content)
  1302. }, parseEl: function (c) {
  1303. var e, d = b.items[c];
  1304. if (d.tagName ? d = {el: a(d)} : (e = d.type, d = {data: d, src: d.src}), d.el) {
  1305. for (var f = b.types, h = 0; f.length > h; h++) if (d.el.hasClass("mfp-" + f[h])) {
  1306. e = f[h];
  1307. break
  1308. }
  1309. d.src = d.el.attr("data-mfp-src");
  1310. d.src || (d.src = d.el.attr("href"))
  1311. }
  1312. return d.type = e || b.st.type || "inline", d.index = c, d.parsed = !0, b.items[c] = d,
  1313. x("ElementParse", d), b.items[c]
  1314. }, addGroup: function (a, c) {
  1315. var e = function (e) {
  1316. e.mfpEl = this;
  1317. b._openClick(e, a, c)
  1318. };
  1319. c || (c = {});
  1320. c.mainEl = a;
  1321. 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)))
  1322. }, _openClick: function (c, d, f) {
  1323. if ((void 0 !== f.midClick ? f.midClick : a.magnificPopup.defaults.midClick) || 2 !== c.which && !c.ctrlKey && !c.metaKey) {
  1324. var e =
  1325. void 0 !== f.disableOn ? f.disableOn : a.magnificPopup.defaults.disableOn;
  1326. if (e) if (a.isFunction(e)) {
  1327. if (!e.call(b)) return !0
  1328. } else if (e > X.width()) return !0;
  1329. c.type && (c.preventDefault(), b.isOpen && c.stopPropagation());
  1330. f.el = a(c.mfpEl);
  1331. f.delegate && (f.items = d.find(f.delegate));
  1332. b.open(f)
  1333. }
  1334. }, updateStatus: function (a, d) {
  1335. b.preloader && (c !== a && b.container.removeClass("mfp-s-" + c), d || "loading" !== a || (d = b.st.tLoading), d = {
  1336. status: a,
  1337. text: d
  1338. }, x("UpdateStatus", d), a = d.status, d = d.text, b.preloader.html(d), b.preloader.find("a").on("click",
  1339. function (a) {
  1340. a.stopImmediatePropagation()
  1341. }), b.container.addClass("mfp-s-" + a), c = a)
  1342. }, _checkIfClose: function (c) {
  1343. if (!a(c).hasClass("mfp-prevent-close")) {
  1344. var e = b.st.closeOnContentClick, d = b.st.closeOnBgClick;
  1345. if (e && d || !b.content || a(c).hasClass("mfp-close") || b.preloader && c === b.preloader[0]) return !0;
  1346. if (c === b.content[0] || a.contains(b.content[0], c)) {
  1347. if (e) return !0
  1348. } else if (d && a.contains(document, c)) return !0;
  1349. return !1
  1350. }
  1351. }, _addClassToMFP: function (a) {
  1352. b.bgOverlay.addClass(a);
  1353. b.wrap.addClass(a)
  1354. }, _removeClassFromMFP: function (a) {
  1355. this.bgOverlay.removeClass(a);
  1356. b.wrap.removeClass(a)
  1357. }, _hasScrollBar: function (a) {
  1358. return (b.isIE7 ? h.height() : document.body.scrollHeight) > (a || X.height())
  1359. }, _setFocus: function () {
  1360. (b.st.focus ? b.content.find(b.st.focus).eq(0) : b.wrap).focus()
  1361. }, _onFocusIn: function (c) {
  1362. return c.target === b.wrap[0] || a.contains(b.wrap[0], c.target) ? void 0 : (b._setFocus(), !1)
  1363. }, _parseMarkup: function (b, c, d) {
  1364. var e;
  1365. d.data && (c = a.extend(d.data, c));
  1366. x("MarkupParse", [b, c, d]);
  1367. a.each(c, function (a, c) {
  1368. if (void 0 === c || !1 === c) return !0;
  1369. if (e = a.split("_"), 1 < e.length) {
  1370. if (a = b.find(".mfp-" +
  1371. e[0]), 0 < a.length) {
  1372. var d = e[1];
  1373. "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)
  1374. }
  1375. } else b.find(".mfp-" + a).html(c)
  1376. })
  1377. }, _getScrollbarSize: function () {
  1378. if (void 0 === b.scrollbarSize) {
  1379. var a = document.createElement("div");
  1380. a.id = "mfp-sbm";
  1381. a.style.cssText = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;";
  1382. document.body.appendChild(a);
  1383. b.scrollbarSize = a.offsetWidth - a.clientWidth;
  1384. document.body.removeChild(a)
  1385. }
  1386. return b.scrollbarSize
  1387. }
  1388. };
  1389. a.magnificPopup = {
  1390. instance: null, proto: W.prototype, modules: [], open: function (b, c) {
  1391. return U(), b = b ? a.extend(!0, {}, b) : {}, b.isObj = !0, b.index = c || 0, this.instance.open(b)
  1392. }, close: function () {
  1393. return a.magnificPopup.instance && a.magnificPopup.instance.close()
  1394. }, registerModule: function (b, c) {
  1395. c.options && (a.magnificPopup.defaults[b] = c.options);
  1396. a.extend(this.proto, c.proto);
  1397. this.modules.push(b)
  1398. }, defaults: {
  1399. disableOn: 0,
  1400. key: null,
  1401. midClick: !1,
  1402. mainClass: "",
  1403. preloader: !0,
  1404. focus: "",
  1405. closeOnContentClick: !1,
  1406. closeOnBgClick: !0,
  1407. closeBtnInside: !0,
  1408. showCloseBtn: !0,
  1409. enableEscapeKey: !0,
  1410. modal: !1,
  1411. alignTop: !1,
  1412. removalDelay: 0,
  1413. prependTo: null,
  1414. fixedContentPos: "auto",
  1415. fixedBgPos: "auto",
  1416. overflowY: "auto",
  1417. closeMarkup: '<button title="%title%" type="button" class="mfp-close">&times;</button>',
  1418. tClose: "Close (Esc)",
  1419. tLoading: "Loading..."
  1420. }
  1421. };
  1422. a.fn.magnificPopup = function (c) {
  1423. U();
  1424. var d = a(this);
  1425. if ("string" == typeof c) if ("open" === c) {
  1426. var e, f = P ? d.data("magnificPopup") : d[0].magnificPopup, h = parseInt(arguments[1], 10) ||
  1427. 0;
  1428. f.items ? e = f.items[h] : (e = d, f.delegate && (e = e.find(f.delegate)), e = e.eq(h));
  1429. b._openClick({mfpEl: e}, d, f)
  1430. } 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);
  1431. return d
  1432. };
  1433. var Y, D, ba, H = function () {
  1434. ba && (D.after(ba.addClass(Y)).detach(), ba = null)
  1435. };
  1436. a.magnificPopup.registerModule("inline", {
  1437. options: {hiddenClass: "hide", markup: "", tNotFound: "Content not found"}, proto: {
  1438. initInline: function () {
  1439. b.types.push("inline");
  1440. B("Close.inline", function () {
  1441. H()
  1442. })
  1443. }, getInline: function (c, d) {
  1444. if (H(), c.src) {
  1445. d = b.st.inline;
  1446. var e = a(c.src);
  1447. if (e.length) {
  1448. var f = e[0].parentNode;
  1449. f && f.tagName && (D || (Y = d.hiddenClass, D = v(Y), Y = "mfp-" + Y), ba = e.after(D).detach().removeClass(Y));
  1450. b.updateStatus("ready")
  1451. } else b.updateStatus("error", d.tNotFound), e = a("<div>");
  1452. return c.inlineElement = e, e
  1453. }
  1454. return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d
  1455. }
  1456. }
  1457. });
  1458. var q, w = function () {
  1459. q && d.removeClass(q);
  1460. b.req && b.req.abort()
  1461. };
  1462. a.magnificPopup.registerModule("ajax", {
  1463. options: {
  1464. settings: null,
  1465. cursor: "mfp-ajax-cur", tError: '<a href="%url%">The content</a> could not be loaded.'
  1466. }, proto: {
  1467. initAjax: function () {
  1468. b.types.push("ajax");
  1469. q = b.st.ajax.cursor;
  1470. B("Close.ajax", w);
  1471. B("BeforeChange.ajax", w)
  1472. }, getAjax: function (c) {
  1473. q && d.addClass(q);
  1474. b.updateStatus("loading");
  1475. var e = a.extend({
  1476. url: c.src, success: function (e, f, h) {
  1477. e = {data: e, xhr: h};
  1478. x("ParseAjax", e);
  1479. b.appendContent(a(e.data), "ajax");
  1480. c.finished = !0;
  1481. q && d.removeClass(q);
  1482. b._setFocus();
  1483. setTimeout(function () {
  1484. b.wrap.addClass("mfp-ready")
  1485. }, 16);
  1486. b.updateStatus("ready");
  1487. x("AjaxContentAdded")
  1488. }, error: function () {
  1489. q && d.removeClass(q);
  1490. c.finished = c.loadError = !0;
  1491. b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src))
  1492. }
  1493. }, b.st.ajax.settings);
  1494. return b.req = a.ajax(e), ""
  1495. }
  1496. }
  1497. });
  1498. var ca, ja = function (c) {
  1499. if (c.data && void 0 !== c.data.title) return c.data.title;
  1500. var d = b.st.image.titleSrc;
  1501. if (d) {
  1502. if (a.isFunction(d)) return d.call(b, c);
  1503. if (c.el) return c.el.attr(d) || ""
  1504. }
  1505. return ""
  1506. };
  1507. a.magnificPopup.registerModule("image", {
  1508. options: {
  1509. 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>',
  1510. cursor: "mfp-zoom-out-cur",
  1511. titleSrc: "title",
  1512. verticalFit: !0,
  1513. tError: '<a href="%url%">The image</a> could not be loaded.'
  1514. }, proto: {
  1515. initImage: function () {
  1516. var a = b.st.image;
  1517. b.types.push("image");
  1518. B("Open.image", function () {
  1519. "image" === b.currItem.type && a.cursor && d.addClass(a.cursor)
  1520. });
  1521. B("Close.image", function () {
  1522. a.cursor && d.removeClass(a.cursor);
  1523. X.off("resize.mfp")
  1524. });
  1525. B("Resize.image", b.resizeImage);
  1526. b.isLowIE && B("AfterChange", b.resizeImage)
  1527. }, resizeImage: function () {
  1528. var a = b.currItem;
  1529. if (a && a.img && b.st.image.verticalFit) {
  1530. var c =
  1531. 0;
  1532. b.isLowIE && (c = parseInt(a.img.css("padding-top"), 10) + parseInt(a.img.css("padding-bottom"), 10));
  1533. a.img.css("max-height", b.wH - c)
  1534. }
  1535. }, _onImageHasSize: function (a) {
  1536. 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))
  1537. }, findImageSize: function (a) {
  1538. var c = 0, d = a.img[0], e = function (f) {
  1539. ca && clearInterval(ca);
  1540. ca = setInterval(function () {
  1541. return 0 < d.naturalWidth ? (b._onImageHasSize(a), void 0) : (200 < c && clearInterval(ca),
  1542. c++, 3 === c ? e(10) : 40 === c ? e(50) : 100 === c && e(500), void 0)
  1543. }, f)
  1544. };
  1545. e(1)
  1546. }, getImage: function (c, d) {
  1547. var e = 0, f = function () {
  1548. 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()))
  1549. }, h = function () {
  1550. 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)
  1551. }, l = b.st.image, p = d.find(".mfp-img");
  1552. if (p.length) {
  1553. var k = document.createElement("img");
  1554. k.className = "mfp-img";
  1555. c.img = a(k).on("load.mfploader", f).on("error.mfploader", h);
  1556. k.src = c.src;
  1557. p.is("img") && (c.img = c.img.clone());
  1558. k = c.img[0];
  1559. 0 < k.naturalWidth ? c.hasSize = !0 : k.width || (c.hasSize = !1)
  1560. }
  1561. return b._parseMarkup(d, {
  1562. title: ja(c),
  1563. img_replaceWith: c.img
  1564. }, 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")),
  1565. d) : (b.updateStatus("loading"), c.loading = !0, c.hasSize || (c.imgHidden = !0, d.addClass("mfp-loading"), b.findImageSize(c)), d)
  1566. }
  1567. }
  1568. });
  1569. var k;
  1570. a.magnificPopup.registerModule("zoom", {
  1571. options: {
  1572. enabled: !1, easing: "ease-in-out", duration: 300, opener: function (a) {
  1573. return a.is("img") ? a : a.find("img")
  1574. }
  1575. }, proto: {
  1576. initZoom: function () {
  1577. var a, c = b.st.zoom;
  1578. if (c.enabled && b.supportsTransition) {
  1579. var d, f, h = c.duration, p = function (a) {
  1580. a = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image");
  1581. var b = {
  1582. position: "fixed",
  1583. zIndex: 9999, left: 0, top: 0, "-webkit-backface-visibility": "hidden"
  1584. };
  1585. return b["-webkit-transition"] = b["-moz-transition"] = b["-o-transition"] = b.transition = "all " + c.duration / 1E3 + "s " + c.easing, a.css(b), a
  1586. }, k = function () {
  1587. b.content.css("visibility", "visible")
  1588. };
  1589. B("BuildControls.zoom", function () {
  1590. if (b._allowZoom()) {
  1591. if (clearTimeout(d), b.content.css("visibility", "hidden"), a = b._getItemToZoom(), !a) return k(), void 0;
  1592. f = p(a);
  1593. f.css(b._getOffset());
  1594. b.wrap.append(f);
  1595. d = setTimeout(function () {
  1596. f.css(b._getOffset(!0));
  1597. d = setTimeout(function () {
  1598. k();
  1599. setTimeout(function () {
  1600. f.remove();
  1601. a = f = null;
  1602. x("ZoomAnimationEnded")
  1603. }, 16)
  1604. }, h)
  1605. }, 16)
  1606. }
  1607. });
  1608. B("BeforeClose.zoom", function () {
  1609. if (b._allowZoom()) {
  1610. if (clearTimeout(d), b.st.removalDelay = h, !a) {
  1611. if (a = b._getItemToZoom(), !a) return;
  1612. f = p(a)
  1613. }
  1614. f.css(b._getOffset(!0));
  1615. b.wrap.append(f);
  1616. b.content.css("visibility", "hidden");
  1617. setTimeout(function () {
  1618. f.css(b._getOffset())
  1619. }, 16)
  1620. }
  1621. });
  1622. B("Close.zoom", function () {
  1623. b._allowZoom() && (k(), f && f.remove(), a = null)
  1624. })
  1625. }
  1626. }, _allowZoom: function () {
  1627. return "image" === b.currItem.type
  1628. }, _getItemToZoom: function () {
  1629. return b.currItem.hasSize ?
  1630. b.currItem.img : !1
  1631. }, _getOffset: function (c) {
  1632. var d = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem);
  1633. c = d.offset();
  1634. var e = parseInt(d.css("padding-top"), 10), f = parseInt(d.css("padding-bottom"), 10);
  1635. c.top -= a(window).scrollTop() - e;
  1636. d = {width: d.width(), height: (P ? d.innerHeight() : d[0].offsetHeight) - f - e};
  1637. 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
  1638. }
  1639. }
  1640. });
  1641. var da = function (a) {
  1642. if (b.currTemplate.iframe) {
  1643. var c =
  1644. b.currTemplate.iframe.find("iframe");
  1645. c.length && (a || (c[0].src = "//about:blank"), b.isIE8 && c.css("display", a ? "block" : "none"))
  1646. }
  1647. };
  1648. a.magnificPopup.registerModule("iframe", {
  1649. options: {
  1650. markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',
  1651. srcAction: "iframe_src",
  1652. patterns: {
  1653. youtube: {index: "youtube.com", id: "v=", src: "//www.youtube.com/embed/%id%?autoplay=1"},
  1654. vimeo: {index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1"},
  1655. gmaps: {index: "//maps.google.", src: "%id%&output=embed"}
  1656. }
  1657. }, proto: {
  1658. initIframe: function () {
  1659. b.types.push("iframe");
  1660. B("BeforeChange", function (a, b, c) {
  1661. b !== c && ("iframe" === b ? da() : "iframe" === c && da(!0))
  1662. });
  1663. B("Close.iframe", function () {
  1664. da()
  1665. })
  1666. }, getIframe: function (c, d) {
  1667. var e = c.src, f = b.st.iframe;
  1668. a.each(f.patterns, function () {
  1669. 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
  1670. });
  1671. var h =
  1672. {};
  1673. return f.srcAction && (h[f.srcAction] = e), b._parseMarkup(d, h, c), b.updateStatus("ready"), d
  1674. }
  1675. }
  1676. });
  1677. var y = function (a) {
  1678. var c = b.items.length;
  1679. return a > c - 1 ? a - c : 0 > a ? c + a : a
  1680. }, m = function (a, b, c) {
  1681. return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c)
  1682. };
  1683. a.magnificPopup.registerModule("gallery", {
  1684. options: {
  1685. enabled: !1,
  1686. arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
  1687. preload: [0, 2],
  1688. navigateByImgClick: !0,
  1689. arrows: !0,
  1690. tPrev: "Previous (Left arrow key)",
  1691. tNext: "Next (Right arrow key)",
  1692. tCounter: "%curr% of %total%"
  1693. }, proto: {
  1694. initGallery: function () {
  1695. var c = b.st.gallery, d = !!a.fn.mfpFastClick;
  1696. return b.direction = !0, c && c.enabled ? (p += " mfp-gallery", B("Open.mfp-gallery", function () {
  1697. c.navigateByImgClick && b.wrap.on("click.mfp-gallery", ".mfp-img", function () {
  1698. return 1 < b.items.length ? (b.next(), !1) : void 0
  1699. });
  1700. h.on("keydown.mfp-gallery", function (a) {
  1701. 37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next()
  1702. })
  1703. }), B("UpdateStatus.mfp-gallery", function (a, c) {
  1704. c.text && (c.text = m(c.text, b.currItem.index, b.items.length))
  1705. }),
  1706. B("MarkupParse.mfp-gallery", function (a, d, e, f) {
  1707. a = b.items.length;
  1708. e.counter = 1 < a ? m(c.tCounter, f.index, a) : ""
  1709. }), B("BuildControls.mfp-gallery", function () {
  1710. if (1 < b.items.length && c.arrows && !b.arrowLeft) {
  1711. var e = c.arrowMarkup,
  1712. f = b.arrowLeft = a(e.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass("mfp-prevent-close");
  1713. e = b.arrowRight = a(e.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass("mfp-prevent-close");
  1714. var h = d ? "mfpFastClick" : "click";
  1715. f[h](function () {
  1716. b.prev()
  1717. });
  1718. e[h](function () {
  1719. b.next()
  1720. });
  1721. 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));
  1722. b.container.append(f.add(e))
  1723. }
  1724. }), B("Change.mfp-gallery", function () {
  1725. b._preloadTimeout && clearTimeout(b._preloadTimeout);
  1726. b._preloadTimeout = setTimeout(function () {
  1727. b.preloadNearbyImages();
  1728. b._preloadTimeout = null
  1729. }, 16)
  1730. }), B("Close.mfp-gallery", function () {
  1731. h.off(".mfp-gallery");
  1732. b.wrap.off("click.mfp-gallery");
  1733. b.arrowLeft && d && b.arrowLeft.add(b.arrowRight).destroyMfpFastClick();
  1734. b.arrowRight = b.arrowLeft = null
  1735. }), void 0) : !1
  1736. }, next: function () {
  1737. b.direction =
  1738. !0;
  1739. b.index = y(b.index + 1);
  1740. b.updateItemHTML()
  1741. }, prev: function () {
  1742. b.direction = !1;
  1743. b.index = y(b.index - 1);
  1744. b.updateItemHTML()
  1745. }, goTo: function (a) {
  1746. b.direction = a >= b.index;
  1747. b.index = a;
  1748. b.updateItemHTML()
  1749. }, preloadNearbyImages: function () {
  1750. var a = b.st.gallery.preload;
  1751. var c = Math.min(a[0], b.items.length), d = Math.min(a[1], b.items.length);
  1752. for (a = 1; (b.direction ? d : c) >= a; a++) b._preloadItem(b.index + a);
  1753. for (a = 1; (b.direction ? c : d) >= a; a++) b._preloadItem(b.index - a)
  1754. }, _preloadItem: function (c) {
  1755. if (c = y(c), !b.items[c].preloaded) {
  1756. var d = b.items[c];
  1757. d.parsed || (d = b.parseEl(c));
  1758. x("LazyLoad", d);
  1759. "image" === d.type && (d.img = a('<img class="mfp-img" />').on("load.mfploader", function () {
  1760. d.hasSize = !0
  1761. }).on("error.mfploader", function () {
  1762. d.hasSize = !0;
  1763. d.loadError = !0;
  1764. x("LazyLoadError", d)
  1765. }).attr("src", d.src));
  1766. d.preloaded = !0
  1767. }
  1768. }
  1769. }
  1770. });
  1771. a.magnificPopup.registerModule("retina", {
  1772. options: {
  1773. replaceSrc: function (a) {
  1774. return a.src.replace(/\.\w+$/, function (a) {
  1775. return "@2x" + a
  1776. })
  1777. }, ratio: 1
  1778. }, proto: {
  1779. initRetina: function () {
  1780. if (1 < window.devicePixelRatio) {
  1781. var a = b.st.retina, c = a.ratio;
  1782. c = isNaN(c) ?
  1783. c() : c;
  1784. 1 < c && (B("ImageHasSize.retina", function (a, b) {
  1785. b.img.css({"max-width": b.img[0].naturalWidth / c, width: "100%"})
  1786. }), B("ElementParse.retina", function (b, d) {
  1787. d.src = a.replaceSrc(d, c)
  1788. }))
  1789. }
  1790. }
  1791. }
  1792. });
  1793. (function () {
  1794. var b = "ontouchstart" in window, c = function () {
  1795. X.off("touchmove" + d + " touchend" + d)
  1796. }, d = ".mfpFastClick";
  1797. a.fn.mfpFastClick = function (f) {
  1798. return a(this).each(function () {
  1799. var e, h = a(this);
  1800. if (b) {
  1801. var g, p, k, l, m, v;
  1802. h.on("touchstart" + d, function (a) {
  1803. l = !1;
  1804. v = 1;
  1805. m = a.originalEvent ? a.originalEvent.touches[0] : a.touches[0];
  1806. p = m.clientX;
  1807. k = m.clientY;
  1808. X.on("touchmove" + d, function (a) {
  1809. m = a.originalEvent ? a.originalEvent.touches : a.touches;
  1810. v = m.length;
  1811. m = m[0];
  1812. (10 < Math.abs(m.clientX - p) || 10 < Math.abs(m.clientY - k)) && (l = !0, c())
  1813. }).on("touchend" + d, function (a) {
  1814. c();
  1815. l || 1 < v || (e = !0, a.preventDefault(), clearTimeout(g), g = setTimeout(function () {
  1816. e = !1
  1817. }, 1E3), f())
  1818. })
  1819. })
  1820. }
  1821. h.on("click" + d, function () {
  1822. e || f()
  1823. })
  1824. })
  1825. };
  1826. a.fn.destroyMfpFastClick = function () {
  1827. a(this).off("touchstart" + d + " click" + d);
  1828. b && X.off("touchmove" + d + " touchend" + d)
  1829. }
  1830. })();
  1831. U()
  1832. })(window.jQuery || window.Zepto);
  1833. (function (a, b, c) {
  1834. function d(a) {
  1835. var b = {}, d = /^jQuery\d+$/;
  1836. c.each(a.attributes, function (a, c) {
  1837. c.specified && !d.test(c.name) && (b[c.name] = c.value)
  1838. });
  1839. return b
  1840. }
  1841.  
  1842. function h(a, b) {
  1843. var d = c(this);
  1844. if (this.value == d.attr("placeholder") && d.hasClass("placeholder")) if (d.data("placeholder-password")) {
  1845. d = d.hide().next().show().attr("id", d.removeAttr("id").data("placeholder-id"));
  1846. if (!0 === a) return d[0].value = b;
  1847. d.focus()
  1848. } else this.value = "", d.removeClass("placeholder"), this == p() && this.select()
  1849. }
  1850.  
  1851. function f() {
  1852. var a = c(this), b = this.id;
  1853. if ("" == this.value) {
  1854. if ("password" == this.type) {
  1855. if (!a.data("placeholder-textinput")) {
  1856. try {
  1857. var f = a.clone().attr({type: "text"})
  1858. } catch (U) {
  1859. f = c("<input>").attr(c.extend(d(this), {type: "text"}))
  1860. }
  1861. f.removeAttr("name").data({
  1862. "placeholder-password": a,
  1863. "placeholder-id": b
  1864. }).bind("focus.placeholder", h);
  1865. a.data({"placeholder-textinput": f, "placeholder-id": b}).before(f)
  1866. }
  1867. a = a.removeAttr("id").hide().prev().attr("id", b).show()
  1868. }
  1869. a.addClass("placeholder");
  1870. a[0].value = a.attr("placeholder")
  1871. } else a.removeClass("placeholder")
  1872. }
  1873.  
  1874. function p() {
  1875. try {
  1876. return b.activeElement
  1877. } catch (v) {
  1878. }
  1879. }
  1880.  
  1881. var G = "placeholder" in b.createElement("input"), W = "placeholder" in b.createElement("textarea"), P = c.fn,
  1882. X = c.valHooks, B = c.propHooks;
  1883. G && W ? (P = P.placeholder = function () {
  1884. return this
  1885. }, P.input = P.textarea = !0) : (P = P.placeholder = function () {
  1886. this.filter((G ? "textarea" : ":input") + "[placeholder]").not(".placeholder").bind({
  1887. "focus.placeholder": h,
  1888. "blur.placeholder": f
  1889. }).data("placeholder-enabled", !0).trigger("blur.placeholder");
  1890. return this
  1891. }, P.input = G, P.textarea = W, P = {
  1892. get: function (a) {
  1893. var b = c(a), d = b.data("placeholder-password");
  1894. return d ? d[0].value : b.data("placeholder-enabled") && b.hasClass("placeholder") ? "" : a.value
  1895. }, set: function (a, b) {
  1896. var d = c(a), G = d.data("placeholder-password");
  1897. if (G) return G[0].value = b;
  1898. if (!d.data("placeholder-enabled")) return a.value = b;
  1899. "" == b ? (a.value = b, a != p() && f.call(a)) : d.hasClass("placeholder") ? h.call(a, !0, b) || (a.value = b) : a.value = b;
  1900. return d
  1901. }
  1902. }, G || (X.input = P, B.value = P), W || (X.textarea = P, B.value = P), c(function () {
  1903. c(b).delegate("form", "submit.placeholder", function () {
  1904. var a = c(".placeholder", this).each(h);
  1905. setTimeout(function () {
  1906. a.each(f)
  1907. },
  1908. 10)
  1909. })
  1910. }), c(a).bind("beforeunload.placeholder", function () {
  1911. c(".placeholder").each(function () {
  1912. this.value = ""
  1913. })
  1914. }))
  1915. })(this, document, jQuery);
  1916. (function () {
  1917. 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"];
  1918. window.requestAnimationFrame || (window.requestAnimationFrame = function (b, c) {
  1919. var d = (new Date).getTime(), h = Math.max(0, 16 - (d - a));
  1920. c = window.setTimeout(function () {
  1921. b(d + h)
  1922. }, h);
  1923. a = d + h;
  1924. return c
  1925. });
  1926. window.cancelAnimationFrame || (window.cancelAnimationFrame =
  1927. function (a) {
  1928. clearTimeout(a)
  1929. })
  1930. })();
  1931. var tdDetect = {};
  1932. (function () {
  1933. tdDetect = {
  1934. isIe8: !1,
  1935. isIe9: !1,
  1936. isIe10: !1,
  1937. isIe11: !1,
  1938. isIe: !1,
  1939. isSafari: !1,
  1940. isChrome: !1,
  1941. isIpad: !1,
  1942. isTouchDevice: !1,
  1943. hasHistory: !1,
  1944. isPhoneScreen: !1,
  1945. isIos: !1,
  1946. isAndroid: !1,
  1947. isOsx: !1,
  1948. isFirefox: !1,
  1949. isWinOs: !1,
  1950. isMobileDevice: !1,
  1951. htmlJqueryObj: null,
  1952. runIsPhoneScreen: function () {
  1953. (768 > jQuery(window).width() || 768 > jQuery(window).height()) && !1 === tdDetect.isIpad ? tdDetect.isPhoneScreen = !0 : tdDetect.isPhoneScreen = !1
  1954. },
  1955. set: function (a, b) {
  1956. tdDetect[a] = b
  1957. }
  1958. };
  1959. tdDetect.htmlJqueryObj = jQuery("html");
  1960. -1 !== navigator.appVersion.indexOf("Win") &&
  1961. tdDetect.set("isWinOs", !0);
  1962. "ontouchstart" in window && !tdDetect.isWinOs && tdDetect.set("isTouchDevice", !0);
  1963. tdDetect.htmlJqueryObj.is(".ie8") && (tdDetect.set("isIe8", !0), tdDetect.set("isIe", !0));
  1964. tdDetect.htmlJqueryObj.is(".ie9") && (tdDetect.set("isIe9", !0), tdDetect.set("isIe", !0));
  1965. -1 < navigator.userAgent.indexOf("MSIE 10.0") && (tdDetect.set("isIe10", !0), tdDetect.set("isIe", !0));
  1966. navigator.userAgent.match(/Trident.*rv:11\./) && tdDetect.set("isIe11", !0);
  1967. window.history && window.history.pushState && tdDetect.set("hasHistory",
  1968. !0);
  1969. -1 !== navigator.userAgent.indexOf("Safari") && -1 === navigator.userAgent.indexOf("Chrome") && tdDetect.set("isSafari", !0);
  1970. /chrom(e|ium)/.test(navigator.userAgent.toLowerCase()) && tdDetect.set("isChrome", !0);
  1971. null !== navigator.userAgent.match(/iPad/i) && tdDetect.set("isIpad", !0);
  1972. /(iPad|iPhone|iPod)/g.test(navigator.userAgent) && tdDetect.set("isIos", !0);
  1973. /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && tdDetect.set("isMobileDevice", !0);
  1974. tdDetect.runIsPhoneScreen();
  1975. -1 < navigator.userAgent.toLowerCase().indexOf("android") && tdDetect.set("isAndroid", !0);
  1976. -1 !== navigator.userAgent.indexOf("Mac OS X") && tdDetect.set("isOsx", !0);
  1977. -1 !== navigator.userAgent.indexOf("Firefox") && tdDetect.set("isFirefox", !0)
  1978. })();
  1979. var tdViewport = {};
  1980. (function () {
  1981. tdViewport = {
  1982. INTERVAL_INITIAL_INDEX: -1,
  1983. _currentIntervalIndex: tdViewport.INTERVAL_INITIAL_INDEX,
  1984. _intervalList: [],
  1985. init: function () {
  1986. if ("undefined" !== typeof window.td_viewport_interval_list && Array === window.td_viewport_interval_list.constructor) {
  1987. for (var a = 0; a < window.td_viewport_interval_list.length; a++) {
  1988. var b = new tdViewport.item, c = window.td_viewport_interval_list[a];
  1989. if (!c.hasOwnProperty("limitBottom") || !c.hasOwnProperty("sidebarWidth")) break;
  1990. b.limitBottom = c.limitBottom;
  1991. b.sidebarWidth = c.sidebarWidth;
  1992. tdViewport._items.push(b)
  1993. }
  1994. tdViewport.detectChanges()
  1995. }
  1996. },
  1997. getCurrentIntervalIndex: function () {
  1998. return tdViewport._currentIntervalIndex
  1999. },
  2000. setIntervalList: function (a) {
  2001. tdViewport._intervalList = a
  2002. },
  2003. getIntervalList: function () {
  2004. return tdViewport._intervalList
  2005. },
  2006. getCurrentIntervalItem: function () {
  2007. return tdViewport.INTERVAL_INITIAL_INDEX === tdViewport._currentIntervalIndex || 0 === tdViewport._currentIntervalIndex ? null : tdViewport._items[tdViewport._currentIntervalIndex - 1]
  2008. },
  2009. _items: [],
  2010. item: function () {
  2011. this.sidebarWidth = this.limitBottom =
  2012. void 0
  2013. },
  2014. detectChanges: function () {
  2015. var a = !1, b = 0;
  2016. var c = !0 === tdDetect.isSafari ? this._safariWiewPortWidth.getRealWidth() : Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
  2017. for (var d = 0; d < tdViewport._items.length; d++) {
  2018. if (c <= tdViewport._items[d].limitBottom) {
  2019. b !== tdViewport._currentIntervalIndex && (tdViewport._currentIntervalIndex = b, a = !0, tdViewport.log("changing viewport " + tdViewport._currentIntervalIndex + " ~ " + c));
  2020. break
  2021. }
  2022. b++
  2023. }
  2024. !1 === a && b !== tdViewport._currentIntervalIndex && (tdViewport._currentIntervalIndex =
  2025. b, a = !0, tdViewport.log("changing viewport " + tdViewport._currentIntervalIndex + " ~ " + c));
  2026. return a
  2027. },
  2028. _safariWiewPortWidth: {
  2029. divAdded: !1, divJqueryObject: "", getRealWidth: function () {
  2030. !1 === this.divAdded && (this.divJqueryObject = jQuery("<div>").css({
  2031. height: "1px",
  2032. position: "absolute",
  2033. top: "-1px",
  2034. left: "0",
  2035. right: "0",
  2036. visibility: "hidden",
  2037. "z-index": "-1"
  2038. }), this.divJqueryObject.appendTo("body"), this.divAdded = !0);
  2039. return this.divJqueryObject.width()
  2040. }
  2041. },
  2042. log: function (a) {
  2043. }
  2044. };
  2045. tdViewport.init()
  2046. })();
  2047. var tdUtil = {};
  2048. (function () {
  2049. tdUtil = {
  2050. 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}$/,
  2051. stopBubble: function (a) {
  2052. a && a.stopPropagation ? a.stopPropagation() : window.event.cancelBubble = !0
  2053. },
  2054. isEmail: function (a) {
  2055. return tdUtil.email_pattern.test(a)
  2056. },
  2057. imageMoveClassToFigure: function (a) {
  2058. jQuery("figure ." + a).each(function () {
  2059. jQuery(this).parents("figure:first").addClass(a);
  2060. jQuery(this).removeClass(a)
  2061. })
  2062. },
  2063. getBackendVar: function (a) {
  2064. return "undefined" === typeof window[a] ?
  2065. "" : window[a]
  2066. },
  2067. isUndefined: function (a) {
  2068. return void 0 === a
  2069. },
  2070. scrollToElement: function (a, b) {
  2071. tdIsScrollingAnimation = !0;
  2072. jQuery("html, body").stop();
  2073. a = a.offset().top > jQuery(document).height() - jQuery(window).height() ? jQuery(document).height() - jQuery(window).height() : a.offset().top;
  2074. jQuery("html, body").animate({scrollTop: a}, {
  2075. duration: b, easing: "easeInOutQuart", complete: function () {
  2076. tdIsScrollingAnimation = !1
  2077. }
  2078. })
  2079. },
  2080. scrollIntoView: function (a) {
  2081. tdIsScrollingAnimation = !0;
  2082. if (!0 !== tdDetect.isMobileDevice) {
  2083. jQuery("html, body").stop();
  2084. a = a.find("img").offset().top;
  2085. a -= 150;
  2086. var b = Math.abs(jQuery(window).scrollTop() - a) / 5;
  2087. jQuery("html, body").animate({scrollTop: a}, {
  2088. duration: 1100 + b,
  2089. easing: "easeInOutQuart",
  2090. complete: function () {
  2091. tdIsScrollingAnimation = !1
  2092. }
  2093. })
  2094. }
  2095. },
  2096. scrollToPosition: function (a, b) {
  2097. if (window.location !== window.parent.location) {
  2098. var c = jQuery(window.parent.document), d = c.find("#" + jQuery("html").attr("id")).offset().top;
  2099. tdIsScrollingAnimation = !0;
  2100. c.find("html, body").stop();
  2101. c.find("html, body").animate({scrollTop: d + a}, {
  2102. duration: b, easing: "easeInOutQuart",
  2103. complete: function () {
  2104. tdIsScrollingAnimation = !1
  2105. }
  2106. })
  2107. } else tdIsScrollingAnimation = !0, jQuery("html, body").stop(), jQuery("html, body").animate({scrollTop: a}, {
  2108. duration: b,
  2109. easing: "easeInOutQuart",
  2110. complete: function () {
  2111. tdIsScrollingAnimation = !1
  2112. }
  2113. })
  2114. },
  2115. tdMoveY: function (a, b) {
  2116. b = "translate3d(0px," + b + "px, 0px)";
  2117. a.style["-webkit-transform"] = b;
  2118. a.style["-moz-transform"] = b;
  2119. a.style["-ms-transform"] = b;
  2120. a.style["-o-transform"] = b;
  2121. a.style.transform = b
  2122. },
  2123. isValidUrl: function (a) {
  2124. 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) ?
  2125. !0 : !1
  2126. },
  2127. round: function (a, b, c) {
  2128. b = Math.pow(10, b | 0);
  2129. a *= b;
  2130. var d = 0 < a | -(0 > a);
  2131. var h = a % 1 === .5 * d;
  2132. var f = Math.floor(a);
  2133. if (h) switch (c) {
  2134. case "PHP_ROUND_HALF_DOWN":
  2135. a = f + (0 > d);
  2136. break;
  2137. case "PHP_ROUND_HALF_EVEN":
  2138. a = f + f % 2 * d;
  2139. break;
  2140. case "PHP_ROUND_HALF_ODD":
  2141. a = f + !(f % 2);
  2142. break;
  2143. default:
  2144. a = f + (0 < d)
  2145. }
  2146. return (h ? a : Math.round(a)) / b
  2147. },
  2148. b64EncodeUnicode: function (a) {
  2149. return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g, function (a, c) {
  2150. return String.fromCharCode("0x" + c)
  2151. }))
  2152. },
  2153. b64DecodeUnicode: function (a) {
  2154. return decodeURIComponent(atob(a))
  2155. },
  2156. isBase64Encoded: function (a) {
  2157. return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/.test(a)
  2158. },
  2159. isInViewport: function (a, b) {
  2160. b = void 0 === b ? 0 : b;
  2161. var c = a.offset().top;
  2162. a = c + a.outerHeight();
  2163. var d = jQuery(window).scrollTop(), h = d + jQuery(window).height();
  2164. return a > d && c < h - b
  2165. }
  2166. }
  2167. })();
  2168. var tdAffix = {};
  2169. (function () {
  2170. tdAffix = {
  2171. allow_scroll: !0,
  2172. menu_selector: "",
  2173. menu_wrap_selector: "",
  2174. tds_snap_menu: "",
  2175. tds_snap_menu_logo: "",
  2176. is_menu_affix_height_computed: !1,
  2177. is_menu_affix_height_on_mobile_computed: !1,
  2178. menu_affix_height: 0,
  2179. menu_affix_height_on_mobile: 0,
  2180. main_menu_height: 0,
  2181. top_offset: 0,
  2182. menu_offset: 0,
  2183. is_requestAnimationFrame_running: !1,
  2184. is_menu_affix: !1,
  2185. is_top_menu: !1,
  2186. menu_offset_max_hit: !1,
  2187. menu_offset_min_hit: !0,
  2188. scroll_window_scrollTop_last: 0,
  2189. init: function (a) {
  2190. tdAffix.menu_selector = a.menu_selector;
  2191. tdAffix.menu_wrap_selector =
  2192. a.menu_wrap_selector;
  2193. tdAffix.tds_snap_menu = a.tds_snap_menu;
  2194. tdAffix.tds_snap_menu_logo = a.tds_snap_menu_logo;
  2195. tdAffix.menu_affix_height = a.menu_affix_height;
  2196. tdAffix.menu_affix_height_on_mobile = a.menu_affix_height_on_mobile;
  2197. 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 () {
  2198. tdAffix.compute_wrapper();
  2199. tdAffix.compute_top()
  2200. }), jQuery(window).on("load", function () {
  2201. tdAffix.compute_wrapper();
  2202. tdAffix.compute_top();
  2203. setTimeout(function () {
  2204. tdAffix.compute_top()
  2205. }, 1E3)
  2206. }))
  2207. },
  2208. _get_menu_affix_height: function () {
  2209. 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;
  2210. !tdAffix.is_menu_affix_height_computed && tdAffix.is_menu_affix && (tdAffix.is_menu_affix_height_computed = !0, tdAffix.menu_affix_height =
  2211. jQuery(tdAffix.menu_selector).height(), "smart_snap_always" === tdAffix.tds_snap_menu && (tdAffix.top_offset = tdAffix.menu_affix_height));
  2212. return tdAffix.menu_affix_height
  2213. },
  2214. td_events_scroll: function (a) {
  2215. if (tdAffix.allow_scroll && tdAffix.tds_snap_menu) {
  2216. var b = "";
  2217. if ("snap" !== tdAffix.tds_snap_menu && ("smart_snap_mobile" !== tdAffix.tds_snap_menu || !0 === tdDetect.isPhoneScreen)) {
  2218. var c = 0;
  2219. a !== tdAffix.scroll_window_scrollTop_last && (b = a > tdAffix.scroll_window_scrollTop_last ? "down" : "up", c = Math.abs(a - tdAffix.scroll_window_scrollTop_last));
  2220. tdAffix.scroll_window_scrollTop_last = a
  2221. }
  2222. "" !== tdAffix.tds_snap_menu && "" !== tdAffix.tds_snap_menu_logo && jQuery(".td-main-menu-logo").addClass("td-logo-sticky");
  2223. 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) {
  2224. var d = jQuery(tdAffix.menu_selector);
  2225. d.length && tdAffix._affix_on(d);
  2226. "snap" === tdAffix.tds_snap_menu || "smart_snap_mobile" ===
  2227. 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 () {
  2228. var f = 0;
  2229. 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)));
  2230. tdUtil.tdMoveY(d[0], f);
  2231. tdAffix.menu_offset_min_hit = 0 === f ? !0 : !1;
  2232. f === -tdAffix._get_menu_affix_height() ? (tdAffix.menu_offset_max_hit = !0,
  2233. (!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());
  2234. tdAffix.menu_offset = f
  2235. }, d[0])
  2236. } else {
  2237. var h = jQuery(tdAffix.menu_selector);
  2238. h.length && tdAffix._affix_off(h)
  2239. }
  2240. }
  2241. },
  2242. compute_top: function () {
  2243. jQuery(tdAffix.menu_wrap_selector).length && (tdAffix.top_offset = jQuery(tdAffix.menu_wrap_selector).offset().top, "smart_snap_always" === tdAffix.tds_snap_menu &&
  2244. (tdAffix.top_offset += tdAffix.menu_affix_height), tdAffix.is_top_menu = 1 === tdAffix.top_offset ? !0 : !1, tdAffix.td_events_scroll(jQuery(window).scrollTop()))
  2245. },
  2246. compute_wrapper: function () {
  2247. 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();
  2248. jQuery(tdAffix.menu_wrap_selector).css("height",
  2249. tdAffix.main_menu_height)
  2250. },
  2251. _affix_on: function (a) {
  2252. !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", "")
  2253. },
  2254. _affix_off: function (a) {
  2255. !0 === tdAffix.is_menu_affix && (jQuery(tdAffix.menu_selector).removeClass("td-affix"), "" === tdAffix.tds_snap_menu_logo &&
  2256. 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())
  2257. }
  2258. }
  2259. })();
  2260. "use strict";
  2261. jQuery().ready(function () {
  2262. function a(a) {
  2263. tdScrollToClass.resetItems();
  2264. a.each(function () {
  2265. var a = new tdScrollToClass.item;
  2266. a.handlerObj = jQuery(this);
  2267. tdScrollToClass.addItem(a)
  2268. });
  2269. tdScrollToClass.manageActiveClasses()
  2270. }
  2271.  
  2272. function b() {
  2273. var b = jQuery("[data-scroll-to-class]"), c = !1;
  2274. b.each(function () {
  2275. var a = jQuery(this), b = !1;
  2276. tdScrollToClass.items.forEach(function (c) {
  2277. c.handlerObj.data("td-block-uid") === a.data("td-block-uid") && (b = !0)
  2278. });
  2279. b || (c = !0)
  2280. });
  2281. c && a(b)
  2282. }
  2283.  
  2284. td_retina();
  2285. td_mobile_menu_toogle();
  2286. td_resize_videos();
  2287. jQuery("input, textarea").placeholder();
  2288. td_more_articles_box.init();
  2289. td_smart_lists_magnific_popup();
  2290. td_smart_list_dropdown();
  2291. if ("undefined" !== typeof tdsDateFormat && "undefined" !== typeof window.td_date_i18n) {
  2292. var c = Math.floor((new Date).getTime() / 1E3);
  2293. c = td_date_i18n(tdsDateFormat, c);
  2294. jQuery(".td_data_time").text(c)
  2295. }
  2296. td_comments_form_validation();
  2297. b();
  2298. window.location !== window.parent.location && setInterval(function () {
  2299. jQuery("[data-scroll-to-class]").length && b()
  2300. }, 1E3)
  2301. });
  2302.  
  2303. function td_smart_list_dropdown() {
  2304. jQuery(".td-smart-list-dropdown").on("change", function () {
  2305. window.location = this.value
  2306. })
  2307. }
  2308.  
  2309. var td_more_articles_box = {
  2310. is_box_visible: !1, cookie: "", distance_from_top: 400, init: function () {
  2311. td_more_articles_box.cookie = td_read_site_cookie("td-cookie-more-articles");
  2312. !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;
  2313. jQuery(".td-close-more-articles-box").click(function () {
  2314. jQuery(".td-more-articles-box").removeClass("td-front-end-display-block");
  2315. jQuery(".td-more-articles-box").hide();
  2316. !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)])
  2317. })
  2318. }, td_events_scroll: function (a) {
  2319. tdIsScrollingAnimation || "show" != tdUtil.getBackendVar("tds_more_articles_on_post_enable") ||
  2320. "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))
  2321. }
  2322. }, td_resize_timer_id;
  2323. jQuery(window).resize(function () {
  2324. clearTimeout(td_resize_timer_id);
  2325. td_resize_timer_id = setTimeout(function () {
  2326. td_done_resizing()
  2327. }, 200)
  2328. });
  2329.  
  2330. function td_done_resizing() {
  2331. td_resize_videos()
  2332. }
  2333.  
  2334. function td_resize_videos() {
  2335. jQuery(document).find('iframe[src*="youtube.com"]').each(function () {
  2336. var a = jQuery(this).parent().parent().parent(),
  2337. b = jQuery(this).parent().hasClass("td_wrapper_playlist_player_vimeo"),
  2338. c = a.hasClass("vc_video-aspect-ratio-43");
  2339. a = a.hasClass("vc_video-aspect-ratio-235");
  2340. b || c || a || (b = jQuery(this), b.attr("width", "100%"), c = b.width(), b.css("height", .5625 * c, "important"))
  2341. });
  2342. jQuery(document).find('iframe[src*="vimeo.com"]').each(function () {
  2343. var a = jQuery(this).parent().parent().parent(),
  2344. b = jQuery(this).parent().hasClass("td_wrapper_playlist_player_vimeo"),
  2345. c = a.hasClass("vc_video-aspect-ratio-43");
  2346. a = a.hasClass("vc_video-aspect-ratio-235");
  2347. b || c || a || (b = jQuery(this), b.attr("width", "100%"), c = b.width(), b.css("height", .5625 * c, "important"))
  2348. });
  2349. jQuery(document).find('iframe[src*="dailymotion.com"]').each(function () {
  2350. var a = jQuery(this).parent().parent().parent(), b = a.hasClass("vc_video-aspect-ratio-43");
  2351. a = a.hasClass("vc_video-aspect-ratio-235");
  2352. b || a || (b = jQuery(this), b.attr("width", "100%"), a = b.width(),
  2353. b.css("height", .6 * a, "important"))
  2354. })
  2355. }
  2356.  
  2357. function td_mobile_menu() {
  2358. }
  2359.  
  2360. function td_mobile_menu_toogle() {
  2361. jQuery("#td-top-mobile-toggle a, #td-top-mobile-toggle span, .td-mobile-close span, .tdb-mobile-menu-button").click(function () {
  2362. "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"))
  2363. });
  2364. jQuery(document).find("#td-mobile-nav .menu-item-has-children").each(function (a) {
  2365. a = "td_mobile_submenu td_mobile_elem_with_submenu_" + a;
  2366. jQuery(this).addClass(a);
  2367. jQuery(this).children("a").addClass("td-link-element-after");
  2368. jQuery(this).click(function (a) {
  2369. var b = jQuery(a.target);
  2370. !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"))
  2371. })
  2372. })
  2373. }
  2374.  
  2375. function td_retina() {
  2376. 1 < window.devicePixelRatio && (jQuery(".td-retina").each(function (a) {
  2377. a = jQuery(this).attr("src").replace(".png", "@2x.png");
  2378. a = a.replace(".jpg", "@2x.jpg");
  2379. jQuery(this).attr("src", a)
  2380. }), jQuery(".td-retina-data").each(function (a) {
  2381. jQuery(this).attr("src", jQuery(this).data("retina"));
  2382. jQuery(this).addClass("td-retina-version")
  2383. }))
  2384. }
  2385.  
  2386. tdDetect.isTouchDevice || "" == tdUtil.getBackendVar("td_ad_background_click_link") || jQuery("body").click(function (a) {
  2387. a = jQuery(a.target ? a.target : a.srcElement);
  2388. 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
  2389. });
  2390.  
  2391. function td_read_site_cookie(a) {
  2392. a = escape(a) + "=";
  2393. for (var b = document.cookie.split(";"), c = 0; c < b.length; c++) {
  2394. for (var d = b[c]; " " == d.charAt(0);) d = d.substring(1, d.length);
  2395. if (0 == d.indexOf(a)) return unescape(d.substring(a.length, d.length))
  2396. }
  2397. return null
  2398. }
  2399.  
  2400. function td_set_cookies_life(a) {
  2401. var b = new Date;
  2402. b.setTime(b.getTime() + a[2]);
  2403. document.cookie = a[0] + "=" + a[1] + "; expires=" + b.toGMTString() + "; path=/"
  2404. }
  2405.  
  2406. function td_delete_site_cookie(a) {
  2407. document.cookie = a + "=; Max-Age=-99999999; path=/"
  2408. }
  2409.  
  2410. var tdIsScrollingAnimation = !1, td_mouse_wheel_or_touch_moved = !1;
  2411. jQuery(document).bind("mousewheel DOMMouseScroll MozMousePixelScroll", function (a) {
  2412. !1 !== tdIsScrollingAnimation && (tdIsScrollingAnimation = !1, td_mouse_wheel_or_touch_moved = !0, jQuery("html, body").stop())
  2413. });
  2414. document.addEventListener && document.addEventListener("touchmove", function (a) {
  2415. !1 !== tdIsScrollingAnimation && (tdIsScrollingAnimation = !1, td_mouse_wheel_or_touch_moved = !0, jQuery("html, body").stop())
  2416. }, !1);
  2417. jQuery(".td-read-down a").click(function (a) {
  2418. a.preventDefault();
  2419. tdUtil.scrollToPosition(jQuery(".td-full-screen-header-image-wrap").height(), 1200)
  2420. });
  2421.  
  2422. function td_post_template_6_title() {
  2423. function a() {
  2424. d = jQuery(document).scrollTop();
  2425. if (950 >= d) {
  2426. var a = 1 - d / 800;
  2427. !0 === tdDetect.isIe8 && (a = 1);
  2428. a = Math.round(100 * a) / 100;
  2429. b.style.opacity = a;
  2430. tdUtil.tdMoveY(c, --Math.round(d / 4));
  2431. h = -Math.round(d / 8);
  2432. tdUtil.tdMoveY(b, -h)
  2433. }
  2434. f = !1
  2435. }
  2436.  
  2437. var b = document.getElementById("td_parallax_header_6"), c = document.getElementById("td-full-screen-header-image"),
  2438. d = "", h;
  2439. jQuery(window).scroll(function () {
  2440. !1 === f && window.requestAnimationFrame(a);
  2441. f = !0
  2442. });
  2443. var f = !1
  2444. }
  2445.  
  2446. function td_smart_lists_magnific_popup() {
  2447. jQuery(".td-lightbox-enabled").magnificPopup({
  2448. delegate: "a",
  2449. type: "image",
  2450. tLoading: "Loading image #%curr%...",
  2451. mainClass: "mfp-img-mobile",
  2452. gallery: {
  2453. enabled: !0,
  2454. navigateByImgClick: !0,
  2455. preload: [0, 1],
  2456. tCounter: tdUtil.getBackendVar("td_magnific_popup_translation_tCounter")
  2457. },
  2458. image: {
  2459. tError: "<a href='%url%'>The image #%curr%</a> could not be loaded.", titleSrc: function (a) {
  2460. return a.el.attr("data-caption")
  2461. }
  2462. },
  2463. zoom: {
  2464. enabled: !0, duration: 300, opener: function (a) {
  2465. return a.find("img")
  2466. }
  2467. },
  2468. callbacks: {
  2469. change: function (a) {
  2470. if ("" != a.el[0].id) {
  2471. var b = a.el[0].id.split("_");
  2472. jQuery(".td-iosSlider").iosSlider("goToSlide", parseInt(b[1]) + 1)
  2473. } else tdModalImageLastEl = a.el, setTimeout(function () {
  2474. tdUtil.scrollIntoView(a.el)
  2475. }, 100)
  2476. }, beforeClose: function () {
  2477. "" != tdModalImageLastEl && tdUtil.scrollIntoView(tdModalImageLastEl)
  2478. }
  2479. }
  2480. });
  2481. jQuery("[data-mfp-src]").on("click", function (a) {
  2482. a.preventDefault();
  2483. if ("undefined" === typeof window.parent.tdcAdminSettings) return a = jQuery(this), a.hasClass("td-mfp-loaded") || (a.addClass("td-mfp-loaded"),
  2484. a.magnificPopup({
  2485. preloader: !0,
  2486. tLoading: "Loading url #%curr%...",
  2487. type: "iframe",
  2488. markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe></div>',
  2489. iframe: {
  2490. patterns: {
  2491. youtube: {
  2492. index: "youtube.com/", id: function (a) {
  2493. return (a = a.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&\?]{11,11}).*/)) && 2 <= a.length ? a[2] : null
  2494. }, src: "//www.youtube.com/embed/%id%?autoplay=1"
  2495. }, vimeo: {index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1"}
  2496. },
  2497. srcAction: "iframe_src"
  2498. }
  2499. })), a.magnificPopup("open"), !1
  2500. })
  2501. }
  2502.  
  2503. function td_get_document_width() {
  2504. var a = 0;
  2505. self.innerHeight ? a = self.innerWidth : document.documentElement && document.documentElement.clientHeight ? a = document.documentElement.clientWidth : document.body && (a = document.body.clientWidth);
  2506. return a
  2507. }
  2508.  
  2509. function td_get_document_height() {
  2510. var a = 0;
  2511. self.innerHeight ? a = self.innerHeight : document.documentElement && document.documentElement.clientHeight ? a = document.documentElement.clientHeight : document.body && (a = document.body.clientHeight);
  2512. return a
  2513. }
  2514.  
  2515. function td_comments_form_validation() {
  2516. if ("show" === tdUtil.getBackendVar("tds_captcha")) {
  2517. var a = jQuery("#g-recaptcha-response");
  2518. if (1 === a.length) {
  2519. var b = a.attr("data-sitekey");
  2520. grecaptcha.ready(function () {
  2521. grecaptcha.execute(b, {action: "validate_captcha"}).then(function (a) {
  2522. document.getElementById("g-recaptcha-response").value = a
  2523. })
  2524. })
  2525. }
  2526. }
  2527. jQuery(".comment-form").on("submit", function (a) {
  2528. var b = jQuery(this), c = !1;
  2529. jQuery(a.target).find(":input").each(function () {
  2530. var d = jQuery(this);
  2531. d.attr("aria-required") && ("" === d.val() ?
  2532. (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),
  2533. c = !0))
  2534. });
  2535. if ("show" === tdUtil.getBackendVar("tds_captcha")) {
  2536. var f = jQuery("#g-recaptcha-response");
  2537. !1 === c && f.length && "" !== f.val() && (a.preventDefault(), f = {
  2538. action: "td_ajax_submit_captcha",
  2539. token: f.val().trim()
  2540. }, jQuery.ajax({type: "POST", url: td_ajax_url, data: f}).success(function (a) {
  2541. a = jQuery.parseJSON(a);
  2542. !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),
  2543. b.find(".td-warning-captcha-score").hide(200)))
  2544. }))
  2545. }
  2546. });
  2547. jQuery("form#commentform :input").each(function () {
  2548. var a = jQuery(this).parent().parent(), b = jQuery(this);
  2549. b.focus(function () {
  2550. "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),
  2551. a.find(".td-warning-email-error").hide(200), a.find(".td-warning-captcha").hide(200), b.css("border", "1px solid #e1e1e1"))
  2552. })
  2553. })
  2554. }
  2555.  
  2556. jQuery(window).on("load", function () {
  2557. var a = td_read_site_cookie("td-cookie-scroll-to-class"), b = td_read_site_cookie("td-cookie-scroll-offset");
  2558. if ("undefined" !== typeof a && null !== a) {
  2559. td_set_cookies_life(["td-cookie-scroll-to-class", "", 1]);
  2560. td_set_cookies_life(["td-cookie-scroll-offset", "", 1]);
  2561. var c = jQuery("." + a);
  2562. if (c.length) {
  2563. c = c.offset();
  2564. var d = 400 * Math.floor(Math.abs(c.top) / 100);
  2565. 1500 < d ? d = 1500 : 500 > d && (d = 500);
  2566. var h = 0;
  2567. "undefined" !== typeof b && null !== b && (h = parseInt(b));
  2568. tdUtil.scrollToPosition(c.top + h, d);
  2569. a = jQuery('[data-scroll-to-class="' +
  2570. a + '"]');
  2571. 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")))
  2572. }
  2573. }
  2574. });
  2575. "undefined" !== typeof window.td_fb_login_enabled && jQuery.ajax({
  2576. type: "POST", url: td_ajax_url, data: {action: "td_ajax_fb_login_get_credentials"}, success: function (a) {
  2577. var b = jQuery.parseJSON(a);
  2578. "" === b.error && (window.fbAsyncInit = function () {
  2579. FB.init({appId: b.app_id, cookie: !0, xfbml: !0, version: "v13.0"});
  2580. FB.AppEvents.logPageView()
  2581. }, function (a, b, h) {
  2582. var c = a.getElementsByTagName(b)[0];
  2583. 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))
  2584. }(document,
  2585. "script", "facebook-jssdk"))
  2586. }
  2587. });
  2588. var tdBlocks = {};
  2589. (function () {
  2590. function a() {
  2591. function a(a, b) {
  2592. !0 === d && a.target === h ? window.location = a.target : (d = !0, h = a.target, a.preventDefault(), setTimeout(function () {
  2593. d = !1
  2594. }, 300), c(a, b))
  2595. }
  2596.  
  2597. function c(a, b) {
  2598. a = b.data("td_block_id");
  2599. var c = tdBlocks.tdGetBlockObjById(a);
  2600. c.is_ajax_running = !0;
  2601. jQuery(".mega-menu-sub-cat-" + a).removeClass("cur-sub-cat");
  2602. b.addClass("cur-sub-cat");
  2603. c.td_filter_value = b.data("td_filter_value");
  2604. c.td_current_page = 1;
  2605. tdBlocks.tdAjaxDoBlockRequest(c, "mega_menu")
  2606. }
  2607.  
  2608. jQuery(".td_block_wrap").on("click", ".td-ajax-next-page",
  2609. function (a) {
  2610. a.preventDefault();
  2611. a = tdBlocks.tdGetBlockObjById(jQuery(this).data("td_block_id"));
  2612. jQuery(this).hasClass("ajax-page-disabled") || !0 === a.is_ajax_running || (a.is_ajax_running = !0, a.td_current_page++, tdBlocks.tdAjaxDoBlockRequest(a, "next"))
  2613. });
  2614. jQuery(".td_block_wrap").on("click", ".td-ajax-prev-page", function (a) {
  2615. a.preventDefault();
  2616. a = tdBlocks.tdGetBlockObjById(jQuery(this).data("td_block_id"));
  2617. jQuery(this).hasClass("ajax-page-disabled") || !0 === a.is_ajax_running || (a.is_ajax_running = !0, a.td_current_page--,
  2618. tdBlocks.tdAjaxDoBlockRequest(a, "back"))
  2619. });
  2620. "undefined" !== typeof window.Hammer && jQuery(".td_with_ajax_pagination_next_prev_swipe:not(.tdb_header_mega_menu)").hammer().bind("swipeleft swiperight", function (a) {
  2621. var b = jQuery(this), c = tdBlocks.tdGetBlockObjById(b.data("td-block-uid"));
  2622. switch (a.type) {
  2623. case "swipeleft":
  2624. if (b.find(".td-ajax-next-page").hasClass("ajax-page-disabled") || !0 === c.is_ajax_running) break;
  2625. c.is_ajax_running = !0;
  2626. c.td_current_page++;
  2627. tdBlocks.tdAjaxDoBlockRequest(c, "next");
  2628. break;
  2629. case "swiperight":
  2630. b.find(".td-ajax-prev-page").hasClass("ajax-page-disabled") ||
  2631. !0 === c.is_ajax_running || (c.is_ajax_running = !0, c.td_current_page--, tdBlocks.tdAjaxDoBlockRequest(c, "prev"))
  2632. }
  2633. });
  2634. jQuery(document).on("click", ".td-load-more-wrap .td_ajax_load_more_js", function (a) {
  2635. a.preventDefault();
  2636. 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"))
  2637. });
  2638. if (tdDetect.isMobileDevice) jQuery(".td-pulldown-filter-display-option").on("click", function () {
  2639. var a = jQuery(this).data("td_block_id");
  2640. jQuery("#td_pulldown_" + a).addClass("td-pulldown-filter-list-open");
  2641. a = jQuery("#td_pulldown_" + a + "_list");
  2642. a.removeClass("fadeOut");
  2643. a.addClass("td_animated td_fadeIn")
  2644. }); else jQuery(".td-pulldown-filter-display-option").hover(function () {
  2645. var a = jQuery(this).data("td_block_id");
  2646. jQuery("#td_pulldown_" + a).addClass("td-pulldown-filter-list-open");
  2647. a = jQuery("#td_pulldown_" + a + "_list");
  2648. a.removeClass("fadeOut");
  2649. a.addClass("td_animated td_fadeIn");
  2650. a.css("visibility", "visible")
  2651. }, function () {
  2652. var a = jQuery(this).data("td_block_id");
  2653. jQuery("#td_pulldown_" + a).removeClass("td-pulldown-filter-list-open")
  2654. });
  2655. jQuery(".td-related-title a").on("click", function (a) {
  2656. a.preventDefault();
  2657. jQuery(".td-related-title").children("a").removeClass("td-cur-simple-item");
  2658. jQuery(this).addClass("td-cur-simple-item");
  2659. a = jQuery(this).data("td_block_id");
  2660. a = tdBlocks.tdGetBlockObjById(a);
  2661. a.td_filter_value = jQuery(this).data("td_filter_value");
  2662. a.td_current_page = 1;
  2663. tdBlocks.tdAjaxDoBlockRequest(a, "pull_down")
  2664. });
  2665. var d = !1, h = "";
  2666. if (tdDetect.isTouchDevice) jQuery(".block-mega-child-cats a").click(function (b) {
  2667. a(b, jQuery(this))
  2668. }, !1).each(function (b, c) {
  2669. c.addEventListener("touchend", function (b) {
  2670. a(b, jQuery(this))
  2671. }, !1)
  2672. }); else jQuery("body").on("mouseenter", ".block-mega-child-cats a", function (a) {
  2673. c(a, jQuery(this))
  2674. });
  2675. jQuery("body").on("click", ".td-subcat-item a", function (a) {
  2676. a.preventDefault();
  2677. a = tdBlocks.tdGetBlockObjById(jQuery(this).data("td_block_id"));
  2678. !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"))
  2679. });
  2680. jQuery(".td-pulldown-filter-link").on("click", function (a) {
  2681. a.preventDefault();
  2682. var b = jQuery(this).data("td_block_id");
  2683. jQuery("#" + b).find(".iosSlider").iosSlider("destroy");
  2684. var c = tdBlocks.tdGetBlockObjById(b);
  2685. !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))
  2686. })
  2687. }
  2688.  
  2689. jQuery().ready(function () {
  2690. a()
  2691. });
  2692. tdBlocks = {
  2693. tdPullDownFilterChangeValue: function (a,
  2694. c) {
  2695. jQuery("#td-pulldown-" + a + "-val").html(c)
  2696. }, tdAjaxDoBlockRequest: function (a, c) {
  2697. var b = JSON.stringify(a);
  2698. 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";
  2699. tdBlocks.tdBlockAjaxLoadingStart(a, !1, c);
  2700. var h = {
  2701. action: "td_ajax_block",
  2702. td_atts: a.atts,
  2703. td_block_id: a.id,
  2704. td_column_number: a.td_column_number,
  2705. td_current_page: a.td_current_page,
  2706. block_type: a.block_type,
  2707. td_filter_value: a.td_filter_value,
  2708. td_user_action: a.td_user_action,
  2709. td_magic_token: tdBlockNonce
  2710. };
  2711. if ("td_woo_products_loop" === a.block_type) {
  2712. -1 === td_ajax_url.indexOf("td_woo_ajax=1") && (td_ajax_url += "&td_woo_ajax=1");
  2713. var f = JSON.parse(a.atts);
  2714. "undefined" !== typeof f.ajax_pagination && "numbered" === f.ajax_pagination && (h.td_request_uri = window.location.pathname + window.location.search)
  2715. }
  2716. jQuery.ajax({
  2717. type: "POST", url: td_ajax_url, cache: !0, data: h, success: function (d,
  2718. f, h) {
  2719. tdLocalCache.set(b, d);
  2720. tdBlocks.tdAjaxBlockProcessResponse(d, c);
  2721. "td_woo_products_loop" === a.block_type && jQuery(document).trigger("td_woo_ajax_block_update", [a, c, d]);
  2722. d = jQuery("." + a.id).find("audio");
  2723. d.length && d.mediaelementplayer()
  2724. }, error: function (a, b, c) {
  2725. console.log(c)
  2726. }
  2727. })
  2728. }, tdAjaxBlockProcessResponse: function (a, c) {
  2729. a = jQuery.parseJSON(a);
  2730. if ("load_more" === c || "infinite_load" === c) {
  2731. if ("undefined" !== typeof window.tdSmartSidebar) for (var b = 0; b < tdSmartSidebar.items.length; b++) "case_3_bottom_of_content" ===
  2732. tdSmartSidebar.items[b].sidebar_state && (tdSmartSidebar.items[b].sidebar_state = "case_1_fixed_down");
  2733. jQuery(a.td_data).appendTo("#" + a.td_block_id)
  2734. } else jQuery("#" + a.td_block_id).html(a.td_data);
  2735. !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");
  2736. !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");
  2737. b = tdBlocks.tdGetBlockObjById(a.td_block_id);
  2738. "slide" === b.block_type && jQuery("#" + a.td_block_id + " .slide-wrap-active-first").addClass("slide-wrap-active");
  2739. b.is_ajax_running = !1;
  2740. tdBlocks.tdBlockAjaxLoadingEnd(a, b, c)
  2741. }, tdBlockAjaxLoadingStart: function (a, c, d) {
  2742. var b = jQuery("#" + a.id);
  2743. jQuery("." + a.id + " .td-loader-gif").remove();
  2744. b.removeClass("td_fadeInRight td_fadeInLeft td_fadeInDown td_fadeInUp td_animated_xlong");
  2745. b.addClass("td_block_inner_overflow");
  2746. var f = b.height();
  2747. b.css("height", f);
  2748. !1 === c && ("load_more" ===
  2749. 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 () {
  2750. jQuery(".td-loader-gif").removeClass("td-loader-animation-start").addClass("td-loader-animation-mid")
  2751. }, 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 :
  2752. tds_theme_color_site_wide), setTimeout(function () {
  2753. jQuery(".td-loader-gif").removeClass("td-loader-animation-start").addClass("td-loader-animation-mid")
  2754. }, 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 () {
  2755. jQuery(".td-loader-gif").removeClass("td-loader-animation-start").addClass("td-loader-animation-mid")
  2756. }, 50), b.addClass("td_animated_long td_fadeOut_to_1")))
  2757. }, tdBlockAjaxLoadingEnd: function (a,
  2758. c, d) {
  2759. jQuery("." + c.id + " .td-loader-gif").removeClass("td-loader-animation-mid").addClass("td-loader-animation-end");
  2760. setTimeout(function () {
  2761. jQuery("." + c.id + " .td-loader-gif").remove();
  2762. tdLoadingBox.stop()
  2763. }, 400);
  2764. var b = jQuery("#" + c.id);
  2765. b.removeClass("td_animated_long td_fadeOut_to_1");
  2766. if (!0 === tdAnimationStack.activated) var f = tdAnimationStack.SORTED_METHOD.sort_left_to_right;
  2767. switch (d) {
  2768. case "next":
  2769. b.addClass("td_animated_xlong td_fadeInRight");
  2770. void 0 !== f && (f = tdAnimationStack.SORTED_METHOD.sort_right_to_left);
  2771. break;
  2772. case "back":
  2773. b.addClass("td_animated_xlong td_fadeInLeft");
  2774. break;
  2775. case "pull_down":
  2776. var p = JSON.parse(c.atts);
  2777. "undefined" !== typeof p.ajax_pagination && "infinite" === p.ajax_pagination && (tdInfiniteLoader.computeTopDistances(), tdInfiniteLoader.enable_is_visible_callback(c.id));
  2778. b.addClass("td_animated_xlong td_fadeInDown");
  2779. break;
  2780. case "mega_menu":
  2781. b.addClass("td_animated_xlong td_fadeInDown");
  2782. break;
  2783. case "load_more":
  2784. setTimeout(function () {
  2785. jQuery("." + c.id + " .td_ajax_load_more_js").css("visibility", "visible")
  2786. },
  2787. 500);
  2788. break;
  2789. case "infinite_load":
  2790. setTimeout(function () {
  2791. tdInfiniteLoader.computeTopDistances();
  2792. "" !== a.td_data && tdInfiniteLoader.enable_is_visible_callback(c.id)
  2793. }, 500), setTimeout(function () {
  2794. tdInfiniteLoader.computeTopDistances()
  2795. }, 1E3), setTimeout(function () {
  2796. tdInfiniteLoader.computeTopDistances()
  2797. }, 1500)
  2798. }
  2799. setTimeout(function () {
  2800. jQuery(".td_block_inner_overflow").removeClass("td_block_inner_overflow");
  2801. b.css("height", "auto");
  2802. "undefined" !== typeof window.tdSmartSidebar && tdSmartSidebar.compute()
  2803. }, 200);
  2804. "undefined" !==
  2805. typeof window.tdSmartSidebar && setTimeout(function () {
  2806. tdSmartSidebar.compute()
  2807. }, 500);
  2808. void 0 !== f && setTimeout(function () {
  2809. "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)
  2810. }, 200)
  2811. }, tdGetBlockIndex: function (a) {
  2812. var b = 0, d = 0;
  2813. jQuery.each(tdBlocksArray, function (c, f) {
  2814. if (f.id === a) return d = b, !1;
  2815. b++
  2816. });
  2817. return d
  2818. },
  2819. tdGetBlockObjById: function (a) {
  2820. return tdBlocksArray[tdBlocks.tdGetBlockIndex(a)]
  2821. }
  2822. }
  2823. })();
  2824. "use strict";
  2825. var td_history = {
  2826. td_history_change_event: !1, init: function () {
  2827. window.addEventListener("popstate", function (a) {
  2828. td_history.td_history_change_event = !0;
  2829. "undefined" != typeof a.state && null != a.state && jQuery("#" + a.state.slide_id).iosSlider("goToSlide", a.state.current_slide)
  2830. })
  2831. }, replace_history_entry: function (a) {
  2832. !1 !== tdDetect.hasHistory && history.replaceState(a, null)
  2833. }, add_history_entry: function (a, b, c) {
  2834. if (!1 !== tdDetect.hasHistory) if ("" == c) history.pushState(a, null, null); else {
  2835. var d = td_history.get_query_parameter("p");
  2836. "" != 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 + "/")
  2837. }
  2838. }, get_mod_rewrite_base_url: function () {
  2839. var a = document.URL;
  2840. "/" == a.charAt(a.length - 1) && (a = a.slice(0, -1));
  2841. return !1 === td_history.get_mod_rewrite_pagination(document.URL) ? document.URL : a.substring(0, a.lastIndexOf("/")) + "/"
  2842. }, get_mod_rewrite_pagination: function () {
  2843. var a = document.URL;
  2844. "/" == a.charAt(a.length - 1) && (a = a.slice(0, -1));
  2845. a = a.substring(a.lastIndexOf("/") + 1, a.length);
  2846. return td_history.isInt(a) ? a : !1
  2847. }, get_current_page: function (a) {
  2848. if ("" != td_history.get_query_parameter("p")) return a = td_history.get_query_parameter(a), "" != a ? a : 1;
  2849. a = td_history.get_mod_rewrite_pagination();
  2850. return !1 !== a ? a : 1
  2851. }, isInt: function (a) {
  2852. return 0 === a % 1
  2853. }, get_query_parameter: function (a) {
  2854. a = a.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
  2855. a = (new RegExp("[\\?&]" + a + "=([^&#]*)")).exec(location.search);
  2856. return null == a ? "" :
  2857. decodeURIComponent(a[1].replace(/\+/g, " "))
  2858. }, slide_changed_callback: function (a) {
  2859. if (!0 === td_history.td_history_change_event) td_history.td_history_change_event = !1; else {
  2860. var b = a.currentSlideNumber;
  2861. a = a.sliderContainerObject.attr("id");
  2862. td_history.add_history_entry({current_slide: b, slide_id: a}, "slide", b)
  2863. }
  2864. }
  2865. };
  2866. window.history && window.history.pushState && td_history.init();
  2867. var tdHeader = {};
  2868. (function () {
  2869. tdHeader = {
  2870. _selectorHeaderDesktop: ".td-header-desktop-wrap",
  2871. _selectorHeaderDesktopSticky: ".td-header-desktop-sticky-wrap",
  2872. _selectorHeaderMobile: ".td-header-mobile-wrap",
  2873. _selectorHeaderMobileSticky: ".td-header-mobile-sticky-wrap",
  2874. _selectorDataHeaderDesktop: "tdc_header_desktop",
  2875. _selectorDataHeaderDesktopSticky: "tdc_header_desktop_sticky",
  2876. _selectorDataHeaderMobile: "tdc_header_mobile",
  2877. _selectorDataHeaderMobileSticky: "tdc_header_mobile_sticky",
  2878. $_headerDesktop: void 0,
  2879. $_headerDesktopSticky: void 0,
  2880. $_mobileDesktop: void 0,
  2881. $_mobileDesktopSticky: void 0,
  2882. _headerDesktopHeight: void 0,
  2883. _headerDesktopStickyHeight: void 0,
  2884. _headerMobileHeight: void 0,
  2885. _headerMobileStickyHeight: void 0,
  2886. _headerDesktopStickyGap: 0,
  2887. _headerMobileStickyGap: 0,
  2888. _previousScrollPosition: 0,
  2889. _isMobile: !1,
  2890. _isInitialized: !1,
  2891. init: function () {
  2892. !tdHeader._isInitialized && (tdHeader.$_headerDesktop = jQuery(tdHeader._selectorHeaderDesktop), tdHeader.$_headerDesktopSticky = jQuery(tdHeader._selectorHeaderDesktopSticky), tdHeader.$_headerMobile = jQuery(tdHeader._selectorHeaderMobile),
  2893. 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")),
  2894. tdHeader.checkSizes(), tdHeader._isInitialized = !0)
  2895. },
  2896. computeItems: function () {
  2897. if (tdHeader._isInitialized) {
  2898. 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") ?
  2899. 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")) :
  2900. (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") &&
  2901. 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 >
  2902. 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"),
  2903. 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")) :
  2904. (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") ||
  2905. 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"))));
  2906. if (window.parent === window.top && "undefined" !== typeof window.name && "tdc-live-iframe" === window.name && "undefined" !== typeof window.parent.tdcSidebar) {
  2907. var a = tdHeader.getActiveHeaderSelector();
  2908. 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),
  2909. tdHeader.timeoutHeaderTemplate = setTimeout(function () {
  2910. window.parent.tdcSidebar.$_tdcZone.find('.tdc-zone[data-type="' + a + '"]').addClass("tdc-zone-active");
  2911. 0 > a.indexOf("sticky") && window.parent.tdcSidebar.setForcedHeaderZone(void 0);
  2912. 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");
  2913. window.parent.tdcState.isMobileHeaderSticky() ?
  2914. tdHeader.$_headerMobileSticky.addClass("tdc-zone-sticky-active").removeClass("tdc-zone-sticky-inactive") : tdHeader.$_headerMobileSticky.addClass("tdc-zone-sticky-inactive").removeClass("tdc-zone-sticky-active");
  2915. 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") :
  2916. 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")
  2917. }, 250)
  2918. }
  2919. tdHeader._previousScrollPosition = tdEvents.scroll_window_scrollTop
  2920. }
  2921. },
  2922. scroll: function () {
  2923. tdHeader.computeItems()
  2924. },
  2925. resize: function () {
  2926. tdHeader.checkSizes();
  2927. tdHeader.computeItems()
  2928. },
  2929. checkSizes: function () {
  2930. if (tdHeader._isInitialized) {
  2931. tdHeader._headerDesktopHeight =
  2932. tdHeader.$_headerDesktop.outerHeight(!0);
  2933. tdHeader._headerDesktopStickyHeight = tdHeader.$_headerDesktopSticky.outerHeight(!0);
  2934. tdHeader._headerMobileHeight = tdHeader.$_headerMobile.outerHeight(!0);
  2935. tdHeader._headerMobileStickyHeight = tdHeader.$_headerMobileSticky.outerHeight(!0);
  2936. var a = tdHeader.$_headerDesktopSticky.find(".tdc_zone:first").data("sticky-offset");
  2937. "undefined" !== typeof a && (tdHeader._headerDesktopStickyGap = a);
  2938. tdHeader._isMobile = 768 > tdEvents.window_innerWidth
  2939. }
  2940. },
  2941. getFixedHeaderHeight: function () {
  2942. if (tdHeader._isInitialized) return tdHeader.checkSizes(),
  2943. tdHeader._isMobile ? tdHeader._headerMobileHeight : tdHeader._headerDesktopHeight
  2944. },
  2945. getActiveHeaderSelector: function () {
  2946. 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
  2947. },
  2948. doExtra: function () {
  2949. "undefined" !== typeof window.tdbSearch && "undefined" !==
  2950. typeof window.tdbSearch.hideAllItems && window.tdbSearch.hideAllItems()
  2951. }
  2952. };
  2953. jQuery(window).on("load", function () {
  2954. tdHeader.init();
  2955. tdHeader.resize()
  2956. })
  2957. })();
  2958. var tdCustomEvents = {};
  2959. (function () {
  2960. tdCustomEvents = {
  2961. _callback_scroll: function () {
  2962. "undefined" !== typeof window.tdAnimationScroll && tdAnimationScroll.compute_all_items()
  2963. }, _callback_resize: function () {
  2964. }, _lazy_callback_scroll_100: function () {
  2965. !0 === tdAnimationStack.activated && tdAnimationStack.td_events_scroll()
  2966. }, _lazy_callback_scroll_500: function () {
  2967. }, _lazy_callback_resize_100: function () {
  2968. tdPullDown.td_events_resize();
  2969. "undefined" !== typeof window.tdBackstr && tdBackstr.td_events_resize();
  2970. "undefined" !== typeof window.tdAnimationScroll && tdAnimationScroll.td_events_resize()
  2971. },
  2972. _lazy_callback_resize_500: function () {
  2973. !0 === tdAnimationStack.activated && tdAnimationStack.td_events_resize();
  2974. if ("undefined" !== typeof window.tdAnimationScroll) {
  2975. 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]);
  2976. tdAnimationScroll.compute_all_items();
  2977. jQuery("body").find(".tdc-video-inner-wrapper").each(function () {
  2978. var a = jQuery(this), c = a.find("iframe");
  2979. if (c.length) {
  2980. var d = c.attr("aspect-ratio");
  2981. if ("undefined" !== typeof d) {
  2982. var h = a.width();
  2983. a = a.height();
  2984. var f = a / h;
  2985. d < f ? c.css({width: a / d, height: a}) : d > f && c.css({width: "100%", height: d * h})
  2986. }
  2987. }
  2988. });
  2989. for (a = 0; a < tdAnimationScroll.items.length; a++) "undefined" !== typeof tdAnimationScroll.items[a].td_video_parallax && tdAnimationScroll.reinitialize_item(tdAnimationScroll.items[a], !0)
  2990. }
  2991. }
  2992. }
  2993. })();
  2994. var tdEvents = {};
  2995. (function () {
  2996. tdEvents = {
  2997. scroll_event_slow_run: !1,
  2998. scroll_event_medium_run: !1,
  2999. resize_event_slow_run: !1,
  3000. resize_event_medium_run: !1,
  3001. scroll_window_scrollTop: 0,
  3002. window_pageYOffset: window.pageYOffset,
  3003. window_innerHeight: window.innerHeight,
  3004. window_innerWidth: window.innerWidth,
  3005. init: function () {
  3006. jQuery(window).scroll(function () {
  3007. tdEvents.scroll_event_slow_run = !0;
  3008. tdEvents.scroll_event_medium_run = !0;
  3009. tdEvents.scroll_window_scrollTop = jQuery(window).scrollTop();
  3010. tdEvents.window_pageYOffset = window.pageYOffset;
  3011. tdAffix.td_events_scroll(tdEvents.scroll_window_scrollTop);
  3012. "undefined" !== typeof window.tdSmartSidebar && tdSmartSidebar.td_events_scroll(tdEvents.scroll_window_scrollTop);
  3013. tdCustomEvents._callback_scroll();
  3014. tdHeader.scroll();
  3015. tdShowVideo.scroll();
  3016. "undefined" !== typeof window.tdToTop && tdToTop.td_events_scroll(tdEvents.scroll_window_scrollTop)
  3017. });
  3018. jQuery(window).resize(function () {
  3019. tdEvents.resize_event_slow_run = !0;
  3020. tdEvents.resize_event_medium_run = !0;
  3021. tdEvents.window_innerHeight = window.innerHeight;
  3022. tdEvents.window_innerWidth = window.innerWidth;
  3023. tdCustomEvents._callback_resize();
  3024. tdHeader.resize()
  3025. });
  3026. setInterval(function () {
  3027. tdViewport.detectChanges();
  3028. tdEvents.scroll_event_medium_run && (tdEvents.scroll_event_medium_run = !1, "undefined" !== typeof window.tdInfiniteLoader && tdInfiniteLoader.computeEvents(), tdCustomEvents._lazy_callback_scroll_100());
  3029. tdEvents.resize_event_medium_run && (tdEvents.resize_event_medium_run = !1, "undefined" !== typeof window.tdSmartSidebar && tdSmartSidebar.td_events_resize(), tdCustomEvents._lazy_callback_resize_100())
  3030. }, 100);
  3031. setInterval(function () {
  3032. tdEvents.scroll_event_slow_run &&
  3033. (tdEvents.scroll_event_slow_run = !1, td_more_articles_box.td_events_scroll(tdEvents.scroll_window_scrollTop), tdCustomEvents._lazy_callback_scroll_500());
  3034. tdEvents.resize_event_slow_run && (tdEvents.resize_event_slow_run = !1, tdAffix.compute_wrapper(), tdAffix.compute_top(), tdDetect.runIsPhoneScreen(), tdCustomEvents._lazy_callback_resize_500())
  3035. }, 500)
  3036. }
  3037. };
  3038. tdEvents.init()
  3039. })();
  3040. var tdPullDown = {};
  3041. (function () {
  3042. tdPullDown = {
  3043. _view_port_interval_index: tdViewport.INTERVAL_INITIAL_INDEX, items: [], item: function () {
  3044. this.container_jquery_obj = this.vertical_jquery_obj = this.horizontal_jquery_obj = this.blockUid = "";
  3045. this.isTdbMenu = !1;
  3046. this.horizontal_max_width = this.horizontal_no_items_css_class = this.horizontal_element_css_class = this.sub_icon = this.main_sub_icon = "";
  3047. this.minimum_elements = 1;
  3048. this.excluded_jquery_elements = [];
  3049. this._horizontal_extra_space = 1;
  3050. this._horizontal_elements = [];
  3051. this._vertical_elements = [];
  3052. this._vertical_ul_jquery_obj =
  3053. "";
  3054. this._vertical_jquery_obj_outer_width = 0;
  3055. this._is_initialized = !1
  3056. }, init: function () {
  3057. tdPullDown._view_port_interval_index = tdViewport.getCurrentIntervalIndex();
  3058. tdPullDown.items = []
  3059. }, add_item: function (a) {
  3060. if (1 !== a.vertical_jquery_obj.length) throw"item.vertical_jquery_obj is more or less than one: " + a.vertical_jquery_obj.length;
  3061. if (1 !== a.horizontal_jquery_obj.length) throw"item.horizontal_jquery_obj is more or less than one: " + a.horizontal_jquery_obj.length;
  3062. if (1 !== a.container_jquery_obj.length) throw"item.container_jquery_obj is more or less than one: " +
  3063. a.container_jquery_obj.length;
  3064. if ("" === a.horizontal_element_css_class) throw"item.horizontal_element_css_class is empty";
  3065. tdPullDown.items.push(a);
  3066. tdPullDown._initialize_item(a);
  3067. tdPullDown._compute_item(a)
  3068. }, deleteItem: function (a) {
  3069. for (var b = 0; b < tdPullDown.items.length; b++) if (tdPullDown.items[b].blockUid === a) return tdPullDown.items.splice(b, 1), !0;
  3070. return !1
  3071. }, unloadItem: function (a) {
  3072. for (var b = 0; b < tdPullDown.items.length; b++) if (tdPullDown.items[b].blockUid === a) {
  3073. 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);
  3074. tdPullDown.deleteItem(a);
  3075. return !0
  3076. }
  3077. return !1
  3078. }, _initialize_item: function (a) {
  3079. 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 {
  3080. var b = null, c = null;
  3081. a.horizontal_jquery_obj.find("." + a.horizontal_element_css_class + ":visible").each(function (d, f) {
  3082. b = jQuery(f);
  3083. b.css("-webkit-transition", "opacity 0.2s");
  3084. b.css("-moz-transition", "opacity 0.2s");
  3085. b.css("-o-transition", "opacity 0.2s");
  3086. b.css("transition", "opacity 0.2s");
  3087. b.css("opacity", "1");
  3088. c = {jquery_object: b, calculated_width: b.outerWidth(!0)};
  3089. a._horizontal_elements.push(c)
  3090. });
  3091. a._vertical_jquery_obj_outer_width = a.vertical_jquery_obj.outerWidth(!0);
  3092. a.vertical_jquery_obj.css("display", "none");
  3093. var d = a.horizontal_jquery_obj.css("padding-left");
  3094. void 0 !== d && "" !== d && (a._horizontal_extra_space += parseInt(d.replace("px", "")));
  3095. d = a.horizontal_jquery_obj.css("padding-right");
  3096. void 0 !== d && "" !== d && (a._horizontal_extra_space +=
  3097. parseInt(d.replace("px", "")));
  3098. d = a.horizontal_jquery_obj.css("margin-left");
  3099. void 0 !== d && "" !== d && (a._horizontal_extra_space += parseInt(d.replace("px", "")));
  3100. d = a.horizontal_jquery_obj.css("margin-right");
  3101. void 0 !== d && "" !== d && (a._horizontal_extra_space += parseInt(d.replace("px", "")));
  3102. d = a.horizontal_jquery_obj.css("border-left");
  3103. void 0 !== d && "" !== d && (a._horizontal_extra_space += parseInt(d.replace("px", "")));
  3104. d = a.horizontal_jquery_obj.css("border-right");
  3105. void 0 !== d && "" !== d && (a._horizontal_extra_space += parseInt(d.replace("px",
  3106. "")));
  3107. a._is_initialized = !0
  3108. }
  3109. }, _get_horizontal_elements_width: function (a) {
  3110. for (var b = 0, c = a._horizontal_elements.length - 1; 0 <= c; c--) b += a._horizontal_elements[c].calculated_width;
  3111. return b
  3112. }, _reinitialize_all_items: function () {
  3113. for (var a = tdPullDown.items.length - 1; 0 <= a; a--) tdPullDown._reinitialize_item(tdPullDown.items[a])
  3114. }, _reinitialize_item: function (a) {
  3115. if (!1 !== a._is_initialized) {
  3116. a._is_initialized = !1;
  3117. a.horizontal_jquery_obj.html(a.horizontal_jquery_obj.html() + a._vertical_ul_jquery_obj.html());
  3118. if (a.isTdbMenu) {
  3119. var b =
  3120. a.horizontal_jquery_obj.find("> .tdb-normal-menu.menu-item-has-children");
  3121. b.length && b.each(function () {
  3122. var b = jQuery(this);
  3123. tdPullDown._change_sub_icon_horiz_elements(a, b)
  3124. })
  3125. }
  3126. a._vertical_ul_jquery_obj.html("");
  3127. a._horizontal_elements = [];
  3128. a._vertical_elements = [];
  3129. a._horizontal_extra_space = 1;
  3130. tdPullDown._initialize_item(a)
  3131. }
  3132. }, _compute_item: function (a) {
  3133. if (!1 !== a._is_initialized) {
  3134. tdPullDown._prepare_horizontal_header(a, !0);
  3135. var b = 0, c = a.container_jquery_obj.width();
  3136. if (void 0 !== c && "" !== c) {
  3137. b = c;
  3138. if ("" !== a.horizontal_max_width) {
  3139. var d =
  3140. parseInt(a.horizontal_max_width.replace("px", ""));
  3141. c > d && (b = d)
  3142. }
  3143. for (c = a.excluded_jquery_elements.length - 1; 0 <= c; c--) b -= a.excluded_jquery_elements[c].outerWidth(!0)
  3144. }
  3145. 0 < a._vertical_elements.length && (b -= a._vertical_jquery_obj_outer_width);
  3146. b -= tdPullDown._get_horizontal_elements_width(a);
  3147. for (b -= a._horizontal_extra_space; 0 > b;) {
  3148. if (0 !== a.minimum_elements && a._horizontal_elements.length <= a.minimum_elements) {
  3149. tdPullDown._make_all_elements_vertical(a);
  3150. tdPullDown._prepare_horizontal_header(a);
  3151. return
  3152. }
  3153. 0 === a._vertical_elements.length &&
  3154. (b -= a._vertical_jquery_obj_outer_width);
  3155. d = tdPullDown._make_element_vertical(a);
  3156. b += d.calculated_width
  3157. }
  3158. if (0 !== a.minimum_elements && 0 === a._horizontal_elements.length && 0 < a._vertical_elements.length && b >= a._vertical_elements[0].calculated_width) {
  3159. for (d = c = 0; d < a.minimum_elements && d < a._vertical_elements.length; d++) c += a._vertical_elements[d].calculated_width;
  3160. 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--;
  3161. else {
  3162. tdPullDown._prepare_horizontal_header(a);
  3163. return
  3164. }
  3165. b -= h
  3166. }
  3167. 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 {
  3168. tdPullDown._prepare_horizontal_header(a);
  3169. return
  3170. }
  3171. 1 === a._vertical_elements.length && b + a._vertical_jquery_obj_outer_width >= a._vertical_elements[0].calculated_width && tdPullDown._make_element_horizontal(a);
  3172. tdPullDown._add_no_items_class(a);
  3173. tdPullDown._prepare_horizontal_header(a)
  3174. }
  3175. }, _prepare_horizontal_header: function (a, b) {
  3176. var c = a.horizontal_jquery_obj.parent().siblings(".block-title:first");
  3177. 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)))
  3178. }, _compute_all_items: function () {
  3179. for (var a = tdPullDown.items.length - 1; 0 <= a; a--) tdPullDown.items[a].constructor ===
  3180. tdPullDown.item && tdPullDown._compute_item(tdPullDown.items[a])
  3181. }, _make_element_horizontal: function (a) {
  3182. if (!1 === a._is_initialized || 0 === a._vertical_elements.length) return null;
  3183. var b = a._vertical_elements.shift(), c = b.jquery_object;
  3184. 0 === a._vertical_elements.length && a.vertical_jquery_obj.css("display", "none");
  3185. a._horizontal_elements.push(b);
  3186. c.css("opacity", "0");
  3187. c.detach().appendTo(a.horizontal_jquery_obj);
  3188. !0 === a.isTdbMenu && c.hasClass("menu-item-has-children") && c.hasClass("tdb-normal-menu") && tdPullDown._change_sub_icon_horiz_elements(a,
  3189. c);
  3190. setTimeout(function () {
  3191. b.jquery_object.css("opacity", "1")
  3192. }, 50);
  3193. return b
  3194. }, _change_sub_icon_horiz_elements: function (a, b) {
  3195. b = b.find("> a");
  3196. var c = b.find(".tdb-sub-menu-icon");
  3197. c.length ? "" !== a.main_sub_icon ? c.replaceWith(a.main_sub_icon) : c.remove() : "" !== a.main_sub_icon && b.append(a.main_sub_icon)
  3198. }, _make_element_vertical: function (a) {
  3199. if (!1 === a._is_initialized || 0 === a._horizontal_elements.length) return null;
  3200. var b = a._horizontal_elements.pop(), c = b.jquery_object;
  3201. 0 === a._vertical_elements.length && a.vertical_jquery_obj.css("display",
  3202. "");
  3203. a._vertical_elements.unshift(b);
  3204. c.detach().prependTo(a._vertical_ul_jquery_obj);
  3205. !0 === a.isTdbMenu && c.hasClass("menu-item-has-children") && c.hasClass("tdb-normal-menu") && tdPullDown._change_sub_icon_vert_elements(a, c);
  3206. return b
  3207. }, _change_sub_icon_vert_elements: function (a, b) {
  3208. b = b.find("> a");
  3209. var c = b.find(".tdb-sub-menu-icon");
  3210. c.length ? "" !== a.sub_icon ? c.replaceWith(a.sub_icon) : c.remove() : "" !== a.sub_icon && b.append(a.sub_icon)
  3211. }, _make_all_elements_vertical: function (a) {
  3212. for (; 0 < a._horizontal_elements.length;) tdPullDown._make_element_vertical(a);
  3213. tdPullDown._add_no_items_class(a)
  3214. }, _add_no_items_class: function (a) {
  3215. "" !== 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))
  3216. }, td_events_resize: function () {
  3217. 0 !== tdPullDown.items.length && (tdPullDown._view_port_interval_index !== tdViewport.getCurrentIntervalIndex() ? (tdPullDown._view_port_interval_index = tdViewport.getCurrentIntervalIndex(),
  3218. "undefined" !== typeof tdPullDown.reinitTimeout && clearTimeout(tdPullDown.reinitTimeout), tdPullDown.reinitTimeout = setTimeout(function () {
  3219. tdPullDown._reinitialize_all_items();
  3220. tdPullDown._compute_all_items()
  3221. }, 100)) : tdPullDown._compute_all_items())
  3222. }, log: function (a) {
  3223. }
  3224. };
  3225. tdPullDown.init()
  3226. })();
  3227. var tdShowVideo = {};
  3228. (function () {
  3229. tdShowVideo = {
  3230. _isInitialized: !1,
  3231. _isApiYoutubeLoaded: !1,
  3232. _isApiVimeoLoaded: !1,
  3233. items: [],
  3234. _$clearZone: void 0,
  3235. _$body: void 0,
  3236. _refLeft: !1,
  3237. _hDist: void 0,
  3238. _refBottom: !1,
  3239. _vDist: void 0,
  3240. _width: 450,
  3241. _playingOne: !1,
  3242. _pauseHidden: !1,
  3243. _runFixed: !1,
  3244. _bodyClass: "td-sticky-video",
  3245. item: function () {
  3246. this.id = void 0;
  3247. this.inlineHeight = this.inlineWidth = 0;
  3248. this.$wrapper = this.player = this.initialOffsetTop = void 0;
  3249. this.inModal = this.inViewport = this.moved = !1;
  3250. this.wrapperHeightBeforeFixed = void 0;
  3251. this.playerStarted = !1;
  3252. this.internalStatus =
  3253. this.playerType = this.parentFixIndexClass = this.restoreFixIndexClass = void 0
  3254. },
  3255. loadApiYoutube: function () {
  3256. if (!tdShowVideo._isApiYoutubeLoaded) {
  3257. var a = document.createElement("script");
  3258. a.src = "https://www.youtube.com/iframe_api";
  3259. var b = document.getElementsByTagName("script")[0];
  3260. b.parentNode.insertBefore(a, b);
  3261. tdShowVideo._isApiYoutubeLoaded = !0
  3262. }
  3263. },
  3264. loadApiVimeo: function () {
  3265. if (!tdShowVideo._isApiVimeoLoaded) {
  3266. var a = document.createElement("script");
  3267. a.src = "https://player.vimeo.com/api/player.js";
  3268. var b = document.getElementsByTagName("script")[0];
  3269. b.parentNode.insertBefore(a, b);
  3270. tdShowVideo._isApiVimeoLoaded = !0
  3271. }
  3272. },
  3273. init: function () {
  3274. 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 &&
  3275. (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 &&
  3276. "" !== 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) {
  3277. var b = jQuery(this).data("item-id");
  3278. "undefined" !== typeof b && tdShowVideo.items.forEach(function (a) {
  3279. b === a.id && (tdShowVideo._clearPlayerStarted(), tdShowVideo._movePlayerFromZone(a), tdShowVideo._pauseHidden &&
  3280. tdShowVideo._pausePlayer(a))
  3281. })
  3282. }), this._isInitialized = !0)
  3283. },
  3284. addItem: function (a) {
  3285. tdShowVideo._isInitialized && a.constructor === tdShowVideo.item && tdShowVideo.items.push(a)
  3286. },
  3287. scroll: function () {
  3288. tdShowVideo._isInitialized && tdShowVideo._checkItems()
  3289. },
  3290. _checkItems: function () {
  3291. tdShowVideo._isInitialized && (tdShowVideo._runFixed && tdShowVideo.items.forEach(function (a) {
  3292. !0 !== tdDetect.isPhoneScreen && (tdShowVideo._getReplacer(a).insertBefore(a.$wrapper.parent()), tdShowVideo._isItemInViewport(a) ? tdShowVideo._movePlayerFromZone(a) :
  3293. tdShowVideo._movePlayerToZone(a))
  3294. }), setTimeout(function () {
  3295. tdShowVideo._pauseHidden && tdShowVideo._pauseOtherPlayers()
  3296. }, 500))
  3297. },
  3298. _movePlayerToZone: function (a) {
  3299. if ("youtube" === a.playerType) {
  3300. 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
  3301. } else if ("vimeo" === a.playerType) {
  3302. if (!tdShowVideo._isInitialized || a.moved || "undefined" === typeof a.player ||
  3303. "undefined" === typeof a.internalStatus || "VIMEO_PLAYING" !== a.internalStatus || "undefined" === typeof a.playerStarted) return !1
  3304. } else if ("video" === a.playerType) {
  3305. if (!tdShowVideo._isInitialized || a.moved || "undefined" === typeof a.player || "undefined" === typeof a.internalStatus || "VIDEO_PLAYING" !== a.internalStatus || "undefined" === typeof a.playerStarted) return !1
  3306. } else if ("undefined" === typeof a.playerType) return !1;
  3307. tdShowVideo._clearPlayerStarted(a);
  3308. tdShowVideo._clearZone();
  3309. var b = a.$wrapper.data("id");
  3310. "undefined" === typeof b &&
  3311. (b = tdShowVideo._getUniqueId(), a.$wrapper.data("id", b), a.id = b);
  3312. "undefined" === typeof a.initialOffsetTop && (a.initialOffsetTop = a.$wrapper.offset().top);
  3313. a.wrapperHeightBeforeFixed = a.$wrapper.height();
  3314. a.$wrapper.parent().addClass("td-video-fixed");
  3315. tdShowVideo._showReplacer(a);
  3316. tdShowVideo._refLeft && a.$wrapper.parent().addClass("td-video-fixed-left");
  3317. tdShowVideo._refBottom && a.$wrapper.parent().addClass("td-video-fixed-bottom");
  3318. b = "width:" + tdShowVideo._width + "px !important;";
  3319. b += "height:" + tdShowVideo._width *
  3320. a.inlineHeight / a.inlineWidth + "px !important;";
  3321. "undefined" !== typeof tdShowVideo._hDist && (b = tdShowVideo._refLeft ? b + ("left:" + tdShowVideo._hDist + "px !important;") : b + ("right:" + tdShowVideo._hDist + "px !important;"));
  3322. "undefined" !== typeof tdShowVideo._vDist && (b = tdShowVideo._refBottom ? b + ("bottom:" + tdShowVideo._vDist + "px !important;") : b + ("top:" + tdShowVideo._vDist + "px !important;"));
  3323. a.$wrapper.css("width", tdShowVideo._width);
  3324. a.$wrapper.css("height", "100%");
  3325. a.$wrapper.parent().attr("style", b);
  3326. a.$wrapper.closest(".tdb-block-inner").hasClass("td-fix-index") ?
  3327. (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");
  3328. tdShowVideo._$clearZone.data("item-id", a.id);
  3329. tdShowVideo._$clearZone.show();
  3330. tdShowVideo._$clearZone.prependTo(a.$wrapper.parent());
  3331. tdShowVideo._addBodyClass();
  3332. return a.moved =
  3333. !0
  3334. },
  3335. _movePlayerFromZone: function (a) {
  3336. if (!tdShowVideo._isInitialized || !a.moved) return !1;
  3337. a.$wrapper.parent().removeClass("td-video-fixed");
  3338. tdShowVideo._hideReplacer(a);
  3339. tdShowVideo._refLeft && a.$wrapper.parent().removeClass("td-video-fixed-left");
  3340. tdShowVideo._refBottom && a.$wrapper.parent().removeClass("td-video-fixed-bottom");
  3341. a.$wrapper.parent().removeAttr("style");
  3342. a.$wrapper.css("width", "");
  3343. "undefined" !== typeof a.wrapperHeightBeforeFixed && a.$wrapper.css("height", a.wrapperHeightBeforeFixed + "px");
  3344. "undefined" !==
  3345. typeof a.restoreFixIndexClass && (a.$wrapper.closest("." + a.parentFixIndexClass).addClass("td-fix-index"), delete a.restoreFixIndexClass, delete a.parentFixIndexClass);
  3346. tdShowVideo._$clearZone.appendTo(tdShowVideo._$body);
  3347. tdShowVideo._$clearZone.hide();
  3348. tdShowVideo._removeBodyClass();
  3349. a.moved = !1;
  3350. return !0
  3351. },
  3352. _addBodyClass: function () {
  3353. tdShowVideo._$body.addClass(tdShowVideo._bodyClass)
  3354. },
  3355. _removeBodyClass: function () {
  3356. tdShowVideo._$body.removeClass(tdShowVideo._bodyClass)
  3357. },
  3358. _isItemInViewport: function (a) {
  3359. var b = a.initialOffsetTop;
  3360. "undefined" === typeof b && (b = a.$wrapper.offset().top, a.initialOffsetTop = b);
  3361. 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
  3362. },
  3363. _isItemInModal: function (a) {
  3364. return a.inModal
  3365. },
  3366. _pauseOtherPlayers: function () {
  3367. tdShowVideo.items.forEach(function (a) {
  3368. tdShowVideo._isItemInViewport(a) || a.moved || "undefined" !== typeof a.player &&
  3369. ("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())
  3370. })
  3371. },
  3372. _pauseModalPlayers: function () {
  3373. tdShowVideo.items.forEach(function (a) {
  3374. tdShowVideo._isItemInModal(a) && tdShowVideo._pausePlayer(a)
  3375. })
  3376. },
  3377. _pausePlayer: function (a) {
  3378. "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())
  3379. },
  3380. _clearZone: function () {
  3381. tdShowVideo._isInitialized && tdShowVideo.items.forEach(function (a) {
  3382. tdShowVideo._movePlayerFromZone(a,
  3383. !0)
  3384. })
  3385. },
  3386. _clearPlayerStarted: function (a) {
  3387. tdShowVideo.items.forEach(function (b) {
  3388. "undefined" !== typeof a ? b !== a && "undefined" !== typeof b.playerStarted && delete b.playerStarted : "undefined" !== typeof b.playerStarted && delete b.playerStarted
  3389. })
  3390. },
  3391. _getReplacer: function (a) {
  3392. if (tdShowVideo._isInitialized) {
  3393. if ("undefined" !== typeof a.$replacer) return a.$replacer;
  3394. a.$replacer = jQuery('<div class="td-video-replacer" data-id="' + a.$wrapper.data("id") + '" style="position: absolute; visibility: hidden; width:' + a.inlineWidth + "px;height:" +
  3395. a.inlineHeight + 'px"></div>');
  3396. return a.$replacer
  3397. }
  3398. },
  3399. _showReplacer: function (a) {
  3400. tdShowVideo._isInitialized && tdShowVideo._getReplacer(a).css("position", "relative")
  3401. },
  3402. _hideReplacer: function (a) {
  3403. tdShowVideo._isInitialized && tdShowVideo._getReplacer(a).css("position", "absolute")
  3404. },
  3405. _getUniqueId: function () {
  3406. return "uid_" + Math.floor(1E4 * Math.random() + 1) + "_" + Math.floor(100 * Math.random() + 1)
  3407. },
  3408. addPlayerStarted: function (a) {
  3409. tdShowVideo._isInitialized && tdShowVideo.items.forEach(function (b) {
  3410. b.player === a ? b.playerStarted = !0 :
  3411. 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)
  3412. })
  3413. },
  3414. clearPlayerStarted: function (a) {
  3415. tdShowVideo._isInitialized && tdShowVideo.items.forEach(function (b) {
  3416. b.player === a && "undefined" !== typeof b.playerStarted && delete b.playerStarted
  3417. })
  3418. },
  3419. onYoutubeReadyEvent: function (a) {
  3420. tdShowVideo._isInitialized &&
  3421. a.target.setPlaybackQuality("hd720")
  3422. },
  3423. onYoutubeStateChangeEvent: function (a) {
  3424. if (tdShowVideo._isInitialized) switch (a.target.getPlayerState()) {
  3425. case YT.PlayerState.PLAYING:
  3426. tdShowVideo.addPlayerStarted(a.target);
  3427. break;
  3428. case YT.PlayerState.ENDED:
  3429. tdShowVideo.clearPlayerStarted(a.target)
  3430. }
  3431. }
  3432. }
  3433. })();
  3434. window.onYouTubeIframeAPIReady = function () {
  3435. tdShowVideo.init();
  3436. jQuery(".td-youtube-player, .wp-block-embed-youtube iframe, .tdm-popup-modal-wrap .youtube-embed").each(function () {
  3437. var a = jQuery(this), b = new tdShowVideo.item;
  3438. b.playerType = "youtube";
  3439. b.inlineWidth = a.outerWidth();
  3440. b.inlineHeight = a.outerHeight();
  3441. b.$wrapper = a;
  3442. a.closest(".tdm-popup-modal-wrap").length && (b.inModal = !0);
  3443. a = a.data("video_id") ? a.data("video_id") : "";
  3444. b.player = new YT.Player(this, {
  3445. height: "720", width: "960", videoId: a, events: {
  3446. onReady: tdShowVideo.onYoutubeReadyEvent,
  3447. onStateChange: tdShowVideo.onYoutubeStateChangeEvent
  3448. }
  3449. });
  3450. tdShowVideo.addItem(b)
  3451. })
  3452. };
  3453. jQuery(window).on("load", function () {
  3454. "undefined" !== typeof window.tdYoutubePlayers && tdYoutubePlayers.players.length && (tdShowVideo.init(), tdYoutubePlayers.players.forEach(function (a) {
  3455. var b = new tdShowVideo.item;
  3456. b.playerType = "youtube";
  3457. b.inlineWidth = a.jqPlayerWrapper.outerWidth();
  3458. b.inlineHeight = a.jqPlayerWrapper.outerHeight();
  3459. b.$wrapper = a.jqPlayerWrapper;
  3460. b.player = a.tdYtPlayer;
  3461. tdShowVideo.addItem(b)
  3462. }))
  3463. });
  3464. jQuery(window).on("load", function () {
  3465. 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"]');
  3466. a.length && (tdShowVideo.init(), a.each(function (a) {
  3467. var b = jQuery(this), d = new tdShowVideo.item;
  3468. d.playerType = "vimeo";
  3469. d.inlineWidth = b.outerWidth();
  3470. d.inlineHeight = b.outerHeight();
  3471. d.$wrapper = b;
  3472. d.id = a;
  3473. b.closest(".tdm-popup-modal-wrap").length && (d.inModal = !0);
  3474. d.player = new Vimeo.Player(this);
  3475. d.player.on("play", function () {
  3476. d.internalStatus =
  3477. "VIMEO_PLAYING";
  3478. tdShowVideo.addPlayerStarted(d.player)
  3479. });
  3480. d.player.on("pause", function () {
  3481. d.internalStatus = void 0
  3482. });
  3483. d.player.on("ended", function (a) {
  3484. d.internalStatus = void 0;
  3485. tdShowVideo.clearPlayerStarted(d.player)
  3486. });
  3487. tdShowVideo.addItem(d)
  3488. }))
  3489. });
  3490. jQuery(window).ready(function () {
  3491. var a = !1;
  3492. 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;
  3493. a && jQuery(".td-youtube-player, .wp-block-embed-youtube iframe, .tdm-popup-modal-wrap .youtube-embed").length && tdShowVideo.loadApiYoutube();
  3494. jQuery('.wpb_video_wrapper iframe[src*="vimeo.com"], .wp-block-embed-vimeo iframe[src*="vimeo.com"], iframe[src*="vimeo.com"]').length &&
  3495. tdShowVideo.loadApiVimeo();
  3496. a = jQuery("video");
  3497. a.length && (tdShowVideo.init(), a.each(function (a) {
  3498. var b = jQuery(this), d = new tdShowVideo.item;
  3499. d.playerType = "video";
  3500. d.inlineWidth = b.outerWidth();
  3501. d.inlineHeight = b.outerHeight();
  3502. d.$wrapper = b;
  3503. d.id = a;
  3504. b.closest(".tdm-popup-modal-wrap").length && (d.inModal = !0);
  3505. d.player = this;
  3506. d.player.addEventListener("play", function (a) {
  3507. d.internalStatus = "VIDEO_PLAYING";
  3508. tdShowVideo.addPlayerStarted(d.player)
  3509. }, !0);
  3510. d.player.addEventListener("pause", function (a) {
  3511. d.internalStatus = void 0;
  3512. tdShowVideo.addPlayerStarted(d.player)
  3513. }, !0);
  3514. d.player.addEventListener("ended", function (a) {
  3515. d.internalStatus = void 0;
  3516. tdShowVideo.addPlayerStarted(d.player)
  3517. }, !0);
  3518. tdShowVideo.addItem(d)
  3519. }))
  3520. });
  3521. var tdAnimationStack = {};
  3522. (function () {
  3523. tdAnimationStack = {
  3524. _animation_css_class1: "",
  3525. _animation_css_class2: "",
  3526. _animation_default_effect: "type0",
  3527. activated: !1,
  3528. _ready_for_initialization: !0,
  3529. _ready_init_timeout: void 0,
  3530. max_waiting_for_init: 3E3,
  3531. _specific_selectors: "",
  3532. _general_selectors: "",
  3533. live_load_items: !1,
  3534. is_ready_init: !1,
  3535. ready_init: function () {
  3536. 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 !==
  3537. 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),
  3538. "" === 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),
  3539. tdAnimationStack._ready_init_timeout = setTimeout(function () {
  3540. tdAnimationStack.log("%c _ready_init_timeout run ", "background: red; color: white;");
  3541. if (!0 !== tdAnimationStack.activated) {
  3542. tdAnimationStack._ready_for_initialization = !1;
  3543. jQuery(tdAnimationStack._general_selectors).not("." + tdAnimationStack._animation_css_class2).removeClass(tdAnimationStack._animation_css_class1);
  3544. var a = jQuery(".td-animation-stack, .post").find(tdAnimationStack._specific_selectors);
  3545. tdAnimationStack.log("_ready_init_timeout found elements: " +
  3546. a.length);
  3547. a.each(function (a, c) {
  3548. a = jQuery(c).data("type");
  3549. c = jQuery(c);
  3550. tdAnimationStack.log("type: " + a);
  3551. tdAnimationStack.log("src: " + c.data("img-url"));
  3552. switch (a) {
  3553. case "image_tag":
  3554. 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"));
  3555. break;
  3556. case "css_image":
  3557. void 0 !== c.data("img-retina-url") && !0 === tdAnimationStack._isHighDensity() ? c.attr("style", "background-image: url(" + c.data("img-retina-url") + ")") : c.attr("style",
  3558. "background-image: url(" + c.data("img-url") + ")")
  3559. }
  3560. });
  3561. void 0 !== window.td_animation_stack_effect && jQuery("body").removeClass("td-animation-stack-" + window.td_animation_stack_effect)
  3562. }
  3563. }, tdAnimationStack.max_waiting_for_init)))
  3564. },
  3565. _ITEM_TO_VIEW_PORT: {ITEM_ABOVE_VIEW_PORT: 0, ITEM_IN_VIEW_PORT: 1, ITEM_UNDER_VIEW_PORT: 2},
  3566. SORTED_METHOD: {
  3567. sort_left_to_right: function (a, b) {
  3568. 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
  3569. }, sort_right_to_left: function (a, b) {
  3570. return a.offset_top >
  3571. b.offset_top || !(a.offset_top < b.offset_top || a._order > b._order) && a._order < b._order ? 1 : -1
  3572. }
  3573. },
  3574. _order: 0,
  3575. interval: 70,
  3576. min_interval: 17,
  3577. max_interval: 40,
  3578. _current_interval: void 0,
  3579. _items_in_view_port: [],
  3580. _items_above_view_port: [],
  3581. items: [],
  3582. item: function () {
  3583. this.itemImgRetinaSrc = this.itemType = this.itemSrc = this._order = this.jqueryObj = this.offset_bottom_to_top = this.offset_top = void 0
  3584. },
  3585. _initialize_item: function (a) {
  3586. a._order = tdAnimationStack._order++;
  3587. a.offset_top = a.jqueryObj.offset().top;
  3588. a.offset_bottom_to_top = a.offset_top +
  3589. a.jqueryObj.height()
  3590. },
  3591. check_for_new_items: function (a, b, c, d) {
  3592. if (!1 !== tdAnimationStack.activated && !1 !== tdAnimationStack._ready_for_initialization) {
  3593. void 0 === a && (a = "");
  3594. var h = [];
  3595. jQuery(tdAnimationStack._general_selectors).not("." + tdAnimationStack._animation_css_class2).addClass(tdAnimationStack._animation_css_class1);
  3596. var f = jQuery(a + ", .post").find(tdAnimationStack._specific_selectors).filter(function () {
  3597. return jQuery(this).hasClass(tdAnimationStack._animation_css_class1)
  3598. });
  3599. f.each(function (a, b) {
  3600. a = new tdAnimationStack.item;
  3601. a.jqueryObj = jQuery(b);
  3602. a.itemSrc = jQuery(b).data("img-url");
  3603. a.itemType = jQuery(b).data("type");
  3604. void 0 !== jQuery(b).data("img-retina-url") && (a.itemImgRetinaSrc = jQuery(b).data("img-retina-url"));
  3605. tdAnimationStack._initialize_item(a);
  3606. h.push(a)
  3607. });
  3608. !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 () {
  3609. for (var a =
  3610. !0, d = 0; d < h.length; d++) if (!1 === f[d].complete) {
  3611. a = !1;
  3612. break
  3613. }
  3614. if (!1 === a) {
  3615. var W = (new Date).getTime();
  3616. tdAnimationStack.log("TIMER - started");
  3617. var P = setInterval(function () {
  3618. var d;
  3619. 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 {
  3620. a = !0;
  3621. for (d = 0; d < h.length; d++) if (!1 === f[d].complete) {
  3622. a = !1;
  3623. break
  3624. }
  3625. !0 === a && (clearInterval(P), tdAnimationStack.log("TIMER - stopped"),
  3626. tdAnimationStack._precompute_items(h, b, c), tdAnimationStack.compute_items(!1))
  3627. }
  3628. }, 100)
  3629. } else tdAnimationStack._precompute_items(h, b, c), tdAnimationStack.compute_items(!1)
  3630. }());
  3631. tdAnimationStack.log("checked for new items finished")
  3632. }
  3633. },
  3634. _precompute_items: function (a, b, c) {
  3635. a.sort(b);
  3636. 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())
  3637. },
  3638. init: function () {
  3639. tdAnimationStack.ready_init();
  3640. 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,
  3641. !1, !0)))
  3642. },
  3643. reinit: function () {
  3644. !1 !== tdAnimationStack._ready_for_initialization && (tdAnimationStack.items = [], tdAnimationStack._items_in_view_port = [], tdAnimationStack._items_above_view_port = [], tdAnimationStack.init())
  3645. },
  3646. compute_items: function (a) {
  3647. if (!1 !== tdAnimationStack.activated && !1 !== tdAnimationStack._ready_for_initialization) {
  3648. for (tdAnimationStack._separate_items(); 0 < tdAnimationStack._items_above_view_port.length;) {
  3649. tdAnimationStack.log("animation - above the view port");
  3650. var b = tdAnimationStack._items_above_view_port.shift();
  3651. !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))
  3652. }
  3653. 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 ",
  3654. "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)))
  3655. }
  3656. },
  3657. _to_timer: function (a, b) {
  3658. tdAnimationStack._current_interval = setInterval(function () {
  3659. if (0 < tdAnimationStack._items_in_view_port.length) {
  3660. var c =
  3661. tdAnimationStack._get_item_from_view_port();
  3662. tdAnimationStack.log("animation at interval: " + a);
  3663. !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));
  3664. clearInterval(tdAnimationStack._current_interval);
  3665. 0 < tdAnimationStack._items_in_view_port.length && tdAnimationStack._to_timer(tdAnimationStack._get_right_interval(1 /
  3666. tdAnimationStack._items_in_view_port.length * tdAnimationStack.interval), b)
  3667. }
  3668. }, a)
  3669. },
  3670. _get_item_from_view_port: function () {
  3671. return tdAnimationStack._items_in_view_port.shift()
  3672. },
  3673. _get_right_interval: function (a) {
  3674. return a < tdAnimationStack.min_interval ? tdAnimationStack.min_interval : a > tdAnimationStack.max_interval ? tdAnimationStack.max_interval : a
  3675. },
  3676. _item_to_view_port: function (a) {
  3677. tdAnimationStack.log("position item relative to the view port >> yOffset " + tdEvents.window_pageYOffset + " | xOffset " + tdEvents.window_innerHeight +
  3678. " : " + a.offset_top);
  3679. 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
  3680. },
  3681. _separate_items: function () {
  3682. if (0 !== tdAnimationStack.items.length) for (tdAnimationStack.log("%c _separate_items - total items: " +
  3683. tdAnimationStack.items.length + " ", "background: #999da0; color: #fff;"); 0 < tdAnimationStack.items.length;) switch (tdAnimationStack._item_to_view_port(tdAnimationStack.items[0])) {
  3684. case tdAnimationStack._ITEM_TO_VIEW_PORT.ITEM_ABOVE_VIEW_PORT:
  3685. tdAnimationStack._items_above_view_port.push(tdAnimationStack.items.shift());
  3686. break;
  3687. case tdAnimationStack._ITEM_TO_VIEW_PORT.ITEM_IN_VIEW_PORT:
  3688. tdAnimationStack._items_in_view_port.push(tdAnimationStack.items.shift());
  3689. break;
  3690. case tdAnimationStack._ITEM_TO_VIEW_PORT.ITEM_UNDER_VIEW_PORT:
  3691. tdAnimationStack.log("after separation items >> above: " +
  3692. tdAnimationStack._items_above_view_port.length + " in: " + tdAnimationStack._items_in_view_port.length + " under: " + tdAnimationStack.items.length);
  3693. return
  3694. }
  3695. },
  3696. _load_item: function (a, b) {
  3697. 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) {
  3698. case "image_tag":
  3699. tdAnimationStack.log("%c image tag ",
  3700. "background: #3ded97; color: #fff;");
  3701. a.jqueryObj.data("complete", !1);
  3702. if (void 0 !== a.itemImgRetinaSrc && !0 === tdAnimationStack._isHighDensity()) a.jqueryObj.attr("src", a.itemImgRetinaSrc).on("load", function () {
  3703. a.jqueryObj.data("complete", !0)
  3704. }); else a.jqueryObj.attr("src", a.itemSrc).on("load", function () {
  3705. a.jqueryObj.data("complete", !0)
  3706. });
  3707. var c = (new Date).getTime(), d = setInterval(function () {
  3708. var b = new Date;
  3709. !0 === a.jqueryObj.data("complete") ? (clearInterval(d), a.jqueryObj.removeClass(tdAnimationStack._animation_css_class1),
  3710. 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))
  3711. }, 100);
  3712. break;
  3713. case "css_image":
  3714. a.jqueryObj.data("complete", !1);
  3715. tdAnimationStack.log("%c image tag ", "background: #3ded97; color: #fff;");
  3716. if (void 0 !== a.itemImgRetinaSrc && !0 === tdAnimationStack._isHighDensity()) jQuery("<img/>").attr("src", a.itemImgRetinaSrc).on("load",
  3717. function () {
  3718. jQuery(this).remove();
  3719. a.jqueryObj.data("complete", !0)
  3720. }); else jQuery("<img/>").attr("src", a.itemSrc).on("load", function () {
  3721. jQuery(this).remove();
  3722. a.jqueryObj.data("complete", !0)
  3723. });
  3724. var h = (new Date).getTime(), f = setInterval(function () {
  3725. var b = new Date;
  3726. !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 + '")'),
  3727. 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))
  3728. },
  3729. 100)
  3730. }
  3731. },
  3732. td_events_scroll: function () {
  3733. tdAnimationStack.compute_items(!0)
  3734. },
  3735. td_events_resize: function () {
  3736. clearInterval(tdAnimationStack._current_interval);
  3737. tdAnimationStack.reinit()
  3738. },
  3739. log: function (a, b) {
  3740. },
  3741. _isHighDensity: function () {
  3742. 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) ||
  3743. window.devicePixelRatio && 1.3 < window.devicePixelRatio
  3744. },
  3745. _isRetina: function () {
  3746. 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 &&
  3747. 2 <= window.devicePixelRatio) && /(iPad|iPhone|iPod)/g.test(navigator.userAgent)
  3748. }
  3749. }
  3750. })();
  3751. "use strict";
  3752. tdAffix.init({
  3753. menu_selector: ".td-header-menu-wrap",
  3754. menu_wrap_selector: ".td-header-menu-wrap-full",
  3755. tds_snap_menu: tdUtil.getBackendVar("tds_snap_menu"),
  3756. tds_snap_menu_logo: tdUtil.getBackendVar("tds_logo_on_sticky"),
  3757. menu_affix_height: 48,
  3758. menu_affix_height_on_mobile: 54
  3759. });
  3760. jQuery(window).on("load", function () {
  3761. if ("undefined" !== typeof window.tdStickyRow) {
  3762. var a = function () {
  3763. var a = jQuery(".tdc-row-is-sticky"), d = !1;
  3764. a.each(function () {
  3765. var a = jQuery(this), b = !1;
  3766. tdStickyRow.items.forEach(function (c) {
  3767. c.rowUid === a.attr("id") && (b = !0)
  3768. });
  3769. b || (d = !0)
  3770. });
  3771. if (d) b(a); else if (a.length === tdStickyRow.items.length) {
  3772. for (var h = !0, f = 0; f < a.length; f++) jQuery(a[f]).attr("id") !== tdStickyRow.items[f].rowUid && (h = !1);
  3773. h || b(a)
  3774. } else b(a)
  3775. }, b = function (a) {
  3776. tdStickyRow.resetItems();
  3777. a.each(function () {
  3778. var a = jQuery(this),
  3779. b = a.attr("id"), c = new tdStickyRow.item;
  3780. c.rowUid = b;
  3781. c.jQueryObj = jQuery("#" + b);
  3782. a.hasClass("tdc-rist-bottom") && (c.position = "bottom");
  3783. tdStickyRow.addItem(c)
  3784. });
  3785. tdStickyRow.manageStickies()
  3786. };
  3787. a();
  3788. window.location !== window.parent.location && setInterval(function () {
  3789. jQuery(".tdc-row-is-sticky").length && a()
  3790. }, 1E3)
  3791. }
  3792. });
  3793. jQuery(window).on("load", function () {
  3794. var a = jQuery(".td-dm-input");
  3795. a.on("change", function (b) {
  3796. b.target.checked ? (jQuery("body").addClass("is_dark"), a.prop("checked", !0)) : (jQuery("body").removeClass("is_dark"), a.prop("checked", !1));
  3797. jQuery.ajax({type: "POST", url: td_ajax_url, data: {action: "td_ajax_dark_mode"}})
  3798. })
  3799. });
  3800. window.addEventListener("DOMContentLoaded", function () {
  3801. if ("enabled" === tdUtil.getBackendVar("tds_smart_sidebar") && "undefined" !== typeof window.tdSmartSidebar) {
  3802. jQuery(".td-ss-row").each(function () {
  3803. var a = new tdSmartSidebar.item, c = jQuery(this).children(".td-pb-span8").find(".wpb_wrapper:first"),
  3804. d = jQuery(this).children(".td-pb-span4").find(".wpb_wrapper:first");
  3805. 0 < c.length && 0 < d.length && (a.sidebar_jquery_obj = d, a.content_jquery_obj = c, tdSmartSidebar.add_item(a))
  3806. });
  3807. if (0 < jQuery(".td-ss-main-content").length &&
  3808. 0 < jQuery(".td-ss-main-sidebar").length) {
  3809. var a = new tdSmartSidebar.item;
  3810. a.sidebar_jquery_obj = jQuery(".td-ss-main-sidebar");
  3811. a.content_jquery_obj = jQuery(".td-ss-main-content");
  3812. tdSmartSidebar.add_item(a)
  3813. }
  3814. tdSmartSidebar.td_events_resize()
  3815. }
  3816. });
  3817. jQuery(window).on("load", function () {
  3818. [{".vc_row": ".vc_column"}, {".vc_row_inner": ".vc_column_inner"}].forEach(function (a) {
  3819. for (var b in a) {
  3820. var c = a[b];
  3821. jQuery(b).each(function () {
  3822. var a = [], b;
  3823. jQuery(this).children(c).each(function (c, d) {
  3824. c = jQuery(d);
  3825. 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")
  3826. });
  3827. a.length && "undefined" !== typeof b && "undefined" !== typeof window.tdSmartSidebar && a.forEach(function (a) {
  3828. var c =
  3829. new tdSmartSidebar.item;
  3830. c.sidebar_jquery_obj = a;
  3831. c.content_jquery_obj = b;
  3832. c.enabled_on = JSON.parse(window.atob(a.data("sticky-enabled-on")));
  3833. c.offset = a.data("sticky-offset");
  3834. c.is_width_auto = JSON.parse(window.atob(a.data("sticky-is-width-auto")));
  3835. tdSmartSidebar.add_item(c)
  3836. })
  3837. })
  3838. }
  3839. });
  3840. "undefined" !== typeof window.tdSmartSidebar && tdSmartSidebar.td_events_resize()
  3841. });
  3842. jQuery(window).on("load", function () {
  3843. jQuery(".td-subcat-filter").each(function (a, b) {
  3844. a = jQuery(b);
  3845. b = a.find(".td-subcat-list:first");
  3846. var c = new tdPullDown.item;
  3847. c.blockUid = a.parent().parent().data("td-block-uid");
  3848. c.horizontal_jquery_obj = b;
  3849. c.vertical_jquery_obj = a.find(".td-subcat-dropdown:first");
  3850. c.horizontal_element_css_class = "td-subcat-item";
  3851. c.container_jquery_obj = b.closest(".td-block-title-wrap");
  3852. c.excluded_jquery_elements = [c.container_jquery_obj.find(".td-pulldown-size")];
  3853. tdPullDown.add_item(c)
  3854. });
  3855. jQuery(".td-category-siblings").each(function (a,
  3856. b) {
  3857. a = jQuery(b);
  3858. b = a.find(".td-category:first");
  3859. var c = new tdPullDown.item;
  3860. c.blockUid = a.parent().parent().data("td-block-uid");
  3861. c.horizontal_jquery_obj = b;
  3862. c.vertical_jquery_obj = a.find(".td-subcat-dropdown:first");
  3863. c.horizontal_element_css_class = "entry-category";
  3864. c.container_jquery_obj = b.parents(".td-category-siblings:first");
  3865. tdPullDown.add_item(c)
  3866. })
  3867. });
  3868.  
  3869. function td_compute_parallax_background(a) {
  3870. a = jQuery(a);
  3871. var b = Math.round(.2 * a.height()), c = -1 * b, d = new tdAnimationScroll.item;
  3872. d.jqueryObj = a;
  3873. d.add_item_property("move_y", 0, 100, c, b, "");
  3874. d.animation_callback = function () {
  3875. var a = parseFloat(d.computed_item_properties.move_y).toFixed();
  3876. d.jqueryObj.css({
  3877. "-webkit-transform": "translate3d(0px," + a + "px, 0px) scale(1.2)",
  3878. transform: "translate3d(0px," + a + "px, 0px) scale(1.2)"
  3879. });
  3880. d.redraw = !1;
  3881. d.td_video_parallax = !0
  3882. };
  3883. tdAnimationScroll.add_item(d)
  3884. }
  3885.  
  3886. function td_compute_backstretch_item(a) {
  3887. var b = 100 * (tdEvents.window_innerHeight - a.offset_top) / (tdEvents.window_innerHeight + a.full_height),
  3888. c = 100 * tdEvents.window_innerHeight / (tdEvents.window_innerHeight + a.full_height), d = a.offset_top / 4;
  3889. 0 == d && (d = 100);
  3890. var h = d / 1.2 * (100 - b) / (c - b);
  3891. c = -d / 2 + .5;
  3892. a.remove_item_property("move_y");
  3893. a.add_item_property("move_y", b, 100, c, h, "");
  3894. var f = parseFloat(1 + Math.abs(d) / a.full_height).toFixed(2);
  3895. delete a.animation_callback;
  3896. a.animation_callback = function () {
  3897. var b = parseFloat(a.computed_item_properties.move_y).toFixed();
  3898. a.jqueryObj.css({
  3899. left: "50%",
  3900. "-webkit-transform": "translate3d(-50%," + b + "px, 0px) scale(" + f + "," + f + ")",
  3901. transform: "translate3d(-50%," + b + "px, 0px) scale(" + f + "," + f + ")"
  3902. });
  3903. a.redraw = !1
  3904. }
  3905. }
  3906.  
  3907. var td_backstretch_items = [];
  3908. jQuery(window).ready(function () {
  3909. "undefined" !== typeof window.tdAnimationScroll && (jQuery(".td-backstretch").each(function (a, b) {
  3910. 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))
  3911. }), jQuery(".td-parallax-header").each(function (a, b) {
  3912. var c = new tdAnimationScroll.item;
  3913. c.jqueryObj = jQuery(b);
  3914. c.add_item_property("move_y", 50, 100, 0, 100, "");
  3915. c.add_item_property("opacity",
  3916. 50, 100, 1, 0, "");
  3917. c.animation_callback = function () {
  3918. var a = parseFloat(c.computed_item_properties.move_y).toFixed(),
  3919. b = parseFloat(c.computed_item_properties.opacity);
  3920. c.jqueryObj.css({
  3921. "-webkit-transform": "translate3d(0px," + a + "px, 0px)",
  3922. transform: "translate3d(0px," + a + "px, 0px)"
  3923. });
  3924. c.jqueryObj.css("transform", "translate3d(0px," + a + "px, 0px)");
  3925. c.jqueryObj.css("opacity", b);
  3926. c.redraw = !1
  3927. };
  3928. tdAnimationScroll.add_item(c)
  3929. }), tdAnimationScroll.compute_all_items(), setTimeout(function () {
  3930. jQuery(".tdc-video-parallax-wrapper").each(function (a,
  3931. b) {
  3932. td_compute_parallax_background(b)
  3933. });
  3934. tdAnimationScroll.compute_all_items()
  3935. }, 300));
  3936. tdAnimationStack.ready_init()
  3937. });
  3938. jQuery(window).on("load", function () {
  3939. jQuery("body").addClass("td-js-loaded");
  3940. window.tdAnimationStack.init()
  3941. });
  3942. jQuery(window).ready(function () {
  3943. jQuery(".td_smart_list_1 a, .td_smart_list_3 a").on("click", function (a) {
  3944. if (a.target === a.currentTarget) {
  3945. var b = jQuery(this).attr("target"), c = jQuery(this)[0].hasAttribute("download"),
  3946. d = jQuery(this).attr("href");
  3947. c || ("_blank" == b ? (a.preventDefault(), window.open(d)) : window.location.href !== d && tdUtil.isValidUrl(d) && (window.location.href = d))
  3948. }
  3949. });
  3950. jQuery(".td_block_trending_now").each(function () {
  3951. var a = new tdTrendingNow.item, b = jQuery(this).find(".td-trending-now-wrapper").data("start"),
  3952. c = 0;
  3953. a.blockUid = jQuery(this).data("td-block-uid");
  3954. "manual" !== b && (a.trendingNowAutostart = b);
  3955. jQuery("#" + a.blockUid + " .td-trending-now-post").each(function () {
  3956. a.trendingNowPosts[c] = jQuery(this);
  3957. c++
  3958. });
  3959. "undefined" === typeof a.trendingNowPosts || 1 > a.trendingNowPosts.length || tdTrendingNow.addItem(a)
  3960. });
  3961. jQuery(".td-trending-now-nav-left").on("click", function (a) {
  3962. a.preventDefault();
  3963. a = jQuery(this).data("block-id");
  3964. tdTrendingNow.itemPrev(a)
  3965. });
  3966. jQuery(".td-trending-now-nav-right").on("click", function (a) {
  3967. a.preventDefault();
  3968. a = jQuery(this).data("block-id");
  3969. tdTrendingNow.itemNext(a)
  3970. })
  3971. });
  3972. var tdConfirm;
  3973. (function (a, b) {
  3974. tdConfirm = {
  3975. _isInitialized: !1,
  3976. mediaUploadLoaded: !1,
  3977. _$content: b,
  3978. _$confirmYes: b,
  3979. _$confirmNo: b,
  3980. _$infoContent: b,
  3981. _$body: b,
  3982. init: function () {
  3983. tdConfirm._$body = a("body");
  3984. 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>');
  3985. tdConfirm._$infoContent = tdConfirm._$content.find(".td-confirm-info");
  3986. tdConfirm._$confirmYes = tdConfirm._$content.find("button.td-confirm-yes");
  3987. tdConfirm._$confirmNo = tdConfirm._$content.find("button.td-confirm-no");
  3988. tdConfirm._$body.append(tdConfirm._$content)
  3989. },
  3990. close: function () {
  3991. tb_remove()
  3992. },
  3993. modal: function (b) {
  3994. tdConfirm.init();
  3995. "undefined" === typeof b.url && (b.url = "#TB_inline?inlineId=td-confirm&width=480");
  3996. if ("undefined" === typeof b.objectContext || null === b.objectContext) b.objectContext = window;
  3997. "undefined" === typeof b.htmlInfoContent && (b.htmlInfoContent = "");
  3998. "undefined" === typeof b.textYes ?
  3999. tdConfirm._$confirmYes.html("Ok") : tdConfirm._$confirmYes.html(b.textYes);
  4000. "undefined" !== typeof b.switchButtons && !0 === b.switchButtons && tdConfirm._$confirmNo.insertBefore(tdConfirm._$confirmYes);
  4001. tdConfirm._$infoContent.html(b.htmlInfoContent);
  4002. "undefined" !== typeof b.hideNoButton && !0 === b.hideNoButton ? tdConfirm._$confirmNo.hide() : (tdConfirm._$confirmNo.show(), tdConfirm._$confirmNo.unbind(), tdConfirm._$confirmNo.on("click", function () {
  4003. "undefined" !== typeof b.callbackNo && b.callbackNo.apply(b.objectContext,
  4004. b.argsNo);
  4005. tb_remove();
  4006. return !1
  4007. }), "undefined" === typeof b.textNo ? tdConfirm._$confirmNo.html("No") : tdConfirm._$confirmNo.html(b.textNo));
  4008. if ("undefined" === typeof b.callbackYes) tdConfirm._$confirmYes.on("click", function () {
  4009. tb_remove();
  4010. return !0
  4011. }); else tdConfirm._$confirmYes.off("click"), tdConfirm._$confirmYes.on("click", function () {
  4012. b.callbackYes.apply(b.objectContext, b.argsYes);
  4013. return !0
  4014. });
  4015. tdConfirm._$body.addClass("td-thickbox-loading");
  4016. tb_show(b.caption, b.url);
  4017. "undefined" !== typeof b.offOverlayClick && !0 ===
  4018. b.offOverlayClick && a("#TB_overlay").off("click");
  4019. var c = a("#TB_window");
  4020. "undefined" !== typeof b.hideCloseButton && !0 === b.hideCloseButton && c.find("#TB_closeWindowButton").hide();
  4021. c.addClass("td-thickbox");
  4022. tdConfirm._$body.removeClass("td-thickbox-loading");
  4023. tdConfirm._$content.remove()
  4024. },
  4025. showModalOk: function (b, d, h, f, p) {
  4026. tdConfirm.init();
  4027. "undefined" === typeof p && (p = "#TB_inline?inlineId=td-confirm&width=480");
  4028. if ("undefined" === typeof f || null === f) f = window;
  4029. "undefined" === typeof d && (d = "");
  4030. tdConfirm._$infoContent.html(d);
  4031. tdConfirm._$confirmNo.hide();
  4032. tdConfirm._$confirmYes.html("Ok");
  4033. if ("undefined" === typeof h) tdConfirm._$confirmYes.on("click", function () {
  4034. tb_remove();
  4035. return !0
  4036. }); else tdConfirm._$confirmYes.on("click", function () {
  4037. tdConfirm._$confirmYes.off("click");
  4038. h.apply(f);
  4039. return !0
  4040. });
  4041. tdConfirm._$body.addClass("td-thickbox-loading");
  4042. tb_show(b, p);
  4043. a("#TB_overlay").off("click");
  4044. b = a("#TB_window");
  4045. b.find("#TB_closeWindowButton").remove();
  4046. !0 === tdConfirm.mediaUploadLoaded && (tdConfirm.fixPosition(), a(window).resize(function () {
  4047. tdConfirm.fixPosition()
  4048. }));
  4049. b.addClass("td-thickbox");
  4050. tdConfirm._$body.removeClass("td-thickbox-loading");
  4051. tdConfirm._$content.remove()
  4052. },
  4053. fixPosition: function () {
  4054. var b = a("#TB_window"), d = "undefined" === typeof document.body.style.maxHeight;
  4055. b.css({marginLeft: "-" + parseInt(TB_WIDTH / 2, 10) + "px", width: TB_WIDTH + "px"});
  4056. d || b.css({marginTop: +parseInt(TB_HEIGHT / 2, 10) + "px"});
  4057. b.css("z-index", "170001");
  4058. a("#TB_overlay").css("z-index", "170000")
  4059. },
  4060. showModal: function (b, d, h, f, p, G) {
  4061. tdConfirm.init();
  4062. "undefined" === typeof G && (G = "#TB_inline?inlineId=td-confirm&width=480");
  4063. "undefined" === typeof d && (d = window);
  4064. "undefined" === typeof p && (p = "");
  4065. tdConfirm._$infoContent.html(p);
  4066. tdConfirm._$confirmYes.unbind();
  4067. if ("undefined" === typeof h) tdConfirm._$confirmYes.on("click", function () {
  4068. tb_remove();
  4069. return !0
  4070. }); else "undefined" === typeof f && (f = []), tdConfirm._$confirmYes.on("click", function () {
  4071. h.apply(d, f)
  4072. });
  4073. tdConfirm._$confirmNo.show();
  4074. tdConfirm._$confirmNo.unbind();
  4075. tdConfirm._$confirmNo.on("click", function () {
  4076. tb_remove();
  4077. return !1
  4078. });
  4079. tdConfirm._$body.addClass("td-thickbox-loading");
  4080. tb_show(b,
  4081. G);
  4082. a("#TB_window").addClass("td-thickbox");
  4083. tdConfirm._$body.removeClass("td-thickbox-loading");
  4084. tdConfirm._$content.remove()
  4085. }
  4086. }
  4087. })(jQuery);
  4088.  
Add Comment
Please, Sign In to add comment