"use strict";
const inputTel=jQuery('input[type=tel]');
inputTel.each(function(){
jQuery(this).on('input', function(event){
jQuery(this).val(jQuery(this).val().replace(/[^\+\d-\d]/g,''))
})
});
document.body.onload=function (){
document.querySelector('.preloader').classList.add('load');
setTimeout(function (){
document.querySelector('.preloader').classList.add('hide');
}, 800);
};
let clientWidth=window.innerWidth;
let grondi_uri='';
const header=document.getElementById('header');
const logo=document.getElementById('logo');
if(typeof grondi!=='undefined') grondi_uri=grondi.uri + '/';
function headerScroll(){
clientWidth=window.innerWidth;
if(clientWidth <=320||header.classList.contains('mobile-fix')){
return false;
}else{
if(window.pageYOffset===0){
header.classList.remove('header-scroll');
logo.src=grondi_uri + 'img/logo.svg';
}else{
header.classList.add('header-scroll');
logo.src=grondi_uri + 'img/logo-scroll.svg';
}}
}
headerScroll();
function headerResize(){
let clientWidth=window.innerWidth;
if(clientWidth <=768&&header.classList.contains('header-scroll')){
header.classList.remove('header-scroll');
logo.src=grondi_uri + 'img/logo.svg';
}
if(clientWidth > 768&&window.pageYOffset > 0){
header.classList.add('header-scroll');
logo.src=grondi_uri + 'img/logo-scroll.svg';
}}
headerResize();
(function rating(){
let feedbackRating=document.querySelectorAll('.clients-feedback__rating');
for (let i=0; i < feedbackRating.length; i++){
let ratingValue=feedbackRating[i].getAttribute('data-rating');
let stars=feedbackRating[i].children;
stars[ratingValue - 1].classList.add('current-rating');
}})();
function animationImg(){
if(document.getElementById('img-wrap')){
if(document.documentElement.clientWidth > 1000){
let animationWrap=document.getElementById('img-wrap');
let imgWoman=document.getElementById('img-wrap__woman');
let imgManRight=document.getElementById('img-wrap__man-right');
let imgManBottom=document.getElementById('img-wrap__man-bottom');
let imgIdea=document.getElementById('img-wrap__idea');
let imgArrow=document.getElementById('img-wrap__arrow');
let imgCatalog=document.getElementById('img-wrap__catalog');
let imgCard=document.getElementById('img-wrap__card');
let startX=-40;
let startY=400;
let w=document.documentElement.offsetWidth;
let h=document.documentElement.offsetHeight;
animationWrap.addEventListener('mousemove', function (evt){
let posX=Math.round(evt.clientX / w * startX);
let posY=Math.round(evt.clientY / h * startY);
imgWoman.style.transform=`translate(${posX + 'px'}, ${posY + 'px'})`;
imgManRight.style.transform=`translate(${-(posX) + 'px'}, ${-(posY) + 'px'})`;
imgManBottom.style.transform=`translate(${posX + 'px'}, ${posY + 'px'})`;
imgIdea.style.transform=`translate(${posX + 'px'}, ${posY + 'px'})`;
imgArrow.style.transform=`translate(${posX + 'px'}, ${posY + 'px'})`;
imgCatalog.style.transform=`translate(${-(posX) + 'px'}, ${-(posY) + 'px'})`;
imgCard.style.transform=`translate(${-(posX) + 'px'}, ${-(posY) + 'px'})`;
});
}}
}
animationImg();
const buttonMenu=document.getElementById('button-menu');
const menuMobile=document.getElementById('menu-mobile');
const bodyWrap=document.querySelector('body');
const bottomItems=document.querySelectorAll('.bottom-menu__item a');
buttonMenu.onclick=function (){
if(buttonMenu.classList.contains('active')){
buttonMenu.classList.remove('active');
menuMobile.classList.remove('open');
header.classList.remove('mobile-fix');
bodyWrap.classList.remove('fix');
}else{
buttonMenu.classList.add('active');
menuMobile.classList.add('open');
header.classList.add('mobile-fix');
bodyWrap.classList.add('fix');
}};
bottomItems.forEach(function(el, i){
el.onclick=function(){
bodyWrap.classList.remove('fix');
}})
window.addEventListener('scroll', headerScroll);
window.addEventListener('resize', headerResize);
let currentIcon=1;
function changeIcons(){
let icons=document.querySelectorAll('.consultation__feedback-icon');
for (let i=0; i < icons.length; i++){
icons[i].classList.remove('current');
icons[currentIcon].classList.add('current');
}
currentIcon++;
if(currentIcon==3){
currentIcon=0;
}
setTimeout(changeIcons, 3000);
}
setTimeout(changeIcons, 3000);
let popup=document.querySelector('.section-popup');
function openPopup(){
popup.classList.add('open');
document.querySelector('body').classList.add('fix');
}
function closePopUp(){
popup.classList.remove('open');
if(document.querySelector('.popup')){
document.querySelector('.popup').classList.add('hide');
}
document.querySelector('body').classList.remove('fix');
document.querySelector('.thanks-popup .popup__title-h5').innerHTML='Спасибо, мы получили Вашу заявку';
document.querySelector('.thanks-popup__text').innerHTML='Обычно обработка заявок занимает до 24 часов';
}
popup.addEventListener("click", function (event){
if(event.target.classList.contains('section-popup')){
closePopUp();
}});
let buttonClosePopUp=document.querySelectorAll('.close-popup');
for (let i=0; i < buttonClosePopUp.length; i++){
buttonClosePopUp[i].addEventListener('click', closePopUp);
}
(function smoothAnchor(){
if(document.querySelector('.lazy-anchor')){
let anchor=document.querySelectorAll('.lazy-anchor');
for (let i=0; i < anchor.length; i++){
anchor[i].addEventListener('click', function (event){
event.preventDefault();
const blockID=anchor[i].getAttribute('href').substr(1);
document.getElementById(blockID).scrollIntoView({
behavior: 'smooth',
block: 'start'
})
})
}}
})();
(function presenceSliderProjects(){
if(document.querySelector('.slider-projects')){
jQuery('.slider-projects').slick({
centerMode: false,
slidesToShow: 2,
variableWidth: true,
arrows: false,
responsive: [
{
breakpoint: 1100,
settings: {
slidesToShow: 1,
variableWidth: true,
centerMode: true
}},
{
breakpoint: 650,
settings: {
slidesToShow: 1,
variableWidth: false
}}
]
});
jQuery('.slider-projects__button-next').on('click', function (){
jQuery('.slider-projects').slick('slickNext');
});
jQuery('.slider-projects__button-prev').on('click', function (){
jQuery('.slider-projects').slick('slickPrev');
});
}})();
(function presenceSliderFeedback(){
if(document.querySelector('.clients-feedback__list')){
jQuery('.clients-feedback__list').slick({
centerMode: false,
autoplay: false,
slidesToShow: 2,
arrows: false,
responsive: [
{
breakpoint: 768,
settings: {
slidesToShow: 2,
}},
{
breakpoint: 650,
settings: {
slidesToShow: 1
}}
]
});
jQuery('.slider-feedback__button-next').on('click', function (){
jQuery('.clients-feedback__list').slick('slickNext');
});
}})();
(function presenceSliderTeamInfo(){
if(document.querySelector('.section-team__info-wrap')){
jQuery('.section-team__info-wrap').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
asNavFor: '.slider-team',
swipe: false,
infinite: true
});
jQuery('.slider-team').slick({
slidesToScroll: 1,
asNavFor: '.section-team__info-wrap',
dots: false,
centerMode: false,
adaptiveHeight: true,
variableWidth: true,
arrows: false,
speed: 600,
infinite: true,
focusOnSelect: true,
waitForAnimate: true,
responsive: [
{
breakpoint: 1440,
settings: {
slidesToShow: 2
}},
{
breakpoint: 980,
settings: {
slidesToShow: 3,
variableWidth: true,
centerMode: true
}},
{
breakpoint: 320,
settings: {
slidesToShow: 1,
variableWidth: false,
centerMode: true,
}}
]
});
jQuery('.slider-team').on('beforeChange', function (event, slick, currentSlide, nextSlide){
jQuery('.slider-team__item').removeClass('center');
if(innerWidth > 650){
jQuery(this).find('.slick-slide[data-slick-index="' + currentSlide + '"]').removeClass('center');
jQuery(this).find('.slick-slide[data-slick-index="' + nextSlide + '"]').addClass('center');
}});
jQuery('#slider-team-next').on('click', function (){
jQuery('.slider-team').slick('slickNext');
});
jQuery('#slider-team-prev').on('click', function (){
jQuery('.slider-team').slick('slickPrev');
});
}})();
let bodymovin1=document.getElementById('bodymovin-1');
let bodymovin2=document.getElementById('bodymovin-2');
let bodymovin3=document.getElementById('bodymovin-3');
let bodymovin4=document.getElementById('bodymovin-4');
let bodymovin5=document.getElementById('bodymovin-5');
let bodymovin6=document.getElementById('bodymovin-6');
let bodymovin7=document.getElementById('bodymovin-7');
let bodymovin8=document.getElementById('bodymovin-8');
let bodymovin9=document.getElementById('bodymovin-9');
let bodymovin10=document.getElementById('bodymovin-10');
let bodymovin11=document.getElementById('bodymovin-11');
let principlesWrap=document.querySelectorAll(".section-principles__principles-wrap");
let listServices=document.querySelectorAll(".section-services__list-services-item");
function loadBMAnimation1(bodymovin1){
let animation=bodymovin.loadAnimation({
container: bodymovin1,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-1.json"
});
for (let x=0; x < principlesWrap.length; x++){
principlesWrap[0].addEventListener("mouseenter", function (){
animation.play();
});
principlesWrap[0].addEventListener("mouseleave", function (){
animation.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(elem.closest('#principles-1')){
animation.play();
}else{
animation.stop();
}}
});
}
if(bodymovin1){
loadBMAnimation1(bodymovin1);
}
function loadBMAnimation2(bodymovin2){
let animation2=bodymovin.loadAnimation({
container: bodymovin2,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-2.json"
});
for (let x=0; x < principlesWrap.length; x++){
principlesWrap[1].addEventListener("mouseenter", function (){
animation2.play();
});
principlesWrap[1].addEventListener("mouseleave", function (){
animation2.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(elem.closest('#principles-2')){
animation2.play();
}else{
animation2.stop();
}}
});
}
if(bodymovin2){
loadBMAnimation2(bodymovin2);
}
function loadBMAnimation3(bodymovin3){
let animation3=bodymovin.loadAnimation({
container: bodymovin3,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-3.json"
});
for (let x=0; x < principlesWrap.length; x++){
principlesWrap[3].addEventListener("mouseenter", function (){
animation3.play();
});
principlesWrap[3].addEventListener("mouseleave", function (){
animation3.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(elem.closest('#principles-3')){
animation3.play();
}else{
animation3.stop();
}}
}});
}
if(bodymovin3){
loadBMAnimation3(bodymovin3);
}
function loadBMAnimation4(bodymovin4){
let animation4=bodymovin.loadAnimation({
container: bodymovin4,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-4.json"
});
for (let x=0; x < listServices.length; x++){
(bodymovin4.closest('.section-services__list-services-item')||listServices[0]).addEventListener("mouseenter", function (){
animation4.play();
});
(bodymovin4.closest('.section-services__list-services-item')||listServices[0]).addEventListener("mouseleave", function (){
animation4.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(bodymovin4.closest('.section-services__list-services-item')&&bodymovin4.closest('.section-services__list-services-item').contains(elem)){
animation4.play();
}else{
animation4.stop();
}}
}});
}
if(bodymovin4){
loadBMAnimation4(bodymovin4);
}
function loadBMAnimation5(bodymovin5){
let animation5=bodymovin.loadAnimation({
container: bodymovin5,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-5.json"
});
for (let x=0; x < listServices.length; x++){
(bodymovin5.closest('.section-services__list-services-item')||listServices[1]).addEventListener("mouseenter", function (){
animation5.play();
});
(bodymovin5.closest('.section-services__list-services-item')||listServices[1]).addEventListener("mouseleave", function (){
animation5.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(bodymovin5.closest('.section-services__list-services-item')&&bodymovin5.closest('.section-services__list-services-item').contains(elem)){
animation5.play();
}else{
animation5.stop();
}}
});
}
if(bodymovin5){
loadBMAnimation5(bodymovin5);
}
function loadBMAnimation6(bodymovin6){
let animation6=bodymovin.loadAnimation({
container: bodymovin6,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-6.json"
});
for (let x=0; x < listServices.length; x++){
(bodymovin6.closest('.section-services__list-services-item')||listServices[5]).addEventListener("mouseenter", function (){
animation6.play();
});
(bodymovin6.closest('.section-services__list-services-item')||listServices[5]).addEventListener("mouseleave", function (){
animation6.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(bodymovin6.closest('.section-services__list-services-item')&&bodymovin6.closest('.section-services__list-services-item').contains(elem)){
animation6.play();
}else{
animation6.stop();
}}
});
}
if(bodymovin6){
loadBMAnimation6(bodymovin6);
}
function loadBMAnimation7(bodymovin7){
let animation7=bodymovin.loadAnimation({
container: bodymovin7,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-7.json"
});
for (let x=0; x < listServices.length; x++){
(bodymovin7.closest('.section-services__list-services-item')||listServices[6]).addEventListener("mouseenter", function (){
animation7.play();
});
(bodymovin7.closest('.section-services__list-services-item')||listServices[6]).addEventListener("mouseleave", function (){
animation7.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(bodymovin7.closest('.section-services__list-services-item')&&bodymovin7.closest('.section-services__list-services-item').contains(elem)){
animation7.play();
}else{
animation7.stop();
}}
});
}
if(bodymovin7){
loadBMAnimation7(bodymovin7);
}
function loadBMAnimation8(bodymovin8){
let animation8=bodymovin.loadAnimation({
container: bodymovin8,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-8.json"
});
for (let x=0; x < listServices.length; x++){
(bodymovin8.closest('.section-services__list-services-item')||listServices[4]).addEventListener("mouseenter", function (){
animation8.play();
});
(bodymovin8.closest('.section-services__list-services-item')||listServices[4]).addEventListener("mouseleave", function (){
animation8.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(bodymovin8.closest('.section-services__list-services-item')&&bodymovin8.closest('.section-services__list-services-item').contains(elem)){
animation8.play();
}else{
animation8.stop();
}}
});
}
if(bodymovin8){
loadBMAnimation8(bodymovin8);
}
function loadBMAnimation9(bodymovin9){
let animation9=bodymovin.loadAnimation({
container: bodymovin9,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-9.json"
});
for (let x=0; x < listServices.length; x++){
(bodymovin9.closest('.section-services__list-services-item')||listServices[2]).addEventListener("mouseenter", function (){
animation9.play();
});
(bodymovin9.closest('.section-services__list-services-item')||listServices[2]).addEventListener("mouseleave", function (){
animation9.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(bodymovin9.closest('.section-services__list-services-item')&&bodymovin9.closest('.section-services__list-services-item').contains(elem)){
animation9.play();
}else{
animation9.stop();
}}
});
}
if(bodymovin9){
loadBMAnimation9(bodymovin9);
}
function loadBMAnimation10(bodymovin10){
let animation10=bodymovin.loadAnimation({
container: bodymovin10,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-10.json"
});
for (let x=0; x < principlesWrap.length; x++){
principlesWrap[2].addEventListener("mouseenter", function (){
animation10.play();
});
principlesWrap[2].addEventListener("mouseleave", function (){
animation10.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(elem.closest('#principles-4')){
animation10.play();
}else{
animation10.stop();
}}
});
}
if(bodymovin10){
loadBMAnimation10(bodymovin10);
}
function loadBMAnimation11(bodymovin11){
let animation11=bodymovin.loadAnimation({
container: bodymovin11,
renderer: "svg",
loop: true,
autoplay: false,
path: grondi_uri + "img/lottie/bodymovin-11.json"
});
for (let x=0; x < listServices.length; x++){
(bodymovin11.closest('.section-services__list-services-item')||listServices[3]).addEventListener("mouseenter", function (){
animation11.play();
});
(bodymovin11.closest('.section-services__list-services-item')||listServices[3]).addEventListener("mouseleave", function (){
animation11.stop();
});
}
window.addEventListener('scroll', function (){
if(innerWidth < 650){
if(innerWidth < 650){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight / 2;
let elem=document.elementFromPoint(centerX, centerY);
if(bodymovin11.closest('.section-services__list-services-item')&&bodymovin11.closest('.section-services__list-services-item').contains(elem)){
animation11.play();
}else{
animation11.stop();
}}
}});
}
if(bodymovin11){
loadBMAnimation11(bodymovin11);
}
(function sortNavigation(){
if(document.getElementById("portfolio-sort")){
let items=document.querySelectorAll('.section-portfolio__content-item');
let checks=document.querySelectorAll('.sort-item__label-input');
let checkAll=document.querySelector('.check-all');
function removeSort(){
if(checkAll.checked){
for (let i=0; i < checks.length; i++){
checks[i].checked=false;
}
for (let i=0; i < items.length; i++){
items[i].classList.remove('hide');
}}else{
for (let i=0; i < checks.length; i++){
if(checks[i].checked){
checkAll.checked=false;
break;
}
checkAll.checked=true;
}}
}
function sort(){
let arr=[];
checkAll.checked=false;
for (let y=0; y < checks.length; y++){
if(checks[y].checked){
arr.push(checks[y].value);
}}
for (let t=0; t < checks.length; t++){
if(checks[t].checked){
for (let q=0; q < items.length; q++){
items[q].classList.add('hide');
}
for (let n=0; n < items.length; n++){
let activeClass=[];
activeClass=items[n].classList;
for (let m=0; m < activeClass.length; m++){
if(arr.includes(activeClass[m])){
items[n].classList.remove('hide');
break;
}else{
items[n].classList.add('hide');
}}
}}
}
if(arr.length==0){
checkAll.checked=true;
removeSort();
}}
for (let i=0; i < checks.length; i++){
}}
})();
jQuery(function($){
(function newSortNavigation(){
if(document.getElementById("portfolio-sort")){
let items=$('.section-portfolio__content-item');
let checks=$('.sort-item__label-input');
let checkAll=$('.check-all');
function newSort(){
checkAll.removeClass('active');
if($(this).hasClass('active')){
$(this).removeClass('active')
}else{
checks.removeClass('active');
$(this).addClass('active');
}
items.addClass('hide');
$(`.${$(this).val()}`).removeClass('hide');
}
function newRemoveSort(){
checkAll.addClass('active');
checks.removeClass('active');
items.removeClass('hide');
}
checkAll[0].addEventListener('change', newRemoveSort);
for (let i=0; i < checks.length; i++){
checks[i].addEventListener('change', newSort);
}}
})();
});
let sliderMenuPortfolio=false;
function addSliderMenuPortfolio(){
jQuery(function ($){
if(window.innerWidth <=768&&sliderMenuPortfolio==false){
$('#portfolio-sort').slick({
dots: false,
infinite: true,
speed: 300,
centerMode: false,
variableWidth: true,
arrows: false,
swipeToSlide: true,
});
sliderMenuPortfolio=true;
}
if(window.innerWidth > 768&&sliderMenuPortfolio==true){
$('#portfolio-sort').slick('unslick');
sliderMenuPortfolio=false;
}})
};
addSliderMenuPortfolio();
window.addEventListener('resize', addSliderMenuPortfolio);
(function numberCounter(){
if(document.getElementById('info-age')&&document.getElementById('info-projects')){
let numberAge=document.getElementById('info-age'),
numberProjects=document.getElementById('info-projects'),
startAge=0, startProjects=0,
endAge=parseInt(numberAge.getAttribute('data-end')||8),
endProjects=parseInt(numberProjects.getAttribute('data-end')||1386);
window.addEventListener('scroll', function onScroll(){
let centerX=document.documentElement.clientWidth / 2;
let centerY=document.documentElement.clientHeight - (document.documentElement.clientHeight / 2) - 200;
let elem=document.elementFromPoint(centerX, centerY);
if(elem.classList.contains('section-info')||elem.closest('.section-info')){
this.removeEventListener('scroll', onScroll);
let intervalAge=setInterval(function (){
numberAge.innerHTML=++startAge;
if(startAge==endAge){
clearInterval(intervalAge);
}}, 100);
let intervalProjects=setInterval(function (){
numberProjects.innerHTML=++startProjects;
if(startProjects==endProjects){
clearInterval(intervalProjects);
}}, 1);
}});
}})();
(function numberCounterAboutUs(){
if(document.querySelector('.section-progress')){
let age=document.getElementById('age'),
projects=document.getElementById('projects'),
clients=document.getElementById('clients'),
awards=document.getElementById('awards'),
numberTop=age.getBoundingClientRect().top,
startAges=0, startProject=0, startClients=0, startAwards=0,
endAges=parseInt(age.getAttribute('data-end')||8),
endProject=parseInt(projects.getAttribute('data-end')||1386),
endClients=parseInt(clients.getAttribute('data-end')||1350),
endAwards=parseInt(awards.getAttribute('data-end')||18);
window.addEventListener('scroll', function onScroll(){
if(window.pageYOffset > numberTop - (window.innerHeight / 2) - 150){
this.removeEventListener('scroll', onScroll);
let intervalAge=setInterval(function (){
age.innerHTML=++startAges;
if(startAges==endAges){
clearInterval(intervalAge);
}}, 100);
let intervalProjects=setInterval(function (){
projects.innerHTML=++startProject;
if(startProject==endProject){
clearInterval(intervalProjects);
}}, 1);
let intervalClients=setInterval(function (){
clients.innerHTML=++startClients;
if(startClients==endClients){
clearInterval(intervalClients);
}}, 1);
let intervalAwards=setInterval(function (){
awards.innerHTML=++startAwards;
if(startAwards==endAwards){
clearInterval(intervalAwards);
}}, 100);
}});
}})();
if(document.querySelector('.input-file')){
document.querySelector('.input-file').addEventListener('change', visibleNameDownloadFile);
}
function visibleNameDownloadFile(){
let nameFile=document.querySelector('.popup__file-name');
let fileAdd=document.querySelector('.input-file').files[0].name;
nameFile.innerHTML=fileAdd;
}
(function playVideo(){
if(document.querySelector('.section-project-preview__video')){
const videos=document.querySelectorAll('.section-project-preview__video');
let generateUrl=function (id){
let query='?rel=0&showinfo=0&autoplay=1';
return 'https://www.youtube.com/embed/' + id + query;
};
let createIframe=function (id){
let iframe=document.createElement('iframe');
iframe.setAttribute('allowfullscreen', '');
iframe.setAttribute('allow', 'autoplay; encrypted-media');
iframe.setAttribute('src', generateUrl(id));
return iframe;
};
videos.forEach((el)=> {
let videoHref=el.getAttribute('data-video');
let deletedLength='https://youtu.be/'.length;
let videoId=videoHref.substring(deletedLength, videoHref.length);
el.addEventListener('click', (e)=> {
e.preventDefault();
let iframe=createIframe(videoId);
el.querySelector('img').remove();
el.appendChild(iframe);
el.querySelector('a').remove();
});
});
}})();
(function presenceSliderFooter(){
if(document.querySelector('.footer__list-partners')){
jQuery('.footer__list-partners').slick({
centerMode: false,
responsiveHeight: true,
slidesToShow: 5,
slidesToScroll: 1,
loop: true,
variableWidth: false,
arrows: false,
dots: false,
autoplay: true,
swipeToSlide: true,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 4
}},
{
breakpoint: 480,
settings: {
slidesToShow: 3
}}
]
});
}})();
function openMenuCall(){
let callMenu=document.querySelector('.consultation__feedback-list');
callMenu.classList.toggle('visible');
}
document.querySelector('.consultation__button-phone').addEventListener('click', openMenuCall);
(function addHandlerButtonMenu (){
let button=document.querySelectorAll('.arrow-menu');
for (let i=0; i < button.length; i++){
button[i].addEventListener('click', function (e){
if(innerWidth <=1024){
button[i].classList.toggle('open');
}});
}})();
function hideMenu(event){
if(!event.target.closest('.consultation__button-phone')||!event.target.closest('.consultation__button-phone')){
let callMenu=document.querySelector('.consultation__feedback-list');
callMenu.classList.remove('visible');
}
if(!event.target.closest('.menu__item')){
let bottomMenu=document.querySelector('.bottom-menu');
let arrowMenu=document.querySelector('.arrow-menu');
bottomMenu.classList.remove('visible');
arrowMenu.classList.remove('open');
}}
window.addEventListener('click', hideMenu);
(function presenceCostList(){
if(document.querySelector('.section-cost__list')){
let checks=document.getElementsByName('cost');
let cardsList=document.querySelector('.section-cost__cards-list');
let cardWidth;
let cards=document.querySelectorAll('.section-cost__cards');
let priceLists=document.querySelectorAll('.section-price__list');
function menuCost(){
for (let x=0; x < checks.length; x++){
if(checks[x].checked){
let checkedValue=checks[x].value;
let posX=cardWidth * x;
cardsList.style.transform=`translate(${-(posX) + 'px'})`;
document.querySelector(`${'#' + checkedValue + '-price'}`).classList.remove('hide');
}else{
let checkedValue=checks[x].value;
document.querySelector(`${'#' + checkedValue + '-price'}`).classList.add('hide');
}}
}
function changeResize(){
cardWidth=document.querySelector('.section-cost__cards-wrap').offsetWidth;
cardsList.style.transform='translate(0)';
checks[0].checked=true;
priceLists[0].classList.remove('hide');
for (let t=1; t < checks.length; t++){
checks[t].checked=false;
priceLists[t].classList.add('hide');
}
for (let y=0; y < cards.length; y++){
cards[y].style.width=cardWidth + 'px';
}}
changeResize();
window.addEventListener('resize', changeResize);
for (let i=0; i < checks.length; i++){
checks[i].addEventListener('change', menuCost);
}}
})();
function buttonScrollTop(){
if(document.querySelector('.scroll-to-top')){
let buttonScroll=document.querySelector('.scroll-to-top');
if(window.pageYOffset==0||window.pageYOffset < document.documentElement.clientHeight / 2){
buttonScroll.classList.remove('view');
}else{
buttonScroll.classList.add('view');
}
buttonScroll.addEventListener('click', function (){
window.scrollTo({
top: 0,
behavior: 'smooth'
});
})
}}
buttonScrollTop();
window.addEventListener('scroll', buttonScrollTop);
function validateForm(f){
let valid=true;
let inputs=f.querySelectorAll('.popup__input');
for (let x=0; x < inputs.length; x++){
if(inputs[x].style.display!='none'){
if(inputs[x].value==''){
inputs[x].closest('.popup__input-wrap').classList.remove('valid');
inputs[x].closest('.popup__input-wrap').classList.add('not-valid');
inputs[x].closest('.popup__input-wrap').nextElementSibling.innerHTML='Это поле обязательно для заполнения';
inputs[x].closest('.popup__input-wrap').nextElementSibling.classList.remove('hide');
valid=false;
}else{
inputs[x].closest('.popup__input-wrap').nextElementSibling.innerHTML='';
inputs[x].closest('.popup__input-wrap').nextElementSibling.classList.add('hide');
inputs[x].closest('.popup__input-wrap').classList.remove('not-valid');
inputs[x].closest('.popup__input-wrap').classList.add('valid');
}}
}
return valid;
}
function validateFormContacts(){
let valid=true;
let inputText=document.querySelector('.form-feedback__input-mail');
let inputPhone=document.querySelector('.form-feedback__input-phone');
let textArea=document.querySelector('.form-feedback__input-text');
let arr=[inputText, inputPhone, textArea];
for (let x=0; x < arr.length; x++){
if(arr[x].value==''){
arr[x].classList.remove('valid');
arr[x].classList.add('not-valid');
arr[x].nextElementSibling.innerHTML='Это поле обязательно для заполнения';
arr[x].nextElementSibling.classList.remove('hide');
valid=false;
}else{
arr[x].nextElementSibling.innerHTML='';
arr[x].nextElementSibling.classList.add('hide');
arr[x].classList.remove('not-valid');
arr[x].classList.add('valid');
}}
return valid;
}
jQuery(function ($){
$('.open-popup').click(function (){
var popup=$('.popup');
var popupImg=$('.popup__img img');
openPopup();
$('.thanks-popup').addClass('hide');
popup.find('.error-text').text('');
if($(this).hasClass('consultation__button-modal')||$(this).hasClass('section-project-info__button')){
popupImg.attr('src', `${grondi_uri}/img/modal/img-1.png`);
popup.find('.popup__title-h5').text('связаться с нами');
popup.find('[name="email"]').hide().parent('.popup__input-wrap').hide();
popup.find('textarea, .popup__input-file').hide();
popup.find('[type="submit"]').val('связаться');
}else if($(this).hasClass('banner-content__button')){
if($(this).hasClass('project-popup')) popup.find('.popup__title-h5').text('проект');
else if($(this).hasClass('the-project-popup')) popup.find('.popup__title-h5').text('Заказать похожий проект на '+$('.section-project-info__title').text());
else popup.find('.popup__title-h5').text($('.section-breadcrumbs__title').text());
popup.find('[name="email"]').hide().parent('.popup__input-wrap').hide();
popup.find('textarea').show();
popup.find('.popup__input-file').hide();
popup.find('[name="name"]').hide().parent('.popup__input-wrap').hide();
popup.find('[type="submit"]').val('заказать');
popupImg.attr('src', `${grondi_uri}/img/modal/img-2.png`);
}else if($(this).hasClass('section-cost__button-order')){
popup.find('.popup__title-h5').text($('[name="cost"]:checked').next('span').text()+' / '+$(this).parents('.section-cost__card').find('mark').text());
popup.find('[name="email"]').show().parent('.popup__input-wrap').show();
popup.find('textarea').show();
popup.find('.popup__input-file').hide();
popup.find('[type="submit"]').val('заказать');
}else if($(this).hasClass('list-vacancy__button')){
popupImg.attr('src', `${grondi_uri}/img/modal/img-3.png`);
popup.find('.popup__title-h5').text($(this).parent('.list-vacancy__info-wrap').find('.list-vacancy__name-vacancy').text());
popup.find('[name="email"]').show().parent('.popup__input-wrap').show();
popup.find('textarea, .popup__input-file').show();
popup.find('[type="submit"]').val('отправить');
}
popup.removeClass('hide');
});
$('.popup__form').submit(function (e){
e.preventDefault();
var f=this;
var frm=$(this);
var fdata=new FormData(f);
fdata.append('action', 'grondi_send_form');
fdata.append('nnc', grondi.nnc);
fdata.append('form', frm.parents('.popup').find('.popup__title-h5').text());
fdata.append('pathname', window.location.pathname);
frm.find('.form-result-text').text('').addClass('hide');
if(!validateForm(f)) return;
frm.find('[type="submit"]').attr('disabled', true);
$.post({
url: grondi.ajx,
data: fdata,
processData: false,
contentType: false,
cache: false,
dataType: 'json'
}).done(function (d){
if(d.error) frm.find('.form-result-text').text(d.message).removeClass('hide');
else {
f.reset();
$('.popup').addClass('hide');
$('.thanks-popup').removeClass('hide');
}}).fail(function (){
frm.find('.form-result-text').text('error').removeClass('hide');
}).always(function (){
frm.find('[type="submit"]').attr('disabled', false);
});
});
$('.banner__form').submit(function (e){
e.preventDefault();
var f=this;
var frm=$(this);
var fdata=new FormData(f);
fdata.append('action', 'grondi_send_form');
fdata.append('nnc', grondi.nnc);
fdata.append('form', frm.parents('.banner-with-form').find('.banner-with-form__title').text());
fdata.append('pathname', window.location.pathname);
frm.find('.form-result-text').text('').addClass('hide');
if(!validateForm(f)) return;
frm.find('[type="submit"]').attr('disabled', true);
$.post({
url: grondi.ajx,
data: fdata,
processData: false,
contentType: false,
cache: false,
dataType: 'json'
}).done(function (d){
$('.thanks-section').addClass('open');
$('.thanks-section .thanks-popup').removeClass('hide');
if(d.error) frm.find('.form-result-text').text(d.message).removeClass('hide');
else {
f.reset();
}}).fail(function (){
frm.find('.form-result-text').text('error').removeClass('hide');
}).always(function (){
frm.find('[type="submit"]').attr('disabled', false);
});
});
$('.thanks-section a').on('click', function(){
$('.thanks-section').removeClass('open');
$('.thanks-section .thanks-popup').addClass('hide');
})
$('.section-form__form-feedback').submit(function (e){
e.preventDefault();
var f=this;
var frm=$(this);
var fdata=new FormData(f);
fdata.append('action', 'grondi_send_form');
fdata.append('nnc', grondi.nnc);
fdata.append('form', 'Контактная форма');
frm.find('.form-result-text').text('').addClass('hide');
if(!validateFormContacts()) return;
frm.find('[type="submit"]').attr('disabled', true);
$.post({
url: grondi.ajx,
data: fdata,
processData: false,
contentType: false,
cache: false,
dataType: 'json'
}).done(function (d){
if(d.error) frm.find('.form-result-text').text(d.message).removeClass('hide');
else {
f.reset();
openPopup();
$('.thanks-popup').removeClass('hide');
}}).fail(function (){
frm.find('.form-result-text').text('error').removeClass('hide');
}).always(function (){
frm.find('[type="submit"]').attr('disabled', false);
});
});
$('.footer__form').submit(function (e){
e.preventDefault();
var f=this;
var frm=$(this);
var fdata=new FormData(f);
fdata.append('action', 'grondi_send_pres');
fdata.append('nnc', grondi.nnc);
frm.find('[type="submit"]').attr('disabled', true);
$.post({
url: grondi.ajx,
data: fdata,
processData: false,
contentType: false,
cache: false,
dataType: 'json'
}).done(function (d){
if(d.error) alert(d.message);
else {
f.reset();
openPopup();
var titleText=$('.thanks-popup .popup__title-h5').text();
titleText=titleText.replace('мы получили Вашу заявку', 'презентации отправлены');
$('.thanks-popup .popup__title-h5').html(titleText);
$('.thanks-popup__text').text('Письмо отправлено на Ваш email. На всякий случай проверьте папку "Спам".');
$('.thanks-popup').removeClass('hide');
}}).fail(function (){
alert('error');
}).always(function (){
frm.find('[type="submit"]').attr('disabled', false);
});
});
});
(function (){
var box=document.querySelector('.section-project-info__content');
if(!box) return;
var content=box.querySelector('.section-project-info__content-wrap');
if(!content) return;
var on=false, ticking=false;
function update(){
ticking=false;
var top=content.getBoundingClientRect().top;
var next=on ? top < 160:top < 100;
if(next!==on){
on=next;
box.classList.toggle('is-wide', on);
}}
window.addEventListener('scroll', function (){
if(!ticking){ ticking=true; requestAnimationFrame(update); }}, { passive: true });
update();
})();
(function (){
var el=document.getElementById('bodymovin-12');
if(!el||typeof bodymovin==='undefined') return;
var data={"v":"5.7.4","fr":60,"ip":0,"op":60,"w":512,"h":512,"nm":"AI agents & chatbots","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"spark-big","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":1,"k":[{"t":0,"s":[0],"i":{"x":[0.5],"y":[1]},"o":{"x":[0.5],"y":[0]}},{"t":60,"s":[90]}]},"p":{"a":0,"k":[430,98,0]},"a":{"a":0,"k":[430,98,0]},"s":{"a":1,"k":[{"t":0,"s":[100,100,100],"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]}},{"t":30,"s":[70,70,100],"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]}},{"t":60,"s":[100,100,100]}]}},"ao":0,"shapes":[{"ty":"gr","nm":"spark","it":[{"ty":"sh","ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[430,64],[439,89],[464,98],[439,107],[430,132],[421,107],[396,98],[421,89]],"c":true}}},{"ty":"fl","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"r":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"spark-small","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[466,168,0]},"a":{"a":0,"k":[466,168,0]},"s":{"a":1,"k":[{"t":0,"s":[60,60,100],"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]}},{"t":30,"s":[110,110,100],"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]}},{"t":60,"s":[60,60,100]}]}},"ao":0,"shapes":[{"ty":"gr","nm":"spark2","it":[{"ty":"sh","ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[466,151],[471,163],[483,168],[471,173],[466,185],[461,173],[449,168],[461,163]],"c":true}}},{"ty":"fl","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"r":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"eyes","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[244,254,0]},"a":{"a":0,"k":[244,254,0]},"s":{"a":1,"k":[{"t":0,"s":[100,100,100],"i":{"x":[0.4,0.4,0.4],"y":[1,1,1]},"o":{"x":[0.6,0.6,0.6],"y":[0,0,0]}},{"t":36,"s":[100,100,100],"i":{"x":[0.4,0.4,0.4],"y":[1,1,1]},"o":{"x":[0.6,0.6,0.6],"y":[0,0,0]}},{"t":41,"s":[100,12,100],"i":{"x":[0.4,0.4,0.4],"y":[1,1,1]},"o":{"x":[0.6,0.6,0.6],"y":[0,0,0]}},{"t":46,"s":[100,100,100],"i":{"x":[0.4,0.4,0.4],"y":[1,1,1]},"o":{"x":[0.6,0.6,0.6],"y":[0,0,0]}},{"t":60,"s":[100,100,100]}]}},"ao":0,"shapes":[{"ty":"gr","nm":"eye-l","it":[{"ty":"el","p":{"a":0,"k":[206,254]},"s":{"a":0,"k":[30,30]},"d":1},{"ty":"fl","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"r":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"eye-r","it":[{"ty":"el","p":{"a":0,"k":[282,254]},"s":{"a":0,"k":[30,30]},"d":1},{"ty":"fl","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"r":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}],"ip":0,"op":60,"st":0,"bm":0,"parent":6},{"ddd":0,"ind":4,"ty":4,"nm":"antenna","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":1,"k":[{"t":0,"s":[0],"i":{"x":[0.5],"y":[1]},"o":{"x":[0.5],"y":[0]}},{"t":15,"s":[-12],"i":{"x":[0.5],"y":[1]},"o":{"x":[0.5],"y":[0]}},{"t":45,"s":[12],"i":{"x":[0.5],"y":[1]},"o":{"x":[0.5],"y":[0]}},{"t":60,"s":[0]}]},"p":{"a":0,"k":[244,202,0]},"a":{"a":0,"k":[244,202,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","nm":"stem","it":[{"ty":"sh","ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[244,202],[244,170]],"c":false}}},{"ty":"st","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":12},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"ball","it":[{"ty":"el","p":{"a":0,"k":[244,158]},"s":{"a":0,"k":[22,22]},"d":1},{"ty":"fl","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"r":1},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}],"ip":0,"op":60,"st":0,"bm":0,"parent":6},{"ddd":0,"ind":5,"ty":4,"nm":"head","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[256,256,0]},"a":{"a":0,"k":[256,256,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","nm":"face","it":[{"ty":"rc","p":{"a":0,"k":[244,256]},"s":{"a":0,"k":[168,108]},"r":{"a":0,"k":34},"d":1},{"ty":"st","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":12},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"ear-l","it":[{"ty":"sh","ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[152,242],[152,272]],"c":false}}},{"ty":"st","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":12},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"gr","nm":"ear-r","it":[{"ty":"sh","ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[336,242],[336,272]],"c":false}}},{"ty":"st","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":12},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}],"ip":0,"op":60,"st":0,"bm":0,"parent":6},{"ddd":0,"ind":6,"ty":4,"nm":"bubble","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":1,"k":[{"t":0,"s":[0],"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]}},{"t":30,"s":[-3],"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]}},{"t":60,"s":[0]}]},"p":{"a":0,"k":[256,256,0]},"a":{"a":0,"k":[256,256,0]},"s":{"a":1,"k":[{"t":0,"s":[100,100,100],"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]}},{"t":30,"s":[104,104,100],"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]}},{"t":60,"s":[100,100,100]}]}},"ao":0,"shapes":[{"ty":"gr","nm":"bubble","it":[{"ty":"sh","ks":{"a":0,"k":{"i":[[-25.4058,0],[0,0],[0,-25.4058],[0,0],[25.4058,0],[0,0],[0,0],[0,0],[0,0],[0,25.4058],[0,0]],"o":[[0,0],[25.4058,0],[0,0],[0,25.4058],[0,0],[0,0],[0,0],[0,0],[-25.4058,0],[0,0],[0,-25.4058]],"v":[[142,124],[346,124],[392,170],[392,304],[346,350],[204,350],[126,414],[154,350],[142,350],[96,304],[96,170]],"c":true}}},{"ty":"st","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":12},"lc":2,"lj":2,"ml":4},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]}],"ip":0,"op":60,"st":0,"bm":0}]};
var anim=bodymovin.loadAnimation({
container: el,
renderer: 'svg',
loop: true,
autoplay: false,
animationData: data
});
var card=el.closest('.section-services__list-services-item')||el.parentElement;
card.addEventListener('mouseenter', function (){ anim.play(); });
card.addEventListener('mouseleave', function (){ anim.stop(); });
window.addEventListener('scroll', function (){
if(innerWidth < 650){
var elem=document.elementFromPoint(document.documentElement.clientWidth / 2, document.documentElement.clientHeight / 2);
if(elem&&(elem===card||card.contains(elem))){ anim.play(); }else{ anim.stop(); }}
});
})();