PageSourceSearch

https://www.naostrzu.pl/js/script2.js?v=200324

js naostrzu.pl collected 2026-09-29 11:19:10 UTC 42,755 bytes, 1,142 lines download raw bytes

1$(document).ready(function () {
2    var dwbc = 250;
3    var koszyk = pokazCookie('koszyk');
4    if (koszyk != undefined) {
5        var t = koszyk.split('|');
6        var ssuma = parseFloat(t[1]);
7        $('#silosc').text(parseInt(t[0]));
8        $('#ssuma').text(ssuma + ' PLN');
9        if (dwbc > ssuma) {
10            dwbc = dwbc - ssuma;
11            $('#dwbc').text(dwbc.toMoney(2, '.') + ' PLN');
12        } else {
13            $('#dwbc')
14                .parent()
15                .html(
16                    '<b>Darmowa Wysyłka!</b> - Twoje zamówienie przekracza kwotę 250 zł'
17                );
18        }
19    } else {
20        $('#dwbc').text(dwbc.toMoney(2, '.') + ' PLN');
21    }
22
23    function createCookie(name, value, days) {
24        if (days) {
25            var date = new Date();
26            date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
27            var expires = '; expires=' + date.toGMTString();
28        } else var expires = '';
29        document.cookie = name + '=' + value + expires + '; path=/';
30    }
31    function getCookie(name) {
32        var ca = document.cookie.split(';');
33        for (var i = 0; i < ca.length; i++) {
34            var c = ca[i];
35            while (c.charAt(0) === ' ') c = c.substring(1, c.length);
36            if (c.indexOf(name) === 0) return c.substring(name.length + 1, c.length);
37        }
38    }
39
40    if (document.querySelector('#toProductCard') != null) {
41        document.querySelector('#toProductCard').addEventListener('click', function () {
42            document.querySelector('#productCard').scrollIntoView({ behavior: 'smooth' });
43        });
44    }
45
46    $('[data-resolution]').on('click', function (event) {
47        event.preventDefault();
48        elresolution = $(this).data('resolution');
49        $('.productBoxWrapper').removeClass('bigest');
50        $('.productBoxWrapper').removeClass('list');
51        $('.productBoxWrapper').removeClass('mini');
52        $('.productBoxWrapper').addClass(elresolution);
53
54        createCookie('resolution', elresolution, 10);
55
56        $('.productBoxWrapper')
57            .find('img.productBox-image')
58            .each(function () {
59                var imgProduct = $(this);
60                var getSrc = imgProduct.attr('src');
61                var puttSrc = getSrc;
62                if (elresolution == 'mini') {
63                    var puttSrc = puttSrc.replace('list', elresolution);
64                    var puttSrc = puttSrc.replace('bigest', elresolution);
65                }
66                if (elresolution == 'bigest') {
67                    var puttSrc = puttSrc.replace('mini', elresolution);
68                    var puttSrc = puttSrc.replace('list', elresolution);
69                }
70                if (elresolution == 'list') {
71                    var puttSrc = puttSrc.replace('mini', 'mini');
72                    var puttSrc = puttSrc.replace('bigest', 'mini');
73                }
74
75                imgProduct.attr('src', puttSrc);
76            });
77    });
78
79    $('html').removeClass('no-js');
80
81    $('.menu-h').on('click', function () {
82        $(this).toggleClass('active');
83        $('.nav-sub-sub-column, .nav-sub').removeClass('active');
84        $('nav .nav').toggleClass('active');
85    });
86
87    $('#autocomplete').autocomplete({
88        serviceUrl: '/produkty,autocomplete',
89        minChars: 3,
90        maxChars: 100,
91        noCache: true,
92        paramName: 'q',
93        deferRequestBy: 300,
94        preserveInput: true,
95        width: 320,
96
97        onSelect: function (suggestion) {
98            // alert('You selected: ' + suggestion.value + ', ' + suggestion.data);
99            window.location = suggestion.data;
100        }
101    });
102
103    $('.gg').on('click', function () {
104        //<script type="text/javascript" src="http://widget.gadu-gadu.pl/getCode.php?id=99ca6feee267d31ac3b38044694fc4c66c79cd14"></script>
105        var left = window.innerWidth / 2 - 225,
106            top = window.innerHeight / 2 - 200;
107        window.open(
108            'http://widget.gadu-gadu.pl/index-detached.php?id=99ca6feee267d31ac3b38044694fc4c66c79cd14',
109            'Konsultant',
110            'height=400, width=450, left=' +
111                left +
112                ', top=' +
113                top +
114                ', scrollbars=no, resizable=yes, status=no, toolbar=no, location=no'
115        );
116    });
117
118    if ($(window).width() <= 991) {
119        $('.nav-sub, .nav-sub-sub-column').append('<span class="nav-back">‹ </span>');
120
121        $('.nav-back').on('click', function (event) {
122            log('klikniety');
123            log($(this).parent());
124            event.preventDefault();
125            $(this).parent().removeClass('active');
126            if ($(this).parent().hasClass('nav-sub')) $('.menu-h').fadeIn('fast');
127        });
128
129        $('.a-lvl-1').on('click', function (event) {
130            $('.nav-sub').removeClass('active');
131            event.preventDefault();
132            $(this).parent().find('div.nav-sub').toggleClass('active');
133            $('.menu-h').fadeOut('fast');
134            return false;
135        });
136
137        $('.a-lvl-2.has-sub').on('click', function (event) {
138            $('.nav-sub-sub-column').removeClass('active');
139            event.preventDefault();
140            $(this).parent().parent().find('.nav-sub-sub-column').toggleClass('active');
141            return false;
142        });
143    }
144
145    $('.baza-tab li').on('click', function () {
146        $('.baza-tab li, .baza-tab-box').removeClass('active');
147        $(this).addClass('active');
148        $('.baza-tab-box').eq($(this).index()).addClass('active');
149    });
150    $('.baza-tab li:first-child').trigger('click');
151
152    /*
153	##       ####  ######   ##     ## ######## ########   #######  ##     ##
154	##        ##  ##    ##  ##     ##    ##    ##     ## ##     ##  ##   ##
155	##        ##  ##        ##     ##    ##    ##     ## ##     ##   ## ##
156	##        ##  ##   #### #########    ##    ########  ##     ##    ###
157	##        ##  ##    ##  ##     ##    ##    ##     ## ##     ##   ## ##
158	##        ##  ##    ##  ##     ##    ##    ##     ## ##     ##  ##   ##
159	######## ####  ######   ##     ##    ##    ########   #######  ##     ##
160 */
161
162    $('[data-lightbox]').each(function (i, e) {
163        var el = $(this),
164            a = el.find('a'),
165            data = el.data('lightbox'),
166            width,
167            height,
168            size,
169            type,
170            title;
171
172        if (a.size()) {
173            el = a;
174        }
175
176        if (data) {
177            size = data.match(/(\d+)x(\d+)/);
178            type = data.match(/(image|ajax|iframe|swf|inline)/);
179            title = data.match(/'(.+)'/);
180
181            if (size !== null) {
182                width = +size[1];
183                height = +size[2];
184            }
185
186            if (type !== null) {
187                type = type[1];
188            }
189
190            if (title !== null) {
191                title = title[1];
192            }
193        }
194
195        el.attr('rel', 'gallery' + i).fancybox({
196            titlePosition: 'inside',
197            overlayColor: '#000',
198            overlayOpacity: 0.2,
199            width: width,
200            height: height,
201            title: title,
202            cyclic: true,
203            padding: 0,
204            changeSpeed: 0,
205            changeFade: 50,
206            speedIn: 100,
207            speedOut: 100,
208            centerOnScroll: true,
209            type: type
210        });
211    });
212    /* data processing popup */
213    (function () {
214        $('[data-dppopup]').each(function () {
215            var i = $(this);
216            i.bind('click', function (e) {
217                e.preventDefault();
218                var uid = 'uid-' + Date.now();
219                $('body').append(
220                    '<style type="text/css">' +
221                        '.dp-popup{background:#FFF;bottom:0;-webkit-box-shadow:0px 0px 25px 0px rgba(0,0,0,0.5);-moz-box-shadow:0px 0px 25px 0px rgba(0,0,0,0.5);box-shadow:0px 0px 25px 0px rgba(0,0,0,0.5);color:#000;cursor:pointer;left:0;margin:auto;max-height:80%;max-width:800px;overflow:auto;position:fixed;right:0;top:0;width:96%;z-index:29999}' +
222                        '.dp-popup>div{padding:25px;text-align:left}' +
223                        '.dp-popup ul{margin:0 0 0 25px;padding:0}' +
224                        '.dp-popup ul>li{background:none;list-style:disc;margin:0;padding: 1px 0}' +
225                        '.dp-popup ol{margin:0 0 0 25px;padding:0}' +
226                        '.dp-popup ol>li{background:none;list-style:decimal;margin:0;padding: 1px 0}' +
227                        '</style>' +
228                        '<div class="dp-popup ' +
229                        uid +
230                        '">' +
231                        '<div>' +
232                        $(i.data('dppopup')).html() +
233                        '</div>' +
234                        '</div>'
235                );
236                $('.' + uid).bind('click', function () {
237                    $(this).remove();
238                });
239            });
240        });
241    })();
242    /* end */
243
244    /*
245	########  #######   ######    ######   ##       ########
246	   ##    ##     ## ##    ##  ##    ##  ##       ##
247	   ##    ##     ## ##        ##        ##       ##
248	   ##    ##     ## ##   #### ##   #### ##       ######
249	   ##    ##     ## ##    ##  ##    ##  ##       ##
250	   ##    ##     ## ##    ##  ##    ##  ##       ##
251	   ##     #######   ######    ######   ######## ########
252 */
253
254    $('[data-toggle]').bind('change click keyup', function (event) {
255        var el = $(this),
256            toggle = el.data('toggle'),
257            clear = el.data('toggleClear');
258
259        if (el.is(':checkbox')) {
260            if (el.prop('checked')) {
261                $(toggle).show();
262            } else {
263                $(toggle).hide();
264                if (clear) {
265                    $(toggle).find('input:text, textarea').val('');
266                }
267            }
268        } else if (el.is('select')) {
269            var selected = el.find('option:selected');
270            toggle = $(selected.data('val'));
271            selected.siblings().each(function () {
272                $($(this).data('val')).hide();
273            });
274            toggle.show();
275        } else if (el.is(':radio')) {
276            if (el.prop('checked')) {
277                var form = el.parents('form'),
278                    name = el.attr('name');
279                form.find('[name="' + name + '"]').each(function () {
280                    $($(this).data('toggle')).hide();
281                });
282                $(toggle).show();
283            } else {
284                $(toggle).hide();
285            }
286        } else {
287            $(toggle).toggle();
288            event.preventDefault();
289        }
290        // Ala F5 dla tooltipów bo możliwe, że zmieniła się ich pozycja
291        $('body, html').trigger('resize');
292    });
293
294    // Odświeżamy domyslnie zaznaczone checkboxy
295    $('input[data-toggle]:checkbox, select[data-toggle]').trigger('change');
296
297    /*
298	##     ##    ###    ##       #### ########     ###    ########  #######  ########
299	##     ##   ## ##   ##        ##  ##     ##   ## ##      ##    ##     ## ##     ##
300	##     ##  ##   ##  ##        ##  ##     ##  ##   ##     ##    ##     ## ##     ##
301	##     ## ##     ## ##        ##  ##     ## ##     ##    ##    ##     ## ########
302	 ##   ##  ######### ##        ##  ##     ## #########    ##    ##     ## ##   ##
303	  ## ##   ##     ## ##        ##  ##     ## ##     ##    ##    ##     ## ##    ##
304	   ###    ##     ## ######## #### ########  ##     ##    ##     #######  ##     ##
305 */
306
307    $('form')
308        .validator({
309            lang: $('html').attr('lang') || 'pl',
310            effect: 'qtip'
311        })
312        .attr('novalidate', 'novalidate');
313
314    /*
315     * Ajax form
316     */
317
318    $('form[data-ajax]').on('submit', function (event) {
319        if (!event.isDefaultPrevented()) {
320            var form = $(this),
321                loader = $(form.data('ajaxLoading')),
322                data = form.serializeJSON();
323
324            loader.fadeTo('fast', 0.8);
325
326            $.ajax({
327                url: form.data('ajax') || form.attr('action'),
328                type: 'POST',
329                dataType: 'json',
330                data: data,
331                success: function (json) {
332                    loader.fadeOut('fast');
333                    if (json.msg) {
334                        form.slideUp(function () {
335                            var info = $('<div/>', {
336                                text: json.msg,
337                                class: 'box box--ok'
338                            }).hide();
339                            form.replaceWith(info);
340                            info.fadeSlideToggle();
341                        });
342                    } else {
343                        form.data('validator').invalidate(json);
344                    }
345                }
346            });
347            event.preventDefault();
348        }
349    });
350
351    /*
352     * Adv form
353     */
354
355    $('form[data-advform]').on('submit', function (event) {
356        if (!event.isDefaultPrevented()) {
357            var form = $(this),
358                place = $(form.data('advformplace')),
359                button = form.find(form.data('advformbutton')),
360                data = form.serializeJSON();
361            form.data('sending', true);
362            button.css('opacity', '0.5');
363            button.attr('disable', 'disable');
364
365            // if (!form.data("sending")) {
366            // $.ajax({
367            //     url: form.data("advform-action") || form.attr("action"),
368            //     type: "POST",
369            //     dataType: "text",
370            //     data: html,
371            //     success: function (html) {
372            //         form.data("sending", false);
373            //         button.css({ opacity: 1 });
374            //         button.removeAttr("disable");
375            //         place.html(html);
376            //     },
377            //     error: function (html) {
378            //         form.data("sending", false);
379            //         button.css({ opacity: 1 });
380            //         button.removeAttr("disable");
381            //         console.log(html);
382            //     }
383            // });
384            // }
385            // event.preventDefault();
386        }
387    });
388
389    /*
390	######## ########  ######## ########
391	   ##    ##     ## ##       ##
392	   ##    ##     ## ##       ##
393	   ##    ########  ######   ######
394	   ##    ##   ##   ##       ##
395	   ##    ##    ##  ##       ##
396	   ##    ##     ## ######## ########
397 */
398
399    $('[data-tree]').each(function () {
400        var container = $(this),
401            open = container.data('tree');
402
403        if (open) {
404            open = $('#' + open).addClass('active');
405            open.parents('ul').show();
406            open.parents('li').addClass('open');
407            open.children('a').next('ul').show();
408        }
409
410        container.on('click', 'a', function (event) {
411            if ($(this).next('ul').size()) {
412                if (!$(this).hasClass('js-go')) {
413                    var a = $(this),
414                        li = a.parent('li'),
415                        next = a.next('ul'),
416                        speed = 200;
417
418                    if (li.hasClass('open')) {
419                        // Zamykamy
420                        var sub_li = next.find('li.open'),
421                            sub_menu = sub_li.find('ul');
422                        next.slideUp(speed);
423                        li.removeClass('open');
424                        sub_menu.slideUp(speed);
425                        sub_li.removeClass('open');
426                    } else {
427                        var sib_li = li.siblings().add(li.siblings().find('li.open')),
428                            sib_menu = li.siblings('.open').find('ul');
429                        // Otwieramy
430                        next.slideDown(speed);
431                        li.addClass('open');
432                        sib_li.removeClass('open');
433                        sib_menu.slideUp(speed);
434                    }
435                    event.preventDefault();
436                }
437            }
438        });
439    });
440
441    /*
442	########  #######   #######  ##       ######## #### ########   ######
443	   ##    ##     ## ##     ## ##          ##     ##  ##     ## ##    ##
444	   ##    ##     ## ##     ## ##          ##     ##  ##     ## ##
445	   ##    ##     ## ##     ## ##          ##     ##  ########   ######
446	   ##    ##     ## ##     ## ##          ##     ##  ##              ##
447	   ##    ##     ## ##     ## ##          ##     ##  ##        ##    ##
448	   ##     #######   #######  ########    ##    #### ##         ######
449 */
450
451    (function () {
452        $('[title]').qtip({
453            content: {
454                attr: 'title'
455            },
456            position: {
457                viewport: $('body')
458            }
459        });
460
461        var tooltip = {};
462
463        // Inputs
464        tooltip.inputsOldtitle = $(
465            'input[oldtitle], select[oldtitle], textarea[oldtitle]'
466        );
467        if (tooltip.inputsOldtitle.size()) {
468            tooltip.inputsOldtitle.each(function () {
469                $(this)
470                    .data('qtip')
471                    .set('position.my', 'center left')
472                    .set('position.at', 'center right')
473                    .set('style.classes', 'ui-tooltip-form')
474                    .reposition();
475            });
476        }
477
478        // Images
479        tooltip.dataImage = $('[data-image]');
480        tooltip.dataImageImages = [];
481        if (tooltip.dataImage.size()) {
482            tooltip.dataImage.each(function () {
483                tooltip.dataImageImages.push($(this).data('image'));
484            });
485            preload(tooltip.dataImageImages);
486
487            tooltip.dataImage.qtip({
488                content: {
489                    text: function (api) {
490                        return $('<img />').attr('src', $(this).data('image'));
491                    }
492                },
493                position: {
494                    viewport: $('body')
495                },
496                style: {
497                    classes: 'ui-tooltip-image'
498                },
499                show: {
500                    delay: 300
501                }
502            });
503        }
504
505        // Zoom
506        tooltip.dataZoom = $('[data-zoom]');
507        tooltip.dataZoomImages = [];
508        if (tooltip.dataZoom.size()) {
509            tooltip.dataZoom.each(function () {
510                tooltip.dataZoomImages.push($(this).data('zoom'));
511            });
512            preload(tooltip.dataZoomImages);
513
514            tooltip.dataZoom.qtip({
515                content: {
516                    text: function (api) {
517                        var parent = $(this).parents('a');
518                        if (parent.size()) {
519                            var a = $('<a/>', {
520                                href: $(this).parents('a').attr('href')
521                            });
522                            return a.append(
523                                $('<img />').attr('src', $(this).data('zoom'))
524                            );
525                        } else {
526                            return $('<img />').attr('src', $(this).data('zoom'));
527                        }
528                    }
529                },
530                position: {
531                    viewport: $('body'),
532                    my: 'center center',
533                    at: 'center center',
534                    adjust: {
535                        method: 'shift none'
536                    }
537                },
538                style: {
539                    classes: 'ui-tooltip-image'
540                },
541                show: {
542                    delay: 300
543                },
544                hide: {
545                    fixed: true
546                }
547            });
548        }
549    })();
550
551    /*
552	 ######  ##       #### ########  ######## ########
553	##    ## ##        ##  ##     ## ##       ##     ##
554	##       ##        ##  ##     ## ##       ##     ##
555	 ######  ##        ##  ##     ## ######   ########
556	      ## ##        ##  ##     ## ##       ##   ##
557	##    ## ##        ##  ##     ## ##       ##    ##
558	 ######  ######## #### ########  ######## ##     ##
559 */
560
561    // (function() {
562    // 	var slider = $('#slider'),
563    // 		content = slider.find('.slider-content-inner'),
564    // 		openClass = 'slider-controll-page--open',
565    // 		height = slider.height(),
566    // 		timer = null;
567
568    // 	var controll = {
569    // 		open: function(eq) {
570    // 			content.animate({
571    // 				top: height*eq*-1
572    // 			}, {
573    // 				queue: false,
574    // 				easing: 'easeInOutCubic',
575    // 				duration: 500
576    // 			});
577    // 			this.timer();
578    // 		},
579    // 		timer: function() {
580    // 			clearTimeout(timer);
581    // 			var self = this;
582    // 			timer = setTimeout(function() {
583    // 				var all = slider.find('.slider-controll-page'),
584    // 					current = all.filter('.'+openClass),
585    // 					next = current.next();
586    // 				if(!next.size()) {
587    // 					next = all.first();
588    // 				}
589    // 				next.trigger('click');
590    // 			}, 3500);
591    // 		}
592    // 	};
593
594    // 	controll.timer();
595
596    // 	if (slider.size()) {
597    // 		slider.on('click', '.slider-controll-page', function(event) {
598    // 			event.preventDefault();
599    // 			var t = $(this);
600    // 			t.addClass(openClass).siblings().removeClass(openClass);
601    // 			controll.open(t.index());
602    // 		});
603    // 	}
604    // })();
605
606    /*
607
608
609
610 /*
611 * INPOST
612 * @IMPORTANT:
613 * Remember - include in index.tpl head section:
614    {if $include=='koszyk.tpl'}
615        <link rel="stylesheet" href="https://geowidget.easypack24.net/css/easypack.css"/>
616        <script async src="https://geowidget.easypack24.net/js/sdk-for-javascript.js"></script>
617    {/if}
618 */
619    var inpost1 = 'inpost_przelew',
620        inpost2 = 'paczkomat_przelew',
621        inpost3 = 'brak',
622        inpost4 = 'brak'; // pobranie
623    $('input[name="dostawa"]').on('change', function () {
624        var i = $(this),
625            v = i.val();
626        if (
627            $.inArray(v, [inpost1, inpost2, inpost3, inpost4]) > -1 &&
628            i.prop('checked')
629        ) {
630            $('[data-cart]').attr('disabled', 'disabled');
631
632            $('[data-inpost]').remove();
633            var box = i.parents('div').first();
634            box.append(
635                '<div class="inpost" data-inpost>' +
636                    '<input type="hidden" name="inpost_code" id="inpost_code" class="hide" /><input type="hidden" name="inpost_city" id="inpost_city" class="hide" /><input type="hidden" name="inpost" id="inpost" class="hide" />' +
637                    '<div class="txt" style="padding: 10px 0;">Nie wybrano punktu</div>' +
638                    '<a href="#" class="button">Wybierz punkt</a>' +
639                    '</div>'
640            );
641            var code = box.find('[name="inpost_code"]'),
642                city = box.find('[name="inpost_city"]'),
643                name = box.find('[name="inpost"]'),
644                txt = box.find('.txt');
645
646            //var inpost = Cookies.get('inpost');
647            var inpost = getCookie('inpost');
648            try {
649                inpost = JSON.parse(inpost);
650                $.each(inpost, function (i, v) {
651                    inpost[i] = $('<div/>').text(v).html();
652                });
653                if (inpost.v != v) inpost = null;
654            } catch (e) {}
655
656            function epInit() {
657                //var types = v != inpost4 ? ['parcel_locker', 'pop'] : ['parcel_locker_only'];
658                var types = ['parcel_locker_only'];
659                easyPack.init({
660                    instance: 'pl',
661                    mobileSize: 786,
662                    mapType: 'osm',
663                    searchType: 'osm',
664                    points: {
665                        types: types,
666                        functions: ['parcel_collect']
667                    },
668                    map: {
669                        defaultLocation: [50.81, 19.11],
670                        initialTypes: types
671                    }
672                });
673                if (inpost) {
674                    easyPack.points.find(inpost.name, function (point) {
675                        inpost = point;
676                        if (inpost) {
677                            code.val(inpost.address_details.post_code);
678                            city.val(inpost.address_details.city);
679                            name.val(inpost.name);
680                            txt.html(
681                                '<div><b>' +
682                                    inpost.name +
683                                    '</b><br>' +
684                                    inpost.address.line1 +
685                                    '<br>' +
686                                    inpost.address.line2 +
687                                    '</div>'
688                            );
689                            $('[data-cart]').removeAttr('disabled');
690                        } else {
691                            epModalMap();
692                        }
693                    });
694                } else {
695                    epModalMap();
696                }
697            }
698            function epModalMap() {
699                $('#widget-modal').remove();
700                var map = easyPack.modalMap(
701                    function (point, modal) {
702                        modal.closeModal();
703                        inpost = point;
704                        inpost.v = v;
705                        code.val(inpost.address_details.post_code);
706                        city.val(inpost.address_details.city);
707                        name.val(inpost.name);
708                        txt.html(
709                            '<div><b>' +
710                                inpost.name +
711                                '</b><br>' +
712                                inpost.address.line1 +
713                                '<br>' +
714                                inpost.address.line2 +
715                                '</div>'
716                        );
717                        //Cookies.set('inpost', JSON.stringify({ name: inpost.name, v: v }), 300);
718                        createCookie(
719                            'inpost',
720                            JSON.stringify({ name: inpost.name, v: v }),
721                            1
722                        );
723                        $('[data-cart]').removeAttr('disabled');
724                    },
725                    { width: 1000, height: 600 }
726                );
727                if (inpost)
728                    var i = setInterval(function () {
729                        if ($('#widget-modal .leaflet-popup-pane').length) {
730                            map.searchLockerPoint(inpost.name);
731                            clearInterval(i);
732                        }
733                    }, 1000);
734            }
735            if (typeof window.easyPackAsyncInit == 'undefined')
736                window.easyPackAsyncInit = epInit;
737            else epInit();
738
739            box.find('a').on('click', function (e) {
740                e.preventDefault();
741                epModalMap();
742            });
743        } else {
744            $('[data-inpost]').remove();
745        }
746    });
747    /* end */
748
749    $('input[name=dostawa]:checked').trigger('change');
750
751    /* data cart button unlock fix */
752    $('input[name=dostawa]').on('change', function () {
753        var v = $(this).val();
754        if (
755            v &&
756            v != inpost1 &&
757            v != inpost2 &&
758            v != inpost3 &&
759            v != inpost4 &&
760            v != 'eprzesylka_przelew' &&
761            v != 'pwr_przelew' &&
762            v != 'pwr_przelew'
763        )
764            $('[data-cart]').removeAttr('disabled');
765    });
766    /* end */
767
768    /*
769    E przesyłka
770    */
771
772    var pp1 = 'odbiorW_przelew';
773
774    /*
775 * E-PRZESYŁKA
776 * @IMPORTANT:
777 * Remember - include in index.tpl head section:
778    {if $include=='koszyk.tpl'}
779        <script src="https://mapa.ecommerce.poczta-polska.pl/widget/scripts/ppwidget.js"></script>
780    {/if}
781 */
782    var pp1 = 'odbiorW_przelew',
783        pp2 = 'odbiorW_pobranie'; // pobranie
784    $('input[name="dostawa"]').on('change', function () {
785        var i = $(this),
786            v = i.val();
787        if ($.inArray(v, [pp1, pp2]) > -1 && i.prop('checked')) {
788            $('[data-cart]').attr('disabled', 'disabled');
789
790            $('[data-pp]').remove();
791            var box = i.parents('div').first();
792            box.append(
793                '<div class="pp" data-pp>' +
794                    '<input type="hidden" name="eprzesylka" id="eprzesylka_item"/>' +
795                    '<input type="hidden" name="eprzesylka_city" id="eprzesylka_city"/><input type="hidden" name="wid" id="wojewodztwo"/>' +
796                    '<div class="txt" style="padding: 10px 0;">Nie wybrano punktu</div>' +
797                    '<a href="#" class="button">Wybierz punkt</a>' +
798                    '</div>'
799            );
800            var id = box.find('[name="eprzesylka"]'),
801                city = box.find('[name="eprzesylka_city"]'),
802                wid = box.find('[name="wid"]'),
803                txt = box.find('.txt');
804
805            var pp = Cookies.get('pp');
806            try {
807                pp = JSON.parse(pp);
808                $.each(pp, function (i, v) {
809                    pp[i] = $('<div/>').text(v).html();
810                });
811                if (pp.v != v) pp = null;
812            } catch (e) {}
813
814            function ppInit() {
815                if (pp) {
816                    id.val(pp.id);
817                    city.val(pp.city);
818                    wid.val(pp.province);
819                    txt.html(
820                        '<div><b>' +
821                            pp.id +
822                            '</b><br>' +
823                            pp.name +
824                            '<br>' +
825                            pp.street +
826                            '<br>' +
827                            pp.code +
828                            ' ' +
829                            pp.city +
830                            '</div>'
831                    );
832                    $('[data-cart]').removeAttr('disabled');
833                } else {
834                    ppMap();
835                }
836            }
837            function ppMap() {
838                PPWidgetApp.toggleMap({
839                    address: pp ? pp.street + ', ' + pp.code + ' ' + pp.city : '',
840                    payOnPickup: v == pp2,
841                    callback: function (point) {
842                        id.val(point.pni);
843                        city.val(point.city);
844                        wid.val(point.province);
845                        txt.html(
846                            '<div><b>' +
847                                point.pni +
848                                '</b><br>' +
849                                point.name +
850                                '<br>' +
851                                point.street +
852                                '<br>' +
853                                point.zipCode +
854                                ' ' +
855                                point.city +
856                                '</div>'
857                        );
858                        Cookies.set(
859                            'pp',
860                            JSON.stringify({
861                                id: point.pni,
862                                name: point.name,
863                                street: point.street,
864                                code: point.zipCode,
865                                city: point.city,
866                                province: point.province,
867                                v: v
868                            }),
869                            300
870                        );
871                        $('[data-cart]').removeAttr('disabled');
872                    }
873                });
874            }
875            ppInit();
876
877            box.find('a').on('click', function (e) {
878                e.preventDefault();
879                ppMap();
880            });
881        } else {
882            $('[data-pp]').remove();
883        }
884    });
885
886    $('input[name=dostawa]:checked').trigger('change');
887
888    /*
889     ######  ##     ##  #######  ########
890    ##    ## ##     ## ##     ## ##     ##
891    ##       ##     ## ##     ## ##     ##
892     ######  ######### ##     ## ########
893          ## ##     ## ##     ## ##
894    ##    ## ##     ## ##     ## ##
895     ######  ##     ##  #######  ##
896*/
897    $('[data-cart]').on('click', function (event) {
898        event.preventDefault();
899        var form = $(this).parents('form'),
900            dostawa = $('input[name="dostawa"]:checked', form).val(),
901            error = $($(this).data('cart'));
902
903        if (dostawa) {
904            //dodano 12.02.15
905            if (
906                dostawa == inpost1 ||
907                dostawa == inpost2 ||
908                dostawa == inpost3 ||
909                dostawa == inpost4
910            ) {
911                if ($('#inpost_city').val() == '0') {
912                    error.removeClass('hide');
913                } else {
914                    if (!$('#inpost').length) {
915                        error.removeClass('hide');
916                    } else {
917                        form[0].action += '?cashdesk=1';
918                        form.submit();
919                    }
920                }
921            } else {
922                form[0].action += '?cashdesk=1';
923                form.submit();
924            }
925        } else {
926            error.removeClass('hide');
927        }
928    });
929    //Dodano 12.02.15
930    $('input[name="dostawa"]').on('click', function () {
931        var form = $(this).closest('form'),
932            error = form.find('#error-delivery');
933
934        if (!error.hasClass('hide')) {
935            error.addClass('hide');
936        }
937    });
938    //Dodano 12.02.15
939    $('.cart').on('change', '#inpost_city', function (e) {
940        var form = $(this),
941            error = $('#error-delivery'),
942            select = form.find(':selected').val();
943
944        if (!error.hasClass('hide')) {
945            error.addClass('hide');
946        }
947    });
948
949    /*
950	 ######  ##     ##    ###    ##       ##                ##  ######
951	##    ## ###   ###   ## ##   ##       ##                ## ##    ##
952	##       #### ####  ##   ##  ##       ##                ## ##
953	 ######  ## ### ## ##     ## ##       ##                ##  ######
954	      ## ##     ## ######### ##       ##          ##    ##       ##
955	##    ## ##     ## ##     ## ##       ##          ##    ## ##    ##
956	 ######  ##     ## ##     ## ######## ########     ######   ######
957 */
958
959    $('[data-increment]').on('click', function (event) {
960        event.preventDefault();
961        $($(this).data('increment')).get(0).value++;
962    });
963    $('[data-decrement]').on('click', function (event) {
964        event.preventDefault();
965        $($(this).data('decrement')).get(0).value--;
966    });
967
968    $('input[placeholder]').placeholderLabel();
969
970    $('[data-cycle]').cycle();
971
972    $.SocialBar({
973        facebook: 'https://www.facebook.com/Naostrzupl' // Full URL
974        // twitter:  'twitter.html', // HTML file to iframe with Twitter plugin
975        // google:   '102950211117817014361', // Page ID
976        // youtube:  'freddiew' // Username
977    });
978
979    /*
980	########  ########   #######  ########  ##     ##  ######  ########
981	##     ## ##     ## ##     ## ##     ## ##     ## ##    ##    ##
982	##     ## ##     ## ##     ## ##     ## ##     ## ##          ##
983	########  ########  ##     ## ##     ## ##     ## ##          ##
984	##        ##   ##   ##     ## ##     ## ##     ## ##          ##
985	##        ##    ##  ##     ## ##     ## ##     ## ##    ##    ##
986	##        ##     ##  #######  ########   #######   ######     ##
987*/
988
989    (function () {
990        var $rozmiar = $('#rozmiar'),
991            $price = $('#price');
992
993        if ($price.length) {
994            var updatePrace = function (price) {
995                price = parseFloat(price);
996                $price.text(price.toMoney(2, '.'));
997            };
998            if ($rozmiar.length) {
999                $rozmiar.on('change', function () {
1000                    var $option = $rozmiar.find('option:selected');
1001                    updatePrace($option.data('price'));
1002                });
1003            }
1004            updatePrace($price.text());
1005        }
1006    })();
1007
1008    /*
1009	 ######   #######   #######  ##    ## #### ########  ######
1010 	##    ## ##     ## ##     ## ##   ##   ##  ##       ##    ##
1011 	##       ##     ## ##     ## ##  ##    ##  ##       ##
1012 	##       ##     ## ##     ## #####     ##  ######    ######
1013 	##       ##     ## ##     ## ##  ##    ##  ##             ##
1014 	##    ## ##     ## ##     ## ##   ##   ##  ##       ##    ##
1015 	 ######   #######   #######  ##    ## #### ########  ######
1016 */
1017    /*
1018    (function () {
1019        function CookieMonster() {
1020            this.init.apply(this, arguments);
1021        }
1022
1023        CookieMonster.prototype = {
1024            init: function (info, more, description, force) {
1025                if (this.showed() && !force) return;
1026                this.html = $(
1027                    '<div class="cookieMonster">' +
1028                        '<div class="cookieMonster-info">' +
1029                        info +
1030                        '<span href="#" class="cookieMonster-close">&times;</span>' +
1031                        '<span href="#" class="cookieMonster-more">' +
1032                        more +
1033                        '</span>' +
1034                        '</div>' +
1035                        '<div class="cookieMonster-description">' +
1036                        description +
1037                        '</div>' +
1038                        '</div>'
1039                );
1040                var self = this,
1041                    body = $(document.body);
1042
1043                this.html.appendTo(body);
1044                this.description = this.html.find('.cookieMonster-description');
1045                this.more = this.html.find('.cookieMonster-more');
1046                this.close = this.html.find('.cookieMonster-close');
1047
1048                this.more.bind('click.cookieMonster', function () {
1049                    self.showDescription();
1050                });
1051
1052                this.close.bind('click.cookieMonster', function () {
1053                    self.hide();
1054                });
1055            },
1056            hide: function () {
1057                this.html.slideUp(200, function () {
1058                    $(this).remove();
1059                });
1060                this.showed(true);
1061            },
1062            showed: function (save) {
1063                if (save) {
1064                    var date = new Date();
1065                    date.setTime(date.getTime() + 356 * 24 * 60 * 60 * 1000);
1066                    document.cookie = 'CookieMonster=showed; expires=' + date.toGMTString() + '; path=/';
1067                } else {
1068                    var name = 'CookieMonster=';
1069                    var ca = document.cookie.split(';');
1070                    for (var i = 0; i < ca.length; i++) {
1071                        var c = ca[i];
1072                        while (c.charAt(0) === ' ') c = c.substring(1, c.length);
1073                        if (c.indexOf(name) === 0) return c.substring(name.length, c.length);
1074                    }
1075                    return null;
1076                }
1077            },
1078            showDescription: function () {
1079                this.description.slideToggle();
1080            }
1081        };
1082
1083        new CookieMonster(
1084            'Nasza strona używa plików cookies. Jeśli nie chcesz, by pliki cookies były zapisywane na Twoim dysku zmień ustawienia swojej przeglądarki.',
1085            'Przeczytaj więcej o cookies',
1086            '<p><b>Czym są pliki „cookies”?</b></p>' +
1087                '<p>Pliki „cookies” to informacje tekstowe przechowywane na urządzeniu końcowym użytkownika (przeglądarka internetowa) w celu rozpoznania urządzenia  tak, aby móc dostarczyć funkcjonalności  takich jak np.: koszyk sklepowy, logowanie. Pliki cookies nie wyrządzają żadnych szkód urządzeniom na których są zapisywane.</p>' +
1088                '<p><b>Pliki cookies są wykorzystywane  na niniejszej stronie internetowej, do poniższych celów:</b></p>' +
1089                '<ul>' +
1090                '<li>utrzymywanie sesji użytkownika  na stronie po zalogowaniu, dzięki czemu nie ma konieczności podawania loginu i hasła na każdej podstronie, którą odwiedza użytkownik. Plik „cookies” wykorzystywane do tego celu są przechowywane tylko do momentu zakończenia sesji danej przeglądarki. Są automatycznie usuwane po jej zamknięciu.</li>' +
1091                '<li>umożliwienie funkcjonowania mechanizmu „koszyka sklepowego”, który zapamiętuje produkty do niego dodane, bez konieczności ponownego ich dodawania do koszyka za każdym razem gdy użytkownik przechodzi na kolejną podstronę. Plik „cookies „wykorzystywane do tego celu  mogą być przechowywane dłużej niż bieżąca sesja przeglądarki użytkownika aby móc zapamiętać i przywrócić w razie zamknięcia przeglądarki, produktów, które użytkownik dodał do koszyka.</li>' +
1092                '<li>gromadzenie ogólnych, anonimowych statystyk  zachowań użytkowników na stronie, w celu poprawy zawartości oraz funkcjonalności strony internetowej.</li>' +
1093                '</ul>' +
1094                '<p><b>Usuwanie plików cookies:</b></p>' +
1095                '<p>Oprogramowanie do przeglądania stron internetowych ma domyślnie ustawione akceptowanie przyjmowania plików cookies. Ustawienie to można zmienić samodzielnie w dowolnym czasie tak aby pliki cookies były blokowane. Zablokowanie plików cookies może jednak spowodować nieprawidłowe funkcjonowanie mechanizmów na stronie internetowej co uniemożliwi w szczególności np.: korzystanie z koszyka zakupowego lub logowanie użytkownika.</p>'
1096            // , true
1097        );
1098    })();
1099    */
1100});
1101
1102// raty
1103
1104function nowe_okno() {
1105    window.open(
1106        'https://www.santanderconsumer.pl/raty-jak-kupic',
1107        'nowe_okno',
1108        'width=600,height=500,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no'
1109    );
1110}
1111function validate_Santander() {
1112    if (document.id_formularza_zamowienia.id_nazwy_pola_raty_zgoda.checked == false) {
1113        alert(
1114            'Zanim złożysz zamówienie, zapoznaj sie z procedura udzielenia kredytu ratalnego e-Raty 
1114Santander Consumer Bank.'
1115        );
1116        return false;
1117    } else {
1118        return true;
1119    }
1120}
1121
1122function PoliczRate(koszyk) {
1123    window.open(
1124        'https://wniosek.eraty.pl/symulator/oblicz/numerSklepu/13210028/wariant sklepu/1/typ produktu/0/wartoscTowarow/' +
1125            koszyk,
1126        'Policz_rate',
1127        'width=640,height=500,directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no'
1128    );
1129}
1130
1131function pokazCookie(nazwa) {
1132    if (document.cookie != '') {
1133        var cookies = document.cookie.split('; ');
1134        for (i = 0; i < cookies.length; i++) {
1135            var nazwaCookie = cookies[i].split('=')[0];
1136            var wartoscCookie = cookies[i].split('=')[1];
1137            if (nazwaCookie === nazwa) {
1138                return unescape(wartoscCookie);
1139            }
1140        }
1141    }
1142}

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.