PageSourceSearch

https://piekary.pl/wp-content/themes/piekary/wp-js.js?ver=1.0.1

js piekary.pl collected 2026-09-24 09:44:43 UTC 9,506 bytes, 343 lines download raw bytes

1(function($) {
2	$( '.contrast-black' ).click(function(){
3		if($( 'body' ).hasClass('hc1')){
4			$( 'body' ).removeClass('hc1')
5		};
6		if($( 'body' ).hasClass('hc3')){
7			$( 'body' ).removeClass('hc3')
8		};
9		$( 'body' ).toggleClass('hc2');
10	});
11
12	$( '.contrast-black-yellow' ).click(function(){
13		if($( 'body' ).hasClass('hc2')){
14			$( 'body' ).removeClass('hc2')
15		};
16		if($( 'body' ).hasClass('hc3')){
17			$( 'body' ).removeClass('hc3')
18		};
19		$( 'body' ).toggleClass('hc1');
20	});
21
22	$( '.contrast-yellow' ).click(function(){
23		if($( 'body' ).hasClass('hc2')){
24			$( 'body' ).removeClass('hc2')
25		};
26		if($( 'body' ).hasClass('hc1')){
27			$( 'body' ).removeClass('hc1')
28		};
29		$( 'body' ).toggleClass('hc3');
30	});
31
32	$( '.contrast-standard' ).click(function(){
33		if($( 'body' ).hasClass('hc1')){
34			$( 'body' ).removeClass('hc1')
35		};
36		if($( 'body' ).hasClass('hc3')){
37			$( 'body' ).removeClass('hc3')
38		};
39		if($( 'body' ).hasClass('hc2')){
40			$( 'body' ).removeClass('hc2')
41		};
42	});
43
44	var fontSize = localStorage.getItem('fontSize');
45	$(document).ready(function() {
46		if(fontSize){
47			$('.section_main, .section_single, .carousel--main__content,.site_footer').css('font-size', Number(fontSize));
48		}	
49	})
50
51	const EXPIRE_TIME = 1000*30*60;
52	setTimeout(function() {
53	  localStorage.removeItem('fontSize');
54	}, EXPIRE_TIME); // after an hour it will delete the data
55
56	$('.size-s').on('click', function(){
57		$('.section_main, .section_single, .carousel--main__content,.site_footer').css('font-size', 12);
58		localStorage.setItem('fontSize', 12);
59	})
60	$('.size-m').on('click', function(){
61		$('.section_main, .section_single, .carousel--main__content,.site_footer').css('font-size', 14);
62		localStorage.setItem('fontSize', 14);
63	})
64	$('.size-l').on('click', function(){
65		$('.section_main, .section_single, .carousel--main__content,.site_footer').css('font-size', 20);
66		localStorage.setItem('fontSize', 20);
67	})
68	$('.size-xl').on('click', function(){
69		$('.section_main, .section_single, .carousel--main__content,.site_footer').css('font-size', 26);
70		localStorage.setItem('fontSize', 26);
71	})
72
73	$(".read_post").click(function() {
74		$(this).parent().toggleClass("active");
75	});
76
77	$('.read_post').on('click',  function()  { /*read the content*/
78		$(".responsivevoice-button").click();
79	});
80	$('#read_post_home').on('click',  function()  { /*read the content*/
81		$(".responsivevoice-button").click();
82	});
83
84	$('.js-gallery').magnificPopup({
85		delegate: 'a',
86		type: 'image',
87		tLoading: 'Ładowanie #%curr%...',
88		mainClass: 'mfp-img-mobile',
89		gallery: {
90			enabled: true,
91			navigateByImgClick: true,
92			preload: [0,1] // Will preload 0 - before current, and 1 after the current image
93		},
94		image: {
95			tError: '<a href="%url%">Obrazek #%curr%</a> nie może być załadowany.',
96		}
97	});
98
99	// $('.ajax-popup-link').magnificPopup({
100	//   type: 'ajax'
101	// });
102
103	// Calendar
104	// function getDaysInMonth(month,year) {
105	// //var monthLength = new Date(year, month, 0).getDate();
106	// 	var days = "";
107	// 	$.ajax({
108	// 		url : ajax_options.admin_ajax_url,
109	// 		type : 'post',
110	// 		data : {
111	// 			action : 'cat_in_day',
112	// 			month : month+1,
113	// 			year : year
114	// 		},
115	// 		success : function( response ) {
116	// 			console.log(response);
117	// 			days = response;
118	// 		}
119	// 	});
120	// 	return days;
121	// }
122
123	date = new Date();
124	months = ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'];
125	shortDays = ['pn', 'wt', 'śr', 'cz', 'pt', 'so', 'nd'];
126
127	monthNumber = date.getMonth();
128	yearNumber = date.getFullYear();
129
130	$('.section_main__calendar__month__current').text(months[monthNumber] + ' ' + yearNumber);
131	//$('.section_main__calendar__days').html(getDaysInMonth(monthNumber, yearNumber));
132	/*$('.section_main__calendar__days').addClass('loading');
133	$.ajax({
134		url : ajax_options.admin_ajax_url,
135		type : 'post',
136		data : {
137			action : 'cat_in_day',
138			month : monthNumber+1,
139			year : yearNumber
140		},
141		success : function( response ) {
142			$('.section_main__calendar__days').html(response);
143			$('.ajax-popup-link').magnificPopup({
144				type: 'ajax'
145			});
146			$('.section_main__calendar__days').removeClass('loading');
147		}
148	});*/
149
150	/*$('.section_main__calendar__month__next').click(function() {
151		if(monthNumber == 11) {
152			monthNumber = 0;
153			yearNumber++;
154		}
155		else
156			monthNumber++;
157
158		$('.section_main__calendar__month__current').text(months[monthNumber] + ' ' + yearNumber);
159		$('.section_main__calendar__days').addClass('loading');
160		$.ajax({
161			url : ajax_options.admin_ajax_url,
162			type : 'post',
163			data : {
164				action : 'cat_in_day',
165				month : monthNumber+1,
166				year : yearNumber
167			},
168			success : function( response ) {
169				$('.section_main__calendar__days').html(response);
170				$('.ajax-popup-link').magnificPopup({
171					type: 'ajax'
172				});
173				$('.section_main__calendar__days').removeClass('loading');
174			}
175		});
176	});*/
177
178	/*$('.section_main__calendar__month__previous').click(function() {
179		if(monthNumber == 0) {
180			monthNumber = 11;
181			yearNumber--;
182		}
183		else
184			monthNumber--;
185
186		$('.section_main__calendar__month__current').text(months[monthNumber] + ' ' + yearNumber);
187		$('.section_main__calendar__days').addClass('loading');
188		$.ajax({
189			url : ajax_options.admin_ajax_url,
190			type : 'post',
191			data : {
192				action : 'cat_in_day',
193				month : monthNumber+1,
194				year : yearNumber
195			},
196			success : function( response ) {
197				$('.section_main__calendar__days').html(response);
198				$('.ajax-popup-link').magnificPopup({
199					type: 'ajax'
200				});
201				$('.section_main__calendar__days').removeClass('loading');
202			}
203		});
204	});*/
205	// END of Calendar
206//	$('.section_main__sidebar  .menu-item-has-children').on("click", function(e) {
207//		$(this).children('ul').toggleClass('active');
208//	    return false;
209//	});
210
211
212	
213$('.section_main__sidebar .menu-item-has-children>a').attr('href', 'javascript:void(0);');
214    $('.section_main__sidebar .menu-item-has-children a').on("click", function(e) {
215        //$(this).parent('ul').toggleClass('active');
216        //$(this).before('<h1>asdasd</h1>');
217        $(this).parent().children('ul').toggleClass('active');
218    });
219
220	$('.js_thumbnail_popup, .image-link').magnificPopup({
221		type: 'image',
222		closeOnContentClick: true,
223		closeBtnInside: false,
224		fixedContentPos: true,
225		mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
226		image: {
227			verticalFit: true
228		},
229		zoom: {
230			enabled: true,
231			duration: 300 // don't foget to change the duration also in CSS
232		}
233	});
234
235	$('.js-contrast').click(function(e){
236		e.preventDefault();
237	});
238
239	$('.site_header__bottom--header .js-search').click(function(e) {
240		e.preventDefault();
241		$('.site_header__bottom--header .js-form-top').toggleClass('active');
242		setTimeout(function() { $('.site_header__bottom--header .js-form-top input[name="s"]').focus(); return false; }, 300)
243		return false;
244	});
245
246	$(".carousel--main__content a").click(function(){
247		var linkarticle = $(this).attr('href');
248		window.location.href = linkarticle;
249	});
250
251$('.header_sticky').css('display', 'none');	
252$(window).scroll(function() {
253	if ($(this).scrollTop() > 100){ 
254		$('.header_sticky').css("display", "block");
255		$('.header_sticky').addClass("sticky_fade"); 
256  }
257  else{
258		$('.header_sticky').removeClass("sticky_fade");
259		$('.header_sticky').css("display", "none");
260  }
261});
262
263$(window).scroll(function() {
264	if ($(this).scrollTop() > 200){  
265		$('.site_header__bottom--header').fadeIn();
266		$('.site_header__bottom--header').addClass('fixedHeader');
267	  }
268	  else{
269		$('.site_header__bottom--header').fadeOut();
270		$('.site_header__bottom--header').removeClass('fixedHeader');
271	  }
272});
273
274$(document).ready(function() {
275	$('.problem-content--more-txt').hide();
276	$('.problem-content--more').click(function(){
277		$('.problem-content--more-txt').fadeToggle();
278	});
279});
280
281$(window).load(function () {
282	if(showPopup == true) {
283		$.extend(true, $.magnificPopup.defaults, {
284			tClose: 'Zamknij', // Alt text on close button
285			tLoading: 'Ładowanie...', // Text that is displayed during loading. Can contain %curr% and %total% keys
286			gallery: {
287			   tPrev: 'Wcześniejszy (Left arrow key)', // Alt text on left arrow
288			   tNext: 'Następny (Right arrow key)', // Alt text on right arrow
289			   tCounter: '%curr% z %total%' // Markup for "1 of 7" counter
290			},
291			image: {
292			    tError: '<a href="%url%">The image</a> could not be loaded.' // Error message when image could not be loaded
293			},
294			ajax: {
295			    tError: '<a href="%url%">The content</a> could not be loaded.' // Error message when ajax request failed
296			}
297		});
298
299		$('.popup-modal').magnificPopup({
300			type: 'inline',
301			preloader: false,
302			modal: true
303		});
304		$(document).on('click', '.popup-modal-dismiss', function (e) {
305			e.preventDefault();
306			$.magnificPopup.close();
307		});
308		$('.popup-modal').click();
309	}
310
311	$(".buzzer-on").click(function(){
312		$(".audio-stars").prop('muted', true);
313		$(".buzzer-on").hide();
314		$(".buzzer-off").show();
315	});
316
317	$(".buzzer-off").click(function(){
318		$(".audio-stars").prop('muted', false);
319		$(".buzzer-on").show();
320		$(".buzzer-off").hide();
321	});
322
323	var carouselWidget1 = $('.js-carousel-widget1');
324
325	// Carousel widget
326	carouselWidget1.owlCarousel({
327		items : 1,
328		nav: true,
329		autoplay: true,
330		autoplayTimeout: 5000,
331		autoplayHoverPause: true,
332		dots: false,
333		loop: true,
334	});
335
336	// i=1;
337	// carouselWidget1.find('.owl-dot').each(function(){
338	// 	$(this).text(i);
339	// 	i++;
340	// });
341
342});
343})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.