PageSourceSearch

https://dolekop.com/js/script.js?ver=1791334292

js dolekop.com collected 2026-10-07 00:51:50 UTC 12,389 bytes, 472 lines download raw bytes

1var retypecaptcha = false;
2
3$(window).load(function () {
4	$(".Collage").removeWhitespace().collagePlus({
5		"fadeSpeed"     : 0,
6		"targetHeight"  : 400,
7	});
8
9	$(".Collage300").removeWhitespace().collagePlus({
10		"fadeSpeed"     : 0,
11		"targetHeight"  : 300
12	});
13	
14	$(".Collage").collageCaption();	
15	//$(".nastred").collageCaption();	
16	
17	/*
18	//vygeneruji si kolazove nahledy
19	$(".Collage img").each(function( index ) {
20  		console.log( index + ": " + $( this ).attr('src') +  ": " + $( this ).width() );
21	});
22	*/
23	
24	var readnextshow = 1;
25	
26	$(window).bind('scroll', function() {
27		/*
28		if (($(window).scrollTop() > 80) && $(window).width() > 1000) {
29       	$('#fixed-menu-nav').fadeIn();
30   	}
31   	else {
32       	$('#fixed-menu-nav').fadeOut();
33   	}
34   	
35   	if (($(window).scrollTop() > 600) && $(window).width() > 1000) {
36       	$('#click2top').fadeIn();
37   	}
38   	else {
39       	$('#click2top').fadeOut();
40   	}
41   	*/
42  		var vyskaclanku = $( ".textclanku" ).height();
43   	if($(document).scrollTop() >= vyskaclanku/2 && $(window).width() > 1000){
44        	if(readnextshow == 1) $("#readnext").show("slow");
45      }else 
46      	$("#readnext").hide("slow");
47	});
48	
49	$('#closereadnext').click(function(e){
50		e.preventDefault();
51		$('#readnext').hide('slow');
52		readnextshow = 0;
53		return false;
54	});
55	
56	$('#closereadnextforever').click(function(e){
57		e.preventDefault();
58		$('#readnext').hide('slow');
59		readnextshow = 0;
60		var d = new Date();
61	   d.setTime(d.getTime() + (365*24*60*60*1000));
62  		var expires = "expires="+ d.toUTCString();
63		document.cookie = "readnextshow=0; expires=" + expires; 
64		return false;
65	});
66});
67
68$(document).ready(function(){
69	menuOnScroll();
70	
71	$('.showhidecom').click(function(e){
72		e.preventDefault();
73		var sh = $(this).data('comment');
74		$(this).closest('p').hide('800');
75		$('#showhidecom' + sh).show('800');
76	});
77		
78	
79	$('#menu').slicknav({});
80
81	$(".fb").fancybox({
82		openEffect	: 'none',
83		closeEffect	: 'none',
84		tpl: {
85		  next: '<a title="Další" class="fancybox-nav fancybox-next"><span></span></a>',
86		  prev: '<a title="Předchozí" class="fancybox-nav fancybox-prev"><span></span></a>'
87		 },
88		 helpers : {
89        title: {
90				type: 'inside'
91			}
92    	}
93	});
94
95function setCookie(cname, cvalue, exdays) {
96    var d = new Date();
97    d.setTime(d.getTime() + (exdays*24*60*60*1000));
98    var expires = "expires="+d.toUTCString();
99    document.cookie = cname + "=" + cvalue + "; " + expires;
100}
101
102function getCookie(cname) {
103    var name = cname + "=";
104    var ca = document.cookie.split(';');
105    for(var i = 0; i < ca.length; i++) {
106        var c = ca[i];
107        while (c.charAt(0) == ' ') {
108            c = c.substring(1);
109        }
110        if (c.indexOf(name) == 0) {
111            return c.substring(name.length, c.length);
112        }
113    }
114    return "";
115}
116
117	$.stylesheetInit();
118	$('#switchbg').bind('click',function(e){
119			$.stylesheetToggle();
120			return false;
121		}
122	);
123
124	$('.tabs').tabslet({
125	  autorotate: true,
126	  mouseevent: 'hover',
127	  attribute: 'data-tab',
128	  delay: 5000
129	});
130   
131	$('#fixed-menu-nav').hide();
132
133	$('.scroll-pane').hover(
134	function(){$('.jspVerticalBar').show();},
135	function(){$('.jspVerticalBar').hide();}
136	);
137	
138	$('.whatisnew').hover(
139	function(){
140		$(this).css('overflow','auto')
141	},
142	function(){
143		$(this).css('overflow','hidden')
144	});
145	
146	$('.scroll-pane').jScrollPane();
147	
148	$('a.back').click(function(){
149		parent.history.back();
150		return false;
151	});
152		
153	$('a.blank').click(function(){
154		window.open(this.href);
155		return false;
156	});
157		
158	$('.textclanku a:not(.fb, .lcl)').click(function(){
159		window.open(this.href);
160		return false;
161	});
162	
163	$('.trigger').click(function(e){
164		e.preventDefault();
165		var id = $(this).prop('id');
166		$("#trigger-"+id).toggle();
167		
168		if ($("#trigger-"+id).is(":visible")){
169			var titulek = 'Skrýt';
170		}else {
171			var titulek = 'Zobrazit';
172		}
173		$(this).prop('title', titulek);
174		
175		return false;
176	});
177	
178	$(".bupdss").click(function(e) {	
179		e.preventDefault();
180		
181    	var len = $("input[name='upds[]']:checked").length;
182		if(len > 0)
183			$(".bupd").submit();
184		else
185			alert('Vyberte alespoň jeden inzerát pro aktualizaci');
186	});
187		
188	$('#bupdsa').click(function(e) {  //on click
189	if(this.checked) { // check select status
190		$('.bupds').each(function() {
191			this.checked = true;                
192		});
193        }else{
194		$('.bupds').each(function() {
195			this.checked = false;                       
196		});        
197        }
198	})
199	
200	/*mazani foto z bazaru*/
201	$("body").on("click", ".frem", function(e){
202		e.preventDefault();
203		var a = $(this);
204		var h = $(this).attr('href');
205		var isok = false;
206		$.ajax({
207			type		: "GET",
208			cache	: false,
209			url		: h,
210			data		: {'ajax' : "yes" },
211			success: function(data) {
212				a.parent().hide();
213			},
214			error: function(data) {
215				alert("Při zpracování došlo k chybě.");
216			}
217		});
218	});
219	/*#mazani foto z bazaru*/	
220	//:not(.async)
221	$('form').each(function() {
222		$(this).validate({ 
223			errorPlacement: function(error, element){
224	            // Set positioning based on the elements position in the form
225	            var elem = $(element),
226	               corners = ['top right', 'bottom right'],
227	               flipIt = elem.parents('span.right').length > 0;
228	
229	            if(!error.is(':empty')) {
230	               elem.filter(':not(.valid)').qtip({
231	                  overwrite: false,
232	                  content: error,
233	                  position: {
234	                     my: corners[ flipIt ? 0 : 1 ],
235	                     at: corners[ flipIt ? 1 : 0 ],
236	                     viewport: $(window)
237	                  },
238	                  show: {
239	                     event: false,
240	                     ready: true
241	                  },
242	                  hide: false
243	                  
244	               })
245	               .qtip('option', 'content.text', error);
246	            }
247	            else { elem.qtip('destroy'); }
248	       },
249		   success: 	$.noop, // Odd workaround for errorPlacement not firing!
250	      submitHandler: function(form) {
251	      	var forsubmit = false;
252				if ( $( "#captcha" ).length ){// je captcha
253					var rewww = /([a-z]+\:\/+)([^\/\s]*)([a-z0-9\-@\^=%&;\/~\+]*)[\?]?([^ \#]*)#?([^ \#]*)/ig;
254					var remail = /(([^<>()\[\]\\.,;:\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,}))/ig;
255   
256					 
257					var str = $("#cf_text").val();
258					var m;
259					
260					if(retypecaptcha == false) { //nezadal znova captcha
261						if ((m = remail.exec(str)) !== null || (m = rewww.exec(str)) !== null) { // mame url nebo mail
262						    $('#captcha').show();
263						    $('#kod').val('');
264						    retypecaptcha = true;
265						}else{ //neni url
266							forsubmit = true;
267						}
268					}else{ //zadal znova captcha
269							forsubmit = true;
270					}
271				}else{ //neni captcha
272					forsubmit = true;
273				}
274				
275				if (typeof ajaxsubmit == 'undefined' || !ajaxsubmit){ // pokud to neni ajax
276					if(forsubmit == true)
277						form.submit();
278				}
279			}
280
281		});
282	}
283	);
284
285	$('.hlasuj').click(function (e) {
286		e.preventDefault();
287		$('#markerbox').html = '<p><img src="/design/ajax-loader.gif" alt="" /></p>';
288		var h = $(this).attr('href');
289		$.ajax({
290			type		: "GET",
291			cache	: false,
292			url		: h,
293			data		: {'ajax' : "yes" },
294			success: function(data) {
295				$('#markerbox').html(data);
296			},
297			error: function(data) {
298				alert("Při zpracování došlo k chybě.");
299			}
300		});
301		
302	});
303
304
305	$(".reset").click(function() {
306		location.href = '/bazar';
307	});
308
309	$(".confirm").click(function() {
310		var ans = confirm('Opravdu chcete smazat položku?');
311		if (ans)
312			return true;
313		else
314			return false;
315	});
316	
317	var kurz = 26.5;	
318	
319	$('#euro2kc').click(function(){
320		var euro = $("#bzr3euro").val();
321		if(!isNaN(euro)){
322			var kc = euro * kurz;
323			$("#bzr3").val(kc);
324		}else{
325			alert('Cena v Euro musí být vyplněna číslem!');
326		}
327		
328	});
329	
330	$('#kc2euro').click(function(){
331		var kc = $("#bzr3").val();
332		if(!isNaN(kc)){
333			var euro = Math.round(kc / kurz);
334			$("#bzr3euro").val(euro);
335		}else{
336			alert('Cena v Kč musí být vyplněna číslem!');
337		}
338		
339	});
340
341
342	/*
343	$('#fixed-menu-nav h1').click(function(event){
344		$('html, body').animate({
345			scrollTop: 0
346		}, 500);
347    		event.preventDefault();
348	});
349	
350	$("#formular").validate({
351		rules: {
352			telefon: {required: true,number: true, minlength: 9,	maxlength: 13}
353		}
354	});	
355
356	var validator = $("#orderform").validate({
357		rules: {
358			jmeno: {required: true},
359			email: {required: true, email: true},
360			'vzkaz': {required: false},
361			'mesto': {required: true},
362			'ulice': {required: true},
363			telefon: {required: true,number: true, minlength: 9,	maxlength: 13},
364			psc: {required: true,number: true, minlength: 5, maxlength: 5},
365			fapsc: {required: false,number: true, minlength: 5, maxlength: 5},
366		},
367		submitHandler: function(form) { 
368			$.post("send.php", $("#orderform").serialize(), "text/plain;charset=utf-8",
369			'text')
370			.done(function(data) {
371				if( $( data ).filter( "#card" ).length ) {
372					top.location.href = '/pos';
373				}else{
374					
375					$("#vysledek").html(data);
376				}
377				$("#orderform")[0].reset();
378				$("#vysledek").show('slow');
379				$("#of").html('<div class="container"><div class="sixteen columns nastred"><a href="#" class="tlacitko cervene" onclick="parent.$.fancybox.close();">Pokračovat</a></div></div>');
380			})
381		},
382		messages: {
383			telefon: {required: "Vyplňte telefon pouze čísly!"},
384			jmeno: {required: "Vyplňte Vaše jméno a příjmení!"},
385			email: {required: "Zadejte e-mailovou adresu!"},
386			'vzkaz': {required: "Pole je vyžadováno!"},
387			'mesto': {required: "Pole je vyžadováno!"},
388			'ulice': {required: "Pole je vyžadováno!"},
389			psc: {required: "Vyplňte PSČ pouze čísly!"},
390        	}
391	});
392	*/
393});
394
395
396function menuOnScroll() {
397   var lastScrollTop, $window = $(window), offset = 10;
398
399    $window.on('scroll',function()  {       
400			$('#mobile-menu').css("position","fixed");
401	      var scrollTop = $window.scrollTop();
402			var height = $('#mobile-menu').height() + 10
403        $('#mobile-menu').css({ top: scrollTop > lastScrollTop && scrollTop > offset ? -height : 0 });
404        lastScrollTop = scrollTop; 
405    });     
406}
407
408(function() {
409  $(function() {
410  	var ww = $( window ).width();
411  	if(ww > 1140){
412    return $("[data-sticky_column]").stick_in_parent({
413      parent: "[data-sticky_parent]"
414    });
415    }
416  });
417
418  $(window).on("resize", (function(_this) {
419    return function(e) {
420      return $(document.body).trigger("sticky_kit:recalc");
421    };
422  })(this));
423
424}).call(this);
425
426var charArray = new Array(
427	' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-',
428	'.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';',
429	'<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
430	'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
431	'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e',
432	'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
433	't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '�', 'Ç', 'ü',
434	'é', 'â', 'ä', 'ŕ', 'ĺ', 'ç', 'ę', 'ë', 'č', 'ď', 'î', 'ě', 'Ä', 'Ĺ',
435	'É', 'ć', 'Ć', 'ô', 'ö', 'ň', 'ű', 'ů', '˙', 'Ö', 'Ü', 'ř', 'Ł', 'Ř',
436	'×', 'ƒ', 'á', 'í', 'ó', 'ú', 'ń', 'Ń', 'Ş', 'ş', 'ż', 'Ž', 'Ź', '˝',
437	'ź', 'Ą', 'Ť', 'ť', '_', '_', '_', 'Ś', 'Ś', 'Á', 'Â', 'Ŕ', 'Š', 'Ś',
438	'Ś', '+', '+', '˘', 'Ľ', '+', '+', '-', '-', '+', '-', '+', 'ă', 'Ă',
439	'+', '+', '-', '-', 'Ś', '-', '+', '¤', 'đ', 'Đ', 'Ę', 'Ë', 'Č', 'i',
440	'Í', 'Î', 'Ď', '+', '+', '_', '_', 'Ś', 'Ě', '_', 'Ó', 'ß', 'Ô', 'Ň',
441	'ő', 'Ő', 'ľ', 'ţ', 'Ţ', 'Ú', 'Ű', 'Ů', 'ý', 'Ý', 'Ż', '´', '­', 'ą',
442	'_', 'ž', 'ś', '§', '÷', '¸', '°', '¨', 'ˇ', 'Å¡', 'ł', '˛', '_', ' ');�
443function byteToChar(n)
444	{
445	if(n < 32 || n > 255) return " ";
446	return charArray[n-32];
447}
448
449function cfh(theForm)
450	{
451	var hex_str = clean_numstr(theForm, 16);
452	var char_str = "";
453	var num_str = "";
454	var i;
455	for(i=0; i < hex_str.length; i+=2)
456		char_str += byteToChar(parseInt(hex_str.substring(i, i+2), 16));
457	return char_str
458}
459
460function clean_numstr(raw_str, base)
461	{
462	var ret_str = "";
463	var c = "";
464	var i;
465	for(i=0; i < raw_str.length; i++) {
466		c = raw_str.charAt(i);
467		if(c == "0" || parseInt(c, base) > 0) {
468			ret_str += c;
469		}
470	}
471	return ret_str;
472}

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.