U cenu je uračunat PDV. Cene možemo menjati bez prethodne najave. Svi artikli koji su prikazani na sajtu su informativnog karaktera. Za više informacija o artiklu, molimo da nas kontaktirate.
Tuš kada 90×70 model Toskana Lux predstavlja pouzdano i estetsko rešenje za savremena kupatila. Ova Zomar tuš kada dizajnirana je tako da se lako uklopi u gotovo sva kupatila, zahvaljujući praktičnim dimenzijama i univerzalnom obliku.
Kvadratna tuš kada 90×70 izrađena je od kvalitetnog belog sanitarnog akrila, koji obezbeđuje dugotrajnost, otpornost i jednostavno održavanje. Kao Zomar tuš kada, model Toskana Lux pruža stabilnost i sigurnost u svakodnevnoj upotrebi, uz moderan i čist izgled.
Tuš kada Toskana Lux opremljena je sifonom prečnika 50 mm, što omogućava efikasno oticanje vode. Dimenzija kade može odstupati za ±2%, čime se olakšava prilagođavanje prilikom montaže. Zahvaljujući svom dizajnu, ova Zomar tuš kada idealna je za klasična i moderna kupatila.
Ako tražite kvalitetnu tuš kadu 90×70, pouzdanu Zomar tuš kadu ili moderan model kao što je tuš kada Toskana Lux, ovaj proizvod predstavlja praktičan i dugotrajan izbor.
document.addEventListener("DOMContentLoaded", function () {
const url = window.location.href;
// bojleri
if (url.includes("/kategorija/bojleri/")) {
document.querySelectorAll(".product_cat-delovi-za-bojler")
.forEach(el => el.style.display = "none");
}
// kade i tus kabine
if (url.includes("/kategorija/kade-i-tus-kabine/")) {
document.querySelectorAll(".product_cat-dodatna-oprema-i-rezervni-delovi")
.forEach(el => el.style.display = "none");
}
// vodokotlici
if (url.includes("/kategorija/vodokotlici/")) {
document.querySelectorAll(".product_cat-delovi-i-oprema")
.forEach(el => el.style.display = "none");
}
// sudopera
if (url.includes("/kategorija/sudopera/")) {
document.querySelectorAll(".product_cat-dodatna-oprema-sudopera")
.forEach(el => el.style.display = "none");
}
});
document.querySelectorAll('.product_cat-plocice .related.products .heading-h2').forEach(element => {
element.textContent = 'Uz ovaj artikal ljudi najčešće kupuju:';
});
document.addEventListener("DOMContentLoaded", function () {
if (window.location.pathname === "/akcija/") {
document.querySelectorAll(".entry-title").forEach(function (el) {
el.style.setProperty("margin-bottom", "0", "important");
});
}
});
const SLIDE_INTERVAL = 7000;
const track = document.querySelector(".slider-track");
const slides = Array.from(document.querySelectorAll(".slide"));
const nextBtn = document.querySelector(".next-btn");
const prevBtn = document.querySelector(".prev-btn");
const dotsContainer = document.querySelector(".slider-dots");
const sliderContainer = document.querySelector(".slider-container");
let index = 0;
let autoSlideInterval;
/* ================= DOTS INIT ================= */
slides.forEach((_, i) => {
const dot = document.createElement("button");
dot.classList.add("dot");
dot.dataset.index = i;
dot.addEventListener("click", () => {
index = i;
updateSlider();
restartAutoSlide();
});
dotsContainer.appendChild(dot);
});
/* ================= SLIDER CORE ================= */
function updateSlider() {
// pomeranje slajdera
track.style.transform = `translateX(-${index * sliderContainer.clientWidth}px)`;
// aktivni slajd
slides.forEach(slide => slide.classList.remove("active"));
slides[index].classList.add("active");
const dots = document.querySelectorAll(".dot");
dots.forEach(dot => dot.classList.remove("active", "visible"));
// aktivna tacka
dots[index].classList.add("active");
// MOBILE: uvek 3 tacke
if (window.innerWidth <= 768) {
const prev = (index - 1 + dots.length) % dots.length;
const next = (index + 1) % dots.length;
dots[prev].classList.add("visible");
dots[index].classList.add("visible");
dots[next].classList.add("visible");
}
// DESKTOP: sve tacke
else {
dots.forEach(dot => dot.classList.add("visible"));
}
}
function nextSlide() {
index = (index + 1) % slides.length;
updateSlider();
}
function prevSlide() {
index = (index - 1 + slides.length) % slides.length;
updateSlider();
}
/* ================= AUTOPLAY ================= */
function startAutoSlide() {
autoSlideInterval = setInterval(nextSlide, SLIDE_INTERVAL);
}
function stopAutoSlide() {
clearInterval(autoSlideInterval);
}
function restartAutoSlide() {
stopAutoSlide();
startAutoSlide();
}
/* ================= EVENTS ================= */
nextBtn.addEventListener("click", () => {
nextSlide();
restartAutoSlide();
});
prevBtn.addEventListener("click", () => {
prevSlide();
restartAutoSlide();
});
sliderContainer.addEventListener("mouseenter", stopAutoSlide);
sliderContainer.addEventListener("mouseleave", startAutoSlide);
sliderContainer.addEventListener("touchstart", stopAutoSlide);
sliderContainer.addEventListener("touchend", startAutoSlide);
window.addEventListener("resize", updateSlider);
/* ================= INIT ================= */
updateSlider();
startAutoSlide();
document.getElementById('godinaFuter').textContent = new Date().getFullYear();
(function () {
if (window.location.href !== 'https://dimtrade.rs/demo2-slide/') return;
var css = `
.header-widget-region,
#masthead,
.topbar-wrapper{
display: none !important;
}
`;
var style = document.createElement('style');
style.id = 'hide-dimtrade-demo-home-elements';
style.appendChild(document.createTextNode(css));
document.head.appendChild(style);
})();
(function () {
const BTN_CLASS = 'custom-close-btn-in-zoom';
const ROOT_SELECTOR = '.pswp'; // glavni PhotoSwipe overlay
function injectInto(zoomWrap) {
if (!zoomWrap || zoomWrap.querySelector('.' + BTN_CLASS)) return;
// obezbedi da parent podržava apsolutno pozicioniranje
const cs = getComputedStyle(zoomWrap);
if (cs.position === 'static') zoomWrap.style.position = 'relative';
zoomWrap.style.overflow = 'visible';
const btn = document.createElement('button');
btn.className = BTN_CLASS;
btn.type = 'button';
btn.setAttribute('aria-label', 'Zatvori (Esc)');
btn.textContent = '×';
// stilovi za izgled i centriranje
Object.assign(btn.style, {
position: 'absolute',
top: '10px',
right: '10px',
zIndex: '99999',
background: 'rgba(0,0,0,0.6)',
color: '#fff',
border: 'none',
borderRadius: '50%',
width: '32px',
height: '32px',
fontSize: '20px',
cursor: 'pointer',
boxShadow: '0 2px 8px rgba(0,0,0,0.3)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
transition: 'background 0.2s ease',
paddingBottom: '2.5px'
});
// efekat hover-a
btn.addEventListener('mouseenter', () => {
btn.style.background = 'rgba(0,0,0,0.8)';
});
btn.addEventListener('mouseleave', () => {
btn.style.background = 'rgba(0,0,0,0.6)';
});
// klik na custom dugme zatvara PhotoSwipe
btn.addEventListener('click', () => {
const nativeClose = document.querySelector('.pswp__button--close');
if (nativeClose) {
nativeClose.click();
} else {
const root = zoomWrap.closest(ROOT_SELECTOR);
if (root) root.style.display = 'none';
}
});
// dodaj dugme u .pswp__zoom-wrap
zoomWrap.appendChild(btn);
}
// odmah dodaj ako PhotoSwipe već postoji
document.querySelectorAll('.pswp__zoom-wrap').forEach(injectInto);
// prati pojavu novih elemenata (PhotoSwipe često menja DOM)
const root = document.querySelector(ROOT_SELECTOR) || document.body;
const obs = new MutationObserver((muts) => {
for (const m of muts) {
m.addedNodes.forEach((n) => {
if (!(n instanceof Element)) return;
if (n.matches && n.matches('.pswp__zoom-wrap')) injectInto(n);
n.querySelectorAll && n.querySelectorAll('.pswp__zoom-wrap').forEach(injectInto);
});
}
});
obs.observe(root, { childList: true, subtree: true });
})();
let bdiElements = document.querySelectorAll('.product_cat-plocice bdi');
bdiElements.forEach(bdi => {
if(document.body.classList.contains('postid-1963764')) {
let dodatak = document.createElement('span');
dodatak.textContent = ' /kom';
bdi.appendChild(dodatak);
} else {
let dodatak = document.createElement('span');
dodatak.textContent = ' /m²';
dodatak.style.textTransform = 'lowercase';
bdi.appendChild(dodatak);
}
});
let cenaElements = document.querySelectorAll('.product_cat-plocice .woocommerce-product-gallery');
cenaElements.forEach(cena => {
let dodatakCene = document.createElement('span');
dodatakCene.textContent = 'Napomena: Slike proizvoda služe kao ilustracija i mogu odstupati od stvarnog izgleda proizvoda zbog razlika u osvetljenju prilikom fotografisanja. Boje i nijanse pločica prikazane na grafičkom sadržaju mogu varirati u odnosu na realan izgled uživo. Preporučujemo da za tačan uvid u boju i teksturu posetite naš prodajni salon ili zatražite fizički uzorak.';
dodatakCene.style.fontSize = '14px'
dodatakCene.style.fontStyle = 'italic'
dodatakCene.style.order = '10'
cena.appendChild(dodatakCene);
});
// 1. Napravi novi
element
const noviP = document.createElement('p');
noviP.id = 'napomenaFuter';
noviP.innerHTML = 'Napomena: Zbog velikog broja proizvoda na sajtu, mogući su povremeni propusti u prikazu cena, opisa, slika i šifri artikala. Prikazane fotografije i grafike služe isključivo kao ilustracija i ne garantuju potpunu tačnost. Takođe, u retkim slučajevima može se desiti da neki proizvodi trenutno nisu dostupni. Cene su izražene u dinarima i mogu se razlikovati od maloprodajnih. Sve informacije vezane za proizvode možete dobiti na broj telefona 062 80 70 600. Hvala na razumevanju.';
// 2. Napravi wrapper
const napomenaWrapper = document.createElement('div');
napomenaWrapper.id = 'napomenaFuterWrapper'; // opciono, možeš da menjaš ili obrišeš
napomenaWrapper.style.backgroundColor = 'napomenaWrapper';
// 3. Ubaci
u taj
napomenaWrapper.appendChild(noviP);
// 4. Dohvati element sa klasom .copyright
const copyrightEl = document.querySelector('.copyright');
if (copyrightEl) {
// 5. Dohvati roditelja tog elementa
const roditelj = copyrightEl.parentNode;
// 6. Ubaci novi
(sa
unutra) pre .copyright
roditelj.insertBefore(napomenaWrapper, copyrightEl);
}
document.addEventListener("DOMContentLoaded", function () {
const target = document.querySelector("footer.copyright");
if (target) {
const p = document.createElement("p");
p.style.display = "flex";
p.style.gap = "5px";
p.style.flexWrap = "wrap";
p.style.setProperty("padding", "2.617924em 20px", "important");
p.style.maxWidth = 'calc(1440px + 40px)';
p.style.margin = 'auto';
if (window.innerWidth < 991) {
p.style.padding = "1rem";
}
const images = [
{ src: "https://dimtrade.rs/wp-content/uploads/2025/06/Visa-Brandmark-Blue-White-1-e1727710007234-1.png", alt: "Visa" },
{ src: "https://dimtrade.rs/wp-content/uploads/2025/06/DinaCard-novi-znak.jpg", alt: "Dina Card" },
{ src: "https://dimtrade.rs/wp-content/uploads/2025/06/Logotip-American-Express.png.webp", alt: "American Express" },
{ src: "https://dimtrade.rs/wp-content/uploads/2025/06/mc-acc-opt-70-1x.png.webp", alt: "Master Card" },
{ src: "https://dimtrade.rs/wp-content/uploads/2025/06/ms-acc-opt-70-1x.png.webp", alt: "Maestro" },
{ src: "https://dimtrade.rs/wp-content/uploads/2025/06/banca-intesa-color-2.png", alt: "Banca Intesa", link: "https://www.bancaintesa.rs/" },
{ src: "https://dimtrade.rs/wp-content/uploads/2025/06/mc-idcheck-hrz-rgb-rev.png", alt: "Id check", link: "https://www.mastercard.rs/sr-rs/korisnici/pronadite-karticu.html", background: "#000" },
{ src: "https://dimtrade.rs/wp-content/uploads/2025/06/visa-secure-blu-72dpi.jpg", alt: "Visa Secure", link: "https://rs.visa.com/pay-with-visa/security-and-assistance/protected-everywhere.html" }
];
images.forEach(imgData => {
const img = document.createElement("img");
img.src = imgData.src;
img.alt = imgData.alt;
img.style.maxHeight = "30px";
img.style.height = "auto";
if (imgData.background) {
img.style.backgroundColor = imgData.background;
}
if (imgData.link) {
const a = document.createElement("a");
a.href = imgData.link;
a.target = "_blank";
a.rel = "noopener noreferrer";
a.appendChild(img);
p.appendChild(a);
} else {
p.appendChild(img);
}
});
target.appendChild(p);
}
});
// 8. Login forma: ćirilica → latinica
const loginForm = document.querySelector('.woocommerce-form.woocommerce-form-login');
if (loginForm) {
const usernameLabel = loginForm.querySelector('label[for="username"]');
const passwordLabel = loginForm.querySelector('label[for="password"]');
const rememberMe = loginForm.querySelector('.woocommerce-form-login__rememberme span');
const submitButton = loginForm.querySelector('button[name="login"]');
const lostPassword = loginForm.querySelector('.woocommerce-LostPassword a');
const screenReaderTexts = loginForm.querySelectorAll('.screen-reader-text');
if (usernameLabel && usernameLabel.textContent.includes("Корисничко име")) {
usernameLabel.childNodes[0].textContent = "Korisničko ime ili adresa e-pošte ";
}
if (passwordLabel && passwordLabel.textContent.includes("Лозинка")) {
passwordLabel.childNodes[0].textContent = "Lozinka ";
}
screenReaderTexts.forEach(function (el) {
if (el.textContent.trim() === "Обавезно") {
el.textContent = "Obavezno";
}
});
if (rememberMe && rememberMe.textContent.trim() === "Запамти ме") {
rememberMe.textContent = "Zapamti me";
}
if (submitButton && submitButton.textContent.trim() === "Улогујте се") {
submitButton.textContent = "Prijavi se";
}
if (lostPassword && lostPassword.textContent.trim() === "Заборавили сте лозинку?") {
lostPassword.textContent = "Zaboravili ste lozinku?";
}
if (
usernameLabel && usernameLabel.textContent.includes("Korisničko ime") &&
passwordLabel && passwordLabel.textContent.includes("Lozinka") &&
rememberMe && rememberMe.textContent.includes("Zapamti me") &&
submitButton && submitButton.textContent.includes("Prijavi se") &&
lostPassword && lostPassword.textContent.includes("Zaboravili ste lozinku?")
) {
translated8 = true;
}
}
document.addEventListener("DOMContentLoaded", function () {
const buttons = document.querySelectorAll('.button.product_type_simple');
if (buttons.length > 0) {
buttons.forEach(function(button) {
if (button.textContent.trim() === 'Pročitajte još') {
button.textContent = 'Detaljnije';
}
});
}
});
document.addEventListener('DOMContentLoaded', function() {
const rows = document.querySelectorAll(".woocommerce-product-attributes.shop_attributes tr");
rows.forEach((row) => {
const labelCell = row.querySelector("th");
if (labelCell && labelCell.textContent.trim().toLowerCase().includes("brend")) {
row.style.display = "none";
}
});
let rsd = document.getElementsByClassName('woocommerce-Price-currencySymbol')
if(rsd){
for(let i = 0; i < rsd.length; i++){
rsd[i].textContent = 'RSD'
}}
let rsd2 = document.getElementsByClassName('woocommerce-Price-currencySymbol');
if (rsd2.length > 0) {
for (let i = 0; i < rsd2.length; i++) {
rsd2[i].textContent = 'RSD';
}
}
let woocommerceInfo = document.getElementsByClassName('woocommerce-info')[0]
if(woocommerceInfo){
woocommerceInfo.style.backgroundColor = 'rgba(167, 167, 167, 0.2)'
woocommerceInfo.style.color = '#999'
}
let cartDrawerHeading = document.getElementsByClassName('cart-drawer-heading')[0]
if(cartDrawerHeading){
cartDrawerHeading.textContent = 'Vaša korpa'
}
let cartClick = document.getElementsByClassName('site-header-cart')[1]
if(cartClick){
const socialIconsDiv = document.createElement('div');
socialIconsDiv.style.display = 'flex';
socialIconsDiv.style.gap = '16px';
const icons = [
{
href: 'https://www.instagram.com/dimtrade/',
imgSrc: 'https://dimtrade.rs/wp-content/uploads/2024/10/5296765-camera-instagram-instagram-logo-icon-2.png',
alt: 'Instagram'
},
{
href: 'https://www.facebook.com/dimtrade94/',
imgSrc: 'https://dimtrade.rs/wp-content/uploads/2024/10/5365678-fb-facebook-facebook-logo-icon-1.png',
alt: 'Facebook'
}
];
const ikoniceNalov = document.createElement('p')
ikoniceNalov.textContent = 'PRATITE NAS'
ikoniceNalov.style.color = '#777'
ikoniceNalov.style.fontWeight = 'bold'
ikoniceNalov.style.marginBottom = '0.7em'
ikoniceNalov.style.marginTop = '1em'
icons.forEach(icon => {
const link = document.createElement('a');
link.href = icon.href;
link.target = '_blank';
link.rel = 'noopener';
const image = document.createElement('img');
image.src = icon.imgSrc;
image.alt = icon.alt;
image.width = 25;
image.height = 25;
link.appendChild(image);
socialIconsDiv.appendChild(link);
});
let noviDivNav = document.createElement('div');
let noviDivNav2 = document.createElement('div');
const li = document.createElement('li')
const li2 = document.createElement('li')
const li3 = document.createElement('li')
// Napravimo "moj nalog" link
const mojNalog = document.createElement('a');
mojNalog.href = 'https://dimtrade.rs/moj-nalog/';
const mojNalogImage = document.createElement('img');
mojNalogImage.decoding = 'async';
mojNalogImage.className = 'alignnone size-full wp-image-15224';
mojNalogImage.style.marginBottom = '-4px';
mojNalogImage.style.marginRight = '10px';
mojNalogImage.src = 'https://dimtrade.rs/wp-content/uploads/2024/10/profil.png';
mojNalogImage.alt = '';
mojNalogImage.width = 22;
mojNalogImage.height = 22;
// Napravimo "wishlist" link
const wishlistLink = document.createElement('a');
wishlistLink.href = 'https://dimtrade.rs/lista-zelja/';
const wishlistImage = document.createElement('img');
wishlistImage.decoding = 'async';
wishlistImage.style.marginRight = '3px';
wishlistImage.style.maxWidth = '20px';
wishlistImage.style.maxHeight = '20px';
wishlistImage.style.marginBottom = '-4px';
wishlistImage.src = 'https://dimtrade.rs/wp-content/uploads/2024/12/heart-2.png';
const callLink = document.createElement('a');
callLink.style.color = 'black';
callLink.style.fontSize = '15px';
callLink.href = 'tel:062 80 70 600';
callLink.textContent = '062 80 70 600';
const naslovLink = document.createElement('p')
naslovLink.textContent = 'KONTAKT'
naslovLink.style.color = '#777'
naslovLink.style.fontWeight = 'bold'
naslovLink.style.marginBottom = '0.7em'
const emailParagraph = document.createElement('p');
emailParagraph.style.setProperty('margin-bottom', '0', 'important');
const emailLink = document.createElement('a');
emailLink.style.color = 'black';
emailLink.href = 'mailto:shop@dimtrade.rs';
const emailImage = document.createElement('img');
emailImage.src = 'https://dimtrade.rs/wp-content/uploads/2024/11/email.png';
emailImage.style.maxWidth = '15px';
emailImage.style.marginRight = '5px';
// Dodajemo sliku i tekst u email link
emailLink.appendChild(document.createTextNode(' shop@dimtrade.rs'));
// Dodajemo link u paragraf
emailParagraph.appendChild(emailLink);
// Složimo sve
wishlistLink.appendChild(wishlistImage);
mojNalog.appendChild(mojNalogImage);
noviDivNav.appendChild(mojNalog);
noviDivNav.appendChild(wishlistLink);
noviDivNav.style.lineHeight = '55px'
noviDivNav2.appendChild(naslovLink);
noviDivNav2.appendChild(emailParagraph);
noviDivNav2.appendChild(callLink);
li2.appendChild(noviDivNav2)
li.appendChild(noviDivNav)
li3.appendChild(ikoniceNalov);
li3.appendChild(socialIconsDiv)
cartClick.appendChild(li)
cartClick.appendChild(li2)
cartClick.appendChild(li3)
}
});
let shoptimizerMobileToggle = document.getElementsByClassName('shoptimizer-mobile-toggle')[0]
if(shoptimizerMobileToggle){
shoptimizerMobileToggle.innerHTML = ` Prikaži Filtere`
}
let currentIndex = 0;
const imagesContainer = document.querySelector('.carousel-images');
const totalImages = document.querySelectorAll('.carousel-images img').length;
let visibleImages = 6; // Početna vrednost za desktop
let imageWidthFix = document.querySelector('.carousel img')
if(imageWidthFix){
let imageWidth = imageWidthFix.clientWidth;
// Funkcija za podešavanje broja vidljivih slika
function updateVisibleImages() {
if (window.innerWidth <= 768) {
visibleImages = 2; // Za telefone
} else {
visibleImages = 6; // Za desktop
}
imageWidth = document.querySelector('.carousel img').clientWidth; // Ažuriranje širine slike
updateCarousel(); // Ažuriranje prikaza
updateArrows(); // Ažuriranje strelica
}
// Funkcija za pomeranje slika
function updateCarousel() {
imagesContainer.style.transform = `translateX(-${currentIndex * imageWidth}px)`;
}
// Funkcija koja ažurira stanje strelica
function updateArrows() {
// Ako je na početku, onemogućiti strelicu levo
if (currentIndex === 0) {
document.querySelector('.carousel-prev').style.display = 'none';
} else {
document.querySelector('.carousel-prev').style.display = 'block';
}
// Ako je na poslednjem, onemogućiti strelicu desno
if (currentIndex >= totalImages - visibleImages) {
document.querySelector('.carousel-next').style.display = 'none';
} else {
document.querySelector('.carousel-next').style.display = 'block';
}
}
// Dugme za pomeranje levo
document.querySelector('.carousel-prev').addEventListener('click', () => {
if (currentIndex > 0) {
currentIndex--;
} else {
currentIndex = totalImages - visibleImages; // Ako je trenutna pozicija 0, vrati na poslednje slike
}
updateCarousel();
updateArrows();
});
// Dugme za pomeranje desno
document.querySelector('.carousel-next').addEventListener('click', () => {
if (currentIndex < totalImages - visibleImages) {
currentIndex++;
} else {
currentIndex = 0; // Ako je trenutna pozicija poslednja, vrati na početak
}
updateCarousel();
updateArrows();
});
// Automatski pomeranje
setInterval(() => {
if (currentIndex < totalImages - visibleImages) {
currentIndex++;
} else {
currentIndex = 0;
}
updateCarousel();
updateArrows();
}, 3000); // Pomeranje svakih 3 sekunde
// Dodavanje osluškivača za promenu veličine ekrana
window.addEventListener('resize', updateVisibleImages);
// Inicijalizacija
updateVisibleImages();
updateArrows();
}
let triggerParent = document.getElementsByClassName('call-back-feature')[0];
if(triggerParent) {
let trigger = triggerParent.getElementsByClassName('trigger');
for(let i = 0; i < trigger.length; i++){
trigger[i].textContent = 'Imate pitanje za ovaj proizvod?'
}
}
//lightbox mob start
document.addEventListener('DOMContentLoaded', function () {
if (window.innerWidth <= 768) { // Provera za uređaje sa širinom ekrana manjom od 768px
document.querySelectorAll('.elementor-image-gallery a').forEach(function (link) {
link.removeAttribute('href'); // Uklanja link koji otvara lightbox
link.style.pointerEvents = 'none'; // Onemogućava klik na link
});
}
});
//lightbox mob end
//Sve za vase kupatilo start
document.addEventListener("DOMContentLoaded", function () {
const carousel = document.querySelector(".custom-carousel-inner");
const items = document.querySelectorAll(".custom-carousel-item");
const prevButton = document.querySelector(".custom-carousel-control-prev");
const nextButton = document.querySelector(".custom-carousel-control-next");
let currentIndex = 0;
function updateCarousel() {
if(items){
const width = items[0].clientWidth;
}
const width = items[0].clientWidth;
carousel.style.transform = `translateX(-${currentIndex * width}px)`;
}
if(prevButton){
prevButton.addEventListener("click", function () {
currentIndex = (currentIndex === 0) ? items.length - 1 : currentIndex - 1;
updateCarousel();
});
}
if(nextButton){
nextButton.addEventListener("click", function () {
currentIndex = (currentIndex === items.length - 1) ? 0 : currentIndex + 1;
updateCarousel();
});
}
window.addEventListener("resize", updateCarousel);
});
//Sve za vase kupatilo end
//korpa mobilni start
const mediaQuery = window.matchMedia('(max-width: 768px)');
if (mediaQuery.matches) {
let dugmad = document.getElementsByClassName('add_to_cart_button ');
if(dugmad){
for(let i = 0; i < dugmad.length; i++){
dugmad[i].textContent = 'Korpa'
}
}
} else {
}
//korpa mobilni end
//Padajuci meni footer start
document.querySelectorAll('.section-headerKP').forEach(header => {
header.addEventListener('click', () => {
const content = header.nextElementSibling;
const isActive = header.classList.contains('active');
// Zatvori sve ostale sekcije (opciono)
document.querySelectorAll('.section-headerKP').forEach(otherHeader => {
if (otherHeader !== header) {
otherHeader.classList.remove('active');
otherHeader.nextElementSibling.style.display = 'none';
}
});
if (isActive) {
header.classList.remove('active');
content.style.display = 'none';
document.getElementById('arrowKP').textContent = '▼'
} else {
header.classList.add('active');
content.style.display = 'block';
document.getElementById('arrowKP').textContent = '▲'
}
});
});
//Padajuci meni footer end
//Padajuci meni footer mobilni start
const sirina = window.matchMedia('(max-width: 993px)');
if (sirina.matches) {
let sectionHeaderLokacije = document.getElementsByClassName('section-header-lokacije');
for (let i = 0; i < sectionHeaderLokacije.length; i++) {
sectionHeaderLokacije[i].addEventListener('click', function() {
let menu = document.getElementsByClassName('section-content-short');
let strelica = sectionHeaderLokacije[i].getElementsByClassName('strelica')[0]; // Selektovanje strelice za trenutnu sekciju
if (menu[i].style.display === 'block') {
menu[i].style.display = 'none';
strelica.textContent = '▼';
} else {
menu[i].style.display = 'block';
strelica.textContent = '▲';
}
});
}
let sediste = document.querySelector('#text-23 span')
sediste.addEventListener('click', function(){
const menuSedista = document.getElementById('sedisteId');
if (menuSedista.style.display === 'block') {
menuSedista.style.display = 'none';
sediste.innerHTML = sediste.innerHTML.replace(/▲/g, `▼`);
} else {
menuSedista.style.display = 'block';
sediste.innerHTML = sediste.innerHTML.replace(/▼/g, `▲`);
}
})
sediste.innerHTML = sediste.innerHTML.replace(/▼/g, `▼`);
} else {
let sediste = document.querySelector('#text-23 span')
sediste.textContent = sediste.textContent.replace('▼', "");
}
let kontaktWiget = document.querySelector('#custom_html-18 span');
kontaktWiget.innerHTML = `
KONTAKT`
//Padajuci meni footer mobilni end
document.addEventListener("DOMContentLoaded", function () {
const outOfStockElements = document.querySelectorAll(".product-out-of-stock em");
outOfStockElements.forEach(function (element) {
if (element.textContent.trim() === "Out of stock") {
element.textContent = "Nema na stanju";
}
});
});
document.addEventListener("DOMContentLoaded", function () {
const textTranslations = {
"Product name": "Naziv proizvoda",
"Unit price": "Cena",
"Stock status": "Zalihe",
"Out of stock": "Nema na stanju",
"In stock": "Dostupno",
"No products added to the Lista želja": "Ni jedan proizvod nije dodat u Listu želja.",
"Share on": "Podeli",
"Checkout": "Poručivanje",
"View cart": "Pogledaj korpu",
"has been added to your": "je dodat u Vašu",
"list": "listu",
};
const elements = document.querySelectorAll("*");
elements.forEach(function (element) {
if (element.childNodes.length > 0) {
element.childNodes.forEach(function (node) {
if (node.nodeType === Node.TEXT_NODE) {
Object.keys(textTranslations).forEach(function (key) {
const regex = new RegExp(`\\b${key}\\b`, "gi");
if (node.textContent.match(regex)) {
node.textContent = node.textContent.replace(regex, textTranslations[key]);
}
});
}
});
}
});
});
document.addEventListener("DOMContentLoaded", function () {
const elements = document.querySelectorAll("*:not(script):not(style)");
elements.forEach(function (element) {
element.childNodes.forEach(function (node) {
if (node.nodeType === Node.TEXT_NODE && node.textContent.match(/wishlist/i)) {
node.textContent = node.textContent.replace(/wishlist/gi, "Lista želja");
}
});
});
});