PageSourceSearch

https://rezydencjazegrze.pl/wp-content/themes/bialkowski/js/script.js?v=84069

js rezydencjazegrze.pl collected 2026-10-08 13:39:15 UTC 24,635 bytes, 873 lines download raw bytes

1$(document).ready(function () {
2  ((g) => {
3    var h,
4      a,
5      k,
6      p = "The Google Maps JavaScript API",
7      c = "google",
8      l = "importLibrary",
9      q = "__ib__",
10      m = document,
11      b = window;
12    b = b[c] || (b[c] = {});
13    var d = b.maps || (b.maps = {}),
14      r = new Set(),
15      e = new URLSearchParams(),
16      u = () =>
17        h ||
18        (h = new Promise(async (f, n) => {
19          await (a = m.createElement("script"));
20          e.set("libraries", [...r] + "");
21          for (k in g)
22            e.set(
23              k.replace(/[A-Z]/g, (t) => "_" + t[0].toLowerCase()),
24              g[k]
25            );
26          e.set("callback", c + ".maps." + q);
27          a.src = `https://maps.${c}apis.com/maps/api/js?` + e;
28          d[q] = f;
29          a.onerror = () => (h = n(Error(p + " could not load.")));
30          a.nonce = m.querySelector("script[nonce]")?.nonce || "";
31          m.head.append(a);
32        }));
33    d[l]
34      ? console.warn(p + " only loads once. Ignoring:", g)
35      : (d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n)));
36  })({
37    key: "AIzaSyCWBBUY3lHVPwt8_Sqs42RUci-bHsOyrVI",
38    v: "weekly",
39    // Use the 'v' parameter to indicate the version to use (weekly, beta, alpha, etc.).
40    // Add other bootstrap parameters as needed, using camel case.
41  });
42
43  let map;
44
45  async function initMap() {
46    if (!document.getElementById("map")) {
47      return;
48    }
49
50    const isMobile = window.innerWidth <= 900;
51    const desktopCenter = { lat: 52.4590474392113, lng: 21.02872552000097 };
52    const mobileCenter = { lat: 52.458425995721825, lng: 21.0364666933001 };
53    const desktopZoom = 15;
54    const mobileZoom = 15;
55
56    // Request needed libraries.
57    const { Map } = await google.maps.importLibrary("maps");
58    const { AdvancedMarkerElement, PinElement } =
59      await google.maps.importLibrary("marker");
60    const { Place } = await google.maps.importLibrary("places");
61    const map = new Map(document.getElementById("map"), {
62      center: isMobile ? mobileCenter : desktopCenter, //trzeba tak ustawic by bylo jak na projekcie, zmienic zoom oraz center wspolrzedne
63      zoom: isMobile ? mobileZoom : desktopZoom,
64      mapId: "4504f8b37365c3d0",
65      // mapId: "5bc664c4da1cda73",
66      // mapId: "5a0f6c604715ae01",
67      zoomControl: false,
68      streetViewControl: false,
69      fullscreenControl: false,
70      mapTypeControl: false,
71    });
72    const parser = new DOMParser();
73
74    const pinChurch = $("#map").data("pin-church");
75    const pinBicycle = $("#map").data("pin-bicycle");
76    const pinPalace = $("#map").data("pin-palace");
77    const pinBicycleYellow = $("#map").data("pin-bicycle-yellow");
78    const pinPalaceYellow = $("#map").data("pin-palace-yellow");
79    const pinPkp = $("#map").data("pin-pkp");
80    const pinRestaurant = $("#map").data("pin-restaurant");
81    const pinSailboat = $("#map").data("pin-sailboat");
82    const pinSailboatYellow = $("#map").data("pin-sailboat-yellow");
83    const pinRz = $("#map").data("pin-rz");
84
85    const createMarker = (position, title, iconUrl, hoverIcon, id) => {
86      const img = document.createElement("img");
87      img.src = iconUrl;
88      img.setAttribute("data-aos", "fade-up");
89      img.setAttribute("data-aos-duration", "600");
90      img.setAttribute("data-aos-offset", "-110");
91      img.setAttribute("data-aos-anchor-placement", "top-bottom");
92
93
94      if (id === "pinRz") {
95        img.style.width = isMobile ? "56px" : "83px";
96        img.style.height = isMobile ? "66px" : "99px";
97      } else {
98        img.style.width = isMobile ? "47px" : "71px";
99        img.style.height = isMobile ? "56px" : "85px";
100      }
101
102      if (id === "pinBicycle") {
103        const anchorBicycle = document.getElementById("bicycle");
104
105        anchorBicycle.addEventListener("mouseover", function () {
106          this.classList.add("hovered");
107          img.src = hoverIcon;
108        });
109
110        anchorBicycle.addEventListener("mouseout", function () {
111          this.classList.remove("hovered");
112          img.src = iconUrl;
113        });
114      }
115
116      if (id === "pinPalace") {
117        const anchorPalace = document.getElementById("palace");
118
119        anchorPalace.addEventListener("mouseover", function () {
120          this.classList.add("hovered");
121          img.src = hoverIcon;
122        });
123
124        anchorPalace.addEventListener("mouseout", function () {
125          this.classList.remove("hovered");
126          img.src = iconUrl;
127        });
128      }
129
130      if (id === "pinPalace") {
131        const anchorPalace = document.getElementById("palace");
132
133        anchorPalace.addEventListener("mouseover", function () {
134          this.classList.add("hovered");
135          img.src = hoverIcon;
136        });
137
138        anchorPalace.addEventListener("mouseout", function () {
139          this.classList.remove("hovered");
140          img.src = iconUrl;
141        });
142      }
143
144
145      if (id === "pinSailboat") {
146        const anchorSailboat = document.getElementById("sailboat");
147
148        anchorSailboat.addEventListener("mouseover", function () {
149          this.classList.add("hovered");
150          img.src = hoverIcon;
151        });
152
153        anchorSailboat.addEventListener("mouseout", function () {
154          this.classList.remove("hovered");
155          img.src = iconUrl;
156        });
157      }
158
159      return new AdvancedMarkerElement({
160        map,
161        position: position,
162        content: img,
163        title: title,
164      });
165    };
166
167    const points = [
168      {
169        lat: 52.46078813103219,
170        lng: 21.036090720134343,
171        title: "Kościół",
172        icon: pinChurch,
173      },
174      {
175        lat: 52.45816664019555,
176        lng: 21.032851998116925,
177        title: "Rower",
178        icon: pinBicycle,
179        iconHover: pinBicycleYellow,
180        id: "pinBicycle",
181      },
182      {
183        lat: 52.461772934131304,
184        lng: 21.04200530390939,
185        title: "Pałac",
186        icon: pinPalace,
187        iconHover: pinPalaceYellow,
188        id: "pinPalace",
189      },
190      {
191        lat: 52.45257616196867,
192        lng: 21.00904793944807,
193        title: "PKP",
194        icon: pinPkp,
195      },
196      {
197        lat: 52.46185536334332,
198        lng: 21.038868600149065,
199        title: "Restauracja",
200        icon: pinRestaurant,
201      },
202            {
203        lat: 52.45791742524223,
204        lng: 21.03612252926563,
205        title: "Dostęp do jeziora",
206        icon: pinSailboat,
207        iconHover: pinSailboatYellow,
208        id: "pinSailboat",
209      },
210      {
211        lat: 52.45908641494673,
212        lng: 21.039548089424525,
213        title: "Rezydencja Zegrze",
214        icon: pinRz,
215        id: "pinRz",
216      },
217    ];
218    points.forEach((point) => {
219      createMarker(
220        { lat: point.lat, lng: point.lng },
221        point.title,
222        point.icon,
223        point.iconHover,
224        point.id
225      );
226    });
227  }
228
229  initMap();
230
231  const widgetIds = new Map(); // Przechowujemy widgetId dla każdego formularza
232
233  function renderRecaptchas() {
234    document.querySelectorAll('.rz-form-with-captcha').forEach((form, index) => {
235      const recaptchaElement = form.querySelector('.g-recaptcha');
236      const tokenInput = form.querySelector('.recaptcha-token');
237
238      const widgetId = grecaptcha.render(recaptchaElement, {
239        sitekey: recaptchaElement.dataset.sitekey,
240        size: 'invisible',
241        callback: function (token) {
242          tokenInput.value = token;
243          $(form).trigger('recaptcha-verified');
244        },
245        badge: "inline"
246      });
247
248      widgetIds.set(form, widgetId);
249    });
250  }
251
252  window.onload = function () {
253    grecaptcha.ready(renderRecaptchas);
254  };
255
256  $(".rz-forms-1").on("submit", function (event) {
257    event.preventDefault();
258
259    const form = this;
260    const widgetId = widgetIds.get(form);
261    const token = $(form).find('.recaptcha-token').val();
262
263    if (!token) {
264      // Jeśli nie mamy tokena — uruchom reCAPTCHA
265      grecaptcha.execute(widgetId);
266      return;
267    }
268
269    $.ajax({
270      url: $(this).attr("action"),
271      method: "POST",
272      data: new FormData(this),
273      processData: false,
274      contentType: false,
275      headers: {
276        "X-Requested-With": "XMLHttpRequest",
277      },
278      success: function (response) {
279        console.log("response", response.responseJSON);
280        const successMessage = document.querySelector(".hero__form-success");
281        const heroForm = document.querySelector(".hero__form");
282        successMessage.classList.remove("hidden");
283        heroForm.classList.add("hidden");
284
285        const heroCloseBtn = document.getElementById("hero-close-btn");
286        heroCloseBtn.addEventListener("click", () => {
287          successMessage.classList.add("hidden");
288          heroForm.classList.remove("hidden");
289        });
290
291        $(form).find('.recaptcha-token').val('');
292        grecaptcha.reset(widgetId);
293      },
294      error: function (response) {
295        console.log("response", response.responseJSON);
296      },
297    });
298  });
299
300    $(".rz-forms-3").on("submit", function (event) {
301    event.preventDefault();
302
303      const form = this;
304      const widgetId = widgetIds.get(form);
305      const token = $(form).find('.recaptcha-token').val();
306
307      if (!token) {
308        // Jeśli nie mamy tokena — uruchom reCAPTCHA
309        grecaptcha.execute(widgetId);
310        return;
311      }
312
313    $.ajax({
314      url: $(this).attr("action"),
315      method: "POST",
316      data: new FormData(this),
317      processData: false,
318      contentType: false,
319      headers: {
320        "X-Requested-With": "XMLHttpRequest",
321      },
322      success: function (response) {
323        console.log("response", response.responseJSON);
324        const successMessage = document.querySelector(".hero__form-success--mobile");
325        const heroForm = document.querySelector(".hero__form--mobile");
326        successMessage.classList.remove("hidden");
327        heroForm.classList.add("hidden");
328
329        const heroCloseBtn = document.getElementById("hero-close-btn--mobile");
330        heroCloseBtn.addEventListener("click", () => {
331          successMessage.classList.add("hidden");
332          heroForm.classList.remove("hidden");
333        });
334
335        $(form).find('.recaptcha-token').val('');
336        grecaptcha.reset(widgetId);
337      },
338      error: function (response) {
339        console.log("response", response.responseJSON);
340      },
341    });
342  });
343
344
345
346
347  $(".rz-forms-2").on("submit", function (event) {
348    event.preventDefault();
349
350    const form = this;
351    const widgetId = widgetIds.get(form);
352    const token = $(form).find('.recaptcha-token').val();
353
354    if (!token) {
355      // Jeśli nie mamy tokena — uruchom reCAPTCHA
356      grecaptcha.execute(widgetId);
357      return;
358    }
359
360    $.ajax({
361      url: $(this).attr("action"),
362      method: "POST",
363      data: new FormData(this),
364      processData: false,
365      contentType: false,
366      headers: {
367        "X-Requested-With": "XMLHttpRequest",
368      },
369      success: function (response) {
370        console.log("response", response.responseJSON);
371        const successMessage = document.querySelector(".contact__form-success");
372        const contactForm = document.querySelector(".contact__form");
373        successMessage.classList.remove("hidden");
374        contactForm.classList.add("hidden");
375
376        const contactFormCloseBtn = document.getElementById(
377          "contact-form-close-btn"
378        );
379        contactFormCloseBtn.addEventListener("click", () => {
380          successMessage.classList.add("hidden");
381          contactForm.classList.remove("hidden");
382        });
383
384        $(form).find('.recaptcha-token').val('');
385        grecaptcha.reset(widgetId);
386      },
387      error: function (response) {
388        console.log("response", response.responseJSON);
389      },
390    });
391  });
392});
393
394
395$(document).on("recaptcha-verified", ".rz-form-with-captcha", function () {
396  $(this).submit(); // wywołuje submit ponownie, teraz z tokenem
397});
398
399
400function validateRooms(form) {
401  const checkboxes = form.querySelectorAll('input[name="rooms[]"]');
402  const oneChecked = Array.from(checkboxes).some(cb => cb.checked);
403
404  checkboxes.forEach(cb => {
405    if (oneChecked) {
406      cb.removeAttribute('required');
407    } else {
408      cb.setAttribute('required', 'required');
409    }
410  });
411}
412
413
414
415$(document).ready(function () {
416  const $slider = $(".ks-single-item");
417  const isMobile = window.innerWidth <= 900;
418
419  $slider.slick({
420    slidesToShow: 2,
421    slidesToScroll: 1,
422    arrows: false,
423    variableWidth: true,
424    centerMode: true,
425    initialSlide: isMobile ? 1 : 2,
426  });
427
428  $slider.on("afterChange", function (event, slick, currentSlide) {
429    $(".slick-prev-custom").css("opacity", "1");
430    refreshFsLightbox();
431  });
432
433  $(".slick-prev-custom").on("click", function () {
434    const $slider = $(this).closest('.ks-section--gallery').find('.ks-single-item');
435    $slider.slick('slickPrev');
436  });
437
438  $(".slick-next-custom").on("click", function () {
439    const $slider = $(this).closest('.ks-section--gallery').find('.ks-single-item');
440    $slider.slick('slickNext');
441  });
442
443  $('.click-close-scroll-apartments').on('click', function (e) {
444    e.preventDefault();
445    
446    $('html').removeClass('pum-open pum-open-overlay pum-open-scrollable');
447
448    $(this).closest('.pum-overlay').hide(0, function() {
449      $('html, body').animate(
450          {
451            scrollTop: $('#flats').offset().top - (isMobile ? 50 : 20)
452          },
453          500,
454      );
455    });
456  });
457
458  $('.hero__form-checkbox .toggle-consent').on('click', function () {
459    const clickedButton = $(this);
460    const clickedWrapper = clickedButton.closest('.hero__form-checkbox');
461
462    if (clickedWrapper.hasClass('active')) {
463      clickedWrapper.removeClass('active');
464      clickedButton.removeClass('active');
465      clickedButton.text(clickedButton.data('show'));
466      return;
467    }
468
469
470    $('.hero__form-checkbox').removeClass('active');
471    $('.toggle-consent').removeClass('active').each(function () {
472      $(this).text($(this).data('show'));
473    });
474
475    clickedWrapper.addClass('active');
476    clickedButton.addClass('active');
477    clickedButton.text(clickedButton.data('hide'));
478  });
479
480  $('.contact__form-checkbox .toggle-consent').on('click', function () {
481    const clickedButton = $(this);
482    const clickedWrapper = clickedButton.closest('.contact__form-checkbox');
483
484    if (clickedWrapper.hasClass('active')) {
485      clickedWrapper.removeClass('active');
486      clickedButton.removeClass('active');
487      clickedButton.text(clickedButton.data('show'));
488      return;
489    }
490
491
492    $('.contact__form-checkbox').removeClass('active');
493    $('.toggle-consent').removeClass('active').each(function () {
494      $(this).text($(this).data('show'));
495    });
496
497    clickedWrapper.addClass('active');
498    clickedButton.addClass('active');
499    clickedButton.text(clickedButton.data('hide'));
500  });
501
502});
503
504$(document).ready(function () {
505  var $slider = $(".ks2-single-item");
506
507  $slider.slick({
508    slidesToShow: 1,
509    slidesToScroll: 1,
510    arrows: false,
511    variableWidth: true,
512  });
513
514  $slider.on("afterChange", function (event, slick, currentSlide) {
515    $(".ks2-slick-prev-custom").css("opacity", "1");
516  });
517
518  $(".ks2-slick-prev-custom").on("click", function () {
519    $slider.slick("slickPrev");
520  });
521
522  $(".ks2-slick-next-custom").on("click", function () {
523    $slider.slick("slickNext");
524  });
525});
526
527$(document).ready(function () {
528  var $slider = $(".ks3-single-item");
529
530  $slider.slick({
531    slidesToShow: 1,
532    slidesToScroll: 1,
533    arrows: false,
534    variableWidth: true,
535  });
536
537  $slider.on("afterChange", function (event, slick, currentSlide) {
538    $(".ks3-slick-prev-custom").css("opacity", "1");
539    refreshFsLightbox();
540  });
541
542  $(".ks3-slick-prev-custom").on("click", function () {
543    $slider.slick("slickPrev");
544  });
545
546  $(".ks3-slick-next-custom").on("click", function () {
547    $slider.slick("slickNext");
548  });
549});
550
551$(document).ready(function () {
552  var $slider = $(".video-slick-slider");
553
554  $slider.slick({
555    slidesToShow: 3,
556    slidesToScroll: 1,
557    arrows: false,
558    // variableWidth: true,
559
560    responsive: [
561      {
562        breakpoint: 1320,
563        settings: {
564
565          slidesToShow: 2
566        }
567      },
568      {
569        breakpoint: 740,
570        settings: {
571          slidesToShow: 1
572        }
573      }
574    ]
575  });
576
577  $(".ks4-slick-prev-custom").on("click", function () {
578    $slider.slick("slickPrev");
579  });
580
581  $(".ks4-slick-next-custom").on("click", function () {
582    $slider.slick("slickNext");
583  });
584
585    $slider.on('afterChange', function() {
586      refreshFsLightbox();
587  });
588});
589
590$(document).ready(function () {
591  var $slider = $(".travel-slick-slider");
592
593  $slider.slick({
594    slidesToShow: 3,
595    slidesToScroll: 1,
596    arrows: false,
597    variableWidth: true,
598
599    // responsive: [
600    //   {
601    //     breakpoint: 1320,
602    //     settings: {
603
604    //       slidesToShow: 2
605    //     }
606    //   },
607    //   {
608    //     breakpoint: 740,
609    //     settings: {
610    //       slidesToShow: 1
611    //     }
612    //   }
613    // ]
614  });
615
616    $slider.on("afterChange", function (event, slick, currentSlide) {
617      $(".ks5-slick-prev-custom").css("opacity", "1");
618    });
619
620
621  $(".ks5-slick-prev-custom").on("click", function () {
622    $slider.slick("slickPrev");
623  });
624
625  $(".ks5-slick-next-custom").on("click", function () {
626    $slider.slick("slickNext");
627  });
628});
629
630const menuIkona = document.getElementById("menu-ikona");
631const menuTrigger = document.getElementById("menu-trigger");
632const menuWysuwane = document.getElementById("menu-wysuwane");
633const menuLinki = document.querySelectorAll("#menu-links a");
634const langOptionsMobile = document.querySelectorAll('.lang-options--mobile');
635const heroFormWrapper = document.querySelector(".hero__form-wrapper");
636const mobileAskBtn = document.getElementById("mobile-ask-btn");
637const meetingMobileBtn = document.getElementById("meeting-mobile-btn"); 
638
639let lastScrollY2 = window.scrollY;
640
641// Przycisk menu
642menuTrigger.addEventListener("click", (event) => {
643  event.stopPropagation();
644
645  // Scroll to top jeśli nie jesteś na górze
646  if (window.scrollY > 50) {
647    window.scrollTo({ top: 0, behavior: "smooth" });
648  }
649
650  // Pokaz/ukryj menu
651  menuWysuwane.classList.toggle("otwarte");
652  menuIkona.classList.toggle("rotated");
653  heroFormWrapper.classList.toggle("hide");
654
655  const isMobile = window.innerWidth <= 900;
656
657  if (isMobile) {
658    if (menuWysuwane.classList.contains("otwarte")) {
659      topHeader.style.top = 0;
660      document.body.classList.add("noscroll");
661    } else {
662      document.body.classList.remove("noscroll");
663      topHeader.style.top = bBar.offsetHeight + "px";
664    }
665  }
666});
667
668// Kliknięcie w linki w menu
669menuLinki.forEach((link) => {
670  link.addEventListener("click", (event) => {
671    if (link.getAttribute("target") === "_blank") {
672      return;
673    }
674
675    // event.preventDefault();
676    const href = link.getAttribute('href');
677    let hash = null;
678
679    if (href.includes('#')) {
680      hash = href.substring(href.indexOf('#'));
681      if (hash.endsWith('/')) {
682        hash = hash.slice(0, -1);
683      }
684    }
685    const targetElement = hash ? document.querySelector(hash) : null;
686
687    if (targetElement) {
688      document.body.classList.remove("noscroll");
689      targetElement.scrollIntoView({ behavior: "smooth" });
690      menuWysuwane.classList.remove("otwarte");
691      menuIkona.classList.remove("rotated");
692    }
693  });
694});
695
696document.addEventListener("DOMContentLoaded", () => {
697  const hash = window.location.hash;
698  if (hash) {
699    const cleanHash = hash.endsWith('/') ? hash.slice(0, -1) : hash;
700    const targetElement = document.querySelector(cleanHash);
701    if (targetElement) {
702      targetElement.scrollIntoView({ behavior: "smooth" });
703    }
704  }
705});
706
707langOptionsMobile.forEach((link) => {
708  link.addEventListener("click", (event) => {
709    document.body.classList.remove("noscroll");
710    menuWysuwane.classList.remove("otwarte");
711    menuIkona.classList.remove("rotated");
712      window.scrollTo({
713        top: 0,
714        behavior: 'smooth'
715      });
716  });
717});
718
719// Klik poza menu
720document.addEventListener("click", (event) => {
721  if (
722    menuWysuwane.classList.contains("otwarte") &&
723    !menuWysuwane.contains(event.target) &&
724    event.target !== menuIkona &&
725    event.target !== menuTrigger
726  ) {
727    menuWysuwane.classList.remove("otwarte");
728    menuIkona.classList.remove("rotated");
729  }
730});
731
732// Automatyczne ukrywanie menu przy scrollu w dół
733window.addEventListener("scroll", () => {
734  const currentScrollY = window.scrollY;
735
736  if (currentScrollY > lastScrollY2) {
737    // Scroll w dół → ukryj menu
738    menuWysuwane.classList.remove("otwarte");
739    menuIkona.classList.remove("rotated");
740  }
741
742  lastScrollY2 = currentScrollY;
743});
744
745mobileAskBtn.addEventListener("click", () => {
746  document.body.classList.remove("noscroll");
747  menuWysuwane.classList.remove("otwarte");
748  menuIkona.classList.remove("rotated");
749
750  const contactSection = document.getElementById("contact");
751  if (contactSection) {
752    contactSection.scrollIntoView({ behavior: "smooth" });
753  }
754});
755
756meetingMobileBtn.addEventListener("click", () => {
757  document.body.classList.remove("noscroll");
758  menuWysuwane.classList.remove("otwarte");
759  menuIkona.classList.remove("rotated");
760
761  const contactSection = document.getElementById("consulting");
762  if (contactSection) {
763    contactSection.scrollIntoView({ behavior: "smooth" });
764  }
765});
766
767let lastScrollY = window.scrollY;
768const topHeader = document.querySelector(".top-header");
769const bBar = document.querySelector(".b-bar");
770const sectionHero = document.querySelector('.section--hero');
771topHeader.style.top = bBar.offsetHeight + "px";
772sectionHero.style.marginTop = bBar.offsetHeight + "px";
773// sectionHero.style.trans = 0 - topHeader.offsetHeight + bBar.offsetHeight + "px";
774
775const updateHeaderState = () => {
776  const currentScrollY = window.scrollY;
777
778  // Dodaj lub usuń klasę "at-top"
779  if (currentScrollY === 0) {
780    topHeader.classList.add("at-top");
781  } else {
782    topHeader.classList.remove("at-top");
783  }
784
785  // Obsługa kierunku scrollowania
786  if (currentScrollY > lastScrollY && currentScrollY > 50) {
787    // Scroll w dół
788    topHeader.classList.remove("nav-down");
789    topHeader.classList.add("nav-up");
790    console.log('0 - topHeader.offsetHeight + bBar.offsetHeight', topHeader.offsetHeight + bBar.offsetHeight)
791    topHeader.style.transform = `translateY(-${topHeader.offsetHeight + bBar.offsetHeight}px)`;
792  } else if (currentScrollY < lastScrollY) {
793    // Scroll w górę
794    topHeader.classList.remove("nav-up");
795    topHeader.classList.add("nav-down");
796    topHeader.style.transform = 'translateY(0px)';
797  }
798
799  lastScrollY = currentScrollY;
800};
801
802
803window.addEventListener("scroll", updateHeaderState);
804
805// Inicjalne ustawienie po załadowaniu
806updateHeaderState();
807
808document.getElementById("rz-logo").addEventListener("click", () => {
809  document.body.classList.remove("noscroll");
810  window.scrollTo({ top: 0, behavior: "smooth" });
811});
812
813document.getElementById("playButton").addEventListener("click", function () {
814  const element = document.querySelector(".jarallax2");
815
816  const result = jarallax(element, {
817    speed: 0.5, // Prędkość efektu parallax
818    videoLoop: true,
819    videoSrc:
820      "mp4:https://rezydencjazegrze.pl/wp-content/themes/bialkowski/images/video/homepage-compressed.mov",
821  });
822
823  this.style.opacity = 0;
824});
825
826const anchorSailboat = document.getElementById("sailboat");
827
828anchorSailboat.addEventListener("mouseover", function () {
829  this.classList.add("hovered");
830  // img.src = hoverIcon;
831});
832
833anchorSailboat.addEventListener("mouseout", function () {
834  this.classList.remove("hovered");
835  // img.src = iconUrl;
836});
837
838const anchorPeace = document.getElementById("peace");
839
840anchorPeace.addEventListener("mouseover", function () {
841  this.classList.add("hovered");
842});
843
844anchorPeace.addEventListener("mouseout", function () {
845  this.classList.remove("hovered");
846});
847
848fsLightboxInstances["gallery"].props.onOpen = function () {
849	console.log("The gallery lightbox has opened.");
850    const container = document.querySelector('.fslightbox-container');
851    
852    if (container) {
853        container.id = 'gallery-lightbox';
854    }
855}
856
857fsLightboxInstances["diary"].props.onOpen = function () {
858	console.log("The diary lightbox has opened.");
859    const container = document.querySelector('.fslightbox-container');
860    
861    if (container) {
862        container.id = 'diary-lightbox';
863    }
864}
865
866fsLightboxInstances["video-gallery"].props.onOpen = function () {
867	console.log("The diary lightbox has opened.");
868    const container = document.querySelector('.fslightbox-container');
869    
870    if (container) {
871        container.id = 'video-gallery-lightbox';
872    }
873}

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.