var mapStyles = [ { featureType: 'water', elementType: 'geometry', stylers: [{color: '#e9e9e9'}, {lightness: 17}], }, { featureType: 'landscape', elementType: 'geometry', stylers: [{color: '#f5f5f5'}, {lightness: 20}], }, { featureType: 'road.highway', elementType: 'geometry.fill', stylers: [{color: '#ffffff'}, {lightness: 17}], }, { featureType: 'road.highway', elementType: 'geometry.stroke', stylers: [{color: '#ffffff'}, {lightness: 29}, {weight: .2}], }, { featureType: 'road.arterial', elementType: 'geometry', stylers: [{color: '#ffffff'}, {lightness: 18}], }, { featureType: 'road.local', elementType: 'geometry', stylers: [{color: '#ffffff'}, {lightness: 16}], }, { featureType: 'poi', elementType: 'geometry', stylers: [{color: '#f5f5f5'}, {lightness: 21}], }, { featureType: 'poi.park', elementType: 'geometry', stylers: [{color: '#dedede'}, {lightness: 21}], }, { elementType: 'labels.text.stroke', stylers: [{visibility: 'on'}, {color: '#ffffff'}, {lightness: 16}], }, { elementType: 'labels.text.fill', stylers: [{saturation: 36}, {color: '#333333'}, {lightness: 40}], }, {elementType: 'labels.icon', stylers: [{visibility: 'off'}]}, { featureType: 'transit', elementType: 'geometry', stylers: [{color: '#f2f2f2'}, {lightness: 19}], }, { featureType: 'administrative', elementType: 'geometry.fill', stylers: [{color: '#fefefe'}, {lightness: 20}], }, { featureType: 'administrative', elementType: 'geometry.stroke', stylers: [{color: '#fefefe'}, {lightness: 17}, {weight: 1.2}], }]; !function(e) { var t = function() { function t(e) { return /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test( e); } !function() { function t() {e('html').css({fontSize: '50%'});} function a() {e('html').css({fontSize: '62.5%'});} function n() {e('html').css({fontSize: '75%'});} function o() { e('.main-search'). css({display: 'block'}). animate({opacity: 1}, 100) e('#search-input').focus(); } function r() { e('.main-search'). animate({opacity: 0}, 100, (function() {e('.main-search').css({display: 'none'});})); } e('.mobile-menu-click'). click((function() {e('#top-container').toggleClass('expanded');})), e( '.selected-subcategory'). click((function() { e('.selected-subcategory'). toggleClass('expanded'); })), e('.decrease-size').click(t), e('.reset-size').click(a), e( '.increase-size').click(n), document.addEventListener('keydown', (function(e) { e.ctrlKey && e.altKey && (107 === e.keyCode && n(), 109 === e.keyCode && t(), 48 === e.keyCode && a()); })), e('#search').click(o), // e('#search').focus((function() {o();})), // e('.main-search').focusout((function() {r();})), document.addEventListener('keydown', (function(e) {e.altKey && 51 === e.keyCode && o();})), e( '#close-search').click(r), e('#search-submit-button'). click((function() { e('#search-input').val().length >= 3 ? e('#search-form').submit() : e('.error').css({display: 'inline-block'}); })), e('#search-input'). keyup((function() { l('change:' + e('#search-input').val()), e('#search-input'). val().length >= 3 && e('.error').css({display: 'none'}); })), e('.js-search-box-submit'). click((function() { e(this). closest('form'). find('input[type="text"]').length && e(this).closest('form').find('input[type="text"]').val().length >= 3 && e(this).closest('form').submit(); })), e('.dropdown ul li').click((function() { var t; t = this, e('.dropdown ul li').removeClass('selected'), e(t). addClass('selected'), e('.dropdown .dropdown-selected'). html(e(t).children('a').html()); })); var s, c, d, p = [], m = 0, u = [], f = e('#logo-carousel .left-arrow '), h = e('#logo-carousel .right-arrow '); 'undefined' != typeof lcLogos && (p = lcLogos); var g = p.length; let isPaused = false; function v() { wWidth = e(window).width(), slideContainerWidth = e('.slider-container').width(); wWidth >= 1024 && (s = 6); wWidth < 1024 && wWidth >= 768 && (s = 5); wWidth < 768 && (s = 4), wWidth < 480 && (s = 2); m = 0; c = slideContainerWidth / s; if (d) { clearInterval(d) } if (!isPaused) { d = setInterval(function() { k(1); }, 3e3); } } function intervalStop(interval) { clearInterval(interval); isPaused = true console.log(interval) } function resumeInterval(interval) { isPaused = false; interval = setInterval(function() { k(1); }, 3e3); return interval; } const resume = document.querySelector(".resume"); const pause = document.querySelector(".pause"); let currInterval; pause.addEventListener('click', () => { if (currInterval) { intervalStop(currInterval) } else{ intervalStop(d) } intervalStop() resume.classList.remove('d-none') pause.classList.add('d-none') }) resume.addEventListener('click', () => { currInterval = resumeInterval(d) resume.classList.add('d-none') pause.classList.remove('d-none') }) function y() { for (i = 0; i < p.length; i++) { if (void 0 !== p[i].lclogo) { var t = e('
'); void 0 !== p[i].lclink && p[i].lclink && e(''). appendTo(t), e('.carousel-images').append(t), u.push(t); } } var a = u[u.length - 1].clone(), n = u[0].clone(); e('.carousel-images').prepend(a), e('.carousel-images'). append(n). css({left: -c}); } function k(t) { h.off('click'), f.off('click'), (m += t) < 0 && (m = g - Math.abs(m % g)), m > g - 1 && (m %= g), t > 0 ? e('.carousel-images'). animate({left: -2 * c}, (function() {w(t);})) : e('.carousel-images').animate({left: 0}, (function() {w(t);})); } function w(t) { var i; 1 == t ? (e('.c-image').first().remove(), i = u[m].clone(), e( '.carousel-images').append(i)) : (e('.c-image').last().remove(), m - 1 < 0 && (m = g), i = u[m - 1].clone(), e('.carousel-images'). prepend(i)), e('.carousel-images').css({left: -c}), h.click( (function() {k(1);})), f.click((function() {k(-1);})); } v(), y(), h.click((function() { clearInterval(d), k(1), d = setInterval((function() {k(1);}), 3e3); })), f.click((function() { clearInterval(d), k(-1), d = setInterval((function() {k(1);}), 3e3); })), e(window). resize((function() { clearInterval(d), e('.c-image'). remove(), u = [], v(), y(); })), 'impaired' == localStorage.getItem('um_dabrowa') && S(), e( '#contrast-ico'). parent('a'). click((function() { 'impaired' == localStorage.getItem('um_dabrowa') ? C() : S(); })); let b = !1; function S() { localStorage.setItem('um_dabrowa', 'impaired'), e('html'). addClass('impaired'), e('#contrast-ico'). parent('a'). html( 'Powrót do wersji podstawowej'); } function C() { localStorage.removeItem('um_dabrowa'), e('html'). removeClass('impaired'), e('#contrast-ico'). parent('a'). html( 'Wersja dla niedowidzących'); } document.addEventListener('keydown', (function(e) { e.ctrlKey && e.altKey && (67 === e.keyCode && !1 === b ? (S(), b = !0) : 67 === e.keyCode && !0 === b && (C(), b = !1)); })); }(), function() { if ('undefined' == typeof entryPhotos) { return !1; } var t, a = entryPhotos, n = [], o = 0; for (i = 0; i < a.length; i++) { obj = e.parseHTML( '
'), n.push(obj); } function l(i) { e('.arrows .right-arrow').off('click'), e('.arrows .left-arrow'). off('click'), clearInterval(t), (o += i) < 0 && (o = n.length - 1), o > n.length - 1 && (o = 0), i > 0 ? (e( '.photo-image').animate({left: '-=100%'}), e('.photo-image'). first(). remove(), e('.photos'). append(e(n[o + 1] || n[0]).css({left: '100%'}))) : (e( '.photo-image'). animate({left: '+=100%'}), e('.photo-image').last().remove(), e( '.photos'). prepend(e(n[o - 1] || n[n.length - 1]). css({left: '-100%'}))), setTimeout(r, 400), t = setInterval( (function() {l(1);}), 5e3); } function r() { e('.arrows .right-arrow'). click((function() {clearInterval(t), l(1);})), e( '.arrows .left-arrow'). click((function() {clearInterval(t), l(-1);})); } e('.photos').append(e(n[n.length - 1]).css({left: '-100%'})), e( '.photos').append(e(n[0]).css({left: '0%'})), e('.photos'). append(e(n[1]).css({left: '100%'})), r(), setTimeout( (function() {l(1);}), 5e3); }(), e('body').hasClass('home') && function() { var t, a = [], n = []; a[0] = { header: e('.description-big h1').html(), p: e('.description-big p').html(), image: c(e('#main-box #left').css('backgroundImage')), a: e('#main-box #left a').attr('href'), }, 0 !== e('.main-photo').find('.play-video-overlay').length ? a[0].video = '
' : a[0].video = '', 0 !== e('.main-photo').find('.camera').length ? a[0].photos = e('.main-photo').find('.camera')[0].outerHTML : a[0].photos = ''; var o = e('#main-box #right .small-box'); for (i = 0; i < o.length; i++) { slideData = { header: e(o[i]). find('h2'). html(), p: e(o[i]).find('.description-small p').html(), a: e(o[i]).find('a').attr('href'), image: c(e(o[i]).css('backgroundImage')), }, 0 !== e(o[i]).find('.play-video-overlay').length ? slideData.video = '
' : slideData.video = '', 0 !== e(o[i]).find('.camera').length ? slideData.photos = e(o[i]).find('.camera')[0].outerHTML : slideData.photos = '', a.push(slideData); } for (i = 0; i < a.length; i++) { str = '
' + a[i].video + a[i].photos + '

' + a[i].header + '

' + a[i].p + '

', n[i] = e.parseHTML(str); } e('#main-box #left').append(e(n[n.length - 1]).css({left: '-100%'})), e( '#main-box #left').append(e(n[0]).css({left: '0%'})), e( '#main-box #left').append(e(n[1]).css({left: '100%'})); var l = 0; function r(i) { e('#main-box #left .arrows .right-arrow').off('click'), e( '#main-box #left .arrows .left-arrow').off('click'), clearInterval( t), (l += i) < 0 && (l = n.length - 1), l > n.length - 1 && (l = 0), i > 0 ? (e('.top-slide').animate({left: '-=100%'}), e( '.top-slide').first().remove(), e('#main-box #left'). append(e(n[l + 1] || n[0]).css({left: '100%'}))) : (e('.top-slide'). animate({left: '+=100%'}), e('.top-slide').last().remove(), e( '#main-box #left'). prepend(e(n[l - 1] || n[n.length - 1]). css({left: '-100%'}))), setTimeout(s, 400), t = setInterval( (function() {r(1);}), 5e3); } function s() { e('#main-box #left .arrows .right-arrow'). click((function() {clearInterval(t), r(1);})), e( '#main-box #left .arrows .left-arrow'). click((function() {clearInterval(t), r(-1);})); } function c(e) { return void 0 !== e && (e = e.replace('url(', '').replace(')', '').replace(/\"/gi, '')), e; } function d() { e(window).width() > 768 || e('body').hasClass('term-koronawirus') ? (clearInterval(t), t = null) : t || (t = setInterval((function() {r(1);}), 5e3)); } s(), d(), e(window).resize(d); }(), e('body').hasClass('home') || e('body').hasClass('term-koronawirus') || function() { var t, a = [], n = [], o = e('.one-by-two-content'); for (j = 0; j < 2; j++) { for (i = 0; i < o.length; i++) { slideData = { header: e(o[i]).find('h2').html(), p: e(o[i]).find('.one-by-two-content-description p').html(), a: e(o[i]).find('a').attr('href'), image: c( e(o[i]).find('.one-by-two-content-img').css('backgroundImage')), }, 0 !== e(o[i]).find('.play-video-overlay').length ? slideData.video = '
' : slideData.video = '', 0 !== e(o[i]).find('.camera').length ? slideData.photos = e(o[i]).find('.camera')[0].outerHTML : slideData.photos = '', a.push(slideData); } } for (i = 0; i < a.length; i++) { str = '
' + a[i].video + a[i].photos + '

' + a[i].header + '

' + a[i].p + '

', n[i] = e.parseHTML(str); } e('.one-by-two').append(e(n[n.length - 1]).css({left: '-100%'})), e( '.one-by-two').append(e(n[0]).css({left: '0%'})), e('.one-by-two'). append(e(n[1]).css({left: '100%'})); var l = 0; function r(i) { e('.arrows .right-arrow').off('click'), e('.arrows .left-arrow'). off('click'), clearInterval(t), (l += i) < 0 && (l = n.length - 1), l > n.length - 1 && (l = 0), i > 0 ? (e('.top-slide'). animate({left: '-=100%'}), e('.top-slide').first().remove(), e( '.one-by-two').append(e(n[l + 1] || n[0]).css({left: '100%'}))) : (e('.top-slide').animate({left: '+=100%'}), e('.top-slide'). last(). remove(), e('.one-by-two'). prepend(e(n[l - 1] || n[n.length - 1]). css({left: '-100%'}))), setTimeout(s, 400), t = setInterval( (function() {r(1);}), 5e3); } function s() { e('.arrows .right-arrow'). click((function() {clearInterval(t), r(1);})), e( '.arrows .left-arrow'). click((function() {clearInterval(t), r(-1);})); } function c(e) { return e.replace('url(', ''). replace(')', ''). replace(/\"/gi, ''); } function d() { e(window).width() > 768 || e('body').hasClass('term-koronawirus') ? (clearInterval(t), t = null) : t || (t = setInterval((function() {r(1);}), 5e3)); } s(), d(), e(window).resize(d); }(), e('.submit-button').click((function() { error = !1, e('#contact-form #message').val() ? e( '#contact-form #message').val().length < 10 && (e('#contact-form .e-message'). html('Wpisz conajmniej 10 znaków.'), error = !0) : (e( '#contact-form .e-message'). html('Wpisz conajmniej 10 znaków.'), error = !0); e('#contact-form #name').val() ? e('#contact-form #name').val().length < 3 && (e('#contact-form .e-name'). html('Wpisz conajmniej 3 znaki.'), error = !0) : (e( '#contact-form .e-name'). html('Wpisz conajmniej 3 znaki.'), error = !0); e('#contact-form #surname').val() ? e('#contact-form #surname'). val().length < 3 && (e('#contact-form .e-surname'). html('Wpisz conajmniej 3 znaki.'), error = !0) : (e( '#contact-form .e-surname'). html('Wpisz conajmniej 3 znaki.'), error = !0); t(e('#contact-form #email').val()) || (e('#contact-form .e-email'). html('Niepoprawny adres e-mail.'), error = !0); grecaptcha && 0 !== grecaptcha.getResponse().length || (e('#contact-form .e-recaptcha'). html('Udowodnij, że nie jesteś robotem.'), error = !0); error || (e('#contact-form .wyslano').css({display: 'flex'}), e( '#contact-form input, #contact-form text-area').css({opacity: 0}), l( 'submit')); })), e('#contact-form #message'). keyup((function() { e(this).val().length >= 10 && e('#contact-form .e-message').html(''); })), e('#contact-form #name'). keyup((function() { e(this).val().length >= 3 && e('#contact-form .e-name').html(''); })), e('#contact-form #surname'). keyup((function() { e(this).val().length >= 3 && e('#contact-form .e-surname').html(''); })), e('#contact-form #email'). keyup((function() { t(e('#contact-form #email').val()) && e('#contact-form .e-email').html(''); })), e('.wyslano .more-button'). click((function() { grecaptcha.reset(), e('#contact-form input, #contact-form text-area'). css({opacity: 1}), e('.wyslano').css({display: 'none'}), e(this). closest('form'). find('input[type=text], textarea'). val(''); })), a.init(), n.init(), o.init(), r.init(), s.init(), c.init(), d.init(), p.init(), m.init(), u.init(); }, a = {init: function() {}}, n = { switcherSelector: '.js-simple-switcher', animationSpeed: 250, init: function() { var t = this; e(this.switcherSelector). click((function() { return e(this). toggleClass('active'). next(). toggleClass('opened'), e(this).data('slide') && e(this).next().slideToggle(t.animationSpeed), !1; })); }, }, o = { selectUiSelector: 'select', checkboxUiSelector: 'input[type="checkbox"]', radioUiSelector: 'input[type="radio"]', fieldWrapperSelector: '.field-input', init: function() {}, }, r = { customFileInputSelector: '.js-custom-file-input', triggerSelector: '.js-cfi-trigger', fileNameSelector: '.js-cfi-file-name', init: function() { var t = this; e(this.triggerSelector). click((function() { return e(this). closest(t.customFileInputSelector). find('input[type="file"]'). click(), !1; })), e(this.customFileInputSelector). find('input[type="file"]'). change((function() { var i = e(this).val().split('\\'); e(this). closest(t.customFileInputSelector). find(t.fileNameSelector). text(i[i.length - 1]); })); }, }, s = { sliderGalleryNextSelector: '.js-slider-gallery-next', sliderGalleryPrevSelector: '.js-slider-gallery-prev', sliderGallerySelector: '.js-slider-gallery', sliderGallery: null, pauseButtonSelector: '.pause-slider', // Dodaj selektor przycisku pauzy resumeButtonSelector: '.resume-slider', // Dodaj selektor przycisku wznowienia init: function () { var t = this, i = { auto: true, // Zmieniamy na true pause: 5000, // 5000 ms (5 sekundy) pager: false, nextSelector: this.sliderGalleryNextSelector, prevSelector: this.sliderGalleryPrevSelector, nextText: '', prevText: '', infiniteLoop: false, hideControlOnEnd: true, keyboardEnabled: true, }; if (e(this.sliderGallerySelector).children().length > 1) { this.sliderGallery = e(this.sliderGallerySelector).bxSlider(i); } e(this.pauseButtonSelector).click(function () { t.sliderGallery.stopAuto(); }); e(this.resumeButtonSelector).click(function () { t.sliderGallery.startAuto(); }); e(document).on('click', this.sliderGalleryNextSelector + ' .bx-next.disabled', function () { t.sliderGallery.goToSlide(0); }); e(document).on('click', this.sliderGalleryPrevSelector + ' .bx-prev.disabled', function () { var e = t.sliderGallery.getSlideCount(); t.sliderGallery.goToSlide(e - 1); }); }, }, c = { listSelector: '.js-di-list', filtersSelector: '.js-di-filters', filtersListSelector: '.js-di-filters-list', paginationSelector: '.js-di-pagination', loader: null, urlHandler: { nazwisko: null, lokalizacja: null, specjalizacja: null, strona: null, }, init: function() { var t = this; if (this.initLoader(), !e(this.listSelector).length) { return !1; } this.buildState(), this.requestObjects(), History.Adapter.bind(window, 'statechange', (function() {t.buildState(), t.requestObjects();})), e( this.filtersSelector). find('select'). change((function() { t.resetPagination(), t.updateUrl(e(this).attr('name'), e(this).val()); })), e(this.filtersListSelector). children(). click((function() { return e(this). addClass('current'). siblings(). removeClass('current'), t.resetPagination(), t.updateUrl( e(this).parent().data('name'), e(this).data('value')), !1; })); var i = null; e(this.filtersSelector). find('input[type="text"]'). keyup((function() { var a = this; clearTimeout(i), i = setTimeout((function() { t.resetPagination(), t.updateUrl(e(a).attr('name'), e(a).val()); }), 500); })), e(document). on('click', this.paginationSelector + ' a', (function() { return e(this).addClass('active'), e(this). hasClass('prev') ? e(t.paginationSelector). data('paged', parseInt(e(t.paginationSelector).find('.current').text()) - 1) : e(this).hasClass('next') ? e(t.paginationSelector). data('paged', parseInt(e(t.paginationSelector).find('.current').text()) + 1) : e(t.paginationSelector). data('paged', parseInt(e(this).text())), t.updateUrl('strona', e(t.paginationSelector).data('paged')), !1; })); }, resetPagination: function() {this.urlHandler.strona = null;}, initLoader: function() { var t = e('
').addClass('loader-wrapper'), i = e('
').addClass('loader'); e('
'). addClass('loader-overlay'). css({opacity: '0.9'}). appendTo(t), i.appendTo(t), this.loader = t; }, requestObjects: function() { var t = this, i = {}; for (var a in this.urlHandler) { this.urlHandler[a] && '0' != this.urlHandler[a] && (i[a] = this.urlHandler[a]); } i.action = e(this.listSelector).data('action'), e.ajax({ url: _baseUrl + '/wp-admin/admin-ajax.php', type: 'POST', cache: !1, data: i, beforeSend: function() { t.loader.appendTo(t.listSelector), e(t.listSelector). parent(). addClass('loading'), e(t.paginationSelector). find('.active').length && e('html, body'). animate({scrollTop: e(t.filtersSelector).offset().top - 20}); }, success: function(i) { e(t.listSelector). parent(). removeClass('loading'), e(t.listSelector).empty().append(i); }, }); }, updateUrl: function(t, i) { if (void 0 === this.urlHandler[t]) { return !1; } this.urlHandler[t] = i && '0' != i ? i : null; var a = location.href.split('?')[0], n = {strona: 1}, o = '', l = !0; for (var r in this.urlHandler) { this.urlHandler[r] && '0' != this.urlHandler[r] && (void 0 !== n[r] && n[r] == this.urlHandler[r] || (l ? (o = '?', l = !1) : o = '&', a += o + r + '=' + this.urlHandler[r])); } History.pushState(null, e(document).find('title').text(), a); }, buildState: function() { var t = this; this.buildUrlHandler(), e(this.filtersSelector). find('select'). filter((function() { return void 0 !== t.urlHandler[e(this).attr('name')]; })). each((function() { var i = t.urlHandler[e(this).attr('name')], a = e(this).find('option:first').val(); e(this). find('option'). each( (function() { if (e(this).val() == i) { return a = i, !1; } })), e( this).val(a), e(this).selectmenu('refresh'); })), e(this.filtersListSelector). filter((function() { return void 0 !== t.urlHandler[e(this).data('name')]; })). each((function() { var i = t.urlHandler[e(this).data('name')], a = e(this).children().last(); e(this). children(). each((function() { if (e(this).data('value') == i) { return a = e(this), !1; } })), a.addClass('current').siblings().removeClass('current'); })), e(this.filtersSelector). find('input[type="text"]'). filter((function() { return void 0 !== t.urlHandler[e(this).attr('name')]; })). each((function() { var i = t.urlHandler[e(this).attr('name')]; i || (i = ''), e(this).val(i); })); }, buildUrlHandler: function() { var e = this.getQueryVars(); for (var t in this.urlHandler) { void 0 !== e[t] && e[t] && '0' != e[t] ? this.urlHandler[t] = e[t] : this.urlHandler[t] = null; } }, getQueryVars: function() { var e = {}; if (-1 === window.location.href.indexOf('?')) { return e; } for (var t = window.location.href.slice( window.location.href.indexOf('?') + 1).split('&'), i = 0; i < t.length; i++) { var a = t[i].split('='); e[a[0]] = decodeURIComponent(a[1]); } return e; }, }, d = { articlesSelector: '.js-la-articles', buttonSelector: '.js-la-btn', init: function() { var t = this; e(this.buttonSelector). children(). eq(0). click((function() {return t.getArticles(), !1;})); }, getArticles: function() { var t = this, i = e(t.articlesSelector).data('paged') || 1; i++, e(t.articlesSelector).data('paged', i); var a = e(t.articlesSelector).data('post-type'), n = e(t.articlesSelector).data('offset'), o = e(t.articlesSelector).data('taxonomy'), l = e(t.articlesSelector).data('taxonomy-term'); e.ajax({ url: _baseUrl + '/wp-admin/admin-ajax.php', type: 'POST', cache: !1, data: { action: 'dgm_get_articles', paged: i, post_type: a, offset: n, taxonomy: o, taxonomy_term: l, }, beforeSend: function() {e(t.buttonSelector).addClass('loading');}, success: function(a) { e(a). appendTo(t.articlesSelector). hide(). slideDown(200), e(t.articlesSelector).data('maxnumpages') == i ? e(t.buttonSelector).remove() : e(t.buttonSelector).removeClass('loading'); }, }); }, }, p = { imagePopupSelector: '.js-image-popup', gallerySelector: '.js-gallery-popup', videoPopupSelector: '.js-video-popup', init: function() { e(this.imagePopupSelector). filter((function() { var t = e(this).attr('href').substring(3); return /.(jpg|png|gif)/i.test(t); })). not('.no-lightbox'). magnificPopup({ type: 'image', tLoading: '...', callbacks: { beforeOpen: function() { this.st.image.markup = this.st.image.markup.replace( 'mfp-figure', 'mfp-figure mfp-with-anim'), this.st.mainClass = 'mfp-zoom-in'; }, }, }), e(this.gallerySelector). each((function() { e(this). magnificPopup({ delegate: 'a', type: 'image', tLoading: '...', removalDelay: 500, callbacks: { beforeOpen: function() { this.st.image.markup = this.st.image.markup.replace( 'mfp-figure', 'mfp-figure mfp-with-anim'), this.st.mainClass = 'mfp-zoom-in'; }, }, closeOnContentClick: !0, midClick: !0, gallery: { enabled: !0, tCounter: '%curr% z %total%', }, }); })), e(this.videoPopupSelector). magnificPopup({ type: 'iframe', tLoading: '...', closeMarkup: '', }); }, }, m = { mapId: 'lots-map', itemSelector: '.js-lp-item', itemDetailsSelector: '.js-lp-item-details', map: null, markers: [], maximumZoom: 17, adjustZoom: !1, markerCluster: null, init: function() { var t = this; e('#' + this.mapId).length && google.maps.event.addDomListener(window, 'load', this.initMap), e( this.itemSelector). click((function() { return void 0 !== e(this).data('markerkey') && t.markers[e(this).data('markerkey')] && new google.maps.event.trigger(t.markers[e(this).data('markerkey')], 'click'), !1; })); }, initMap: function() { var e = { center: {lat: 50.331021, lng: 19.20657}, zoom: 12, scrollwheel: !1, styles: mapStyles, }; m.map = new google.maps.Map(document.getElementById(m.mapId), e), m.addMarkers(), google.maps.event.addListener(m.map, 'bounds_changed', (function(e) { m.adjustZoom && (m.map.getZoom() > m.maximumZoom && m.map.setZoom(m.maximumZoom), m.adjustZoom = !1); })); }, addMarkers: function() { var t = this; e(this.itemSelector). each((function() { if (e(this).data('lat') && e(this).data('lng')) { var i = { lat: parseFloat(e(this).data('lat')), lng: parseFloat(e(this).data('lng')), }, a = new google.maps.Marker({ position: i, map: m.map, icon: _themeUrl + '/images/marker.png', }), n = e(this).siblings(t.itemDetailsSelector).html(), o = new google.maps.InfoWindow({}); google.maps.event.addListener(a, 'click', (function() { m.map.panTo(a.position); m.map.getZoom(); m.map.setZoom(m.maximumZoom), n && (o.setContent(n), o.open(m.map, this)); })), t.markers.push(a), e(this). data('markerkey', t.markers.indexOf(a)); } })); var i = { gridSize: 100, styles: [ { url: _themeUrl + '/images/marker_cluster.png', width: 32, height: 32, textColor: '#fff', textSize: 15, }], }; this.markerCluster && this.markerCluster.clearMarkers(), this.markerCluster = new MarkerClusterer( m.map, this.markers, i), google.maps.event.addListener( this.markerCluster, 'clusterclick', (function(e) {m.fitMapBounds(e.getMarkers());})), this.fitMapBounds(); }, fitMapBounds: function(e) { var t = new google.maps.LatLngBounds; for (var i in void 0 === e && (e = this.markers), e) { t.extend( e[i].position); } null !== this.map && (this.map.fitBounds(t), this.adjustZoom = !0); }, }, u = { elWrapperSelector: '.js-map-objects-el-wrapper', init: function() { var t = this; if (!e(this.elWrapperSelector).length) { return !1; } e.ajax({ url: _baseUrl + '/wp-admin/admin-ajax.php', type: 'POST', cache: !1, data: {action: 'dgm_get_map_objects'}, beforeSend: function() {e('.mapa-calosc').addClass('loading');}, success: function(i) { e('.mapa-calosc').removeClass('loading'); var a = e.parseJSON(i); null != a && (i = a), t.initMap(i); }, }); }, initMap: function(t) { if (!t) { return !1; } var a = [], n = [], o = [], l = []; markerCluster = null; let r = { center: [50.331161, 19.206521], zoom: 15, noWrap: !0, scrollWheelZoom: !1, }, s = new L.map('map', r), c = new L.TileLayer( 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'); s.addLayer(c); var d = e('.lists'), p = e('.big-lists'), m = e('.scroller'), u = e('.handle'); function f() { var e = d.innerHeight(), t = p[0].scrollHeight; m.css({height: e}), t > e ? m.removeClass('hide') : m.addClass('hide'); } function h() { var t = e('.pills').innerHeight(); e('.lista-obiektow .objects').css({marginTop: t}); } function g() { e('.mapa-calosc .title-and-menu-row .left h1'). html('Mapa'), e('#map').css({display: 'block'}), e( '.lista-obiektow'). css({display: 'none'}), e( '.mapa-calosc .title-and-menu-row .right ul li.mapa'). find('a'). addClass('selected'), e( '.mapa-calosc .title-and-menu-row .right ul li.lista'). find('a'). removeClass('selected'), s._popup.update(); } u.draggable({ axis: 'y', containment: 'parent', drag: function() { var e = u.height(), t = m.height() - e, i = parseInt(u.css('top')) / t, a = d.innerHeight(), n = p[0].scrollHeight - a; p.css({top: -n * i}); }, }), f(), e('.small-list-header'). click((function() { e(this). parent('.small-dropdown'). toggleClass('opened'), f(), function() { var e = d.innerHeight(), t = p[0].scrollHeight, i = parseFloat(p.css('top')); t - e < Math.abs(i) && (p.css({top: -(t - e)}), i = parseFloat(p.css('top'))); allreadyScrolled = -i, scrollingSpace = t - e, precentScrolled = allreadyScrolled / scrollingSpace, u.css( {top: (m.height() - u.height()) * precentScrolled}), f(); }(); })), e('.map-dropdown, .b-anuluj, .small-list li'). click((function() { e('.map-dropdown').toggleClass('opened'), e('.selection-list'). toggleClass('opened'); })), e(document). on('click', '.mapa-wybieranie .pill .close, .mapa-calosc .pill .close', (function() { var t = e(this).parent('.pill').attr('objecttype'), a = e(this).parent('.pill').attr('classinmenu'); e(this).parent('.pill').remove(), e('.small-dropdown .' + a). removeClass('displayed'), function(e) { for (i = 0; i < o[e].length; i++) { s.removeLayer(o[e][i]); } }(t), function(t) {e('.object.' + t).remove();}(t), h(); })), e('.small-list li').click((function() { e(this).hasClass('displayed') || (className = e(this). attr('class'). split(' ')[0], objectType = function(e) { return e.split('-'). map((function(e, t) { return 0 !== t ? e.charAt(0).toUpperCase() + e.substr(1) : e.charAt(0).toLowerCase() + e.substr(1); })). join(''); }(className), e(this).addClass('displayed'), function( i, a) { var n = t[i].icon || 'url(../images/icons/map-marker.svg)', o = '
' + t[i].displayName + '
'; e('.full-container .inner-container.top-margin .pills'). append(o), h(); }(objectType, className), function(e) { for (a = [], n = [], i = 0; i < t[e].items.length; i++) { a[i] = new L.Marker([ parseFloat(t[e].items[i].lat), parseFloat(t[e].items[i].lng)]), a[i].addTo(s), n[i] = L.popup(). setLatLng([ parseFloat(t[e].items[i].lat), parseFloat(t[e].items[i].lng)]). setContent(t[e].items[i].content). openOn(s), a[i].bindPopup(t[e].items[i].content).openPopup(); } o[e] = a, function() { for (var e in l = [], o) { for (var t in o[e]) { l.push(o[e][t]); } } }(); }(objectType), function(a) { for (i = 0; i < t[a].items.length; i++) { var n = e('
' + t[a].items[i].content + '
Pokaż na mapie
'); e('.objects').append(n), void 0 !== t[a].items[i].marker && n.data('marker', t[a].items[i].marker); } }(objectType)); })), e(document).on('click', '.show-on-map', (function() { g(); var t = parseFloat(e(this).attr('lat')), i = parseFloat(e(this).attr('lng')); console.log(t, i), s.panTo(new L.LatLng(t, i)), e(this). closest('.object'). data('marker'); })), e(document).ready((function() {h();})), e(window). resize((function() {h();})), e( '.mapa-calosc .title-and-menu-row .right ul li.mapa').click(g), e( '.mapa-calosc .title-and-menu-row .right ul li.lista'). click((function() { e('#map').css({display: 'none'}), e('.lista-obiektow'). css({display: 'block'}), e( '.mapa-calosc .title-and-menu-row .left h1').html('Lista'), e( '.mapa-calosc .title-and-menu-row .right ul li.mapa'). find('a'). removeClass('selected'), e( '.mapa-calosc .title-and-menu-row .right ul li.lista'). find('a'). addClass('selected'); })); }, }; let f; if (document.querySelector('.page-id-48881')) { fetch( 'https://offers.erecruiter.pl/skk/company/20015776/offers.json?hash=AC6B9584BF39A15B115469D87B591DBE3E4557AF350142FFA366E837A5624FA47954A94AD3C65A8DF999885EA1D7F0F53BD0F84DB0C6EC53A41DF4DC54AAFA93'). then((e => e.json())). then((e => { f = e, f.jobs.forEach((e => { if ('Urząd Miejski w Dąbrowie Górniczej' === e.partnership) { const t = e.title, i = e.urlWithLayout, a = e.publishDate, n = e.applicationLink; let o = e.departments[0]; o = o ? e.departments[0] : ' '; const l = `\n \n

\n \n ${o}\n \n

\n \n \n \n \n `, r = document.querySelector('.o-recruiter__list'), s = document.createElement('li'); s.classList.add( 'o-recruiter__item'), s.innerHTML = l, r.appendChild(s); } })); })); } if (document.querySelector('.o-hr')) { const t = document.querySelectorAll('.o-hr__tile.has_additional_text'); t.forEach((i => { const a = e(i).find('.o-hr_on-click'); i.addEventListener('click', (() => { 'none' === a.css('display') ? (t.forEach( (t => e(t).find('.o-hr_on-click').fadeOut(200))), e(i). addClass('active'), a.fadeIn(200)) : e(i). find('.js-close'). on('click', (() => {e(i).removeClass('active'), a.fadeOut(200);})); })); i.addEventListener('keyup', ((event) => { if (event.code === "Enter") { 'none' === a.css('display') ? (t.forEach( (t => e(t).find('.o-hr_on-click').fadeOut(200))), e(i). addClass('active'), a.fadeIn(200)) : e(i). find('.js-close'). on('click', (() => {e(i).removeClass('active'), a.fadeOut(200);})); } })); })), window.addEventListener('click', (t => { const i = t.target, a = i.classList; ('container' === i.id || a.contains('o-hr')) && e('.o-hr_on-click').fadeOut(200); })); } function classToggleOnFocus (className, ...elements) { elements.forEach(element => { e(element).focus((function() {e(this).addClass(className)})) e(element).focusout((function () {e(this).removeClass(className)})) }) } window.addEventListener('load', () => { classToggleOnFocus('u-focus', 'button', 'a', 'input') }) // e('button'). // each((function() { // e(this). // focus((function() {e(this).addClass('u-focus');})), e(this). // focusout((function() {e(this).removeClass('u-focus');})); // })) // e('a'). // each((function() { // e(this). // focus((function() {e(this).addClass('u-focus');})), e(this). // focusout((function() {e(this).removeClass('u-focus');})); // })), e('#accessibility-menu').focus((function() {e(this).removeClass('u-vh');})), e('#accessibility-menu a').each((function() { e(this).focus((function() {e(this).removeClass('u-vh');})); })), e('#accessibility-menu a'). each((function() { e(this). focusout((function() {e(this).addClass('u-vh');})); })), e('#accessibility-menu a:nth-last-child(1)'). focusout((function() { e('#accessibility-menu'). addClass('u-vh'); })), document.addEventListener('keydown', (function(t) { t.altKey && (49 === t.keyCode && (window.location.href = e('.m-vh-menu__nav').attr('href')), 50 === t.keyCode && (window.location.href = e('.m-vh-menu__content'). attr('href'))), t.ctrlKey && t.altKey && (72 === t.keyCode && (window.location.href = '/'), t.keyCode); })), e('#shortcut-btn'). click((function() {e('.m-shortcut').toggleClass('--active');})), e( '.m-shortcut').click((function() {e(this).removeClass('--active');})), e( (function() { t(), document.querySelector('.page-id-131 .grid tr:nth-child(1) .b2') && (document.querySelector( '.page-id-131 .grid tr:nth-child(1) .b2').colSpan = '2'); })); new Swiper('.swiper-container', { slidesPerView: 'auto', centeredSlides: !0, loop: !0, loopFillGroupWithBlank: !1, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev'}, keyboard: { enabled: true, onlyInViewport: true, }, }); const h = document.querySelectorAll('.swiper-slide'), g = document.querySelector('.modal'); const modalToggle = document.querySelector('#modalToggle') if (modalToggle) { modalToggle. addEventListener('click', (() => {g.classList.toggle('is-visible');})), h.forEach((e => { e.addEventListener('click', (() => { const t = e.querySelector('.m-tile'), i = document.querySelector('#modalName'), a = document.querySelector('#modalPosition'), n = document.querySelector('#modalImg'), o = document.querySelector('#modalDescription'); g.classList.toggle( 'is-visible'), i.innerHTML = t.dataset.name, a.innerHTML = t.dataset.position, o.innerHTML = t.dataset.description, n.src = t.dataset.img; })); })); } }(jQuery);