PageSourceSearch

https://liquimoly.ru/bitrix/templates/liquimoly_vbf/js/scripts.js?15617344646812

js liquimoly.ru collected 2026-09-24 08:59:52 UTC 6,812 bytes, 221 lines download raw bytes

1$('.d_small_result').bind('mousewheel DOMMouseScroll', function(e) {
2    var scrollTo = null;
3    if (e.type == 'mousewheel') {
4        scrollTo = (e.originalEvent.wheelDelta * -1);
5    }
6    else if (e.type == 'DOMMouseScroll') {
7        scrollTo = 40 * e.originalEvent.detail;
8    }
9    if (scrollTo) {
10        e.preventDefault();
11        $(this).scrollTop(scrollTo + $(this).scrollTop());
12    }
13});
14
15function render_filtered_search() {
16
17    var counter = 0;
18    $('.search_item').hide();
19
20    $('.clicker_filter').each(function() {
21        if ($(this).prop("checked")) {
22            var filter = $(this).data("type");
23            console.log(filter);
24            $('.s_t_'+filter).show();
25            counter++;
26        }
27    });
28
29    console.log("counter "+counter);
30    if (counter == 0) {
31        $('.search_item').show();
32    }
33}
34
35function triggerProblems (element, classType) {
36
37    $(element).siblings().removeClass("active");
38    $('.problem-link-container').removeClass("no-after");
39    $(element).addClass("active");
40
41    $('.problem-class-container').hide();
42    $('.problem-link-container').hide();
43    $('.problem-class-link').hide();
44
45    $('.problem-link-container[data-vehicle*="' + classType + '"]').each(function() {
46        $(this).show();
47        $(this).parents('.problem-class-container').show();
48        var problemClass = $(this).parents('.problem-class-container').data("problemclass");
49        $('.problem-class-link[data-problemclass="' + problemClass + '"]').show();
50    });
51
52    $(".problem-class-container:visible").each(function() {
53        $(this).find(".problem-link-container:visible").last().addClass("no-after");
54    });
55}
56
57$( document ).ready(function() {
58
59    if ($(".top_filters").length) {
60
61        $(".problem-class-link").on("click", function() {
62            var href = $(this).data("href");
63            $('html, body').animate({
64                scrollTop: $(href).offset().top
65            }, 100);
66        });
67
68        var possible_filters = ["car", "truck", "moto"];
69        var current_filter_from_hash = window.location.hash.substring(1);
70
71        if ($('.problem-link-container[data-vehicle*="moto"]').length) {
72            $(".problem-filter-button.moto").show();
73        }
74
75        console.log(current_filter_from_hash);
76
77        if (possible_filters.indexOf(current_filter_from_hash) !== -1) {
78            var element = $('.problem-filter-button.'+current_filter_from_hash);
79            triggerProblems(element, current_filter_from_hash);
80        }
81
82        $(".problem-filter-button").on("click", function(e){
83            e.preventDefault();
84            var classType = $(this).data("classtoggle");
85            window.location.hash = classType;
86            triggerProblems(this, classType);
87
88        });
89
90        $('.problem-disable-filters').on("click", function(e){
91            e.preventDefault();
92            window.location.hash = "all";
93            $(this).siblings().removeClass("active");
94            $('.problem-link-container').removeClass("no-after");
95            $('.problem-class-link').show();
96            $('.problem-class-container').show();
97            $('.problem-link-container').show();
98        })
99    }
100
101    if (typeof $.fn.dropit !== 'undefined'){
102        $('.volume_menu').dropit({beforeShow: function(){
103            $( ".toggle_class" ).removeClass("item_volume_show_toggle");
104            $( ".toggle_class" ).addClass( "item_volume_show_toggle_up" );
105        }, beforeHide: function(){
106            $( ".toggle_class" ).removeClass("item_volume_show_toggle_up");
107            $( ".toggle_class" ).addClass( "item_volume_show_toggle" );
108        }});
109    }
110
111    $('.clicker_filter').click(function(e){
112        e.stopPropagation();
113        render_filtered_search();
114    });
115
116    $('.e_btn').hover(
117        function(){ $('.e_btn').attr('src', '/images/btn_enter_sel_156x47.png'); },
118        function(){ $('.e_btn').attr('src', '/images/btn_enter_156x47.png'); }
119    );
120    $('.icon_search').hover(
121        function(){ $('.icon_search').attr('src', '/images/i_search_sel_24x24.png'); },
122        function(){ $('.icon_search').attr('src', '/images/i_search_24x24.png'); }
123    );
124    $('.btn_send').hover(
125        function(){ $('.btn_send').attr('src', '/images/btn_send_sel_152x42.png'); },
126        function(){ $('.btn_send').attr('src', '/images/btn_send_152x42.png'); }
127    );
128    $('#input_s').keypress(function(e){
129        if (e.which == 13){
130            if (show_p_search == false) show_s();
131            else search();
132            return false;
133        }
134    });
135    if (typeof $.fn.loupe !== 'undefined') {
136        $('.loupe_target').loupe({
137            width: 400, // ширина лупы
138            height: 300, // высота лупы
139            loupe: 'loupe' // css класс лупы
140        });
141        $('.loupe_target').data('loupe', false);
142    }
143});
144
145var show_p_fl = false;
146
147function show_p(){
148    if (show_p_fl == true){
149        show_p_fl = false;
150        $('.p_zona').removeClass('p_zona_on');
151        $('.open_login').removeClass('open_login_on');
152        $('.cl_zona_pl').hide();
153    } else {
154        show_p_fl = true;
155        $('.open_login').addClass('open_login_on');
156        $('.p_zona').addClass('p_zona_on');
157        $('.cl_zona_pl').show();
158    }
159}
160
161var show_p_search = false;
162
163function search(){
164    var q = $('#input_s').val();
165    if (q == ''){
166        alert('Поисковый запрос не задан.');
167        return false;
168    }
169    $('#ajax_search').html('<div align="center"><img src="/images/loader.png" border="0"></div>');
170    $('#search_q').html(q.replace(/<\/?[^>]+>/gi, ''));
171    $.get('/ajax/search.ajax.php?q='+q, function(data){
172        $('#ajax_search').html(data);
173    });
174}
175
176function show_s(){
177    if (search() == false) return false;
178
179    if (show_p_search == true){
180        show_p_search = false;
181        $('.cl_search').hide();
182    } else {
183        show_p_search = true;
184        $('.cl_search').show();
185    }
186}
187
188$(document).mouseup(function (e){
189    var div = $(".cl_search");
190    var div_2 = $(".td_search");
191    if (!div.is(e.target) && div.has(e.target).length === 0 && !div_2.is(e.target) && div_2.has(e.target).length === 0) {
192        div.hide();
193        show_p_search = false;
194    }
195    var div = $(".cl_zona_pl");
196    if (!div.is(e.target) && div.has(e.target).length === 0) {
197        $('.p_zona').removeClass('p_zona_on');
198        $('.cl_zona_pl').hide();
199    }
200});
201
202var menu_g_s = 0;
203function menu_g_show(){
204    if (menu_g_s == 0){
205        $('.sub_i_menu').show();
206        $('.fl_sub_menu').css('height', 'auto');
207        menu_g_s = 1;
208    } else {
209        $('.fl_sub_menu').css('height', '25');
210        $('.sub_i_menu').hide();
211        menu_g_s = 0;
212    }
213}
214
215function old_hide(){
216    $('#olddiv').hide();
217    $.get("/ajax/oldhide.php?hide=1", function( data ) {});
218}
219
220
221

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.