$(document).ready(function(){ $('.menu-call').on("click", function(e){ e.preventDefault(); $('.mobile-menu').slideToggle(); if( $(".fa-bars").length ) { $(".fa-bars").removeClass("fa-bars").addClass("fa-times"); } else { $(".fa-times").removeClass("fa-times").addClass("fa-bars"); } }); setTimeout( function(){ $(".mask_popup").addClass("on"); $(".mask_popup .close-btn").on("click", function(ev){ ev.preventDefault(); $(".mask_popup").fadeOut(500, function(){ $(".mask_popup").removeClasS("on"); }); }); }, 90000); /*$("#lightgallery, .gallery, .main-photo").lightGallery({ share: false, download: false, zoom: false }); */ $('a.zoom').magnificPopup( { type: 'image', gallery: { enabled: true } }); $('#contactFormSend').on('submit', function(evt) { evt.preventDefault(); good = true; _this = $(this); if (good) { $(this).find("button").prop("disabled", "disabled").text("wysyłanie..."); var formData = new FormData($(this)[0]); $.ajax({ url: $(this).attr('action'), type: 'POST', data: formData, async: false, success: function (data) { //alert(data) _this.find('input, textarea').val(''); _this.find('p.ajaxInfo.ok').show(); _this.find("button").removeProp("disabled").hide(); }, error: function (data) { _this.find('p.ajaxInfo.error_send').show(); }, cache: false, contentType: false, processData: false }); } else { $(this).find('p.ajaxInfo.error').show(); } }); $('.start-slider').owlCarousel({ animateOut: 'fadeOut', animateIn: 'fadeIn', items:1, margin:0, stagePadding:0, smartSpeed:450, autoplay: true, loop: true, dots: true, nav: true, navText: ['', ''] }).addClass("owl-carousel"); $('.gallery-carousel, .gallery-tiles').magnificPopup({ delegate: 'a.magpop', type: 'image', tLoading: 'Trwa ładowanie #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] // Will preload 0 - before current, and 1 after the current image }, image: { tError: 'Obraz nie został załadowany.', titleSrc: function(item) { return item.el.attr('title'); } } }); $('.gallery-tiles.carousel').owlCarousel({ animateOut: 'fadeOut', animateIn: 'fadeIn', items: 5, responsive: { 0: { items: 2 }, 800: { items: 3 }, 1000: { items: 4 }, 1280: { items: 5 } }, margin:0, stagePadding:0, smartSpeed:450, autoplay: true, loop: true, dots: true, nav: false }).addClass("owl-carousel"); $('.section-gallery-tiles .gallery-carousel').owlCarousel({ animateOut: 'fadeOut', animateIn: 'fadeIn', items: 5, responsive: { 0: { items: 2 }, 800: { items: 3 }, 1000: { items: 4 }, 1280: { items: 5 } }, margin:0, stagePadding:0, smartSpeed:450, autoplay: true, loop: true, dots: true, nav: true, navText: ['', ''] }).addClass("owl-carousel"); });