PageSourceSearch

https://www.kvetnice.eu/js/myjquery.js?v=21

js kvetnice.eu collected 2026-09-24 10:15:31 UTC 14,581 bytes, 452 lines download raw bytes

1$(document).ready(function () {
2
3    $('.toggle').click(function () {
4        $('.toggle').toggleClass('active');
5    });
6
7
8
9    $(".unblur").on('click', function (event) {
10        $(this).blur();
11    })
12
13
14    AOS.init({
15        disable: 'mobile'
16    });
17
18
19/* header 9 */
20if ($(".header9").length) {
21    $("a.dropdown-item,a.nav-link").hover(function () {
22        $('.info-submenu').addClass('d-none');      
23        let id = $(this).data('id');
24         console.log(id);
25        if (id.length) {
26             console.log('IIINNN');
27            $('.info-submenu[data-show="' + id + '"]').removeClass('d-none');
28        }
29    });
30}
31    
32 var width = $(this).width();
33
34    /* menu click x hover */
35    if (width < 769) {
36       
37    } else {
38        // click x hover
39        $('.dropdown.universalhover').hover(function () {
40            $(this).addClass('show');
41            $(this).find('.dropdown-menu').addClass('show');
42        }, function () {
43            $(this).removeClass('show');
44            $(this).find('.dropdown-menu').removeClass('show');
45        });
46         $('.dropdown.universalhover > a').click(function () {
47            location.href = this.href;
48        });
49    }
50
51    /* consent Youtube */
52    $("iframe").each(function (index) {
53        if ($(this).data('src')) {
54            let width = $(this).width();
55            let height = $(this).height();
56            $(this).css('position', 'relative');
57            $(this).before('<div class="ytoverlay" style="width:' + width + 'px;height:' + height + 'px"><div style="padding-bottom:10%;text-align:center;">Pro přehrání je potřeba přijmout <br><a href="#" onclick="showCookies();return false;">reklamní a sledovací cookies</a></div></div>');
58        }
59    })
60   
61    $(".magnific-video").each(function (index) {
62        $(this).before('<div class="ytoverlay" style="padding:1em;z-index:10;position:absolute;left:50%;transform:translateX(-50%);width:100%;height:100%;display:flex;align-items: center;justify-content:center;background-color:#eee"><div style="text-align:center;"><p>Pro zobrazení videa je potřeba přijmout reklamní a sledovací <a href="/cookies" class="underline" data-cc="c-settings">cookies</a></div></div>');
63    });
64
65    /* back to top */
66// browser window scroll (in pixels) after which the "back to top" link is shown
67    var offset = 300,
68            //browser window scroll (in pixels) after which the "back to top" link opacity is reduced
69            offset_opacity = 1200,
70            //duration of the top scrolling animation (in ms)
71            scroll_top_duration = 700,
72            //grab the "back to top" link
73            $back_to_top = $('.cd-top');
74
75    //hide or show the "back to top" link
76    $(window).scroll(function () {
77        ($(this).scrollTop() > offset) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
78        if ($(this).scrollTop() > offset_opacity) {
79            $back_to_top.addClass('cd-fade-out');
80        }
81    });
82
83    //smooth scroll to top
84    $back_to_top.on('click', function (event) {
85        event.preventDefault();
86        $('body,html').animate({
87            scrollTop: 0,
88        }, scroll_top_duration
89                );
90    });
91
92
93    /* Email reg */
94    $("#cancel_reg_mail").click(function () {
95        $("#action").val('delete_reg_mail');
96        $("#mail_form2").submit();
97        return false;
98    });
99
100
101    /* disable doubleclick */
102    $('.noresubmit').preventDoubleSubmission();
103    
104    /* pralaxie */
105    let imgSrc = $('.parallax-window').data('image-src');
106    if ($(".parallax-window").length) {
107        $('.parallax-window').parallax({
108            imageSrc: imgSrc,
109            speed: 0.2,
110        });
111    }
112    
113        /* pralaxie */
114    if ($(".parallaxie").length) {
115        $('.parallaxie').parallaxie({
116            speed: 0.5
117        });
118    }
119
120    /* links  */
121
122    var sliderNav = $('.linksslick');
123    var maxItems = Math.round(sliderNav.width() / 320);
124
125    sliderNav.slick({
126        dots: false,
127        slidesToShow: maxItems,
128        slidesToScroll: 1,
129        arrows: true,
130        autoplay: true,
131        prevArrow: '<img class="a-left control-c prev slick-prev" src="/images/universal/arrow_left_black.svg" width="19" height="51" alt="vlevo">',
132        nextArrow: '<img class="a-right control-c next slick-next" src="/images/universal/arrow_right_black.svg" width="19" height="51" alt="vpravo">',
133        responsive: [
134            {
135                breakpoint: 1200,
136                settings: {
137                    slidesToShow: 4,
138                    slidesToScroll: 1,
139                    infinite: true,
140                    dots: true
141                }
142            },
143            {
144                breakpoint: 1024,
145                settings: {
146                    slidesToShow: 3,
147                    slidesToScroll: 1,
148                    infinite: true,
149                    dots: true
150                }
151            },
152            {
153                breakpoint: 600,
154                settings: {
155                    slidesToShow: 2,
156                    slidesToScroll: 1
157                }
158            },
159            {
160                breakpoint: 480,
161                settings: {
162                    slidesToShow: 1,
163                    slidesToScroll: 1
164                }
165            }
166
167        ]
168    });
169
170    $("button#submit").click(function () {
171        $.ajax({
172            type: "POST",
173            url: "/templates/out/snippet/out_form_ajax.php",
174            data: $('form').serialize(),
175            success: function (msg) {
176                if (msg == 'OK') {
177
178                    $('#myModal .modal-body').html('Formulář odeslán.');
179                    $('#myModal').modal('show');
180                    $('input, textarea').val('');
181                } else {
182                    $("#alert" + msg).addClass('has-error');
183                    $("#alert" + msg + " input,#alert" + msg + " select").focus();
184                    $('#myModal .modal-body').html('Chyba ve formuláři.');
185                    $('#myModal').modal('show');
186
187                }
188            },
189            error: function () {
190                alert("Chyba");
191            }
192        });
193        return false;
194    });
195
196    $('form#mail_submit input[name="form_time"]').val(Math.floor(Date.now() / 1000));
197
198    $("#mail_submit").on('submit', function(e) {
199        e.preventDefault();
200
201        var $form = $(this);
202        var $submitButton = $form.find('button[type="submit"]');
203        if ($submitButton.prop('disabled')) {
204            return false;
205        }
206
207        var name = $form.find('#name').val();
208        var email = $form.find('#email').val();
209        var action = $form.data('action');
210        var lang = $form.data('lang');
211        var info = $form.find('#info').val();
212        var surname = $form.find('input[name="surname"]').val();
213        var formTime = $form.find('input[name="form_time"]').val();
214
215        if ((typeof email != 'undefined') && (typeof action != 'undefined')) {
216            $submitButton.prop('disabled', true);
217            $.ajax({
218                type: "POST",
219                url: "/progres/ajax/reg_mail.php",
220                data: {name: name, email: email, action: action, info: info, lang: lang, surname: surname, form_time: formTime},
221                dataType: "json"})
222                    .done(function (data) {
223                        if (data.success) {
224                            var text = data.text;
225                            $('#myModal').find('.modal-body').html(text);
226                        } else {
227                            var text = data.error;
228                            $('#myModal').find('.modal-body').html('Problém: ' + text);
229                        }
230                        $('#myModal').modal('show');
231                    })
232                    .fail(function (e) {
233                        //  alert("Chyba na serveru");
234                    })
235                    .always(function () {
236                        $submitButton.prop('disabled', false);
237                    });
238        }
239        return false;
240    });
241
242
243    /* print */
244    $("a#print_button").click(function () {
245        window.print();
246    });
247    $("a#tisknout-stranku").click(function () {
248        window.print();
249    });
250
251
252
253    $('.search-button').click(function () {
254        $('.search-block').addClass('on');
255          $('#search-mobile').focus();
256          
257        return false;
258    });
259
260    $('.close-search').click(function () {
261        $('.search-block').removeClass('on');
262        return false;
263    });
264    
265    // Skrytí formuláře při stisknutí ESC
266    document.addEventListener("keydown", function (event) {
267        if (event.key === "Escape") {
268           $('.search-block').removeClass('on');
269        }
270    });
271    
272    $('.change-submit').change(function () {
273        $(this).closest('form').trigger('submit');
274    });
275
276    $('.click-submit a').click(function () {
277        var letter = $(this).data('filter');
278        $('#filter-alphabet').val(letter);
279        $(this).closest('form').trigger('submit');
280    });
281
282
283    /* poll */
284    $('a.poll-answer').click(function () {
285        var q_id = $(this).data("id");
286        var item_id = $(this).data("item_id");
287        $.get("/progres/ajax/poll.php", {send: "ok", q_id: q_id, item_id: item_id},
288                function (data) {
289                    $('.poll').html(data);
290                });
291        return false;
292
293    });
294
295
296
297    /* mail ochrana*/
298    $("a.name").each(function (i, val) {
299        e = this.rel.replace('|', '@');
300        e = e.replace(/\//g, '.');
301        this.title = '';
302        this.href = 'mailto:' + e;
303        $(this).html(e);
304
305    })
306
307    /* obecna lehka mail ochrana*/
308    if ($("span.ochrana").length) {
309        // variables, which will be replaced
310        var at = / MOCHR /;
311        var dot = / MOCHR2 /g;
312
313        // function, which replaces pre-made class
314        $('span.ochrana').each(function () {
315            var addr = $(this).text().replace(at, '@').replace(dot, '.');
316            $(this).after('<a href="mailto:' + addr + '">' + addr + '</a>');
317            $(this).remove();
318        });
319    }
320
321
322/* drop down */
323    $(".nav").accessibleDropDown();
324  
325
326    /* drop down  2 column*/
327    $('ul.dropdown-menu').filter(function () {
328        return $(this).children().length > 10;
329    }).addClass('twoColumns');
330
331
332});
333
334
335
336
337
338
339
340$.fn.accessibleDropDown = function ()
341{
342    var el = $(this);
343
344    /* Setup dropdown menus for IE 6 */
345
346    $("li", el).mouseover(function () {
347        $(this).addClass("hover");
348    }).mouseout(function () {
349        $(this).removeClass("hover");
350    });
351
352    /* Make dropdown menus keyboard accessible */
353
354    $("a", el).focus(function () {
355        $(this).parents("li").addClass("hover");
356    }).blur(function () {
357        $(this).parents("li").removeClass("hover");
358    });
359}
360
361
362function number_format(number, decimals, dec_point, thousands_sep) {
363    // From: http://phpjs.org/functions
364    // +   original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
365    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
366    // +     bugfix by: Michael White (http://getsprink.com)
367    // +     bugfix by: Benjamin Lupton
368    // +     bugfix by: Allan Jensen (http://www.winternet.no)
369    // +    revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
370    // +     bugfix by: Howard Yeend
371    // +    revised by: Luke Smith (http://lucassmith.name)
372    // +     bugfix by: Diogo Resende
373    // +     bugfix by: Rival
374    // +      input by: Kheang Hok Chin (http://www.distantia.ca
374/)
375    // +   improved by: davook
376    // +   improved by: Brett Zamir (http://brett-zamir.me)
377    // +      input by: Jay Klehr
378    // +   improved by: Brett Zamir (http://brett-zamir.me)
379    // +      input by: Amir Habibi (http://www.residence-mixte.com/)
380    // +     bugfix by: Brett Zamir (http://brett-zamir.me)
381    // +   improved by: Theriault
382    // +      input by: Amirouche
383    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
384    // *     example 1: number_format(1234.56);
385    // *     returns 1: '1,235'
386    // *     example 2: number_format(1234.56, 2, ',', ' ');
387    // *     returns 2: '1 234,56'
388    // *     example 3: number_format(1234.5678, 2, '.', '');
389    // *     returns 3: '1234.57'
390    // *     example 4: number_format(67, 2, ',', '.');
391    // *     returns 4: '67,00'
392    // *     example 5: number_format(1000);
393    // *     returns 5: '1,000'
394    // *     example 6: number_format(67.311, 2);
395    // *     returns 6: '67.31'
396    // *     example 7: number_format(1000.55, 1);
397    // *     returns 7: '1,000.6'
398    // *     example 8: number_format(67000, 5, ',', '.');
399    // *     returns 8: '67.000,00000'
400    // *     example 9: number_format(0.9, 0);
401    // *     returns 9: '1'
402    // *    example 10: number_format('1.20', 2);
403    // *    returns 10: '1.20'
404    // *    example 11: number_format('1.20', 4);
405    // *    returns 11: '1.2000'
406    // *    example 12: number_format('1.2000', 3);
407    // *    returns 12: '1.200'
408    // *    example 13: number_format('1 000,50', 2, '.', ' ');
409    // *    returns 13: '100 050.00'
410    // Strip all characters but numerical ones.
411    number = (number + '').replace(/[^0-9+\-Ee.]/g, '');
412    var n = !isFinite(+number) ? 0 : +number,
413            prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
414            sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,
415            dec = (typeof dec_point === 'undefined') ? '.' : dec_point,
416            s = '',
417            toFixedFix = function (n, prec) {
418                var k = Math.pow(10, prec);
419                return '' + Math.round(n * k) / k;
420            };
421    // Fix for IE parseFloat(0.55).toFixed(0) = 0;
422    s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
423    if (s[0].length > 3) {
424        s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
425    }
426    if ((s[1] || '').length < prec) {
427        s[1] = s[1] || '';
428        s[1] += new Array(prec - s[1].length + 1).join('0');
429    }
430    return s.join(dec);
431}
432
433
434
435
436// jQuery plugin to prevent double submission of forms
437jQuery.fn.preventDoubleSubmission = function () {
438    $(this).on('submit', function (e) {
439        var $form = $(this);
440
441        if ($form.data('submitted') === true) {
442            // Previously submitted - don't submit again
443            e.preventDefault();
444        } else {
445            // Mark it so that the next submit can be ignored
446            $form.data('submitted', true);
447        }
448    });
449
450    // Keep chainability
451    return this;
452};

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.