PageSourceSearch

https://authenticukraine.com.ua/js/general.js

js authenticukraine.com.ua collected 2026-09-24 21:13:31 UTC 11,153 bytes, 359 lines download raw bytes

1// document.oncontextmenu = document.body.oncontextmenu = function() {return false;}
2
3
4
5
6$(document).ready(function () {
7    // move main photo on /authentic-savor-of-ukraine   
8    if ($(window).width() < 800) {
9        $(".food-img-interactive").kinetic("scrollLeft", (1000 - $(window).width()) / 2);
10    }
11
12    if ($(window).width() < 800) {
13        $('.food-img-interactive').kinetic({
14
15            // cursor style
16            cursor: 'move',
17
18            // enables decelerate
19            decelerate: true,
20
21            // uses hardware acceleration for iOS
22            triggerHardware: false,
23
24            // the number of pixels the mouse needs to move before the element starts scrolling
25            threshold: 0,
26
27            // enable x/y scrolling
28            y: true,
29            x: true,
30
31            // animation speed
32            slowdown: 1,
33
34            // max velocity speed
35            maxvelocity: 40,
36
37            // FPS
38            throttleFPS: 60,
39
40            // inverts movement direction
41            invert: false,
42
43            // default CSS classes
44            movingClass: {
45                up: 'kinetic-moving-up',
46                down: 'kinetic-moving-down',
47                left: 'kinetic-moving-left',
48                right: 'kinetic-moving-right'
49            },
50            deceleratingClass: {
51                up: 'kinetic-decelerating-up',
52                down: 'kinetic-decelerating-down',
53                left: 'kinetic-decelerating-left',
54                right: 'kinetic-decelerating-right'
55            }
56
57        });
58    }
59
60
61
62    $(function () {
63        $('[data-toggle="tooltip"]').tooltip()
64    });
65
66    scrfunc();
67
68    $('.regions-list li:nth-child(1)').hover(
69        function () {
70            $('#g4').addClass('active')
71        },
72        function () {
73            $('#g4').removeClass('active')
74        }
75    );
76
77    $('.regions-list li:nth-child(2)').hover(
78        function () {
79            $('#g1').addClass('active')
80        },
81        function () {
82            $('#g1').removeClass('active')
83        }
84    );
85
86    $('.regions-list li:nth-child(3)').hover(
87        function () {
88            $('#g5').addClass('active')
89        },
90        function () {
91            $('#g5').removeClass('active')
92        }
93    );
94
95    $('.regions-list li:nth-child(4)').hover(
96        function () {
97            $('#g2').addClass('active')
98        },
99        function () {
100            $('#g2').removeClass('active')
101        }
102    );
103    $('.regions-list li:nth-child(5)').hover(
104        function () {
105            $('#g3').addClass('active')
106        },
107        function () {
108            $('#g3').removeClass('active')
109        }
110    );
111
112    $('.section-filter-btn').click(function () {
113        if ($('#product-filter-form').hasClass('active')) {
114            $('#product-filter-form').removeClass('active');
115        } else {
116            $('#product-filter-form').addClass('active');
117        }
118    });
119
120    $('#g1').click(function () {
121        document.location.href = '/areas/north';
122    });
123    $('#g2').click(function () {
124        document.location.href = '/areas/west';
125    });
126    $('#g3').click(function () {
127        document.location.href = '/areas/south';
128    });
129    $('#g4').click(function () {
130        document.location.href = '/areas/center';
131    });
132    $('#g5').click(function () {
133        document.location.href = '/areas/east';
134    });
135
136
137
138
139    $('.slider-main2').slick({
140        dots: false,
141        infinite: true,
142        fade: true,
143        speed: 500,
144        autoplay: true,
145        slidesToShow: 1,
146        slidesToScroll: 1,
147        rows: 1,
148        accessibility: false,
149        arrows: true,
150
151    });
152    $('.menu-switcher1 .item').click(function () {
153        $('.menu-switcher1 .item').removeClass('active');
154        $('div.slide-page').hide();
155
156        $(this).addClass('active');
157        var id = $(this).attr('rel');
158        //  alert(id);
159        $('#slide-page-' + id).show();
160
161    });
162
163    $('.main-menu-top > li > .menu-link ').click(function () {
164        var id = $(this).attr('rel');
165
166        if ($(this).hasClass('active')) {
167
168            $(this).removeClass('active');
169
170        } else {
171            $('.main-menu-list').removeClass('active');
172            $('#main-menu-list-' + id).addClass('active');
173
174            $(this).addClass('active');
175        }
176    });
177    $('.main-menu-list .back').click(function () {
178        $('.main-menu-list, .main-menu-top > li > .menu-link').removeClass('active');
179
180
181    });
182
183
184
185    $('.menu-switcher2 .item').click(function () {
186        $('.menu-switcher2 .item').removeClass('active');
187        $('div.slide-page2').hide();
188
189        $(this).addClass('active');
190        var id = $(this).attr('rel');
191        //  alert(id);
192        $('#slide-page2-' + id).show();
193    });
194
195    $('section').viewportChecker({
196        classToAdd: 'visible', // Класс добавляемый элементу когда тот появл
196яется в области просмотра
197        classToRemove: 'invisible', // Класс, удаляемый перед применением "classToAdd" к элементу
198        // offset: [100 OR 10%], // Задержка появления элементов, относительно просматриваемой области. Можно указывать процентное соотношение (указывать в кавычках, со знаком "%")
199        invertBottomOffset: true, // Делает значение смещения отрицательным значением
200        repeat: false, // Удаляет добавляемый класс когда элемент вне области просмотра, делая фукцию повторяемой
201        callbackFunction: function (elem, action) {}, // Функция запускаемая после добавления класса. Возвращает  "add" или "remove", в зависимости от того был ли класс добавлен или удален
202        scrollHorizontal: false // Установить "true" если сайт имеет горизонтальный скролл, вместо вертикального
203    });
204
205
206    $('.img-in-text').viewportChecker({
207        classToAdd: 'visible', // Класс добавляемый элементу когда тот появляется в области просмотра
208        classToRemove: 'invisible', // Класс, удаляемый перед применением "classToAdd" к элементу
209        // offset: [100 OR 10%], // Задержка появления элементов, относительно просматриваемой области. Можно указывать процентное соотношение (указывать в кавычках, со знаком "%")
210        invertBottomOffset: true, // Делает значение смещения отрицательным значением
211        repeat: false, // Удаляет добавляемый класс когда элемент вне области просмотра, делая фукцию повторяемой
212        callbackFunction: function (elem, action) {}, // Функция запускаемая после добавления класса. Возвращает  "add" или "remove", в зависимости от того был ли класс добавлен или удален
213        scrollHorizontal: false // Установить "true" если сайт имеет горизонтальный скролл, вместо вертикального
214    });
215
216    $('#menu-toggle, .menu-close, .main-menu-bg').click(function () {
217        if ($('#menu-toggle ').hasClass('active')) {
218            $('#menu-toggle').removeClass('active');
219            $('.main-menu-bg').fadeOut();
220            $('.main-menu').removeClass('active');
221
222        } else {
223            $('#menu-toggle').addClass('active');
224            $('.menu-close').removeClass('active');
225            $('.main-menu-bg').fadeIn();
226            $('.main-menu').addClass('active');
227
228        }
229    });
230
231    $('.ancLinks').click(function () {
232        var target = $(this).attr('href');
233        $('html, body').animate({
234            scrollTop: $(target).offset().top
235        }, 1000);
236        return false;
237    });
238
239});
240
241
242function scrfunc() {
243    var winH = $(window).height();
244    var winW = $(window).width();
245    var scrolled = $(window).scrollTop();
246    var ow = $(".virtual-tours .block-wrap, .circle").outerWidth();
247    var oh = $(".block-height").outerHeight();
248
249
250    $('.section1, .top-img, .street-view').css("height", winH);
251
252    if (winW >= 700) {
253        $('.sticky-col').css("height", oh - 250);
254    }
255
256    $('.virtual-tours .block-wrap, .circle').css("height", ow);
257
258    $('.top-img-container').css({
259        'top': scrolled / 2
260    });
261    $('.overlay .top-info-container,  .container-exhibit').css({
262        'margin-top': scrolled / 2.5
263    });
264
265
266    $('.logo-inner').css({
267        'opacity': 1 - scrolled * 0.01
268    });
269    $('.powered-by').css({
270        'opacity': 1 - scrolled * 0.01
271    });
272    $('.menu-toggle-label').css({
273        'opacity': 1 - scrolled * 0.01
274    });
275
276    if (scrolled >= 700) {
277        $('.overlay').addClass('overlay-small');
278        //  $(' .overlay').css({'top': scrolled /  1.3});
279
280    }
281    if (scrolled < 700) {
282        $('.overlay').removeClass('overlay-small');
283
284    }
285    if (scrolled >= 1800) {}
286
287    if (scrolled >= 40) {
288        $('.header').addClass('header-fixed');
289
290    }
291    if (scrolled < 40) {
292        $('.header').removeClass('header-fixed');
293    }
294}
295
296$(window).bind('resize', function () {
297    scrfunc();
298
299});
300$(window).bind('scroll', function () {
301    scrfunc();
302
303});
304
305
306
307$(document).ready(function () {
308
309
310    $(".section1").mousemove(function (event) {
311
312        var w = $(window).width();
313        var h = $(window).height();
314        var x = 0.5 - event.pageX / w;
315        var y = 0.5 - event.pageY / h;
316
317        var x1 = "translate3d(" + Math.round(40 * x) + "px," + 0 + "px, 0px)";
318        var x2 = "translate3d(" + Math.round(70 * x) + "px," + 0 + "px, 0px)";
319        var x3 = "translate3d(" + Math.round(90 * x) + "px," + 0 + "px, 0px)";
320        var x4 = "translate3d(" + Math.round(120 * x) + "px," + 0 + "px, 0px)";
321
322
323
324        $(".top-logo").css({
325            '-webkit-transform': x1,
326            'transform': x1,
327            'moz-transform': x1
328        });
329
330
331        $(".top-img").css({
332            '-webkit-transform': x1,
333            'transform': x1,
334            'moz-transform': x1
335        });
336
337        $(".text-slide").css({
338            '-webkit-transform': x1,
339            'transform': x1,
340            'moz-transform': x1
341        });
342        $(".sm-img-1").css({
343            '-webkit-transform': x4,
344            'transform': x4,
345            'moz-transform': x4
346        });
347        $(".sm-bg-1").css({
348            '-webkit-transform': x3,
349            'transform': x3,
350            'moz-transform': x3
351        });
352        $(".sm-bg-2").css({
353            '-webkit-transform': x2,
354            'transform': x2,
355            'moz-transform': x2
356        });
357
358    });
359});

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.