function headerHeight() { var e = $("header").height(); $("body").css({ "padding-top": e }) } function storeCookie() { return $.ajax({ url: "/cookiesAccepted", type: "POST", dataType: "json", async: !0, contentType: "application/json; charset=utf-8", success: function () { $("#cookiesText").hide(), headerHeight() }, error: function () { alert("error") } }), !1 } function hideH1MainSlider() { $(".slider_h1").animate({ height: "0", left: "0", opacity: "0" }, 1e3, function () { $(".slider_h1").css({ height: "100%", left: "-100px", opacity: "0" }) }) } function showH1MainSlider() { $(".slider_h1").animate({ left: "0", opacity: "1" }, 1e3) } function progressBarStart(e, t) { if ($(".slide").length) { var a, s = $(".slide").length; $(".slide").each(function () { $(this).hasClass("active") && (a = $(this).index() + 1) }), $("#progress").html(""), $("#progress").html("" + a + "/" + s + ""), new ProgressBar.Circle(progress, { color: "#fff", strokeWidth: 4, trailWidth: 4, easing: "easeInOut", duration: t, text: { autoStyleContainer: !1 }, from: { color: e, width: 4 }, to: { color: e, width: 4 }, step: function (e, t) { t.path.setAttribute("stroke", e.color), t.path.setAttribute("stroke-width", e.width) } }).animate(1) } } !function () { var e, t = document.querySelectorAll(".hamburger"); function e() { var e = $("
").css({ height: "50px", width: "50px" }), t = $("
").css({ height: "200px" }); $("body").append(e.append(t)); var a = $("div", e).innerWidth(); e.css("overflow-y", "scroll"); var s = $("div", e).innerWidth(); return $(e).remove(), a - s } 0 < t.length && function (e, t, a) { if ("[object Object]" === Object.prototype.toString.call(e)) for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && t.call(a, e[s], s, e); else for (var i = 0, o = e.length; i < o; i++) t.call(a, e[i], i, e) }(t, function (e) { e.addEventListener("click", function () { this.classList.toggle("is-active") }, !1) }), e = window.innerWidth > document.body.clientWidth ? e() : 0, $(".hamburger").on("click", function () { $(this).hasClass("is-active") ? ($(".header_menu_wrap").addClass("active"), $(".menu_bg").addClass("visible"), $(".hamburger_text").addClass("hidden"), $(".hamburger-box").addClass("active"), $("body").css({ overflow: "hidden", "padding-right": e + "px" })) : ($(".header_menu_wrap").removeClass("active"), $(".menu_bg").removeClass("visible"), $(".hamburger_text").removeClass("hidden"), $(".hamburger-box").removeClass("active"), $("body").css({ overflow: "auto", "padding-right": "0" })) }), $(".menu_bg").on("click", function () { $(".hamburger").hasClass("is-active") && ($(".hamburger").removeClass("is-active"), $(".header_menu_wrap").removeClass("active"), $(".menu_bg").removeClass("visible"), $(".hamburger_text").removeClass("hidden"), $(".hamburger-box").removeClass("active"), $("body").css({ overflow: "auto", "padding-right": "0" })) }) }(), headerHeight(), showH1MainSlider(), function () { if ($(".slide").length) { var t; function a() { t = setInterval(function () { var e, t; hideH1MainSlider(), $(".slide").each(function () { $(this).hasClass("active") && (e = $(this).index(), t = $(this).index() + 1, e == $(".slide").length - 1 && (e = -1), t == $(".slide").length && (t = 0)) }), $(".trigger").removeClass("active"), $(".trigger").eq(t).addClass("active"), $(".slide").eq(e).removeClass("active"), $(".slide").eq(e + 1).addClass("active").animate({ opacity: "1", left: "0" }, 500), showH1MainSlider(), setTimeout(function () { $(".slide").eq(e).animate({ opacity: "0", left: "-200px" }, 200) }, 500), progressBarStart("#94c120", 6200) }, 6e3) } $(".slide").eq(0).animate({ opacity: "1", left: "0" }, 300), $(".triggers_wrap").attr("style", "pointer-events: all;"), $(".trigger").on("click", function () { hideH1MainSlider(); var e = $(this).index(); $(".slide").not($(".slide").eq(e)).removeClass("active"), $(".triggers_wrap").css({ "pointer-events": "none" }), $(".slider").css({ "pointer-events": "none" }), showH1MainSlider(), $(".slide").eq(e).addClass("active").animate({ opacity: "1", left: "0" }, 1500, function () { $(".slide").not($(".slide").eq(e)).animate({ opacity: "0", left: "-200px" }, 200, function () { $(".triggers_wrap").css({ "pointer-events": "all" }), $(".slider").css({ "pointer-events": "all" }) }) }), $(".trigger").removeClass("active"), $(this).addClass("active"), progressBarStart("#fff", .1) }), $(".slide").on("swipeleft", function () { if ("pointer-events: all;" == $(".triggers_wrap").attr("style")) { clearInterval(t); var e = $(".trigger.active").index(); e == $(".trigger").length - 1 && (e = -1), $(".trigger").eq(e + 1).click(), setTimeout(function () { a(), progressBarStart("#94c120", 6200) }, 1500) } }), $(".slide").on("swiperight", function () { if ("pointer-events: all;" == $(".triggers_wrap").attr("style")) { clearInterval(t); var e = $(".trigger.active").index(); 0 == e && (e = $(".trigger").length), $(".trigger").eq(e - 1).click(), setTimeout(function () { a(), progressBarStart("#94c120", 6200) }, 1500) } }), a(), $(".triggers_wrap").mouseenter(function () { clearInterval(t), progressBarStart("#fff", .1) }), $(".triggers_wrap").mouseleave(function () { a(), progressBarStart("#94c120", 6200) }) } }(), progressBarStart("#94c120", 6200), $(".sponsor_logos_wrap").slick({ slidesToShow: 4, responsive: [{ breakpoint: 1140, settings: { slidesToShow: 3 } }, { breakpoint: 880, settings: { slidesToShow: 2 } }, { breakpoint: 550, settings: { slidesToShow: 1 } }] }), $(".affiliat_logos_wrap").slick({ slidesToShow: 4, responsive: [{ breakpoint: 1140, settings: { slidesToShow: 3 } }, { breakpoint: 880, settings: { slidesToShow: 2 } }, { breakpoint: 550, settings: { slidesToShow: 1 } }] }), $(".reviews__slider").slick({ slidesToShow: 2, responsive: [{ breakpoint: 991, settings: { slidesToShow: 1 } }] }), $(".faq__guides__list").slick({ slidesToShow: 1 }), $(".faq .not-sure__list").slick({ responsive: [{ breakpoint: 2e3, settings: "unslick" }, { breakpoint: 740, settings: { slidesToShow: 1, arrows: !1, dots: !0 } }] }), $(".faq__pagination-arr__right").on("click", function () { $(".slick-next").click() }), $(".faq__pagination-arr__left").on("click", function () { $(".slick-prev").click() }), function () { function e() { var e = $(".faq__guides__item.slick-active").data("num"), t = $(".faq__guides__item").not(".slick-cloned").length; $(".faq__guides-slid-num").html(e + "/" + t) } e(), $(".slick-arrow").on("click", function () { e() }), $(".faq__guides__list").on("swipe", function () { e() }) }(), $(".article__btn").on("click", function () { $(".flip-container").addClass("hover"), $(".article__question-answer-wrap, .flip-container.hover .article__question-answer-wrap").css("transform", "rotateY(180deg)"), setTimeout(function () { $(".flip-container").removeClass("hover"), $(".article__question-answer-wrap, .flip-container.hover .article__question-answer-wrap").css("transform", "") }, 2e3) }), $(".main-banner__links__link").on("mouseenter", function () { $(this).find(".main-banner__links__img_top").css({ opacity: 0 }), $(this).find(".main-banner__links__img_bottom").css({ opacity: 1 }), $(this).find(".main-banner__links__text").css({ color: "#fff", transition: "color .3s" }) }), $(".main-banner__links__link").on("mouseleave ", function () { $(this).find(".main-banner__links__img_top").css({ opacity: 1 }), $(this).find(".main-banner__links__img_bottom").css({ opacity: 0 }), $(this).find(".main-banner__links__text").css({ color: "#054c80", transition: "color .3s" }) }), function () { var a = /[-\\|!@№#$%^&?*(){}~`.;":'/1-9]/, t = /.+@.+\..+/i; function e(e) { t.test(e.val()) ? e.removeAttr("style").addClass("valid") : e.css("border-color", "red").removeClass("valid") } $(".gq__text-input").on("focus", function () { $(".gadget-quotes__your-gadget__select__list").addClass("hidden"), $(this).val().length < 2 || a.test($(this).val()) ? $(this).css("border-color", "red").removeClass("valid") : $(this).removeAttr("style").addClass("valid") }).on("focusout", function () { 0 === $(this).val().length && $(this).removeAttr("style").removeClass("valid") }).on("keyup", function () { if ($(this).val().length < 2 && $(this).css("border-color", "red").removeClass("valid"), a.test($(this).val())) { var e, t = $(this).val(); e = t.substring(0, t.length - 1), $(this).val(e), $(this).css("border-color", "red").removeClass("valid"), a.test($(this).val()) || $(this).removeAttr("style").addClass("valid") } else 2 <= $(this).val().length && $(this).removeAttr("style").addClass("valid") }), $(".gq__mail-input").on("focus", function () { e($(this)) }).on("keyup", function () { e($(this)) }), $(".gq__input").on("keyup", function () { $(".gq__input").length === $(".valid").length ? ($(".gadget-quotes__container").addClass("active"), $(".gadget-quotes__your-gadget__add__plus").addClass("active"), $(".gq__select").addClass("active")) : ($(".gadget-quotes__container").removeClass("active"), $(".gadget-quotes__your-gadget__add__plus").removeClass("active"), $(".gq__select").removeClass("active"), $(".gq__select").removeAttr("style"), $(".gadget-quotes__btn-block__btn").removeClass("active")) }), $(".gadget-quotes__container").on("click", ".gadget-quotes__your-gadget__add__plus.active", function () { $(".gadget-quotes__your-gadget").append(''), $(this).next().remove(), $(this).remove() }).on("click", ".gadget-quotes__your-gadget__remove__plus", function () { var e = 'Add another gadget'; $(this).parents(".gadget-quotes__your-gadget__list").prev().hasClass("first") && 2 === $(".gadget-quotes__your-gadget__list").length ? $(this).parents(".gadget-quotes__your-gadget__list").prev().find(".gadget-quotes__your-gadget__add").html(e) : !$(this).parents(".gadget-quotes__your-gadget__list").prev().hasClass("first") && 2 < $(".gadget-quotes__your-gadget__list").length && $(this).parents(".gadget-quotes__your-gadget__list").index() === $(".gadget-quotes__your-gadget__list").length && $(this).parents(".gadget-quotes__your-gadget__list").prev().find(".gadget-quotes__your-gadget__add").html(e), $(this).parents(".gadget-quotes__your-gadget__list").remove() }).on("change", ".gq__gadget-name .gadget-quotes__your-gadget__select", function () { var e = ''; $(this).parents(".gadget-quotes__your-gadget__list").find(".gadget-quotes__your-gadget__img-wrap").html(e) }).on("change", ".gadget-quotes__your-gadget__select", function () { $(this).addClass("check-gadget"), 2 <= $(".check-gadget").length ? $(".gadget-quotes__btn-block__btn").addClass("active") : $(".gadget-quotes__btn-block__btn").removeClass("active") }), $(".show-plan-btn").on("click", function (e) { $(".showing-plan").addClass("visible") }), $(".show-key-btn").on("click", function (e) { e.preventDefault(), $(".key-features__block").addClass("visible"), $(".pop-up__bg").addClass("visible"), $(".pop-up").addClass("visible") }), $(".gq__popup_det").on("click", function (e) { var t = $(this).parents(".showing-plan__block").find(".showing-plan__block__logo").attr("src"), a = $(this).parents(".showing-plan__block").find(".gq__price_month").html(), s = $(this).parents(".showing-plan__block").find(".gq__price_year").html(); $(".result__block").addClass("visible"), $(".pop-up__bg").addClass("visible"), $(".pop-up").addClass("visible"), $(".result__block__logo").attr("src", t), $(".result__gq__price_month").html(a), $(".result__gq__price_year").html(s) }), $(".pop-up__close, .pop-up__bg").on("click", function (e) { $(".key-features__block").removeClass("visible"), $(".result__block").removeClass("visible"), $(".pop-up__bg").removeClass("visible"), $(".pop-up").removeClass("visible") }) }();