Новости

  • 1
  • 2
  • 3
  • 4
Map
'+data.items[i].type+'

 | '+data.items[i].title+'

'+data.items[i].text+'
'); } else { // without image items.push('
  • '+data.items[i].type+'

     | '+data.items[i].title+'

    '+data.items[i].text+'
  • '); } } searchList.fadeIn(300); searchList.html(items.join('')); searchShowAll.fadeIn(300); searchCounter.html(data.items.length); showAllLink.attr('href', '/search?q='+searchInput.val()); }); } else { searchList.fadeOut(300); searchShowAll.fadeOut(300); } }, 100); $(document).keypress(function(e) { if (body.hasClass('is-search') && e.which == 13) { window.location.href = '/search?q='+searchInput.val(); } }); }); //vacancy popup var vacancyLink = $('.vacancy__link'), vacancyPopup = $('.vacancy-popup'), vacancyWrap = $('.vacancy-popup .df-popup__wrap'); vacancyLink.on('click', function(e) { e.preventDefault(); vacancyPopup.fadeIn(400); }); $(document).mouseup(function (e) { if (!vacancyWrap.is(e.target) && vacancyWrap.has(e.target).length === 0) { vacancyPopup.fadeOut(400); } }); $(document).keydown(function(e) { if (e.keyCode == 27) { vacancyPopup.fadeOut(400); } }); //cookie popup var cookieLink = $('.cookie-more'), cookiePopup = $('.cookie-popup'), cookieClose = $('.cookie__close'), cookieAgree = $('.cookie-agree'), cookieMain = $('.cookie'), cookieInfo = $('.cookie-popup__info'), cookieWrap = $('.cookie-popup .df-popup__wrap'); $(window).on('load', function() { if (!$.cookie('cookieAreShown')) { cookieMain.addClass('is-show'); } }); cookieLink.on('click', function(e) { e.preventDefault(); cookiePopup.fadeIn(400); }); $(document).mouseup(function (e) { if (!cookieWrap.is(e.target) && cookieWrap.has(e.target).length === 0) { cookiePopup.fadeOut(400); } }); cookieClose.on('click', function() { cookiePopup.fadeOut(400); }); $(document).keydown(function(e) { if (e.keyCode == 27) { cookiePopup.fadeOut(400); } }); cookieAgree.on('click', function(e) { e.preventDefault(); cookiePopup.fadeOut(400); cookieMain.removeClass('is-show'); setTimeout(function() { $.cookie('cookieAreShown', true); cookieMain.hide(); }, 1200); }); new PerfectScrollbar('.cookie-popup__info', { wheelSpeed: 2, minScrollbarLength: 20 }); });