(()=>{var i=document.querySelector("body"),l=document.querySelector("#cs-navigation"),a=document.querySelector("#cs-navigation .cs-toggle");a.addEventListener("click",function(){a.classList.toggle("cs-active"),l.classList.toggle("cs-active"),i.classList.toggle("cs-open"),d()});function d(){let e=document.querySelector("#cs-expanded");e.getAttribute("aria-expanded")==="false"?e.setAttribute("aria-expanded","true"):e.setAttribute("aria-expanded","false")}var p=Array.from(document.querySelectorAll("#cs-navigation .cs-dropdown"));for(let e of p){let t=()=>{e.classList.toggle("cs-active")};e.addEventListener("click",t)}mapboxgl.accessToken="pk.eyJ1IjoiY3Jvc2V2ZW4iLCJhIjoiY2x6MXIwbnNsMnlmMzJrcXZoMTNha2dzYiJ9.It3ga_ZVbwNBPXDFLVC90A";var o=new mapboxgl.Map({container:"map",style:"mapbox://styles/croseven/clyrmp49x000201pc3v9wabp9",center:[18.000469066693594,44.4248959793664],zoom:15,attributionControl:!1});o.on("load",function(){document.querySelector(".mapboxgl-ctrl-logo").style.display="none",o.addSource("markers",{type:"geojson",data:{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[18.00120703634586,44.4260728463239]},properties:{description:"VMDS",icon:"mapbox-boot"}},{type:"Feature",geometry:{type:"Point",coordinates:[18.000469066693594,44.4248959793664]},properties:{description:"VMDS Parking",icon:"parking"}}]}}),o.addLayer({id:"markers",type:"symbol",source:"markers",layout:{"icon-image":["get","icon"],"icon-size":1,"text-field":["get","description"],"text-font":["DIN Offc Pro Medium","Arial Unicode MS Bold"],"text-size":14,"text-offset":[0,.8],"text-anchor":"top"},paint:{"text-color":"#d7d7d7"}}),o.on("click","markers",function(e){let t=e.features[0].geometry.coordinates.slice(),n=e.features[0].properties.description,s=`https://www.google.com/maps?q=${t[1]},${t[0]}`,r=`https://maps.apple.com/?ll=${t[1]},${t[0]}`;new mapboxgl.Popup().setLngLat(t).setHTML(`
                    <div style="font-family: Arial, sans-serif; font-size: 14px; color: #333;">
                        <a href="${s}" target="_blank" style="color: #007bff; text-decoration: none;">Otvori Google Maps</a><br>
                    </div>
                `).addTo(o)}),o.on("mouseenter","markers",function(){o.getCanvas().style.cursor="pointer"}),o.on("mouseleave","markers",function(){o.getCanvas().style.cursor=""})});function c(e,t){let r=document.querySelector(e).getBoundingClientRect().top+window.pageYOffset-t;window.scrollTo({top:r,behavior:"smooth"})}document.querySelectorAll(".cs-li-link").forEach(e=>{e.addEventListener("click",function(t){t.preventDefault();let n=this.getAttribute("href");document.getElementById("cs-navigation").classList.remove("cs-active"),document.querySelector(".cs-toggle").classList.remove("cs-active"),c(n,185)})});document.querySelectorAll(".cs-link").forEach(e=>{e.addEventListener("click",function(t){t.preventDefault();let n=this.getAttribute("href");c(n,185)})});document.querySelectorAll(".button-program").forEach(e=>{e.addEventListener("click",function(t){t.preventDefault();let n=this.getAttribute("href");c(n,185)})});})();
