jQuery(document).ready((function(e) { var t = e(".add-favorite").data("post-id"), i = JSON.parse(atob(o("favorite_posts")) || "[]").includes(t); function a(e, t, i = 1) { var a = new Date; a.setTime(a.getTime() + 60 * i * 1e3); var o = "expires=" + a.toGMTString(); document.cookie = e + "=" + t + ";" + o + ";path=/" } function o(e) { for (var t = e + "=", i = decodeURIComponent(document.cookie).split(";"), a = 0; a < i.length; a++) { for (var o = i[a]; " " == o.charAt(0);) o = o.substring(1); if (0 == o.indexOf(t)) return o.substring(t.length, o.length) } return "" } e(".add-favorite").html(i ? '' : ''), e(window).scroll((function() { e(this).scrollTop() > 0 ? e("#scroller").fadeIn() : e("#scroller").fadeOut() })), e("#scroller").click((function() { return e("body,html").animate({ scrollTop: 0 }, 400), !1 })), e(".theatre-mode-toggle").click((function() { !!e(".theatre-view .player").length ? e(".theatre-view .player").detach().prependTo(".movie-details") : e(".movie-details .player").detach().prependTo(".theatre-view") })), e(".brightness-toggle").click((function() { const t = e(this), i = t.data("active"); e(this).find("i").toggleClass("mdi-flip-h"), e(".night-holder").toggleClass("show"), i ? (t.data("active", !1), e(".player .movie-player").css("z-index", "")) : (t.data("active", !0), e(".player .movie-player").css("z-index", "1030"), e(".night-holder").css("display", "block")), setTimeout((() => { i && e(".night-holder").css("display", "") }), 150) })), e(".add-favorite").click((function() { var t = e(this).data("post-id"), i = JSON.parse(atob(o("favorite_posts")) || "[]"); i.includes(t) ? (e(this).html(''), i = i.filter((function(e) { return e !== t }))) : (i.push(t), e(this).html('')), a("favorite_posts", btoa(JSON.stringify(i)), 365e4) })); var r = o("pxl"); if ("" != r && e("#vidad").remove(), e("#vidad").on("click", (function() { "" == r && a("pxl", !0, 2) })), "undefined" != typeof Plyr) { const e = new Plyr("video", { captions: { active: !0 } }); window.player = e } e(".jt").cluetip({ positionBy: "fixed" }), e("#trailerModal").on("hide.bs.modal", (function(t) { const i = e("#trailer").attr("src"); e("#trailer").attr("src", i) })) }));