', 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('