PageSourceSearch

https://ua.today/default/js/script.js

js ua.today collected 2026-10-02 17:34:36 UTC 28,402 bytes, 924 lines download raw bytes

1$(document).ready(function(){
2  adsbygoogle_block();
3  var heitgh_img = $('.linck_slider > .img > img').outerHeight(true);
4  $('.linck_slider .nav a').css({'height':  heitgh_img + 'px'});
5
6
7
8  /**arrow position */
9  var left_pos  = $('main').offset().left;
10  $('.fixed-arrow a.prev').css({'left': left_pos - 55 + 'px'});
11  var right_pos  = $('#right').offset().left;
12  right_pos += $('#right').outerWidth(true);
13  $('.fixed-arrow a.next').css({'left': right_pos + 5 + 'px'});
14var cur_url = location.href;
15if($(window).width() > 1240){
16  $('.fixed-arrow').delay(500).fadeIn(500);
17}
18if(cur_url.search(/#galery/) > -1 ){
19
20    var topgaleryscroll = $('.linck_slider').offset().top;
21
22//  $('body').delay(500).animate({scrollTop: topgaleryscroll - 110}, 1000);
23
24
25
26}
27
28$('.bottom_text').append('<span class="readmore">Читать дальше>></span>');
29$('#cat_text').after('<span class="readmore">Читать дальше>></span>');
30  $('.readmore').on('click', function(){
31     $(this).siblings('#cat_text').toggleClass('active');
32    $(this).siblings('.body').toggleClass('active');
33  });
34
35
36
37
38
39  var widtWind = $(document).width();
40
41
42  //str.replace(regexp, newSubStr|function);
43
44  if(widtWind >= 340){
45      $('#Burptech').css({'left': widtWind/2 - 170 +  'px', 'width':'340px'});
46      $('#Burp').css({'right': '-25px', 'top':'-25px'});
47  } else {
48      $('#Burptech').css({'left': '0px', 'width':widtWind+'px'});
49      $('#Burp').css({'right': '-10px', 'top':'-5px'});
50  }
51
52
53
54  var userag = navigator.userAgent;
55
56  if (userag.search(/Firefox/) > -1) $('#bigmir').css({'top': 0});
57  if (userag.search(/Safari/) > -1) $('#bigmir').css({'top': '15px'});
58
59  /*drop more item*/
60  $('#list_news_cat .description').each(function(){
61    var s = $(this).text();
62    var s = s.replace("#more_item#", " ");
63    $(this).text(s);
64
65
66
67  });
68
69
70 var width_list =  $('.news_list').outerWidth(true);
71  var width_upbut  = $('.upbut').outerWidth(true);
72  $('.upbut').css({'left' : width_list/2 - width_upbut /2 + 'px'});
73  function show_widg(event){
74
75
76
77  }
78
79
80
81  /*tabs widget*/
82  $('aside .tab_title li').bind('click', function(){
83    if(!$(this).hasClass('active')){
84       $('aside .tab_title li').removeClass('active');
85       var currentclass = $(this).attr("class");
86      $(this).addClass('active');
87
88
89      $('aside .tab_item li.active').fadeOut(500, function(){
90	$(this).removeClass('active');
91
92	var curent = 'aside .tab_item .' + currentclass;
93	$(curent).addClass('active').fadeIn(500);
94
95
96      });
97
98
99    }
100
101
102  });
103
104
105
106
107
108
109  /*if(!$('body').hasClass('homepage')){
110    $('#banner').prependTo('#right');
111
112  }*/
113  var sss = $('#right + main').css('display');
114  if(!$('body').hasClass('homepage') && $('#right + main').css('display') == 'none'){
115    $('main').insertAfter( "#left" );
116
117  }
118  for_mobile();
119  //$('menu  li  ul').siblings().addClass('need');
120
121
122 var pp = 2;
123  if($(window).width() < 700){
124    pp = 2;
125  }
126
127  $('.downbut').bind('click', {l : pp, p : 0}, addnewsfeed);
128  $('.downbut_2').bind('click', {l : pp, p : 1}, addnewsfeed);
129
130
131   $('#headline_news li').eq(0).addClass('active');
132
133  function slideTopNews(){
134	outer: for(var i=0; i <  $('#headline_news li').length+1; ++i){
135
136	if($('#headline_news li').eq(i).hasClass('active') && i+1 != $('#headline_news li').length ){
137	  $('#headline_news li').eq(i).removeClass('active').fadeOut('500', function(){
138
139	    $('#headline_news li').eq(i+1).addClass('active').fadeIn('500');
140	  });
141
142	  //$('#headline_news li').eq(i+1).addClass('active');
143	 break outer;
144	}
145	else if(i+1 == $('#headline_news li').length){
146	  $('#headline_news li').eq(i).removeClass('active').fadeOut('500', function(){;
147
148	  $('#headline_news li').eq(0).addClass('active').fadeIn('500');
149	  });
150	  break outer;
151	}
152
153    }
154
155  }
156  function slideTopNewsPrev(){
157    if( !$('#headline_news').hasClass('start')){
158	  $('#headline_news').addClass('start');
159
160	  outer: for(var i=0; i <  $('#headline_news li').length+1; ++i){
161
162	      if($('#headline_news li').eq(i).hasClass('active') ){
163		$('#headline_news li').eq(i).removeClass('active').fadeOut('500', function(){
164
165		  $('#headline_news li').eq(i-1).addClass('active').fadeIn('500', function(){
166		    $('#headline_news').removeClass('start');
167		  });
168
169		});
170
171
172	      break outer;
173	      }
174	    }
175
176    }
177  }
178  function slideTopNewsNext(){
179    if( !$('#headline_news').hasClass('start')){
180		  $('#headline_news').addClass('start');
181		  outer: for(var i=0; i <  $('#headline_news li').length+1; ++i){
182
183		  if($('#headline_news li').eq(i).hasClass('active') && i+1 != $('#headline_news li').length ){
184		    $('#headline_news li').eq(i).removeClass('active').fadeOut('500', function(){
185
186		      $('#headline_news li').eq(i+1).addClass('active').fadeIn('500', function(){
187			      $('#headline_news').removeClass('start');
188			    });
189		    });
190
191		    //$('#headline_news li').eq(i+1).addClass('active');
192		  break outer;
193		  }
194		  else if(i+1 == $('#headline_news li').length){
195		    $('#headline_news li').eq(i).removeClass('active').fadeOut('500', function(){;
196
197		    $('#headline_news li').eq(0).addClass('active').fadeIn('500', function(){
198			      $('#headline_news').removeClass('start');
199			    });
200		    });
201		    break outer;
202		  }
203
204	      }
205    }
206  }
207
208
209  var intervalnews = setInterval(slideTopNews, 5000 );
210   $('#headline_news').hover(function(){
211
212     clearInterval(intervalnews);
213  }, function(){
214     intervalnews = setInterval(slideTopNews, 5000 );
215  });
216  $('#headline_news .prev').bind('click', slideTopNewsPrev);
217  $('#headline_news .next').bind('click', slideTopNewsNext);
218    set_active_menu();
219    news_feed();
220    news_feed_click_settings();
221    var click_item = null;
222    header_scroll();
223
224    $(window).scroll(function (event) {
225        if($(window).scrollTop()>0){
226            $("#up_page").show();
227	    $("#up_home").show();
228	}
229        else{
230            $("#up_page").hide();
231	$("#up_home").hide();
232	}
233    });
234
235 $('.search.icon').bind("click", function(){
236  if( $('#search_form').hasClass('show')){
237
238    $('#search_form').fadeOut('1000').removeClass('show');
239  }
240   else{
241
242   $('#search_form').addClass('show').fadeIn('1000');
243
244   }
245})
246 $('#hide-search').bind("click", function(){
247   $('#search_form').fadeOut(500).removeClass('show');
248 })
249
250
251$('nav ul li').parents('li').addClass('left_p').prepend('<span class="plus" onclick="show_sub(this);"><i class="fa fa-plus-square"></i></span>');
252
253
254var z = $(window).height();
255
256// $('.news_list').css({"height":z -100 +"px"});
257
258    $('body').keydown(function(event){
259        if (event.keyCode == 13 && event.ctrlKey){
260            if(window.getSelection().toString().length > 0 && $('#error_msg').css('display')=='none'){
261                error_msg('show');
262                $('#error_msg #errormsg_error_text').html(window.getSelection().toString());
263            }
264        }
265    })
266    //priority block
267    resize_pb();
268});
269function resize_pb(){
270
271  $('main .block_cat').removeClass('line');
272  if($('main .news-feed').length>0){
273    var min_h = $('main .news-feed').offset().top+$('main .news-feed').height();
274    $('main .block_cat').each(function(){
275        var top = $(this).offset().top;
276        if(top>=min_h)
277            $(this).addClass('line');
278        else
279            $(this).removeClass('line');
280    })
281  }
282}
283
284$(window).resize(function(){
285  for_mobile();
286    error_msg_position();
287    resize_pb();
288    move_right();
289  adsbygoogle_block();
290});
291//before "#meteoprog_informer_standart" in desctop
292//before "#page_title .admix" in mobile
293//adsbygoogle_block
294function adsbygoogle_block(){
295    /*if(parseInt($(window).width())>867){
296	    $('#block_6823397105').insertBefore("#page_title .admix");
297    } else {
298	if($('body').hasClass('article'))
299	{
300	    $('#block_6823397105').insertBefore("#news_partner" );
301	} else {
302	    $('#block_6823397105').insertBefore("#page_title .admix");
303	}
304    }*/
305}
306function move_right(){
307    if(parseInt($(window).width())>867){
308        $('#right').insertBefore( "main" );
309    } else {
310        $('#right').insertAfter( "main" );
311    }
312}
313function error_msg(action){
314    if(action == 'show'){
315        $('#error_msg').show();
316        error_msg_position();
317    }
318    if(action == 'closed'){
319        $('#error_msg #errormsg_error_text').html('');
320        $('#error_msg #errormsg_comment').html('');
321        $('#error_msg').hide();
322    }
323    if(action == 'send'){
324        //console.log($('#error_msg form').serialize());
325        $.ajax({
326            type: "POST",
327            url: $('#error_msg.error_msg form').attr('action'),
328            data: $('#error_msg.error_msg form').serialize(),
329            dataType: "json",
330            success: function(response) {
331                console.log(response);
332                if(response.send){
333                    $('#error_msg #errormsg_error_text').html('');
334                    $('#error_msg #errormsg_comment').html('');
335                    alert("Увжаемый читатель, спасибо Вам огромное за то, что помогаете нам улучшить сайт, сообщая об ошибках.\nМы приложим все возможные усилия для того, чтобы минимизировать возможность появления их в дальнейшем.");
336                    $('#error_msg').hide();
337                }
338                else {
339                    if(response.capcha==false){
340                        alert('Не вірна капча.');
341                    } else {
342                        alert('Не вдалсоя відправити, спробуйте пізніше.');
343                    }
344                }
345            }
346        });
347    }
348}
349function error_msg_position(){
350    $('#error_msg').css({'left':($( window ).width()-$('#error_msg').width())/2+'px', 'top':($( window ).height()-$('#error_msg').height())/2+'px'});
351}
352function for_mobile(){
353  var mobile = false;
354
355  if (/Mobi/.test(navigator.userAgent)) {
356  var mobile = true;
357} else {
358  var mobile = false;
359}
360
361  var check = $('header nav').css('display');
362  if(check == 'none'){
363
364    if(!$('body').hasClass('mobile')){
365    $('body').addClass('mobile');
366
367    var clonemenu = $('#header nav').clone();
368    $('#header .body').after(clonemenu);
369    var clonemainnew = $('main .block_cat.priority').clone();
370//       $('#page #left').before(clonemainnew);
371    }
372  }
373  else{
374//     $('#header .body + nav').add('#page .body > .block_cat.priority').remove();
375    $('body').removeClass('mobile');
376     $('#header .body + nav').hide();
377  }
378
379}
380
381function show_code(item){
382    $(item).closest('.code').find('xmp').toggleClass('active');
383}
384function show_sub(item){
385  jQuery(item).parent().find('ul').removeClass('hover').toggleClass('show');
386  jQuery('nav ul').removeClass('hover');
387  jQuery(item).find('i').toggleClass('fa-minus-square');
388}
389function show_naw(item){
390  console.log('sss');
391  jQuery('.body + nav').toggleClass('show').slideToggle();
392 }
393function up_top_page(){
394    $("html, body").animate({scrollTop:0}, '600');
395    return false;
396}
397function set_active_menu(){
398    var url = window.location.pathname;
399    var last = url.substr(-1);
400    if(last !="/")
401        url+="/";
402
403    $('a.menu-item').each(function(){
404        var href=$(this).attr("href");
405        last = href.substr(-1);
406        if(last !="/")
407            href+="/";
408        if(url==href)
409            $(this).closest("li").addClass("active");
410        else
411            $(this).closest("li").removeClass("active");
412    })
413}
414function news_feed(){
415    var all = true;
416    $('.news-feed-settings li.list-item input').each(function(){
417        if(!$(this).is(":checked"))
418            all = false;
419    })
420    return all;
421}
422function get_news_feed(){
423    var data = "";
424    $(".news-feed .settings input:checked").each(function(){
425        if(data!="")
426            data+=";";
427        data+=$(this).val();
428    })
429    $.ajax({
430        type: "POST",
431        url: "/get_left_article",
432        data: { data:data },
433        success: function(results){
434	  //console.log(results);
435            var html = $.parseHTML(results);
436            html = $(html).find('.list_news').html();
437            $('.news-feed .list_news').html(html);
438            news_feed_show_settings();
439        }
440    });
441}
442
443/*function show__hide_search(){
444    if($('#search_form').css("display")=="none")
445        $('#search_form').slideDown("slow");
446    else
447        $('#search_form').slideUp("slow");
448}*/
449function header_scroll(){
450    var item = $('#header');
451    var h = $('#header').outerHeight(true);
452     /*var height_top = $('#top_html').outerHeight(true) + $('header').outerHeight(true) + $('#page_title').outerHeight(true);
453     var scroll2 = $(window).scrollTop();*/
454    if($(item).offset())
455    {
456        var item_top = $(item).offset().top;
457        $(window).scroll(function (event) {
458            var scroll = $(window).scrollTop();
459            if(scroll>item_top){
460                $("#top_header").css({"margin-bottom":h+"px"});
461                $(item).addClass("fixed");
462		/*if(scroll2 > height_top){
463		$('#left').addClass("some_fixed");
464		//console.log($('#left').hasClass('some_fixed'));
465
466		if(!$('#left').hasClass('wow')){
467		$('aside .news-feed > div').css({"top":"55px"});
468		}
469		}*/
470            }
471            else{
472                $("#top_header").css({"margin-bottom":"0px"});
473                $(item).removeClass("fixed");
474		/*$('#left').removeClass("some_fixed").removeClass('wow');
475		$('aside .news-feed > div').css({"top":"0px"});*/
476            }
477        })
478    }
479}
480function news_feed_click_settings(){
481    $('.news-feed .settings label').click(function(){
482
483        click_item = $(this).closest("li");
484        $(click_item).toggleClass('checked');
485
486        if($(click_item).hasClass('all')){
487            if($(click_item).hasClass('checked')) {
488                $(click_item).closest('ul').find('li.item_seting').each(function(){
489                    $(this).addClass('checked');
490                    $(this).find('input').prop("checked", true);
491                })
492            } else {
493                $(click_item).closest('ul').find('li.item_seting').each(function(){
494                    $(this).removeClass('checked');
495                    $(this).find('input').prop("checked", false);
496                })
497            }
498        } else {
499            var stat = true
500            $(click_item).closest('ul').children('li.item_seting').each(function(){
501                if(!$(this).hasClass("checked")){
502                    stat = false;
503                }
504            })
505            if(stat){
506                $('.news-feed .settings li.all').addClass('checked');
507                $('.news-feed .settings li.all input').prop("checked", true);
508            } else {
509                $('.news-feed .settings li.all').removeClass('checked');
510                $('.news-feed .settings li.all input').prop("checked", false);
511            }
512        }
513    })
514
515}
516function news_feed_show_settings(){
517    if($('.news-feed .settings').css("display")=="none"){
518        /*$('#left .news-feed .settings').slideDown("slow");*/
519        $(' .news-feed .settings').show();
520        $(' .news-feed .settings').css({"width":"0px"});
521        $(' .news-feed .settings').animate({"width":"280px"}, "slow");
522    }
523    else {
524        /*$('#left .news-feed .settings').slideUp("slow");*/
525        $(' .news-feed .settings').show();
526        $(' .news-feed .settings').css({"width":"250px"});
527        $(' .news-feed .settings').animate({"width":"0px"}, "slow", function(){
528            $(' .news-feed .settings').hide();
529        });
530    }
531}
532function set_tab(item){
533    $(item).parent().children('.active').removeClass('active');
534    $(item).addClass('active');
535    var id=$(item).attr('id');
536    $('body').find('[name="'+id+'"]').parent().children().removeClass('active');
537    $('body').find('[name="'+id+'"]').addClass('active');
538}
539function add_more_annonce(item){
540    var page = parseInt($(item).attr('page'));
541    var count = 16;
542    var cat = $('section#list_news_cat').attr('cat');
543    $.ajax({
544        type: "POST",
545        url: "/add_more_news_annonce",
546        data: { page:page, count:count, cat:cat },
547        success: function(results){
548            if(results=='')
549                $('.show-more-news').hide();
550            else{
551                $(item).attr('page', page+1);
552                $('#list_news_cat > ul').append(results);
553            }
554        }
555    });
556}
557function add_more_news(item){
558    var page = parseInt($(item).attr('page'));
559    var count = 16;
560    var cat = $('section#list_news_cat').attr('cat');
561    $.ajax({
562        type: "POST",
563        url: "/add_more_news",
564        data: { page:page, count:count, cat:cat },
565        success: function(results){
566            if(results=='')
567                $('.show-more-news').hide();
568            else{
569                $(item).attr('page', page+1);
570                $('#list_news_cat > ul').append(results);
571            }
572        }
573    });
574}
575function add_more_news_video(item){
576    var page = parseInt($(item).attr('page'));
577    $.ajax({
578        type: "POST",
579        url: "/add_more_news_video",
580        data: { page:page },
581        success: function(results){
582            if(results=='')
583                $('.show-more-news').hide();
584            else{
585                $(item).attr('page', page+1);
586                $('.block_cat.video > .list_news > li > ul').append(results);
587            }
588        }
589    });
590}
591function add_more_news_photo(item){
592    var page = parseInt($(item).attr('page'));
593    $.ajax({
594        type: "POST",
595        url: "/add_more_news_photo",
596        data: { page:page },
597        success: function(results){
598            if(results=='')
599                $('.show-more-news').hide();
600            else{
601                $(item).attr('page', page+1);
602                $('.block_cat.photo > .list_news > li > ul').append(results);
603            }
604        }
605    });
606}
607
608function add_more_search(item){
609    var page = parseInt($(item).attr('page'));
610    $.ajax({
611        type: "POST",
612        url: "/add_more_search",
613        data: { page:page, q:$(item).attr('q') },
614        success: function(results){
615            if(results=='')
616                $('.show-more-news').hide();
617            else{
618                $(item).attr('page', page+1);
619                $('.block_cat.search > .list_news > li > ul').append(results);
620            }
621        }
622    });
623}
624function add_more_annonce_catalog(item){
625  var sub_cat = parseInt($(item).closest('li').attr('name').replace("cat_", ""));
626  var cat = parseInt($(item).closest('div.block_cat').attr('cat'));
627  var page = parseInt($(item).attr('page'));
628    $.ajax({
629        type: "POST",
630        url: "/add_more_annonce_catalog",
631        data: { page:page, sub_cat:sub_cat, cat:cat },
632        success: function(results){
633	  console.log('-'+results+'-');
634            if(results==''){
635                $(item).hide();
636	    }
637            else{
638                $(item).attr('page', page+1);
639		$(item).closest('li').children('ul').append(results);
640            }
641        }
642    });
643
644}
645function srol_s(){
646   var height_top = $('#top_html').outerHeight(true) + $('header').outerHeight(true) + $('#page_title').outerHeight(true);
647
648
649    var block4 = $('main').outerHeight(true);
650       var block6 = $(window).height();
651     var height = block4 - block6;
652console.log("height all " + (block4 + height_top));
653
654
655$(window).scroll(function (event) {
656            var scroll = $(window).scrollTop();
657// 	    console.log(height_top);
658	    var item = $('aside .news-feed > div').offset().top;
659// 	    console.log("item _ " + item);
660// 	    console.log("sds - " + (scroll + item ));
661// 	    console.log("height all " + (block4 + height_top));
662	    if(scroll > height_top){
663	      $('#left').addClass('some_fixed');
664	      /*if(block4 > block6){
665	      $('.wow .news-feed > div').css({"top": height + 40 + "px"});
666	      }*/
667	     if(scroll + block6 > block4 + height_top + 50){
668	       $('#left').removeClass('some_fixed').addClass('wow');
669 	       $('.wow .news-feed > div').css({'top': block4  - block6  + "px" });
670	    }
671	    else{
672	      $('#left').removeClass('wow').addClass('some_fixed');
673	      $('aside .news-feed > div').css({'top': '55px'});
674	    }
675	    }
676	    else{
677	      $('#left').removeClass('some_fixed');
678	       $('aside .news-feed > div').css({'top': '0px'});
679	    }
680
681
682
683
684});
685
686}
687
688
689$(window).load(function(){
690
691
692
693  var default_height_news_block = $('.news_list').outerHeight(true);
694  var cur_height = 0;
695		$('.active .news_list li').each(function(){
696		 cur_height +=  $(this).outerHeight(true);
697
698		});
699
700
701function Upnews(event){
702   var curent_scroll =  $('.news_list').scrollTop();
703   $('.news_list').stop().animate({
704		    scrollTop: curent_scroll - 350
705		}, 700, check);
706
707
708
709}
710
711  //srol_s();
712  $('.upbut').bind('click', { el: default_height_news_block }, Upnews);
713
714
715
716});
717function up_down_cat(item, count){
718    item =$(item).closest('.block_cat');
719
720    var new_item = '';
721    if($('body').hasClass('homepage')){
722        var scrollTop = $(window).scrollTop();
723        var itemTop = $(item).position().top;
724        var cat_id =$(item).attr('cat');
725        var h = $(item).outerHeight(true);
726        var w = $(item).width();
727
728        var index = $("main div.block_cat").index(item)-count;
729        new_item = $("main div.block_cat").eq(index);
730        var m_b = parseInt($(new_item).css("margin-bottom"));
731        var new_itemTop = $(new_item).position().top;
732        var top =itemTop-scrollTop;
733
734        $(item).css({"position":"fixed", "top":top+"px", "width":w+"px", "z-index":"10"})
735        $("body").stop();
736        if(count > 0){
737            if(index >= 1){
738                $("body").animate({ "scrollTop": (scrollTop-(itemTop-new_itemTop)) }, 1000, function(){
739                    //$(this).new_item.css({"margin-bottom":m_b+"px"});
740                    $(item).css({"position":"relative", "top":"0px", "width":"auto", "z-index":"10"});
741                    $(item).insertBefore($(new_item));
742                    var cat = '';
743                    $('main > .block_cat').each(function(){
744                        if(cat!="")
745                            cat+=";"
746                        cat+=$(this).attr('cat');
747                    })
748                    //console.log(cat);
749                    $.ajax({
750                        type: "POST",
751                        url: "/up_cat",
752                        data: { up_cat:cat, url:window.location.href },
753                        success: function(results){
754
755                        }
756                    });
757                })
758            }
759        } else {
760            $("body").animate({ "scrollTop": (scrollTop-(itemTop-new_itemTop)) }, 1000, function(){
761                //$(this).new_item.css({"margin-bottom":m_b+"px"});
762                $(item).css({"position":"relative", "top":"0px", "width":"auto", "z-index":"10"});
763                $(item).insertAfter($(new_item));
764                var cat = '';
765                $('main > .block_cat').each(function(){
766                    if(cat!="")
767                        cat+=";"
768                    cat+=$(this).attr('cat');
769                })
770                //console.log(cat);
771                $.ajax({
772                    type: "POST",
773                    url: "/up_cat",
774                    data: { up_cat:cat, url:window.location.href },
775                    success: function(results){
776
777                    }
778                });
779            })
780        }
781    }
782}
783function up_cat(item){
784    item =$(item).closest('.block_cat');
785    if($(".block_cat.priority").html()!=$(item).prev().html() && $('body').hasClass('homepage')){
786        var scrollTop = $(window).scrollTop();
787        var itemTop = $(item).position().top;
788        var nextTop = $(".block_cat.priority").next().position().top;
789        var top =itemTop-scrollTop;
790        var cat_id =$(item).attr('cat');
791        var h = $(item).outerHeight(true);
792        var w = $(item).outerWidth();
793        var m_b = parseInt($(".block_cat.priority").css("margin-bottom"));
794        $(".block_cat.priority").css({"margin-bottom":h+m_b+"px"});
795        $(item).css({"position":"fixed", "top":top+"px", "width":w+"px", "z-index":"10"})
796        $("html, body").stop();
797        $("html, body").animate({ "scrollTop": (scrollTop-(itemTop-nextTop)) }, 1000, function(){
798            $(".block_cat.priority").css({"margin-bottom":m_b+"px"});
799            $(item).css({"position":"relative", "top":"0px", "width":"auto", "z-index":"10"});
800            $(item).insertAfter($('.block_cat.priority'));
801            var cat = '';
802            $('main > .block_cat').each(function(){
803                if(cat!="")
804                    cat+=";"
805                cat+=$(this).attr('cat');
806            })
807            $.ajax({
808                type: "POST",
809                url: "/up_cat",
810                data: { up_cat:cat, url:window.location.href },
811                success: function(results){
812
813                }
814            });
815        });
816
817    }
818}
819//function addnewsfeed(l, p)
820function addnewsfeed(event){
821    var tab = $(this).closest('li');
822    var height = $(tab).children('.news_list').outerHeight(true);
823    var scrolling = $(tab).children('.news_list').scrollTop();
824    var cur_height = 0;
825	$(tab).children('.news_list').children('li').each(function(){
826		 cur_height +=  $(this).outerHeight(true);
827	});
828
829    if(height + scrolling >= cur_height){
830    if($(this).closest('li').attr('add_more')){
831        var item = $(this);
832
833	    var last_id = parseInt($(this).closest('li').children('.news_list').children('li:last-child').attr('created'));
834        $.ajax({
835            type: "POST",
836            url: "/get_list_left_article/"+event.data.l+"/"+event.data.p+"/"+last_id,
837            success: function(results){
838	      console.log(results);
839                var height = $(tab).children('.news_list').outerHeight(true);
840                $(tab).children('.news_list').css({'height': height + 'px'});
841                        $(item).closest('li').children('ul.news_list').append(results);
842                var ww = 0;
843                $(tab).children('.news_list').children('li').each(function(){
844                 ww +=  $(this).outerHeight(true);
845                });
846                 var height = $(tab).children('.news_list').outerHeight(true);
847
848                var container = $(tab).children('.news_list');
849
850
851                container.stop().animate({
852                    scrollTop: ww - height + 200
853                }, 700, check);
854            }
855        });
856
857    }
858    }
859    else{
860      var container = $('.news_list');
861
862
863		container.stop().animate({
864		    scrollTop: scrolling + 200
865		}, 700, check);
866
867    }
868     var curent_scroll =  $('.news_list').scrollTop();
869
870}
871function check(){
872
873    if($('.news_list').scrollTop() <= 40){
874
875    $('.upbut').removeClass('active');
876  }
877  else{
878    $('.upbut').addClass('active');
879
880  }
881
882  }
883function setLike(id, like){
884            console.log(id);
885            console.log(like);
886    $.ajax({
887        type: "POST",
888        url: '/page_like/'+id+'/'+like,
889        dataType: "json",
890        success: function(response) {
891            console.log(response);
892            $('#like .like_num.minus').html('-'+response.rezult.like[0].count);
893            $('#like .like_num.add').html('+'+response.rezult.like[1].count);
894            var total = parseInt(response.rezult.like[0].count)+parseInt(response.rezult.like[1].count);
895            var proc = Math.round(parseInt(response.rezult.like[0].count)*100/total);
896            $('#like .not_like').css({'width':(proc-proc%10)+'%'})
897            /***************/
898            var rating = Math.round(response.rezult.rating.total/response.rezult.rating.count).toFixed(2);
899            $('[itemprop=ratingCount]').html(response.rezult.rating.count);
900            $('[itemprop=ratingValue]').html(rating);
901            $('.page-rating').attr('data-average', rating);
902            $('.jRatingColor').css({'width':(rating*10)+'%'});
903            $('#like .click').removeAttr('onclick');
904        }
905    });
906}
907$('.more_nav').on('click', function(){
908     $('.body').toggleClass('active');
909  });
910
911$(function(){
912    if($("#news_partner").length != 0) {
913        setTimeout(function(){
914            news_partner_start = $('#news_partner').offset().top;
915            page_start = $('#right .news_list').offset().top;
916            list_height = news_partner_start - page_start - 35;
917            $('#right .news_list').css('height',list_height);
918            //console.log(news_partner_start);
919            //console.log(page_start);
920            //console.log(list_height);
921        }, 3000);
922    }
923
924});

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.