PageSourceSearch

https://mediumvioletred-kudu-331045.hostingersite.com/wp-content/t…/assets/js/agrion-theme.js?ver=1791002520

js mediumvioletred-kudu-331045.hostingersite.com collected 2026-10-03 04:42:43 UTC 7,946 bytes, 264 lines download raw bytes

1(function ($) {
2  "use strict";
3
4  if ($(".main-menu__list").length) {
5    let menuElement = $(".main-menu__list");
6    let currentMenuItem = menuElement.find("li.current-menu-item");
7    let currentMenuParent = menuElement.find("li.current-menu-parent");
8    let currentMenuAncestor = menuElement.find("li.current-menu-ancestor");
9    let currentPageItem = menuElement.find("li.current_page_item");
10    currentMenuItem.addClass("current");
11    currentMenuParent.addClass("current");
12    currentMenuAncestor.addClass("current");
13    currentPageItem.addClass("current");
14  }
15
16  // Accrodion
17  if ($(".accrodion-grp").length) {
18    var accrodionGrp = $(".accrodion-grp");
19    accrodionGrp.each(function () {
20      var accrodionName = $(this).data("grp-name");
21      var Self = $(this);
22      var accordion = Self.find(".accrodion");
23      Self.addClass(accrodionName);
24      Self.find(".accrodion .accrodion-content").hide();
25      Self.find(".accrodion.active").find(".accrodion-content").show();
26      accordion.each(function () {
27        $(this)
28          .find(".accrodion-title")
29          .on("click", function () {
30            if ($(this).parent().hasClass("active") === false) {
31              $(".accrodion-grp." + accrodionName)
32                .find(".accrodion")
33                .removeClass("active");
34              $(".accrodion-grp." + accrodionName)
35                .find(".accrodion")
36                .find(".accrodion-content")
37                .slideUp();
38              $(this).parent().addClass("active");
39              $(this).parent().find(".accrodion-content").slideDown();
40            }
41          });
42      });
43    });
44  }
45
46  if ($(".scroll-to-target").length) {
47    $(".scroll-to-target").on("click", function () {
48      var target = $(this).attr("data-target");
49      // animate
50      $("html, body").animate({
51          scrollTop: $(target).offset().top,
52        },
53        1000
54      );
55
56      return false;
57    });
58  }
59
60  if ($(".video-popup").length) {
61    $(".video-popup").magnificPopup({
62      type: "iframe",
63      mainClass: "mfp-fade",
64      removalDelay: 160,
65      preloader: true,
66
67      fixedContentPos: false,
68    });
69  }
70
71  if ($(".img-popup").length) {
72    var groups = {};
73    $(".img-popup").each(function () {
74      var id = parseInt($(this).attr("data-group"), 10);
75
76      if (!groups[id]) {
77        groups[id] = [];
78      }
79
80      groups[id].push(this);
81    });
82
83    $.each(groups, function () {
84      $(this).magnificPopup({
85        type: "image",
86        closeOnContentClick: true,
87        closeBtnInside: false,
88        gallery: {
89          enabled: true,
90        },
91      });
92    });
93  }
94
95  if ($(".add").length) {
96    $(document).on("click", ".add", function () {
97      if ($(this).prev().val() < 999) {
98        $(this)
99          .prev()
100          .val(+$(this).prev().val() + 1);
101      }
102      $(this).prev().trigger("change");
103    });
104  }
105
106  if ($(".sub").length) {
107    $(document).on("click", ".sub", function () {
108      if ($(this).next().val() > 0) {
109        if ($(this).next().val() > 0)
110          $(this)
111          .next()
112          .val(+$(this).next().val() - 1);
113      }
114      $(this).next().trigger("change");
115    });
116  }
117
118  if ($(".main-menu__list").length && $(".mobile-nav__container").length) {
119    let navContent = document.querySelector(".main-menu__list").outerHTML;
120    let mobileNavContainer = document.querySelector(".mobile-nav__container");
121    mobileNavContainer.innerHTML = navContent;
122  }
123  if ($(".sticky-header__content").length) {
124    let navContent = document.querySelector(".main-menu").innerHTML;
125    let mobileNavContainer = document.querySelector(".sticky-header__content");
126    mobileNavContainer.innerHTML = navContent;
127  }
128
129  if ($(".mobile-nav__container .main-menu__list").length) {
130    let dropdownAnchor = $(
131      ".mobile-nav__container .main-menu__list .menu-item-has-children > a"
132    );
133    dropdownAnchor.each(function () {
134      let self = $(this);
135      let toggleBtn = document.createElement("BUTTON");
136      toggleBtn.setAttribute("aria-label", "dropdown toggler");
137      toggleBtn.innerHTML = "<i class='fa fa-angle-down'></i>";
138      self.append(function () {
139        return toggleBtn;
140      });
141      self.find("button").on("click", function (e) {
142        e.preventDefault();
143        let self = $(this);
144        self.toggleClass("expanded");
145        self.parent().toggleClass("expanded");
146        self.parent().parent().children("ul").slideToggle();
147      });
148    });
149  }
150
151  if ($(".mobile-nav__toggler").length) {
152    $(".mobile-nav__toggler").on("click", function (e) {
153      e.preventDefault();
154      $(".mobile-nav__wrapper").toggleClass("expanded");
155      $("body").toggleClass("locked");
156    });
157  }
158
159  if ($(".search-toggler").length) {
160    $(".search-toggler").on("click", function (e) {
161      e.preventDefault();
162      $(".search-popup").toggleClass("active");
163      $(".mobile-nav__wrapper").removeClass("expanded");
164      $("body").toggleClass("locked");
165    });
166  }
167
168  if ($(".dynamic-year").length) {
169    let date = new Date();
170    $(".dynamic-year").html(date.getFullYear());
171  }
172
173
174
175  // window load event
176
177  $(window).on("load", function () {
178
179    if ($(".preloader").length) {
180      $(".preloader").fadeOut();
181    }
182
183    if ($(".shop-one ul.products").length) {
184      $(".shop-one ul.products").imagesLoaded(function () {
185        $(".shop-one ul.products").isotope({
186          layoutMode: "masonry",
187        });
188      });
189    }
190
191  });
192
193  // window scroll event
194
195  $(window).on("scroll", function () {
196    if ($(".stricked-menu").length) {
197      var headerScrollPos = 130;
198      var stricky = $(".stricked-menu");
199      if ($(window).scrollTop() > headerScrollPos) {
200        stricky.addClass("stricky-fixed");
201      } else if ($(this).scrollTop() <= headerScrollPos) {
202        stricky.removeClass("stricky-fixed");
203      }
204    }
205    if ($(".scroll-to-top").length) {
206      var strickyScrollPos = 100;
207      if ($(window).scrollTop() > strickyScrollPos) {
208        $(".scroll-to-top").fadeIn(500);
209      } else if ($(this).scrollTop() <= strickyScrollPos) {
210        $(".scroll-to-top").fadeOut(500);
211      }
212    }
213  });
214
215  $(document).on("click", ".shop-one__cart.agrion_ajax ", function (e) {
216    $(".agrion-overlay").fadeIn(300);
217  });
218
219  $(document.body).on(
220    "added_to_cart",
221    function (event, fragments, cart_hash, $button) {
222      $(".agrion-overlay").fadeOut(300);
223    }
224  );
225
226  // custom coursor
227  if ($(".custom-cursor").length) {
228    var cursor = document.querySelector(".custom-cursor__cursor");
229    var cursorinner = document.querySelector(".custom-cursor__cursor-two");
230    var a = document.querySelectorAll("a");
231
232    document.addEventListener("mousemove", function (e) {
233      var x = e.clientX;
234      var y = e.clientY;
235      cursor.style.transform = `translate3d(calc(${e.clientX}px - 50%), calc(${e.clientY}px - 50%), 0)`;
236    });
237
238    document.addEventListener("mousemove", function (e) {
239      var x = e.clientX;
240      var y = e.clientY;
241      cursorinner.style.left = x + "px";
242      cursorinner.style.top = y + "px";
243    });
244
245    document.addEventListener("mousedown", function () {
246      cursor.classList.add("click");
247      cursorinner.classList.add("custom-cursor__innerhover");
248    });
249
250    document.addEventListener("mouseup", function () {
251      cursor.classList.remove("click");
252      cursorinner.classList.remove("custom-cursor__innerhover");
253    });
254
255    a.forEach((item) => {
256      item.addEventListener("mouseover", () => {
257        cursor.classList.add("custom-cursor__hover");
258      });
259      item.addEventListener("mouseleave", () => {
260        cursor.classList.remove("custom-cursor__hover");
261      });
262    });
263  }
264})(jQuery);

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.