//TOOLTIP 8
document.addEventListener('mousemove', function(event) {
var x = event.clientX;
var y = event.clientY;
if (x > window.innerWidth * 0.43 && x < window.innerWidth * 0.47 &&
y > window.innerHeight * 0.10 && y < window.innerHeight * 0.12) {
showTooltip('tooltip8', x, y, 'Саша Станковић');
} else {
hideTooltip('tooltip8');
}
});
var slideIndex8 = 1;
showSlides8(slideIndex8);
function openModal8() {
var modal = document.getElementById("myModal8");
modal.style.display = "block";
modal.classList.add("fade");
}
function closeModal8() {
var modal = document.getElementById("myModal8");
var modalAudio = document.getElementById("modalAudio8");
modal.style.display = "none";
modalAudio.pause();
}
function plusSlides8(n) {
showSlides8(slideIndex8 += n);
}
function currentSlide8(n) {
showSlides8(slideIndex8 = n);
}
function showSlides8(n) {
var i;
var slides = document.getElementsByClassName("mySlides8");
var modal = document.getElementById("myModal8");
var modalAudio = document.getElementById("modalAudio8");
var modalImages = document.querySelectorAll('.mySlides img');
modalImages.forEach(function(img) {
img.style.width = '100%';
img.style.height = '100%';
img.style.objectFit = 'contain';
});
if (n > slides.length) {
slideIndex8 = 1;
}
if (n < 1) {
slideIndex8 = slides.length;
}
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
slides[slideIndex8 - 1].style.display = "block";
modalAudio.load();
}
document.addEventListener('click', function(event) {
var x = event.clientX;
var y = event.clientY;
if (x > window.innerWidth * 0.43 && x < window.innerWidth * 0.47 &&
y > window.innerHeight * 0.10 && y < window.innerHeight * 0.12) {
openModal8();
}
});