PageSourceSearch

https://saz-avangard.ru/local/templates/main/script.js

js saz-avangard.ru collected 2026-10-07 14:45:33 UTC 10,746 bytes, 306 lines download raw bytes

1"use strict";
2/**
3 * Created by saz-avangard.
4 * Date: 14.10.21
5 */
6
7(function (G, U) {
8    var $           = G.jQuery,
9        bool        = "boolean",
10        string      = "string",
11        number      = "number",
12        object      = "object",
13        smartFilter = G.smartFilter;
14
15    $(document).ready(function () {
16        if (checkMobile().mobile()) {
17            $('.tabs_content > li:not(.neactiv)').on('click', function () {
18                if ($(this).hasClass('active')) {
19                    var tc = $(this).index();
20                    $('.tabs > li').eq(tc).removeClass('active');
21                    $('.tabs_content > li').eq(tc).removeClass('active');
22                } else {
23                    $('.tabs, .tabs_content').find('.active').removeClass('active');
24                    var tc = $(this).index();
25                    $(this).addClass('active');
26                    $('.tabs > li').eq(tc).addClass('active');
27                    $('.tabs_content > li').eq(tc).addClass('active');
28                }
29            });
30        }
31        $('.accordion_container .title').on('click', function(e) {
32            $(this).parents('.item').toggleClass('active');
33        });
34        if (window.location.pathname == '/about/services/') {
35            $('.allContent').each(function (i) {
36                $(this).addClass("from_services");
37            });
38        }
39
40        if (window.location.pathname == '/about/') {
41            $('.allContent').each(function (i) {
42                $(this).addClass("from_about");
43            });
44        }
45
46        if (window.location.pathname == '/about/vacancy/') {
47            $('.allContent').each(function (i) {
48                $(this).addClass("from_vacancys");
49            });
50        }
51
52
53        $('.counterInc').mousedown(function (e) {
54            var obj = $(this);
55            switch (e.which) {
56                case 1:
57                    get('/ajax/counter-inc/', {
58                        'ajax'    : 'y',
59                        'id'      : $(this).data('id'),
60                        'only_get': $(this).hasClass('only_get')
61                    }, 'html', function (data) {
62                        obj.find('.views span').html(parseInt(data));
63                        obj.find('.views').show();
64                    });
65                    break;
66                case 2:
67                    get('/ajax/counter-inc/', {
68                        'ajax'    : 'y',
69                        'id'      : $(this).data('id'),
70                        'only_get': $(this).hasClass('only_get')
71                    }, 'html', function (data) {
72                        obj.find('.views span').html(parseInt(data));
73                        obj.find('.views').show();
74                    });
75                    break;
76                case 3:
77                    //right Click
78                    break;
79            }
80            return true; // to allow the browser to know that we handled it.
81        });
82        /**
83         $('.vacancy_item .more_link').on('click', function () {
84        get($(this).attr('href'), {'ajax':'y'}, 'html', function (data){
85            $('.vacancy_popup .wrapper').html(data);
86            $('.vacancy_popup').fadeIn();
87        });
88
89        return false;
90    });*/
91        $('.removeFilter').on('click', function () {
92            $('#reload').val('Y');
93            $('#' + $(this).data('id')).trigger('click');
94            return false;
95        });
96
97        $('.filter button[type="reset"]').on('click', function () {
98            $(this).parents('form').find('input:checked').removeAttr('checked');
99            $(this).parents('form').find('.checker').removeClass('select');
100            $(this).parents('form').find('input').val('');
101            $('.filter_btns .sfc').data('count', '0');
102            sfc();
103        });
104        $('.filter_btn').on('click', function () {
105            $('.filter_mobile').addClass('active');
106        });
107        $('.filter_mobile .close').on('click', function () {
108            $('.filter_mobile').removeClass('active');
109        });
110        $('.clear_all').on('click', function () {
111            $(this).parents('.active_filters').remove();
112        });
113        $('.product_catalog .wrapper .cp_list_item .title').each(function () {
114            $(this).append('<div class="curret"></div>');
115        });
116        $('.product_catalog .wrapper .cp_list_item .curret').on('click', function () {
117            $(this).toggleClass('act')
118            $(this).parents('.cp_list_item').find('ul').toggleClass('chow');
119        });
120        $('.quash').on('click', function () {
121            var tl = $(this).parents('ul').find('li').length;
122
123            if (tl - 2 <= 1) {
124                $(this).parents('ul').find('.clear_all').parents('li').remove();
125            }
126
127            if (tl <= 1) {
128                $(this).parents('.active_filters').remove();
129            }
130
131            $(this).parents('li').remove();
132            af();
133        });
134        $('.filter .checker input').on('change', function () {
135            $(this).parents('.checker').toggleClass('select');
136            if (!$(this).parents('.checker').hasClass('select')) {
137                $(this).attr('checked', false);
138            } else {
139                $(this).attr('checked', true);
140            }
141        });
142
143        $('.cooperation_item .more_link').on('click', function () {
144            var don    = $(this).data('on');
145            var doa    = $(this).data('oa');
146            var dod    = $(this).data('od');
147            var dtel   = $(this).data('tel');
148            var doe    = $(this).data('oe');
149            var review = $(this).data('review');
150            var lnk    = $(this).data('lnk');
151            var cat    = $(this).data('catalog');
152            var sert   = $(this).data('sert');
153            $('.cooperation_popup .title').text(don);
154            $('.cooperation_popup .address').text(doa);
155            $('.cooperation_popup .desc').text(dod);
156            $('.cooperation_popup .tel a').attr('href', 'tel:' + dtel);
157            $('.cooperation_popup .tel a span').text(dtel);
158            if (dtel !== '') {
159                $('.cooperation_popup .tel').show();
160            } else {
161                $('.cooperation_popup .tel').hide();
162            }
163            $('.cooperation_popup .email a').attr('href', 'mailto:' + doe);
164            $('.cooperation_popup .email a span').text(doe);
165            if (dtel !== '') {
166                $('.cooperation_popup .email').show();
167            } else {
168                $('.cooperation_popup .email').hide();
169            }
170            $('.cooperation_popup .reviewA').attr('href', review);
171            if (review !== '') {
172                $('.cooperation_popup .review').show();
173            } else {
174                $('.cooperation_popup .review').hide();
175            }
176
177            $('.cooperation_popup .lnk a').attr('href', lnk);
178            $('.cooperation_popup .lnk a span').text(lnk);
179            if (lnk !== '') {
180                $('.cooperation_popup .lnk').show();
181            } else {
182                $('.cooperation_popup .lnk').hide();
183            }
184
185
186            $('.cooperation_popup .cat a').attr('href', cat);
187            if (cat !== '') {
188                $('.cooperation_popup .cat').show();
189            } else {
190                $('.cooperation_popup .cat').hide();
191            }
192            $('.cooperation_popup .sert a').attr('href', sert);
193            if (sert !== '') {
194                $('.cooperation_popup .sert').show();
195            } else {
196                $('.cooperation_popup .sert').hide();
197            }
198            $('.cooperation_popup').fadeIn();
199        });
200
201
202        $('form .input_container label').on('click', function () {
203            $(this).parent().addClass('select');
204            $(this).fadeOut();
205            $(this).parent().find('input, textarea, select').focus();
206
207        });
208        $('.openForm').on('click', function () {
209            $($(this).data('target')).fadeIn();
210            $('#product_id').val($(this).data('id'));
211            $('#product_name').val($(this).data('name'));
212            return false;
213        });
214
215        $(' .popupWindow .close').on('click', function () {
216            $(this).parent().fadeOut();
217            // window.bodyScrollLock.enableBodyScroll('body');
218            $('body').removeAttr('style')
219        });
220        // $('.info_popup .close').on('click', function (){
221        //     window.bodyScrollLock.enableBodyScroll('body');
222        // });
223        $('.info_popup .close').on('click', function () {
224            $('.info_popup').fadeOut();
225            $('body').removeAttr('style')
226        });
227        $('.ajaxForm').on('submit', function () {
228            if (BX !== undefined) {
229                BX.showWait();
230            }
231            var modal = $(this).data('modal');
232            if (modal !== "") {
233                $(modal).fadeOut();
234            }
235            get($(this).prop('action'),
236                $(this).serialize(),
237                'json',
238                function (data) {
239                    if (BX !== undefined) {
240                        BX.closeWait();
241                    }
242                    //  updateCapcha();// Recaptchafree.reset();
243                    $('.info_popup .scroll_container').html(data.message);
244                    $('.info_popup').fadeIn();
245                });
246
247            return false;
248        });
249        $('input[type="tel"]').mask('+7 (999) 999-9999');
250    });
251}(this, undefined));
252
253function get(url, data, dataType, func) {
254    BX.ajax({
255        url            : url,
256        method         : 'POST',
257        data           : data,
258        dataType       : dataType,
259        timeout        : 60,
260        async          : true,
261        processData    : true,
262        scriptsRunFirst: true,
263        emulateOnload  : true,
264        start          : true,
265        cache          : false,
266        onsuccess      : func
267    });
268
269}
270
271function checkMobile() {
272    var a = {
273        Android   : function () {
274            return navigator.userAgent.match(/Android/i);
275        },
276        BlackBerry: function () {
277            return navigator.userAgent.match(/BlackBerry/i);
278        },
279        iOS       : function () {
280            return navigator.userAgent.match(/iPhone/i);
281        },
282        Windows   : function () {
283            return navigator.userAgent.match(/IEMobile/i);
284        },
285        mobile    : function () {
286            return a.Android() || a.BlackBerry() || a.iOS();
287        },
288        any       : function () {
289            return a.Android() || a.BlackBerry() || a.iOS() || a.Opera() || a.Windows();
290        }
291    };
292    return a;
293}
294
295
296
297
298
299$(document).ready(function(){
300  setTimeout(function () {
301     $("#nca-cookiesaccept-line").parent('div').addClass('w-100');
302    }, 300);
303});
304
305
306

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.