$(document).ready(function(){$('.js-count-rating-all').wRateCountAll();$('.js-count-rating').wRateCount();$('body').append('
Загрузка.
Пожалуйста, подождите.');},success:function(data){$('#pagination').remove();$('#dle-content').append($('#dle-content',data).html());window.history.pushState("","",urlNext);$('html, body').animate({scrollTop:scrollNext},800);$('.pagination__btn-loader span').text('Больше нет новостей');HideLoading('');setTimeout(function(){$(window).lazyLoadXT();},300);},error:function(){HideLoading('');alert('что-то пошло не так');}});};return false;});$('body').on('click','.js-show-trailer',function(){$("#page__trailer").dialog({modal:true,show:'fade',hide:'fade',width:800,open:function(event,ui){$('[data-src]').each(function(){var trg=$(this).data('src');$(this).attr('src',trg).removeAttr('data-src');});},close:function(event,ui){$(this).dialog('destroy')}});});$(".page__btn-dl").click(function(){$('html, body').animate({scrollTop:$('.page__dl').offset().top-20},800);return false;});$(".js-show-mobile-menu").click(function(){$('.overlay').fadeIn(200);$('#mobile-menu, .mobile-menu-close').addClass('is-active');$('body').addClass('mobile-menu-is-opened');});$(document).on('click','.overlay, .login__close, .mobile-menu-close',function(){$('.overlay, .login').fadeOut(200);$('#mobile-menu, .mobile-menu-close').removeClass('is-active');$('body').removeClass('modal-is-opened mobile-menu-is-opened');});$(document).on('click','.form__textarea-inside textarea, .fr-wrapper',function(){$('.add-comments-form').find('.form__row--protect').removeClass('d-none');});$('#dle-content > #dle-ajax-comments').appendTo($('#page__comments-list'));$('.login__social-btns a').on('click',function(){var href=$(this).attr('href'),width=820,height=420,left=(screen.width-width)/2,top=(screen.height-height)/2-100;auth_window=window.open(href,'auth_window',"width="+width+",height="+height+",top="+top+",left="+left+"menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no");return false;});$('.js-comm-author').each(function(){var a=$(this),b=a.closest('.js-comm'),c=a.text().substr(0,1),f=b.find('.js-comm-avatar'),e=f.children('img').attr('src'),d=["#c57c3b","#753bc5","#79c53b","#eb3b5a","#45aaf2","#2bcbba","#778ca3"],rand=Math.floor(Math.random()*d.length);if(e=='/templates/'+dle_skin+'/dleimages/noavatar.png'){f.html('