const brifParent = document.querySelector('.brife__wrapper')
let brifeLeft = document.querySelector('.brife__left')
brifParent.addEventListener('input', e => {
const target = e.target;
if (target.classList.contains('input-info')) {
let rightInput = target.getAttribute('data-name');
if (rightInput === brifeLeft.querySelector(['[data-name=' + rightInput + '']).getAttribute('data-name')) {
brifeLeft.querySelector(['[data-name=' + rightInput + '']).textContent = target.value
}
}
})
let preloadImg = document.querySelectorAll('.pr-bub');
let arrayBub = Array.from(preloadImg)
let reverseArray = arrayBub.reverse();
function setClassBub() {
reverseArray.forEach((bub, index) => {
setTimeout(() => {
bub.classList.add('animationPreBub')
if (index === (reverseArray.length - 1)) {
setTimeout(() => {
reverseArray.forEach((item) => {
item.classList.remove('animationPreBub')
})
}, 200)
setClassBub();
}
}, 300 * (index + 1))
})
}
setClassBub();
if(itemindex === sectionindex) {
const height = section.getBoundingClientRect().top + window.pageYOffset - 78;
window.scrollTo({top: height, behavior: 'smooth'});
}