// mobilni meni if ($("#nav-menu-box").length) { jQuery(document).ready(function () { jQuery('#nav-menu').meanmenu({ meanMenuContainer: '#nav-menu-box', meanRevealPosition: "right", meanScreenWidth: "1080", }); }); } // jezici meni if ($("#change-lang").length) { jQuery(document).ready(function () { jQuery('#change-lang').click(function () { jQuery('#menu-lang').toggle(); return false; }); jQuery('#menu-lang').mouseleave(function () { jQuery('#menu-lang').toggle(); return false; }); }); } // carousel testimonials if ($("#swiper-testimonials").length) { jQuery(document).ready(function () { jQuery('#swiper-testimonials-next, #swiper-testimonials-prev').click(function () { jQuery('#swiper-testimonials-next, #swiper-testimonials-prev').hide(); jQuery('#swiper-testimonials-next, #swiper-testimonials-prev').fadeIn('slow'); return false; }); var swiper = new Swiper('#swiper-testimonials', { slidesPerView: 1, spaceBetween: 20, loop: true, nextButton: '#swiper-testimonials-next', prevButton: '#swiper-testimonials-prev', breakpoints: { 1024: { slidesPerView: 1, spaceBetween: 40 }, 852: { slidesPerView: 1, spaceBetween: 30 }, 480: { slidesPerView: 1, spaceBetween: 10 } } }); }); } // accordion if ($(".accordion-open").length) { jQuery(document).ready(function() { $(".accordion-content").hide(); $(".accordion-open").click(function() { if($(this).next("div").is(":visible")){ $(".accordion-open .accordion-icon").removeClass('icon-down-open-mini'); $(".accordion-open .accordion-icon").addClass('icon-up-open-mini'); $(this).next("div").slideUp(); } else { $(".accordion-content").slideUp(); $(this).next("div").slideToggle(); $(".accordion-open .accordion-icon").removeClass('icon-up-open-mini'); $(".accordion-open .accordion-icon").addClass('icon-down-open-mini'); $(this).find(".accordion-icon").removeClass('icon-down-open-mini'); $(this).find(".accordion-icon").addClass('icon-up-open-mini'); } }); }); } // tabovi if ($("#tab-box").length) { jQuery(document).ready(function(){ if ($(window).width() > 1080) { $('.destinations-list').css('column-count', '4'); } else if ($(window).width() <= 1080 && $(window).width() > 500) { $('.destinations-list').css('column-count', '3'); } else if ($(window).width() <= 500) { $('.destinations-list').css('column-count', '1'); } $('#tab-box > div').hide(); $('#tab-box > div:first').show(); $('#tab-nav li:first').addClass('active'); $('#tab-nav li a').click(function(){ $('#tab-nav li').removeClass('active'); $(this).parent().addClass('active'); var currentTab = $(this).attr('href'); $('#tab-box > div').hide(); $(currentTab).show(); return false; }); }); } // pop up slike if ($(".popup-image").length) { jQuery(document).ready(function() { $('.popup-image').magnificPopup({ type: 'image', closeOnContentClick: true, mainClass: 'mfp-img-mobile' }); }); } // pop up galerije if ($(".popup-gallery").length) { $('.popup-gallery').each(function() { $(this).magnificPopup({ delegate: 'a', type: 'image', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] } }); }); } // pop up video if ($(".popup-youtube").length) { jQuery(document).ready(function() { $('.popup-youtube').magnificPopup({ disableOn: 700, type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false }); }); } // google maps function initialize() { var Boja = [ { featureType: "all", stylers: [ { "hue": "#0066ff" } ] } ]; var myLatlng = new google.maps.LatLng(43.962179, 15.422831); var mapOptions = { zoom: 15, center: myLatlng, scrollwheel: false, gestureHandling: 'cooperative', styles: Boja }; var map = new google.maps.Map(document.getElementById('contact-map'), mapOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map, icon: '/images/map-marker.png' }); } if ($("#contact-map").length) { google.maps.event.addDomListener(window, 'load', initialize); }