if(itemindex === sectionindex) {
const height = section.getBoundingClientRect().top + window.pageYOffset - 78;
window.scrollTo({top: height, behavior: 'smooth'});
}
let preloader = document.querySelector('.preloader')
let preh = document.querySelector('.preh1')
let onload = false
let animation = false
if(preloader) {
preh.addEventListener('animationend', () => {
animation = true
endPreloader()
})
window.onload = function () {
onload = true
endPreloader()
}
}
function endPreloader() {
if(onload && animation) {
preh.classList.add('hidden')
preloader.classList.add('disabled');
setTimeout(() => { preloader.hidden = true;}, 3000)
window.setTimeout(function () { dropItem(); }, 1000);
}
}