PageSourceSearch

https://zdarskevrchy.cz/public/frontend/js/custom.js?v=2.3

js zdarskevrchy.cz collected 2026-10-02 12:11:22 UTC 10,334 bytes, 418 lines download raw bytes

1/*
2	Template Name: Digiqole - News Magazine Newspaper HTML5 Template
3	Author: Tripples
4	Author URI: https://themeforest.net/user/tripples
5	Description: Digiqole - News Magazine Newspaper HTML5 Template
6	Version: 1.1
7	1. Main slideshow
8	2. Site search
9	3. Owl Carousel
10	4. Video popup
11	5. Contact form
12	6. Back to top
13  
14*/
15
16
17jQuery(function($) {
18  "use strict";
19
20	/* ----------------------------------------------------------- */
21	/*  Mobile Menu
22	/* ----------------------------------------------------------- */
23	$('.navbar-nav .menu-dropdown').on('click', function (event) {
24		event.preventDefault();
25		event.stopPropagation();
26		$(this).siblings().slideToggle();
27	});
28	
29
30	$('.nav-tabs[data-toggle="tab-hover"] > li > a').hover( function(){
31    	$(this).tab('show');
32	});
33
34	/**-------------------------------------------------
35     *Fixed HEader
36     *----------------------------------------------------**/
37
38	$(window).on('scroll', function () {
39
40		/**Fixed header**/
41		if ($(window).scrollTop() > 250) {
42		   $('.is-ts-sticky').addClass('sticky fade_down_effect');
43		} else {
44		   $('.is-ts-sticky').removeClass('sticky fade_down_effect');
45		}
46  });
47
48
49	/* ----------------------------------------------------------- */
50	/*  Nová galerie MU 29.5.2021
51	/* ----------------------------------------------------------- */
52
53	if ( $.isFunction($.fn.lightSlider) ) {
54		var slider = $('#imageGallery').lightSlider({
55			gallery:true,
56			autoWidth:true,
57			adaptiveHeight:true,
58			loop:true,
59			item:1,
60			thumbItem:6,
61			responsive: true,
62			onSliderLoad: function(el) {
63				el.lightGallery({
64					selector: '#imageGallery .lslide',
65					thumbnail: true,
66					download: false,
67					videojs: true,
68					videojsOptions: {
69						muted: true,
70					},
71				});
72			},
73			onBeforeSlide: function (el) {
74				$('#current').text(el.getCurrentSlideCount());
75			}
76		});
77
78		var slider = $('#imageGalleryClanek').lightSlider({
79			autoWidth:false,   /* LU 17/05/2022 původně true */
80			loop:true,
81			verticalHeight: 100,
82			onSliderLoad: function(el) {
83				el.lightGallery({
84					selector: '#imageGalleryClanek .lslide',
85					thumbnail: true,
86					download: false,
87					videojs: true,
88					videojsOptions: {
89						muted: true,
90					},
91				});
92			},
93			onBeforeSlide: function (el) {
94				$('#current').text(el.getCurrentSlideCount());
95			},
96			responsive : [
97				{
98					breakpoint:800,
99					settings: {
100						item:3,
101						slideMove:1,
102						slideMargin:6,
103					}
104				},
105				{
106					breakpoint:480,
107					settings: {
108						item:2,
109						slideMove:1
110					}
111				}
112			]
113		});
114
115		var slider = $('#imageGalleryLevyNahled').lightSlider({
116			gallery:true,
117			item:1,
118			vertical:true,
119			verticalHeight:560,
120			vThumbWidth:200,
121			thumbItem:5,
122			thumbMargin:1,
123			slideMargin:0,
124			onSliderLoad: function(el) {
125				el.lightGallery({
126					selector: '#imageGalleryLevyNahled .lslide',
127					download: false
128				});
129			},
130			onBeforeSlide: function (el) {
131				$('#current').text(el.getCurrentSlideCount());
132			}
133		});
134	}
135
136
137	$('.imageSingle').lightGallery({
138		thumbnail: false,
139		download: false
140	});
141
142	$('.galerieAutor').lightGallery({
143		thumbnail: true,
144		download: false
145	});
146
147	if ( $.isFunction($.fn.lightSlider) ) {
148		$('#imageGalleryBezNahledu').lightSlider({
149			gallery:false,
150			autoWidth:true,
151			adaptiveHeight: false,
152			loop:false,
153			onSliderLoad: function(el) {
154				el.lightGallery({
155					selector: '#imageGalleryBezNahledu .lslide',
156					download: false
157				});
158			}
159		});
160	}
161
162	//oblibene, vychozi bod
163	$( ".vychoziBod" ).click(function( event ) {
164		//event.preventDefault();
165
166		//$('#vychoziBodModal').modal('show');
167		//$('#vychoziBodModal').modal('show');
168
169		$.post( "/Akce/Index/vychozi_bod", { gps_lat: $(this).data("lat"), gps_lon: $(this).data("lon"), nazev: $(this).data("nazev"), img: $(this).data("img"), url: $(this).data("url") })
170			.done(function( data ) {
171				//tady asi udělám redirect na vysvětlujicí stránku nebo modal
172				//alert(data);
173				$( "#vychoziBodModal" ).modal.show();
174
175				//alert(data);
176			});
177	});
178
179	$( ".razeni" ).click(function( event ) {
180		event.preventDefault();
181		$.post( "/Akce/Index/razeni", { sort: $(this).data("sort"), navrat: $(this).parent().data("url")})
182			.done(function( data ) {
183				location.reload();
184			});
185	});
186
187	$( ".oblibeneAdd" ).click(function( event ) {
188		event.preventDefault();
189		alert("jsem tu oblibene");
190	});
191
192	//obrázky v obsahu
193	$( ".post-content-area-vrchy > img" ).addClass("img-fluid");
194
195
196	//ovládání mapy.cz na mobilu
197	//na mobilu mapu 2 prsty
198	$("#m").on('touchstart', function (e){
199		if (width <= 600)
200		{
201			if (e.touches.length > 1)
202			{
203				document.body.setAttribute("style","touch-action: pan-x;");
204				m.addControl(pohybPoMape);
205			}
206
207			if (e.touches.length <= 1)
208			{
209				document.body.setAttribute("style","touch-action: auto;");
210				m.removeControl(pohybPoMape);
211			}
212		}
213	});
214
215
216	/* ----------------------------------------------------------- */
217	/*  Back to top
218	/* ----------------------------------------------------------- */
219
220		$(window).scroll(function () {
221			if ($(this).scrollTop() > 50) {
222				 $('.backto').fadeIn();
223			} else {
224				 $('.backto').fadeOut();
225			}
226		});
227
228		// scroll body to 0px on click
229		$('.backto').on('click', function () {
230			 $('.backto').tooltip('hide');
231			 $('body,html').animate({
232				  scrollTop: 0
233			 }, 800);
234			 return false;
235		});
236		
237		$('.backto').tooltip('hide');
238
239	/* ----------------------------------------------------------- */
240	/*  Obsluha patickove mapy 02.02.2022
241	/* ----------------------------------------------------------- */
242
243	$('#mapaSection').hide();
244
245	$( '.mapaPopup' ).click(function() {
246		$('#mapaSection').show();
247
248		$('body,html').animate({
249			scrollTop: $('#mapaSection').offset().top
250		}, 800);
251	});
252
253
254	$( ".oblibene" ).click(function() {
255
256
257		var model = $( this ).data("model");
258		var idmodel = $( this ).data("idmodel");
259		var nazev = $( this ).data("nazev");
260		var url = $( this ).data("url");
261		var imgurl = $( this ).data("imgurl");
262
263		var kategorie = $( this ).data("kategorie");
264		var kategorieid = $( this ).data("kategorieid");
265		var kategorieurl = $( this ).data("kategorieurl");
266
267		//gps
268		var lat = $( this ).data("lat");
269		var lon = $( this ).data("lon");
270		var obec = $( this ).data("obec");
271
272		//pomocná kvůli změně ikony
273		var pom = $( this ).parent();
274		var pomKlik = $( this );
275
276		var formData = {model:model,idmodel:idmodel,nazev:nazev,url:url,imgurl:imgurl,
277			kategorie:kategorie,
278			kategorieId:kategorieid,
279			kategorieUrl:kategorieurl,
280			lat:lat,
281			lon:lon,
282			obec:obec,
283		}; //Poskládám do post pole
284
285		$.ajax({ //make ajax request to cart_process.php
286			url: "/Oblibene/Add",
287			type: "POST",
288			dataType: "json",
289			data: formData,
290			success: function(data, textStatus, jqXHR)
291			{
292				$("#wishlist_link").text("Oblibené ("+data.countItems+")");
293
294				//hláška
295				//$("#hlaska_text").text(data.text);
296				//$('#oblibeneModal').modal('show');
297				//setTimeout(function() {$('#oblibeneModal').modal('hide');}, 1500);
298
299				pom.removeClass("wishlist").addClass("wishlist_close");
300				pomKlik.text('-');
301				//location.reload();
302			},
303			error: function (jqXHR, textStatus, errorThrown)
304			{
305				alert("Chyba->"+textStatus);
306			}
307		})
308
309	});
310
311	$( ".oblibeneDetail" ).click(function() {
312
313
314		var model = $( this ).data("model");
315		var idmodel = $( this ).data("idmodel");
316		var nazev = $( this ).data("nazev");
317		var url = $( this ).data("url");
318		var imgurl = $( this ).data("imgurl");
319
320		var kategorie = $( this ).data("kategorie");
321		var kategorieid = $( this ).data("kategorieid");
322		var kategorieurl = $( this ).data("kategorieurl");
323
324		//gps
325		var lat = $( this ).data("lat");
326		var lon = $( this ).data("lon");
327		var obec = $( this ).data("obec");
328
329		//pomocná kvůli změně ikony
330		var pom = $( this ).parent();
331		var pomKlik = $( this );
332
333		var formData = {model:model,idmodel:idmodel,nazev:nazev,url:url,imgurl:imgurl,
334			kategorie:kategorie,
335			kategorieId:kategorieid,
336			kategorieUrl:kategorieurl,
337			lat:lat,
338			lon:lon,
339			obec:obec,
340		}; //Poskládám do post pole
341
342		$.ajax({ //make ajax request to cart_process.php
343			url: "/Oblibene/Add",
344			type: "POST",
345			dataType: "json",
346			data: formData,
347			success: function(data, textStatus, jqXHR)
348			{
349				$("#wishlist_link").text(""+data.countItems+"");
350
351				//hláška
352				//$("#hlaska_text").text(data.text);
353				//$('#oblibeneModal').modal('show');
354				//setTimeout(function() {$('#oblibeneModal').modal('hide');}, 1500);
355
356				// pom.removeClass("wishlist").addClass("wishlist_close");
357				//pomKlik.text('-');
358				location.reload();
359			},
360			error: function (jqXHR, textStatus, errorThrown)
361			{
362				alert("Chyba->"+textStatus);
363			}
364		})
365
366	});
367
368	$( ".oblibeneDelete" ).click(function() {
369
370		var idOblibene = $( this ).data("id");
371		var formData = {idOblibene:idOblibene}; //Poskládám do post pole
372
373		$.ajax({ //make ajax request to cart_process.php
374			url: "/Oblibene/Delete",
375			type: "POST",
376			dataType: "json",
377			data: formData,
378			success: function(data, textStatus, jqXHR)
379			{
380
381				console.log(data);
382
383				$("#wishlist_link").text("Oblibené ("+data.countItems+")");
384
385				//hláška
386				$("#hlaska_text").text(data.text);
387				$('#oblibeneModal').modal('show');
388				setTimeout(function() {$('#oblibeneModal').modal('hide');}, 1500);
389
390				location.reload();
391			},
392			error: function (jqXHR, textStatus, errorThrown)
393			{
394				alert("Chyba->"+textStatus);
395			}
396		})
397
398	});
399
400	$('.printMe').click(function(){
401		window.print();
402	});
403
404	function copyToClipboard(text) {
405		var sampleTextarea = document.createElement("textarea");
406		document.body.appendChild(sampleTextarea);
407		sampleTextarea.value = text; //save main text in it
408		sampleTextarea.select(); //select textarea contenrs
409		document.execCommand("copy");
410		document.body.removeChild(sampleTextarea);
411	}
412
413	$('.clipboard').click(function(){
414		var obsah = $('.clipboardInput').val();
415		copyToClipboard(obsah);
416	});
417
418});

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.