PageSourceSearch

https://www.veritan.md/front-assets/js/main.js?v=33

js veritan.md collected 2026-09-29 23:25:57 UTC 17,278 bytes, 398 lines download raw bytes

1// $(document).on("click", ".plus", function () {
2//     var e = $(this).parent().parent().find("input").val();
3//     $(this)
4//         .parent()
5//         .parent()
6//         .find("input")
7//         .val(++e);
8// }),
9//     $(document).on("click", ".minus", function () {
10//         var e = $(this).parent().parent().find("input").val();
11//         1 < e &&
12//             $(this)
13//                 .parent()
14//                 .parent()
15//                 .find("input")
16//                 .val(--e);
17//     });
18// $(document).on('click', '.plus', function() {
19//     if (parseInt($(this).parent().find('input').val()) > parseInt($(this).parent().find('input').attr('max'))) $(this).parent().find('input').val($(this).parent().find('input').attr('max'));
20// });
21const swiper = new Swiper(".item-sliders", {
22        slidesPerView: 2,
23        spaceBetween: 10,
24        resistanceRatio: 0,
25        observer: 1,
26        observeParents: 1,
27        navigation: { nextEl: ".arrow-right", prevEl: ".arrow-left" },
28        breakpoints: { 640: { slidesPerView: 3, spaceBetween: 10 }, 1e3: { slidesPerView: 4, spaceBetween: 10 }, 1260: { slidesPerView: 5, spaceBetween: 10 } },
29    }),
30    swiper4 =
31        ($(document).ready(function () {
32            $(".item-sliders-four").each(function () {
33                new Swiper($(this), {
34                    slidesPerView: 2,
35                    spaceBetween: 10,
36                    loop: !0,
37                    navigation: { nextEl: $(this).parent().find(".arrow-right"), prevEl: $(this).parent().find(".arrow-left") },
38                    breakpoints: { 550: { slidesPerView: 2, spaceBetween: 10 }, 700: { slidesPerView: 3, spaceBetween: 10 }, 1260: { slidesPerView: 4, spaceBetween: 10 } },
39                });
40            });
41        }),
42        $(document).ready(function () {
43            $(".banners_slider").each(function () {
44                new Swiper($(this), {
45                    slidesPerView: 1,
46                    spaceBetween: 10,
47                    allowTouchMove: !0,
48                    autoplay: { delay: 5e3 },
49                    navigation: { nextEl: $(this).find(".swiper-button-prev"), prevEl: $(this).find(".swiper-button-next") },
50                    breakpoints: { 1e3: { allowTouchMove: !1, slidesPerView: 2, spaceBetween: 10 } },
51                });
52            });
53        }),
54        new Swiper(".item-sliders-2", {
55            slidesPerView: 2,
56            spaceBetween: 10,
57            resistanceRatio: 0,
58            observer: 1,
59            observeParents: 1,
60            navigation: { nextEl: ".arrow-right", prevEl: ".arrow-left" },
61            breakpoints: { 640: { slidesPerView: 3, spaceBetween: 10 }, 1e3: { slidesPerView: 5, spaceBetween: 10 } },
62        })),
63    swiper20 = new Swiper(".mobile-image-swiper", { slidesPerView: 1, spaceBetween: 10, observer: 1, observeParents: 1, pagination: { el: ".swiper-pagination" }, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev" } }),
64    swiper6 =
65        ($(document).ready(function () {
66            $(".big_slider").each(function () {
67                new Swiper($(this), {
68                    autoplay: { delay: 5e3 },
69                    observer: 1,
70                    observeParents: 1,
71                    slidesPerView: 1,
72                    pagination: { el: ".swiper-pagination", type: "bullets", clickable: !0 },
73                    navigation: { nextEl: $(this).find(".swiper-button-next"), prevEl: $(this).find(".swiper-button-prev") },
74                });
75            });
76        }),
77        new Swiper(".pluses-slider", {
78            slidesPerView: 1.4,
79            spaceBetween: 10,
80            breakpoints: { 540: { slidesPerView: 1.8, spaceBetween: 10 }, 800: { slidesPerView: 3, spaceBetween: 10, allowTouchMove: !0 }, 1200: { slidesPerView: 4, spaceBetween: 10, allowTouchMove: !1 } },
81        })),
82    swiper2 = new Swiper(".item-slider", {
83        direction: "horizontal",
84        slidesPerView: 2,
85        spaceBetween: 0,
86        scrollbar: { el: ".swiper-scrollbar" },
87        breakpoints: { 400: { slidesPerView: 3 }, 640: { slidesPerView: 4 }, 900: { direction: "vertical" }, 1260: { slidesPerView: 4, direction: "vertical", spaceBetween: 0 } },
88    });
89$(document).click(function (e) {
90    var i = $(".menu");
91    i.is(e.target) || 0 !== i.has(e.target).length || $(".category-big-down").slideUp();
92}),
93    $(document).click(function (e) {
94        var i = $(".dots");
95        i.is(e.target) || 0 !== i.has(e.target).length || $(".pop-up-serv").removeClass("active");
96    }),
97    $(window).scroll(function () {
98        var e = $(this),
99            i = $(".top");
100        500 < e.scrollTop() ? i.addClass("active") : i.removeClass("active");
101    }),
102    $(document).click(function (e) {
103        var i = $(".open-faq");
104        i.is(e.target) || 0 !== i.has(e.target).length || $(".drop-down-social").slideUp();
105    }),
106    $(".takeaway").on("click", function () {
107        $(".takeordeliv").attr("value", "takeaway"), $(".price-delivery").slideUp(), $(".adress").slideUp();
108    }),
109    $(".delivery-go").on("click", function () {
110        $(".takeordeliv").attr("value", "delivery"), $(".price-delivery").slideDown(), $(".adress").slideDown();
111    }),
112    $(".rev-on").on("click", function () {
113        $(".review-wrapper").fadeIn();
114    }),
115    $(".starts-selection svg").on("click", function () {
116        var e = $(this).data("star");
117        for ($(".rating-input").attr("value", e), $(this).parent().find("svg").removeClass("active"), i = 1; i <= e; i++) $(".rating-star-" + i).addClass("active");
118    }),
119    $(".trash-it").on("click", function () {
120        $(this).closest(".special-item").remove();
121        var e = $(".value-fav").attr("data-value");
122        e--, $(".value-fav").attr("data-value", e), $(".value-fav").text(e);
123    }),
124    $(".lang").on("click", function () {
125        $(".drop-lang").slideToggle();
126    }),
127    $(".curient-sort").on("click", function () {
128        $(this).parent().toggleClass("active");
129    }),
130    $(".tab-item").on("click", function () {
131        $(".tab-item").removeClass("active");
132        var e = $(this).data("show");
133        $(".show-hide").removeClass("active"), $("." + e).addClass("active"), $('.tab-item[data-show="' + e + '"]').toggleClass("active");
134    }),
135    $(".add-to-wish, .add-to-compare,.trash-it").on("click", function () {
136        $(this).find("svg").toggleClass("active");
137    }),
138    $(".title-filter").on("click", function () {
139        $(this).parent().toggleClass("active");
140    }),
141    $(".type-chouse").on("click", function () {
142        $(".type-chouse").removeClass("active"), $(this).addClass("active");
143    }),
144    $(".one-in-row").on("click", function () {
145        $(".two-in-row").removeClass("active"), $(this).addClass("active"), $(".row-item-special").removeClass("active");
146    }),
147    $(".catalog-list-page .show-all-categories").on("click", function () {
148        $(this).toggleClass("active"), $(this).parent().find("ul").toggleClass("active");
149    }),
150    $(".two-in-row").on("click", function () {
151        $(".one-in-row").removeClass("active"), $(this).addClass("active"), $(".row-item-special").addClass("active");
152    }),
153    $(".open-faq").on("click", function () {
154        $(".drop-down-social").slideToggle();
155    }),
156    $(".drop_down").on("click", function () {
157        $(this).parent().find('.drop_block_cabinet').slideToggle();
158    }),
159    $(".open_popup").on("click", function () {
160        var e = $(this).data("pop");
161        $("." + e).fadeIn();
162    }),
163    $(".close").on("click", function () {
164        $(this).parent().parent().fadeOut();
165    }),
166    $(".plenka").on("click", function () {
167        $(this).parent().fadeOut();
168    }),
169    $(".reg-from-sign").on("click", function () {
170        $(".overflow").fadeOut(), $(".reg").fadeIn();
171    }),
172    $(".reginopen").on("click", function (e) {
173        e.preventDefault(), $(".reg").fadeIn();
174    }),
175    $(".loginopen").on("click", function (e) {
176        e.preventDefault(), $(".sign").fadeIn();
177    }),
178    $(".categorys span").on("click", function () {
179        $(".category-big-down").slideToggle(), $(".grid").masonry({ itemSelector: ".grid-item" });
180    }),
181    $(".dots").on("click", function () {
182        $(this).find(".pop-up-serv").toggleClass("active");
183    }),
184    $(".with-drop").on("click", function () {
185        0 == $(this).parent().find(".drop-hello:hidden").length ? $(".drop-hello").slide
185Up() : ($(".drop-hello").slideUp(), $(this).parent().find(".drop-hello").slideToggle());
186    }),
187    $(".top").click(function () {
188        return $("html, body").animate({ scrollTop: 0 }, "slow"), !1;
189    }),
190    $(".item-slider .swiper-slide").on("click", function () {
191        var e = $(this).attr("data-image");
192        $(".big-image a").slideUp(), $(".image-" + e).slideDown();
193    }),
194    $(".burger").on("click", function () {
195        $(".close-mobile-menu").addClass("active"), $("html").addClass("active"), $(".main-header-mobile").addClass("active");
196    }),
197    $(".mob-catalog").on("click", function () {
198        $(".mobile-catalog").addClass("active");
199    }),
200    $(document).on("click", ".row-back", function () {
201        $(this).parent().removeClass("active");
202    }),
203    $(".close-mobile-menu").on("click", function () {
204        $(".header-mobile").removeClass("active"), $("html").removeClass("active"), $(".close-mobile-menu").removeClass("active");
205    }),
206    $(document).on("click", ".drop-container-max a", function () {
207        var e = $(this).attr("data-open");
208        $("." + e).addClass("active");
209    }),
210    $(document).ready(function () {
211        setTimeout(function() {
212            $(".loader").hide();
213        }, 300)
214    }),
215    $(document).click(function (e) {
216        var i = $(".search");
217        i.is(e.target) || 0 !== i.has(e.target).length || $(".smart-search").fadeOut();
218    });
219let image = $(".text-block img"),
220    screen = $(window).width();
221if (
222    (image.each(function () {
223        var e = $(this).css("width");
224        parseInt(e) > screen && $(this).addClass("wfull");
225    }),
226    $(window).width() < 1e3)
227) {
228    $(".read-it-button").on("click", function () {
229        $(".info-alert").toggleClass("active");
230    }),
231        $(".filter-block-mobile .head-ff").on("click", function () {
232            $(this).closest(".filter-block-mobile").find(".drop-filter-checkbox").toggle();
233        }),
234        $(".search input").on("click", function () {
235            setTimeout(function() {
236                $(".search").addClass("active"), $("html, body").addClass("active"), $(".smart-search").addClass("active");
237            }, 300)
238        }),
239        $(".visible-breads .icon-oppener").on("click", function () {
240            $(this).closest(".visible-breads").slideUp(), $(".hidden-breads").slideDown();
241        }),
242        $(".close-search").on("click", function () {
243            $(".search").removeClass("active"), $("html, body").removeClass("active"), $(".smart-search").removeClass("active");
244        }),
245        $(".close-filter").on("click", function () {
246            $(".catalog-filter-mobile").slideUp(), $("html").removeClass("active");
247        }),
248        $(".open-filter-mobile").on("click", function () {
249            $(".catalog-filter-mobile").slideDown(), $("html").addClass("active"), $(".show-filter-results").removeClass("active");
250        }),
251        $(".mob-sort").on("click", function () {
252            $(".drop-down-sort").slideToggle();
253        }),
254        $(".ttl-footer").on("click", function (e) {
255            e.preventDefault(), $(this).toggleClass("active"), $(this).parent().find(".mob-drop").slideToggle();
256        });
257    // var previousScroll = 0;
258    // $(document).on("scroll", function (e) {
259    //     var i;
260    //     150 < $(window).scrollTop() && ((i = $(this).scrollTop()), previousScroll < i ? $(".head-fix").addClass("hiddy") : $(".head-fix").removeClass("hiddy"), (previousScroll = $(window).scrollTop()));
261    // });
262    var hasScrolled;
263    var lastScrollTop = 0;
264    var delta = 5;
265    var navbarHeight = $('.head-fix').outerHeight();
266
267    $(window).scroll(function(event){
268        hasScrolled = true;
269    });
270
271    setInterval(function() {
272        if (hasScrolled) {
273            hasScrolledF();
274            hasScrolled = false;
275        }
276    }, 250);
277
278    function hasScrolledF() {
279        var st = $(this).scrollTop();
280        
281        if (Math.abs(lastScrollTop - st) <= delta)
282            return;
283        
284        if (st > lastScrollTop && st > navbarHeight){
285            $('.head-fix').addClass('hiddy');
286        } else {
287            if(st + $(window).height() < $(document).height()) {
288                $('.head-fix').removeClass('hiddy');
289            }
290        }
291        
292        lastScrollTop = st;
293    }        
294} else {
295    $(".drop-menu li a").on("mouseover", function () {
296        var e = $(this).attr("data-hover");
297        $(".hover-blocks .row").css("display", "none"), $("." + e).css("display", "flex"), $(".grid").masonry({ itemSelector: ".grid-item" });
298    }),
299        $(".search input").on("keydown", function () {
300            $(".smart-search").fadeIn();
301        }),
302        $(".search input").on("focus", function () {
303            $(".smart-search").fadeIn();
304        });
305    let e = $(".top-header").outerHeight(),
306        i = $(".head-fix").outerHeight();
307    $(document).on("scroll", function () {
308        $(window).scrollTop() > e ? ($(".head-fix").addClass("fixed"), $(".container-fluid.menu").css("margin-top", i)) : ($(".head-fix").removeClass("fixed"), $(".container-fluid.menu").css("margin-top", 0));
309    });
310}
311$(".open-mob-filter").on("click", function () {
312    $("#filter-data-mobile").slideToggle(), $("#filter-data-mobile").toggleClass("active"), $(this).toggleClass("active");
313}),
314    $(document).on("click", ".result-add-to-cart-item", function () {
315        $(this).css("display", "none"), $(this).parent().find(".count").css("display", "flex");
316    }),
317    $(".open-buy-fast").on("click", function () {
318        $(".count-value").attr("value", $(".value-for-fast-buy").val()), $(".fastbuy-wrapper").fadeIn();
319    }),
320    $(document).ready(function () {
321        -1 < window.location.href.indexOf("#reviews") && ($(".tab-item").removeClass("active"), $(".tab-item[data-show='c3']").addClass("active"), $(".show-hide").removeClass("active"), $(".c3").addClass("active"));
322    }),
323    $(".count input").on("keyup", function () {
324        var e = $(this).val();
325        $(this).attr("value", e), ($(this).value = e);
326    }),
327    $(".smart-search-input").on("keyup", function () {
328        "" === $(this).val ? $(".search button").prop("disabled", !0) : $(".search button").prop("disabled", !1);
329    });
330
331
332$(document).ready(function() {
333
334	$('.filters .filter .var-filter-wrapper .var-filter:nth-of-type(n + 7)').hide();
335	$('.catalog-filter-mobile .filter-block-mobile .drop-filter-checkbox label:nth-of-type(n + 7)').hide();
336
337	$('.var-filter-toggle-btn').click(function() {
338		$(this).parent().hide().parent().find('.var-filter:nth-of-type(n + 7)').show();
339		$(this).parent().hide().parent().find('label:nth-of-type(n + 7)').show();
340	});
341
342	$('.show-filter-results-buttons').click(function() {
343		$('.catalog-filter-mobile').slideUp();
344		$("html, .show-filter-results").removeClass("active")
345	});
346
347	$('.close-filter').click(function() {
348		$("html, .show-filter-results").removeClass("active")
349	});
350
351    // hidden-text-seo start
352    $('.open-hidden-text a').click(function() {
353        if ($(this).hasClass('active')) {
354            $(this).removeClass('active').find('span').html($(this).data('more'));
355            $(this).parent().parent().find('.hidden-text-seo').removeClass('opened');
356        } else {
357            $(this).addClass('active').find('span').html($(this).data('less'));
358            $(this).parent().parent().find('.hidden-text-seo').addClass('opened');
359        }
360    });
361    // hidden-text-seo end
362
363    // cookie start
364    $('.cookie-ajust').click(function() {
365        $('.cookie-form').addClass('active');
366    });
367
368    $('.cookie-close-btn').click(function() {
369        $('.cookie-inner').addClass('closed');
370    });
371
372    $('.open-cookie').click(function() {
373        $('.cookie-inner').removeClass('closed');
374    });
375
376    $('.cookie-text-toggle').click(function() {
377        $(this).toggleClass('active');
378        $('.cookie-text-content').stop().slideToggle();
379    });
380    // cookie end
381});
382
383$(document).mouseup(function(e) {
384    var container = $(".main-header .lang, .main-header .top-menu-right");
385
386    if (!container.is(e.target) && container.has(e.target).length === 0) {
387        $('.main-header .lang .drop-lang').slideUp();
388        $('.main-header .cabiner').removeClass('active');
389    }
390});
391
392$(document).mouseup(function(e) {
393    var container2 = $(".top-menu-right .cabiner");
394
395    if (!container2.is(e.target) && container2.has(e.target).length === 0) {
396        $('.drop_block_cabinet').slideUp();
397    }
398});

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.