if ($.cookie("theme_csspath")) { $('link#theme-stylesheet').attr("href", $.cookie("theme_csspath")); } if ($.cookie("theme_layout")) { $('body').addClass($.cookie("theme_layout")); } $(function () { rotatingText(); lightbox(); sliders(); menuSliding(); utils(); map(); demo(); }); /* for demo purpose only - can be deleted */ function demo() { if ($.cookie("theme_csspath")) { $('link#theme-stylesheet').attr("href", $.cookie("theme_csspath")); } $("#colour").change(function () { if ($(this).val() !== '') { var theme_csspath = 'css/style.' + $(this).val() + '.css'; $('link#theme-stylesheet').attr("href", theme_csspath); $.cookie("theme_csspath", theme_csspath, {expires: 365, path: '/'}); } return false; }); $("#layout").change(function () { if ($(this).val() !== '') { var theme_layout = $(this).val(); $('body').removeClass('wide'); $('body').removeClass('boxed'); $('body').addClass(theme_layout); $.cookie("theme_layout", theme_layout, {expires: 365, path: '/'}); } return false; }); } /* ========================================= * rotating text * =======================================*/ function rotatingText() { $("#intro .rotate").textrotator({ animation: "fade", speed: 3000 }); } /* ========================================= * lightbox * =======================================*/ function lightbox() { $(document).delegate('*[data-toggle="lightbox"]', 'click', function (event) { event.preventDefault(); $(this).ekkoLightbox(); }); } /* sliders */ function sliders() { if ($('.owl-carousel').length) { $(".testimonials").owlCarousel({ items: 4, itemsDesktopSmall: [1100, 3], itemsTablet: [768, 2], itemsMobile: [480, 1] }); } } function map() { if ($('#map').length > 0) { function initMap() { var location = new google.maps.LatLng(50.0875726, 14.4189987); var mapCanvas = document.getElementById('map'); var mapOptions = { center: location, zoom: 16, panControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(mapCanvas, mapOptions); var markerImage = 'img/marker.png'; var marker = new google.maps.Marker({ position: location, map: map, icon: markerImage }); var contentString = '
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
' + '