$(document).ready(function() { changeNavbarColor(); }); $(window).scroll(function() { changeNavbarColor(); //displayImage(); }); function changeNavbarColor() { var navHeight = 70; //$('#main-nav').height() var actualPos = $(document).scrollTop(); if (actualPos > navHeight) { $('#main-nav').addClass('bgcolor'); // $('#logo').fadeIn(); } else { $('#main-nav').removeClass('bgcolor'); // $('#logo').fadeOut(); } }; $(document).ready(function() { $('.navbar-nav>li>a').on('click', function() { $('.navbar-collapse').collapse('hide'); }); }); $(document).ready(function() { $(window).scroll(function() { if ($(this).scrollTop() > 100) { $('.scrollToTop').fadeIn(); } else { $('.scrollToTop').fadeOut(); } }); $('.scrollToTop').click(function() { $('html, body').animate({ scrollTop: 0 }, 300); }); }); $(document).ready(function() { $(".navbar-toggler").click(function() { $('#main-nav').addClass('bgcolor'); }); }); $("#oferta").click(function() { $('html, body').animate({ scrollTop: $("#kontakt").offset().top, }, 1000); }); $(document).ready(function() { // Add smooth scrolling to all links $('a').on('click', function(event) { // Make sure this.hash has a value before overriding default behavior if (this.hash !== '') { // Prevent default anchor click behavior event.preventDefault(); // Store hash var hash = this.hash; // Using jQuery's animate() method to add smooth page scroll // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area $('html, body').animate({ scrollTop: $(hash).offset().top - 120, }, 1000); { // Add hash (#) to URL when done scrolling (default click behavior) window.location.hash = hash; } } // End if }); }); //Ciasteczka (function() { var monster = { set: function(e, t, n, r) { var i = new Date, s = "", o = typeof t, u = ""; r = r || "/", n && (i.setTime(i.getTime() + n * 24 * 60 * 60 * 1e3), s = "; expires=" + i.toGMTString()); if (o === "object" && o !== "undefined") { if (!("JSON" in window)) throw "Bummer, your browser doesn't support JSON parsing."; u = JSON.stringify({ v: t }) } else u = escape(t); document.cookie = e + "=" + u + s + "; path=" + r }, get: function(e) { var t = e + "=", n = document.cookie.split(";"), r = "", i = "", s = {}; for (var o = 0; o < n.length; o++) { var u = n[o]; while (u.charAt(0) == " ") u = u.substring(1, u.length); if (u.indexOf(t) === 0) { r = u.substring(t.length, u.length), i = r.substring(0, 1); if (i == "{") { s = JSON.parse(r); if ("v" in s) return s.v } return r == "undefined" ? undefined : unescape(r) } } return null }, remove: function(e) { this.set(e, "", -1) }, increment: function(e, t) { var n = this.get(e) || 0; this.set(e, parseInt(n, 10) + 1, t) }, decrement: function(e, t) { var n = this.get(e) || 0; this.set(e, parseInt(n, 10) - 1, t) } }; if (monster.get('cookieinfo') === 'true') { return false; } var container = document.createElement('div'), link = document.createElement('a'); container.setAttribute('id', 'cookieinfo'); container.setAttribute('class', 'cookie-alert'); container.innerHTML = '
Korzystanie z witryny oznacza zgodę na używanie plików cookies.
'; link.setAttribute('href', '#'); link.setAttribute('title', 'Zamknij'); link.innerHTML = 'x'; function clickHandler(e) { if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; } container.setAttribute('style', 'opacity: 1'); var interval = window.setInterval(function() { container.style.opacity -= 0.01; if (container.style.opacity <= 0.02) { document.body.removeChild(container); window.clearInterval(interval); monster.set('cookieinfo', 'true', 365); } }, 4); } if (link.addEventListener) { link.addEventListener('click', clickHandler); } else { link.attachEvent('onclick', clickHandler); } container.appendChild(link); document.body.appendChild(container); return true; })(); $(document).ready(function($) { $('audio').on("play", function(me) { $('audio').each(function(i, e) { if (e !== me.currentTarget) { this.pause(); } }); }); }) function initMap() { //Map options var options = { zoom: 15, center: { lat: 50.00394, lng: 19.86949 } } var map = new google.maps.Map(document.getElementById('map'), options); var markers = [{ coords: { lat: 50.00394, lng: 19.86949 }, con: ' MOVITECH
ul. Skotnicka 224
30-394 Kraków
www.movitech.pl
' }]; for (var i = 0; i < markers.length; i++) { //add markeers addMarker(markers[i]); } //function for the plotting markers on the map function addMarker(props) { var marker = new google.maps.Marker({ position: props.coords, map: map, }); var infoWindow = new google.maps.InfoWindow({ content: props.con, }); marker.addListener("click", () => { infoWindow.open(map, marker); }); } } $(document).ready(function($) { $('audio').on("play", function(me) { $('audio').each(function(i, e) { if (e !== me.currentTarget) { this.pause(); } }); }); }) $(function() { $('.dropdown-menu a.dropdown-toggle').on('click', function(e) { if (!$(this).next().hasClass('show')) { $(this).parents('.dropdown-menu').first().find('.show').removeClass("show"); } var $subMenu = $(this).next(".dropdown-menu"); $subMenu.toggleClass('show'); // appliqué au ul $(this).parent().toggleClass('show'); // appliqué au li parent return false; }); }); (function($) { "use strict"; $('body').on('mouseenter mouseleave', '.nav-item', function(e) { if ($(window).width() > 750) { var _d = $(e.target).closest('.nav-item'); _d.addClass('show'); setTimeout(function() { _d[_d.is(':hover') ? 'addClass' : 'removeClass']('show'); }, 1); } }); })(jQuery);