PageSourceSearch

https://green-way.com.ua/plugins/greenway/information/assets/javascript/home2.js?ver=39

js green-way.com.ua collected 2026-09-24 17:49:05 UTC 28,862 bytes, 459 lines download raw bytes

1var startCursorX = 0;
2var startCursorY = 0;
3
4$('body').on('mousedown touchstart', '.slider a', function (e) {
5    startCursorX = e.clientX;
6    startCursorY = e.clientY;
7});
8$('body').on('mouseup touchend', '.slider a', function (e) {
9    if (e.clientX < startCursorX + 6 && e.clientX > startCursorX - 6 && e.clientY < startCursorY + 6 && e.clientY > startCursorY - 6) {
10        location.href = $(this).attr('href');
11    }
12});
13
14$('body').on('click', '.slider a', function (e) {
15    e.preventDefault();
16});
17
18$('#tableHeaderBlockComments th.region').on('click', function(e){
19    if ($(this).hasClass('open')) {
20        $(this).removeClass('open');
21    } else {
22        $(this).addClass('open');
23    }
24    e.stopPropagation();
25});
26
27$(document).ready(function() {
28    var scene = document.getElementById('scene');
29    var parallax = new Parallax(scene);
30    $('.big-banner').css('display', 'none');
31    $('#scene').css('display', 'block');
32
33    var scrollEvent = false;
34    $(document.body).on('touchmove', onScroll); // for mobile
35    $(window).on('scroll', onScroll);
36
37    function onScroll() {
38        activeSliders();
39    }
40    function activeSliders() {
41        if (!scrollEvent) {
42            var options = {
43                horizontal: 1,
44                smart: true,
45                itemNav: 'basic',
46                speed: 200,
47                mouseDragging: 1,
48                touchDragging: 1
49            };
50
51            $.request('onGetTopCourses', {
52                success: function(data) {
53                    $('#courses-slider').attr('style', '');
54                    $('#courses-slider .loading-block').remove();
55                    $('.courses-top .users').text(getTitleCoursesText(data['totalCourses'], data['totalDone']));
56                    for (key in data['courses']) {
57                        var html = '';
58                        html += '<li>';
59                        html += '<div class="course-item">';
60                        html += '<a href="/' + ($('html').attr('lang')).replace('-UA', '') + '/obuchenie/course/' + (data['courses'][key]['seo_url'] != '' ? data['courses'][key]['seo_url'] : data['courses'][key]['source_id']) + '">';
61                        html += '<div class="title">' + data['courses'][key]['title'] + '</div>';
62                        html += '<div class="image">';
63                        html += '<img src="' + data['courses'][key]['image'] + '" alt="' + data['courses'][key]['title'] + '" title="' + data['courses'][key]['title'] + '" class="img-responsive" width="176px" height="230px">';
64                        html += '</div>';
65                        html += '<div class="info">';
66                        html += '<div>';
67                        html += '<div>' + textCourseItemAuthor + '</div>';
68                        html += '<div><object><a href="/' + ($('html').attr('lang')).replace('-UA', '') + '/test-pdd/user/' + data['courses'][key]['uid'] + '#courses">' + data['courses'][key]['uname'] + '</a></object></div>';
69                        html += '</div>';
70                        if (data['courses'][key]['theme_id'] != 0) {
71                            html += '<div>';
72                            html += '<div>' + textCourseItemTheme + '</div>';
73                            html += '<div>' + data['themes'][data['courses'][key]['theme_id']]['text'] + '</div>';
74                            html += '</div>';
75                        }
76                        html += '<div>';
77                        html += '<div>' + textCourseItemLanguage + '</div>';
78                        html += '<div>' + data['courses'][key]['locales'] + '</div>';
79                        html += '</div>';
80                        html += '<div>';
81                        html += '<div>' + textCourseItemCity + '</div>';
82                        html += '<div>' + (data['courses'][key]['city_id'] > 0 ? (data['cities'][data['courses'][key]['city_id']]['text'] != '' ? data['cities'][data['courses'][key]['city_id']]['text'] : textCourseformCityAll) : textCourseformCityAll) + '</div>';
83                        html += '</div>';
84                        html += '</div>';
85                        if (data['courses'][key]['progress']) {
86                            html += '<div class="prog">';
87                            html += '<div class="title">' + textCourseItemProgress + '</div>';
88                            html += '<div class="green-line" style="width: ' + data['courses'][key]['progress'] + '%;">';
89                            html += '<span>' + data['courses'][key]['progress'] + '%</span>';
90                            html += '</div>';
91                            html += '</div>';
92                        }
93                        if (data['courses'][key]['rating']) {
94                            html += '<div class="stars">';
95                            for (var i = 1; i < 6; i++) {
96                                html += '<i class="fa fa-star' + (data['courses'][key]['rating'] >= i ? '' : (data['courses'][key]['rating'] + 0.5 == i ? '-half-o' : '-o')) + '" aria-hidden="true"></i>';
97                            }
98                            html += '</div>';
99                            html += '<div class="reviews">' + getReviewsText(data['courses'][key]['total']) + '</div>';
100                        }
101                        if (data['courses'][key]['is_owner'] != 2) {
102                            if (data['courses'][key]['is_owner'] != 1) {
103                                if (('oldPrice' in data['courses'][key])&&(data['courses'][key]['oldPrice'] != 0)&&data['courses'][key]['price'] == 0) {
104                                    html += '<div class="price free">';
105                                    html += '<div>' + data['courses'][key]['oldPrice'] + " ' + textUah + '</div>";
106                                    html += '<div>' + ($('#header .pro_account').hasClass('master') ? textCoursePriceFreeMaster : textCoursePriceFreeStudent) + '</div>';
107                                    html += '</div>';
108                                } else {
109                                    if (('oldPrice' in data['courses'][key])&&(data['courses'][key]['oldPrice'] != 0)) {
110                                        html += '<div class="price discount">';
111                                        html += '<div>' + data['courses'][key]['oldPrice'] + ' ' + textUah + '</div>';
112                                    } else {
113                                        html += '<div class="price">';
114                                    }
115                                    html += '<div' + (data['courses'][key]['price'] == 0 ? ' class="text"' : '') + '>
115' + (data['courses'][key]['price'] > 0 ? data['courses'][key]['price'] + " " + textUah : textFree) + '</div>';
116                                    html += '</div>';
117                                }
118                            } else {
119                                if (data['courses'][key]['is_ffs'] == 1 && data['courses'][key]['oldPrice'] > 0) {
120                                    html += '<div class="price free">';
121                                } else {
122                                    html += '<div class="price">';
123                                }
124                                html += '<div' + (data['courses'][key]['oldPrice'] == 0 ? ' class="text"' : '') + '>' + (data['courses'][key]['oldPrice'] > 0 ? data['courses'][key]['oldPrice'] + " " + textUah : textFree) + '</div>';
125                                if (data['courses'][key]['is_ffs'] == 1 && data['courses'][key]['oldPrice'] > 0) {
126                                    html += '<div>' + textCoursePriceFreeTeacher + '</div>'
127                                }
128                                html += '</div>';
129                            }
130                        } else {
131                            html += "<div class='price'><div class='text'>" + textCourseBought + "</div></div>";
132                        }
133                        html += '</a>';
134                        html += '</div>';
135                        html += '</li>';
136                        $('#courses-slider ul').append(html);
137                    }
138                    initSlider($('#courses-slider'));
139                },
140                error: function(data) {}
141            });
142
143            $.request('onGetTopTeachers', {
144                success: function(data) {
145                    $('#teachers-slider').attr('style', '');
146                    $('#teachers-slider .loading-block').remove();
147                    $('.teachers-top .users').text(getTitleTeachersText(data['totalUsers'], data['active']));
148                    for (key in data['teachersData']) {
149                        var html = '';
150                        html += '<li>';
151                        html += '<a href="/' + ($('html').attr('lang')).replace('-UA', '') + '/test-pdd/user/' + data['teachersData'][key]['id'] + '">';
152                        html += '<div class="autoschool-image">';
153                        html += '<img class="instructor-avatar" src="' + data['teachersData'][key]['avatar']  + '" alt="teachers-photo">';
154                        html += '</div>';
155                        html += '<div class="name">' + data['teachersData'][key]['name']  + '</div>';
156                        html += '<div class="city">' + data['teachersData'][key]['autoschool']  + '</div>';
157                        html += '<div class="city">' + data['teachersData'][key]['city']  + '</div>';
158                        html += '<div class="rating">' + data['teachersData'][key]['rating']  + '</div>';
159                        html += '</a>';
160                        html += '</li>';
161                        $('#teachers-slider ul').append(html);
162                    }
163                    $('#teachers-slider .autoschool-image img').each(function(index) {
164                        if ($(this).width() >= $(this).height()) {
165                            $(this).attr('style','height: 100%;');
166                        } else {
167                            $(this).attr('style','width: 100%;');
168                        }
169                    });
170                    initSlider($('#teachers-slider'));
171                },
172                error: function(data) {}
173            });
174
175            $.request('onGetTopAutoschools', {
176                success: function(data) {
177                    $('#autoschools-slider').attr('style', '');
178                    $('#autoschools-slider .loading-block').remove();
179                    $('.autoschools-top .users').text(getTitleAutoschoolsText(data['totalUsers'], data['active']));
180                    for (key in data['autoschoolsData']) {
181                        var html = '';
182                        html += '<li>';
183                        html += '<a href="/' + ($('html').attr('lang')).replace('-UA', '') + data['autoschoolsData'][key]['link']  + '">';
184                        html += '<div class="autoschool-image"><img class="autoschool-avatar" src="' + (data['autoschoolsData'][key]['avatar'].indexOf('/autoschool2') != -1 ? '/themes/remaster/assets/images/autoschool3.png' : data['autoschoolsData'][key]['avatar'])  + '" alt="autoschool-photo"></div>';
185                        html += '<div class="name">' + data['autoschoolsData'][key]['name'].replace(/<\/?[^>]+>/g,'') + '</div>';
186                        html += '<div class="city">' + data['autoschoolsData'][key]['city']  + '</div>';
187                        html += '<div class="rating">' + data['autoschoolsData'][key]['rating']  + '</div>';
188                        html += '</a>';
189                        html += '</li>';
190                        $('#autoschools-slider ul').append(html);
191                    }
192                    initSlider($('#autoschools-slider'));
193                },
194                error: function(data) {}
195            });
196
197            $.request('onGetTopCommentators', {
198                success: function(data) {
199                    $('#commentators-slider').attr('style', '');
200                    $('#commentators-slider .loading-block').remove();
201                    $('.statistics_comments .users').text($('.statistics_comments .users').text().replace(/0/i, data['totalUsers'].replace(/\B(?=(\d{3})+(?!\d))/g, " ")));
202                    var html = '';
203                    for (key in data['data']) {
204                        html += '<tr class="user-tr" onclick="location.href = \'/uk/test-pdd/user/' + data['data'][key]['id'] + '\'">';
205                        html += '<td class="number">' + (Number(key) + 1) + '</td>';
206                        html += '<td class="fio">' + data['data'][key]['name'] + '</td>';
207                        html += '<td class="region">' + data['data'][key]['status'] + '</td>';
208                        html += '<td class="exam-time exam">' + data['data'][key]['rate'].replace(/\B(?=(\d{3})+(?!\d))/g, " ") + '</td>';
209                        html += '</tr>';
210                    }
211                    $('#tableContentBlockComments tbody').html(html);
212                },
213                error: function(data) {}
214            });
215
216            $('#news-slider').attr('style','');
217            initSlider($('#news-slider'));
218
219            $('#comments-slider').attr('style','');
220            initSlider($('#comments-slider'));
221            $('#comments-slider .comment-wrapper .text, #comments-slider .comment-wrapper .comment-quote-block').each(function() {
222                if (!$(this).text()) {
223                    $(this).html('');
224                } else {
225                    $(this).find('a').each(function() {
226                        $(this).attr('target', '_self').wrap("<object></object>");
227                    });
228                    $(this).wrap("<a href='" + $(this).parent().find('.more').attr('href') + "' class='text-link'></a>");
229                }
230            });
231
232            $('#comments-slider .comment-wrapper .text-link').on('click', function(e){
233                if (e.target.tagName === 'A') {
234                    e.stopPropagation();
235                }
236            });
237
238            function initSlider(slider) {
239                var $frame = slider.find('.slider_content');
240                $frame.sly(options);
241                var height = 0;
242                if (slider.attr('id') == 'courses-slider') {
243                    if (window.innerWidth > 1799) {
244                        var tempHeight = Math.floor(slider.outerWidth() / 4) - 12;
245                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 4) - 12) + 'px;');
246                    } else if (window.innerWidth > 1349) {
247                        var tempHeight = Math.floor(slider.outerWidth() / 3) - 12;
248                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 3) - 12) + 'px;');
249                    } else if (window.innerWidth > 899) {
250                        var tempHeight = Math.floor(slider.outerWidth() / 2) - 12;
251                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 2) - 12) + 'px;');
252                    } else {
253                        var tempHeight = Math.floor(slider.outerWidth() / 1) - 12;
254                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 1) - 12) + 'px;');
255                    }
256                } else if (slider.attr('id') == 'comments-slider') {
257                    if (window.innerWidth > 1499) {
258                        var tempHeight = Math.floor(slider.outerWidth() / 4) - 12;
259                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 4) - 12) + 'px;');
260                    } else if (window.innerWidth > 1099) {
261                        var tempHeight = Math.floor(slider.outerWidth() / 3) - 12;
262                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 3) - 12) + 'px;');
263                    } else if (window.innerWidth > 699) {
264                        var tempHeight = Math.floor(slider.outerWidth() / 2) - 12;
265                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 2) - 12) + 'px;');
266                    } else {
267                        var tempHeight = Math.floor(slider.outerWidth() / 1) - 12;
268                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 1) - 12) + 'px;');
269                    }
270                } else if (slider.attr('id') == 'news-slider') {
271                    if (window.innerWidth > 1649) {
272                        var tempHeight = Math.floor(slider.outerWidth() / 5) - 12;
273                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 5) - 12) + 'px;');
274                    } else if (window.innerWidth > 1249) {
275                        var tempHeight = Math.floor(slider.outerWidth() / 4) - 12;
276                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 4) - 12) + 'px;');
277                    } else if (window.innerWidth > 799) {
278                        var tempHeight = Math.floor(slider.outerWidth() / 3) - 12;
279                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 3) - 12) + 'px;');
280                    } else if (window.innerWidth > 699) {
281                        var tempHeight = Math.floor(slider.outerWidth() / 2) - 12;
282                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 2) - 12) + 'px;');
283                    } else {
284                        var tempHeight = Math.floor(slider.outerWidth() / 1) - 12;
285                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 1) - 12) + 'px;');
286                    }
287                } else {
288                    if (window.innerWidth > 1599) {
289                        var tempHeight = Math.floor(slider.outerWidth() / 7) - 12;
290                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 7) - 12) + 'px;');
291                    } else if (window.innerWidth > 1399) {
292                        var tempHeight = Math.floor(slider.outerWidth() / 6) - 12;
293                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 6) - 12) + 'px;');
294                    } else if (window.innerWidth > 1199) {
295                        var tempHeight = Math.floor(slider.outerWidth() / 5) - 12;
296                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 5) - 12) + 'px;');
297                    } else if (window.innerWidth > 899) {
298                        var tempHeight = Math.floor(slider.outerWidth() / 4) - 12;
299                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 4) - 12) + 'px;');
300                    } else if (window.innerWidth > 699) {
301                        var tempHeight = Math.floor(slider.outerWidth() / 3) - 12;
302                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 3) - 12) + 'px;');
303                    } else if (window.innerWidth > 499) {
304                        var tempHeight = Math.floor(slider.outerWidth() / 2) - 12;
305                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 2) - 12) + 'px;');
306                    } else {
307                        var tempHeight = Math.floor(slider.outerWidth() / 1) - 12;
308                        slider.find('li').attr('style','width:' + (Math.floor(slider.outerWidth() / 1) - 12) + 'px;');
309                    }
310                }
311
312                $frame.sly('reload');
313
314                tempHeight = (tempHeight * 75) / 100;
315                slider.find('li').each(function(index) {
316                    if ($(this).attr('id') ==  'teachers-slider') {
317                        $(this).find('.autoschool-image').css('height', tempHeight < 165 ? tempHeight : 165 + 'px');
318                    }
319                    height = $(this).outerHeight() > height ? $(this).outerHeight() : height;
320                });
321
322                slider.attr('style', 'height: auto;');
323                slider.find('.frame').attr('style', 'height: auto;');
324
325                if (Math.ceil(slider.find('ul').outerWidth()) > slider.find('ul').parent().outerWidth() + 50) {
326                    sliderOn(slider);
327                }
328            }
329
330            $('.leftSelectorArrow').click(function(){
331                $(this).parents('.slider').find('.slider_content').sly('slideBy', -$(this).parents('.slider').find('li').outerWidth(), false, true);
332            });
333            $('.rightSelectorArrow').click(function(){
334                $(this).parents('.slider').find('.slider_content').sly('slideBy', $(this).parents('.slider').find('li').outerWidth(), false, true);
335            });
336            $(window).resize(function(e) {
337                $(".slider").each(function(index) {
338                    $(this).find('.autoschool-image').attr('style', '');
339                    if ($(this).attr('id') == 'courses-slider') {
340                        if (window.innerWidth > 1799) {
341                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 4) - 12) + 'px;');
342                        } else if (window.innerWidth > 1349) {
343                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 3) - 12) + 'px;');
344                        } else if (window.innerWidth > 899) {
345                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 2) - 12) + 'px;');
346                        } else {
347                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 1) - 12) + 'px;');
348                        }
349                    } else if ($(this).attr('id') == 'comments-slider') {
350                        if (window.innerWidth > 1499) {
351                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 4) - 12) + 'px;');
352                        } else if (window.innerWidth > 1099) {
353                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 3) - 12) + 'px;');
354                        } else if (window.innerWidth > 699) {
355                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 2) - 12) + 'px;');
356                        } else {
357                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 1) - 12) + 'px;');
358                        }
359                    } else if ($(this).attr('id') == 'news-slider') {
360                        if (window.innerWidth > 1649) {
361                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 5) - 12) + 'px;');
362                        } else if (window.innerWidth > 1249) {
363                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 4) - 12) + 'px;');
364                        } else if (window.innerWidth > 799) {
365                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 3) - 12) + 'px;');
366                        } else if (window.innerWidth > 699) {
367                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 2) - 12) + 'px;');
368                        } else {
369                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 1) - 12) + 'px;');
370                        }
371                    } else {
372                        if (window.innerWidth > 1599) {
373                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 7) - 12) + 'px;');
374                        } else if (window.innerWidth > 1399) {
375                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 6) - 12) + 'px;');
376                        } else if (window.innerWidth > 1199) {
377                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 5) - 12) + 'px;');
378                        } else if (window.innerWidth > 899) {
379                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 4) - 12) + 'px;');
380                        } else if (window.innerWidth > 699) {
381                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 3) - 12) + 'px;');
382                        } else if (window.innerWidth > 499) {
383                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 2) - 12) + 'px;');
384                        } else {
385                            $(this).find('li').attr('style','width:' + (Math.floor($(this).outerWidth() / 1) - 12) + 'px;');
386                        }
387                    }
388
389                    if (Math.ceil($(this).find('ul').outerWidth()) > $(this).find('ul').parent().outerWidth() + 50) {
390                        sliderOn($(this));
391                    } else {
392                        sliderOff($(this));
393                    }
394                });
395                $('.slider_content').sly('reload');
396            });
397            function sliderOn(slider) {
398                slider.find('.selectorArrow').css('display','block');
399            }
400            function sliderOff(slider) {
401                slider.find('.selectorArrow').css('display', 'none');
402            }
403
404            function getTitleCoursesText(number, totalDone) {
405                var lang = $('html').prop('lang').replace('-UA', '');
406                if (lang == "ru") {
407                    return number + ' курс' + pluralize(number, ['', 'а', 'ов']) + (totalDone > 0 ? ' (которые были пройдены ' + totalDone.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ") + ' раз' + pluralize(totalDone, ['', 'а', '']) + ')' : '');
408                } else if (lang == "uk") {
409                    return number + ' курс' + pluralize(number, ['', 'а', 'ів']) + (totalDone > 0 ? ' (які були пройдені ' + totalDone.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ") + ' раз' + pluralize(totalDone, ['', 'а', 'ів']) + ')' : '');
410                } else {
411                    return number + ' course' + (number > 1 ? 's' : '') + (totalDone > 0 ? ' (which have been completed ' + totalDone.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ") + ' times)' : '');
412                }
413            }
414
415            function getTitleTeachersText(number, active) {
416                var lang = $('html').prop('lang').replace('-UA', '');
417                if (lang == "ru") {
418                    return  'В рейтинге  ' + number + ' преподавател' + pluralize(number.replace(/\s+/g, ''), ['ь', 'я', 'ей']) + ' (активных ' + active + ')';
419                } else if (lang == "uk") {
420                    return 'У рейтингу ' + number + ' викладач' + pluralize(number.replace(/\s+/g, ''), ['', 'а', 'ів']) + ' (активних ' + active + ')';
421                } else {
422                    return number + ' teachers in the rating' + ' (active ' + active + ')';
423                }
424            }
425
426            function getTitleAutoschoolsText(number, active) {
427                var lang = $('html').prop('lang').replace('-UA', '');
428                if (lang == "ru") {
429                    return  'В рейтинге ' + number + ' автошкол' + pluralize(number.replace(/\s+/g, ''), ['а', 'ы', '']) + ' (активных ' + active + ')';
430                } else if (lang == "uk") {
431                    return 'У рейтингу ' + number + ' ' + pluralize(number.replace(/\s+/g, ''), ['автошкола', 'автошколи', 'автошкіл']) + ' (активних ' + active + ')';
432                } else {
433                    return number + ' driving schools in the rating' + ' (active ' + active + ')';
434                }
435            }
436
437            function getReviewsText(number) {
438                var lang = $('html').prop('lang').replace('-UA', '');
439                if (lang == "ru") {
440                    return '(' + number + ' отзыв' + pluralize(number, ['', 'а', 'ов']) + ')';
441                } else if (lang == "uk") {
442                    return '(' + number + ' відгук' + pluralize(number, ['', 'а', 'ів']) + ')';
443                } else {
444                    return '(' + number + ' review' + (number > 1 ? 's' : '') + ')';
445                }
446            }
447
448            function pluralize(n, forms) {
449                return n % 10 == 1 && n % 100 != 11
450                    ? forms[0]
451                    : (n % 10 >= 2 && n % 10 <= 4
452                    && (n % 100 < 10
453                        || n % 100 >= 20) ? forms[1] : forms[2]);
454            }
455
456            scrollEvent = true;
457        }
458    }
459});

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.