PageSourceSearch

https://valmo-rus.ru/bitrix/templates/valmo_rus2/js/main.min.js

js valmo-rus.ru collected 2026-10-07 03:05:56 UTC 10,399 bytes, 305 lines download raw bytes

1$(window).scroll(function () {
2  let height = $(window).scrollTop();
3  if (height > 0) {
4    $(".header").addClass("fixed");
5    $(".header").css("transition", "0.3s");
6  } else {
7    $("header").removeClass("fixed");
8  }
9});
10
11$(document).ready(function () {
12  const e = document.querySelector(".menu"),
13    t = document.getElementById("openMenu"),
14    o = document.getElementById("closeMenu"),
15    n = document.querySelector("body");
16  (e.style.opacity = "0"),
17    t.addEventListener("click", function () {
18      (e.style.transform = "translateY(0px)"),
19        (e.style.opacity = "1"),
20        (n.style.overflowY = "hidden"),
21        (n.style.padding = "0 10px 0 0");
22    }),
23    o.addEventListener("click", function () {
24      (e.style.transform = "translateY(-100%)"),
25        (e.style.opacity = "0"),
26        (n.style.overflowY = "scroll"),
27        (n.style.padding = "0");
28    });
29}),
30  $(document).ready(function () {
31    const e = document.getElementById("openCamera"),
32      t = document.getElementById("openCamera2"),
33      o = document.getElementById("menuCamer"),
34      n = document.getElementById("closeCamer"),
35      s = document.querySelector("body");
36    (o.style.opacity = "0"),
37      e.addEventListener("click", function () {
38        (o.style.transform = "translateY(0px)"),
39          (o.style.opacity = "1"),
40          (s.style.overflowY = "hidden"),
41          (s.style.padding = "0 10px 0 0");
42      }),
43      n.addEventListener("click", function () {
44        (o.style.transform = "translateY(100%)"),
45          (o.style.opacity = "0"),
46          (s.style.overflowY = "scroll"),
47          (s.style.padding = "0");
48      }),
49      t.addEventListener("click", function () {
50        (o.style.transform = "translateY(0px)"),
51          (o.style.opacity = "1"),
52          (s.style.overflowY = "hidden"),
53          (s.style.padding = "0 10px 0 0");
54      }),
55      n.addEventListener("click", function () {
56        (o.style.transform = "translateY(100%)"),
57          (o.style.opacity = "0"),
58          (s.style.overflowY = "scroll"),
59          (s.style.padding = "0");
60      });
61  }),
62  $(".slider-banner").slick({ adaptiveHeight: !0, dots: !0, autoplay: !0 }),
63  $(".slider-sert").slick({
64    autoplay: !0,
65    infinite: !0,
66    slidesToShow: 4,
67    slidesToScroll: 1,
68    responsive: [
69      { breakpoint: 768, settings: { slidesToShow: 2, slidesToScroll: 1 } },
70    ],
71  }),
72  $(".slider-liz").slick({
73    adaptiveHeight: !0,
74    autoplay: !0,
75    slidesToShow: 6,
76    slidesToScroll: 1,
77    responsive: [
78      { breakpoint: 1520, settings: { slidesToShow: 5, slidesToScroll: 1 } },
79      { breakpoint: 1200, settings: { slidesToShow: 4, slidesToScroll: 1 } },
80      {
81        breakpoint: 991,
82        settings: { slidesToShow: 3, slidesToScroll: 1, dots: !0 },
83      },
84      {
85        breakpoint: 768,
86        settings: { slidesToShow: 2, slidesToScroll: 1, dots: !0 },
87      },
88      {
89        breakpoint: 576,
90        settings: { slidesToShow: 1, slidesToScroll: 1, dots: !0 },
91      },
92    ],
93  }),
94  $(document).ready(function () {
95    $(".accordion-tabs")
96      .children("li")
97      .first()
98      .children("a")
99      .addClass("is-active")
100      .next()
101      .addClass("is-open")
102      .show(),
103      $(".accordion-tabs").on("click", "li > a", function (e) {
104        $(this).hasClass("is-active")
105          ? e.preventDefault()
106          : (e.preventDefault(),
107            $(".accordion-tabs .is-open").removeClass("is-open").hide(),
108            $(this).next().toggleClass("is-open").toggle(),
109            $(".accordion-tabs").find(".is-active").removeClass("is-active"),
110            $(this).addClass("is-active"));
111      });
112  }),
113  Fancybox.bind('[data-fancybox="gallery-sert"]', {}),
114  Fancybox.bind('[data-fancybox=""]', {}),
115  $(document).ready(function () {
116    $(".phone").mask("+7(999) 999-99-99");
117
118    $(".modal-form").on("submit", function (event) {
119  event.preventDefault();
120
121  const $submitButton = $(this).find("button[type='submit']");
122  const $hidBtn = $(this).find(".hidbtn");
123
124  $submitButton.hide();
125  $hidBtn.show();
126
127  $.ajax({
128    type: "POST",
129    url: "/mail.php",
130    data: $(this).serialize(),
131    success: function () {
132      if (typeof ym === "function") {
133        ym(86226868, "reachGoal", "forms");
134      }
135
136      $("#request").modal("toggle");
137      $("#t").modal("toggle");
138      $("#t2").modal("toggle");
139      $(".modal-form")[0].reset();
140    },
141    complete: function () {
142      $submitButton.show();
143      $hidBtn.hide();
144        },
145      });
146    });
147  });
148$("#request").on("show.bs.modal", function (e) {
149  var t = $(e.relatedTarget).data("whatever"),
150    o = $(this);
151  o.find('input[name="formname"]').val(t), o.find("h4").text(t);
152}),
153  document.addEventListener("DOMContentLoaded", function () {
154    const e = document.querySelectorAll(".open-modal"),
155      t = document.querySelector(".form__anim"),
156      o = document.querySelectorAll(".btn__get");
157    e.forEach((e) => {
158      e.addEventListener("click", () => {
159        (t.style.transform = "translateX(-470%)"),
160          setTimeout(() => {
161            t.style.transform = "translateX(0px)";
162          }, 900);
163      });
164    }),
165      o.forEach((e) => {
166        e.addEventListener("click", () => {
167          t.style.transform = "translateX(470%)";
168        });
169      });
170  }),
171  document.addEventListener("DOMContentLoaded", function () {
172    const e = document.getElementById("hoverOpen1"),
173      t = document.getElementById("hoverOpen2"),
174      o = document.getElementById("hoverItems1"),
175      n = document.getElementById("hoverItems2");
176    function s() {
177      document.querySelectorAll(".hoverItem").forEach(function (e) {
178        e.style.display = "none";
179      });
180    }
181    e.addEventListener("mouseover", function () {
182      s(), (o.style.display = "block");
183    }),
184      t.addEventListener("mouseover", function () {
185        s(), (n.style.display = "block");
186      }),
187      [e, t, o, n].forEach(function (e) {
188        e.addEventListener("mouseout", function () {
189          s();
190        });
191      });
192  }),
193  document.addEventListener("DOMContentLoaded", function () {
194    const e = document.querySelectorAll(".accordion-item");
195    e.forEach((t) => {
196      t.querySelector(".accordion-header").addEventListener("click", () => {
197        var o;
198        t.classList.toggle("active"),
199          t.classList.contains("active") &&
200            ((o = t),
201            e.forEach((e) => {
202              e !== o &&
203                e.classList.contains("active") &&
204                e.classList.remove("active");
205            }));
206      });
207    });
208  });
209
210$(document).ready(function () {
211  var e = $(".video-widget"),
212    a = document.getElementById("video-widget__video");
213  $(".video-widget__close").click(function (t) {
214    return (
215      t.preventDefault(),
216      "default" == e.attr("data-state")
217        ? e.hide()
218        : (e.attr("data-state", "default"), (a.muted = !0)),
219      !1
220    );
221  }),
222    $(".video-widget__container").on("click", function (t) {
223      "default" == e.attr("data-state")
224        ? (e.attr("data-state", "opened"), (a.currentTime = 0), (a.muted = !1))
225        : (e.attr("data-state", "default"), (a.muted = !0));
226    }),
227    1024 < $(document).width() &&
228      $(".video-widget__container").on("touchstart", function (t) {
229        "default" == e.attr("data-state")
230          ? (e.attr("data-state", "opened"),
231            (a.currentTime = 0),
232            (a.muted = !1))
233          : (e.attr("data-state", "default"), (a.muted = !0));
234      }),
235    $(document).mouseup(function (t) {
236      e.is(t.target) ||
237        0 !== e.has(t.target).length ||
238        "default" == e.attr("data-state") ||
239        (e.attr("data-state", "default"), (a.muted = !0));
240    });
241});
242
243// Флаг для предотвращения повторной отправки формы
244let isSubmitting = false;
245
246// Функция открытия формы
247function openForm() {
248  document.getElementById("formOverlay").style.display = "flex";
249  document.getElementById("feedbackForm").reset(); // Очистка формы при повторном открытии
250  document.getElementById("statusMessage").style.display = "none"; // Скрыть сообщение об успехе
251  isSubmitting = false; // Сброс флага на случай повторного открытия формы
252}
253
254// Функция закрытия формы
255function closeForm() {
256  document.getElementById("formOverlay").style.display = "none";
257}
258
259// Функция отправки формы через AJAX
260function sendForm(event) {
261  event.preventDefault(); // Предотвращение стандартной отправки формы
262
263  // Проверка на текущую отправку формы
264  if (isSubmitting) return;
265
266  isSubmitting = true; // Установка флага отправки формы
267
268  const formData = new FormData(document.getElementById("feedbackForm"));
269  const submitButton = document.querySelector(".submit-btn");
270
271  // Блокируем кнопку отправки
272  submitButton.disabled = true;
273  submitButton.textContent = "Отправка...";
274
275  fetch("/mail-servis.php", {
276    method: "POST",
277    body: formData,
278  })
279    .then((response) => response.text())
280    .then((result) => {
281      document.getElementById("formOverlay").style.display = "none"; // Скрыть форму
282
283      // Показать сообщение об успешной отправке
284      const statusMessage = document.getElementById("statusMessage");
285      statusMessage.textContent = result || "Форма успешно отправлена!";
286      statusMessage.style.display = "block";
287
288      // Скрыть сообщение через 2 секунды
289      setTimeout(() => {
290        statusMessage.style.display = "none";
291      }, 3000);
292    })
293    .catch((error) => {
294      alert("Ошибка отправки формы. Попробуйте снова.");
295      console.error("Ошибка:", error);
296    })
297    .finally(() => {
298      isSubmitting = false; // Сброс флага отправки формы
299      submitButton.disabled = false; // Разблокировка кнопки отправки
300      submitButton.textContent = "Отправить";
301    });
302}
303
304// Привязка события отправки формы
305document.getElementById("feedbackForm").addEventListener("submit", sendForm);

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