var countDownDate = new Date(time.replace(' ', 'T')).getTime();
if (isNaN(countDownDate)) {
countDownDate = new Date(time).getTime();
}
var mapFlag = false;
$(window).scroll(function () {
if (mapFlag == true) {
var el = $('.map');
if ($(this).scrollTop() > el.offset().top - 800) {
var script = document.createElement('script');
script.src = "https://api-maps.yandex.ru/services/constructor/1....";
el.append(script);
mapFlag = false;
}
}
});