PageSourceSearch

https://www.holidaytrip-spain.com/widget/script/loadScriptsForFrontpage/lang/es/action/index

js holidaytrip-spain.com collected 2026-10-08 07:17:43 UTC 25,876 bytes, 681 lines download raw bytes

1var WidgetTXT =  WidgetTXT || {};WidgetTXT[149] = WidgetTXT[149] || {};
2WidgetTXT[149].TrwaUruchamianieSystemuRezerwacji = 'Booking system launch in progress...';
3WidgetTXT[149].Zamknij = 'Close';var pokoj = "night";var pokoje = "rooms";var pokoi = "accommodation";var pokoju = "night";var idosellbooking_defaultLang =  149;var idosellbooking_domain =  "https://client6691.idobooking.com";var idosellbooking_affiliate_id =  "";var idosellbooking_acp_configuration = {"widgetDomain":"https:\/\/client6691.idobooking.com\/book-now"};var idosellbooking_is_new_domain_for_widget = 1;var url_to_save_currency = "https://www.holidaytrip-spain.com/es/frontpage/save-currency";var action_after_save_currency = "index";var displayCloseDialog = false;
4var confirmmessage_pop = '';
5
6function iai_booking_button(obj) {
7    var lang = obj.lang;
8    if (typeof obj.langNew !== 'undefined') {
9        // automatyczny język
10        lang = obj.langNew;
11        if (obj.langNew == 0) {
12            var langTmp = navigator.languages ?
13              navigator.languages[0] :
14              (navigator.language || navigator.userLanguage);
15            langTmp = langTmp.split('-')[0];
16            lang = obj.langIdCodes[langTmp];
17            obj.lang = lang;
18        }
19    }
20
21    var text3 = (typeof obj.literalsInLang[lang].button === 'undefined') ? 'Rezerwuj Online' : obj.literalsInLang[lang].button;
22
23    var buttons = document.getElementsByClassName('i_do_sell_booking_widget_start');
24    for (var i = 0; i < buttons.length; i++) {
25        buttons[i].textContent = text3;
26    }
27}
28
29function getParmFromHashIdoSellBooking(idosellbooking_url, idosellbooking_parm) {
30    var idosellbooking_re = new RegExp("(#|hashurl).*[?&]" + idosellbooking_parm + "=([^&]+)(&|$)");
31    var idosellbooking_match = idosellbooking_url.match(idosellbooking_re);
32    return (idosellbooking_match ? idosellbooking_match[2] : "");
33}
34window.addEventListener('message', function (e) {
35    const trustedBaseDomains = ['idobooking.com', 'idosell.com'];
36    const isOriginTrusted = trustedBaseDomains.some(domain => {
37        const isBaseDomain = e.origin === `https://${domain}`;
38        const isSubdomain = e.origin.endsWith(`.${domain}`);
39
40        return isBaseDomain || isSubdomain;
41    });
42    if (!isOriginTrusted) {
43        console.warn('Rejected message from untrusted origin:', e.origin);
44        return;
45    }
46    if (typeof e.data == 'object') {
47        if (typeof e.data.action == 'string') {
48            switch (e.data.action) {
49                case 'copy':
50                    copyFromEvent(e.data.value);
51                    break;
52            }
53        }
54        return;
55    }
56    if (e.data == 'noDisplayCloseDialog') {
57        displayCloseDialog = false;
58    }
59    if (e.data.indexOf("#txtCloseDialog") == 0) {
60        displayCloseDialog = true;
61        confirmmessage_pop = e.data.replace("#txtCloseDialog:", "");
62    }
63});
64
65async function copyFromEvent(text) {
66    await navigator.clipboard.writeText(text);
67}
68
69booking_init = {
70    init: function () {
71        this.checkAndRedirectForMobile();
72        booking_init.initButtons();
73    },
74    checkAndRedirectForMobile: function () {
75        if (typeof idosellbooking_is_mobile != 'undefined' && idosellbooking_is_mobile == "1") {
76            window.location = idosellbooking_frontpage_url;
77        }
78    },
79    link: function () {
80        return idosellbooking_domain;
81    },
82    initButtons: function () {
83        if (!document.getElementById('idosellbooking_css')) {
84            var idosellbooking_css = document.createElement("link");
85            idosellbooking_css.rel = "stylesheet";
86            idosellbooking_css.type = "text/css";
87            idosellbooking_css.id = "idosellbooking_css";
88            idosellbooking_css.href = booking_init.link() + "/template/widget/css/generate-widget.css.gz";
89            document.getElementsByTagName("head")[0].appendChild(idosellbooking_css);
90        }
91    },
92    load_widget: function (url) {
93        window.open(url, '_blank');
94    },
95    remove_widget: function () {
96        if (displayCloseDialog && confirmmessage_pop) {
97            if (!confirm(confirmmessage_pop)) {
98                return false;
99            }
100        }
101        var idosellbooking_widget = document.getElementById("booking-widgetWrapper");
102        idosellbooking_widget.parentNode.removeChild(idosellbooking_widget);
103        displayCloseDialog = false;
104        document.body.classList.remove('booking-widget');
105    }
106};
107
108//// HELPERS
109var mobileCheck = {
110    ios: (function () {
111        return navigator.userAgent.match(/iPhone|iPad|iPod/i);
112    }()),
113    android: (function () {
114        return navigator.userAgent.match(/Android/i);
115    }()),
116    blackBerry: (function () {
117        return navigator.userAgent.match(/BB10|Tablet|Mobile/i);
118    }()),
119    windows: (function () {
120        return navigator.userAgent.match(/IEMobile/i);
121    }()),
122    smartphone: (function () {
123        return (window.innerWidth <= 384 && window.innerHeight <= 640);
124    }()),
125    tablet: (function () {
126        return (navigator.userAgent.match(/Tablet|iPad|iPod/i) && window.innerWidth <= 1280 && window.innerHeight <= 800);
127    }()),
128    all: (function () {
129        return navigator.userAgent.match(/Android|BlackBerry|Tablet|Mobile|iPhone|iPad|iPod|Opera Mini|IEMobile/i);
130    }())
131};
132
133booking_init.init();
134
135function getGoogleAnalyticsClientIdParam() {
136    if (typeof ga !== 'undefined') {
137        var clientId = null;
138        ga(function (tracker) {
139            clientId = tracker.get('clientId');
140        });
141        if (clientId) {
142            return '/ga_client_id/' + clientId;
143        }
144    }
145
146    return '';
147}
148
149async function getGaLinkerParam() {
150    var ret = {};
151
152    try {
153        var gl = new URLSearchParams(window.location.search).get('_gl');
154        if (gl) {
155            ret.gl = gl;
156            return ret;
157        }
158    } catch (e) {}
159
160    try {
161        if (typeof gtag === 'function' && typeof googleAnalytics4Id !== 'undefined' && googleAnalytics4Id) {
162            const [cid, sid] = await Promise.all([
163                withTimeout(new Promise(r => gtag('get', googleAnalytics4Id, 'client_id', r)), 1000),
164                withTimeout(new Promise(r => gtag('get', googleAnalytics4Id, 'session_id', r)), 1000),
165            ]);
166            ret.clientId = cid;
167            ret.sessionId = sid;
168        }
169    } catch (e) {}
170
171    return ret;
172}
173
174function withTimeout(p, ms) {
175    return Promise.race([p, new Promise(r => setTimeout(() => r(undefined), ms))]);
176}
177
178function generateWidgetIdoSellBooking(object) {
179    try {
180        var client_id = object.getAttribute('data-client');
181        if ((client_id !== null) && (typeof client_id != 'undefined') && (parseInt(client_id) > 0)) {
182            if (typeof idosellbooking_is_new_domain_for_widget != 'undefined' && idosellbooking_is_new_domain_for_widget) {
183                idosellbooking_domain = 'https://engine' + client_id + '.idobooking.com';
184            } else {
185                idosellbooking_domain = 'https://client' + client_id + '.idosell.com';
186            }
187        }
188    } catch (error) {}
189
190    var idosellbooking_link = idosellbooking_domain + '/widget/booking/defaultchoice';
191
192    var idosellbooking_widgetStart = object;
193    if (idosellbooking_widgetStart.getAttribute("data-start-date") &&
194      idosellbooking_widgetStart.getAttribute("data-end-date")) {
195        idosellbooking_link += '/start_date/' + idosellbooking_widgetStart.getAttribute("data-start-date") +
196          '/end_date/' + idosellbooking_widgetStart.getAttribute("data-end-date");
197    }
198    if (idosellbooking_widgetStart.getAttribute("currency")) {
199        idosellbooking_link += '/currency/' + idosellbooking_widgetStart.getAttribute("currency");
200    }
201    if (idosellbooking_widgetStart.getAttribute("language")) {
202        idosellbooking_link += '/language/' + idosellbooking_widgetStart.getAttribute("language");
203    }
204    if (idosellbooking_widgetStart.getAttribute("data-currency")) {
205        idosellbooking_link += '/currency/' + idosellbooking_widgetStart.getAttribute("data-currency");
206    }
207    if (idosellbooking_widgetStart.getAttribute("data-price_type")) {
208        idosellbooking_link += '/price_type/' + idosellbooking_widgetStart.getAttribute("data-price_type");
209    }
210    if (idosellbooking_widgetStart.getAttribute("data-price_from")) {
211        idosellbooking_link += '/price_from/' + idosellbooking_widgetStart.getAttribute("data-price_from");
212    }
213    if (idosellbooking_widgetStart.getAttribute("data-price_to")) {
214        idosellbooking_link += '/price_to/' + idosellbooking_widgetStart.getAttribute("data-price_to");
215    }
216    if (idosellbooking_widgetStart.getAttribute("data-language")) {
217        idosellbooking_link += '/language/' + idosellbooking_widgetStart.getAttribute("data-language");
218    }
219    if (idosellbooking_widgetStart.getAttribute("data-location")) {
220        idosellbooking_link += '/location/' + idosellbooking_widgetStart.getAttribute("data-location");
221    }
222    if (idosellbooking_widgetStart.getAttribute("data-loc_country")) {
223        idosellbooking_link += '/loc_country/' + idosellbooking_widgetStart.getAttribute("data-loc_country");
224    }
225    if (idosellbooking_widgetStart.getAttribute("data-loc_city")) {
226        idosellbooking_link += '/loc_city/' + idosellbooking_widgetStart.getAttribute("data-loc_city");
227    }
228    if (idosellbooking_widgetStart.getAttribute("data-loc_region")) {
229        idosellbooking_link += '/loc_region/' + idosellbooking_widgetStart.getAttribute("data-loc_region");
230    }
231    if (idosellbooking_widgetStart.getAttribute("data-persons-adult")) {
232        idosellbooking_link += '/persons-adult/' + idosellbooking_widgetStart.getAttribute("data-persons-adult");
233    }
234    if (idosellbooking_widgetStart.getAttribute("data-persons-child-big")) {
235        idosellbooking_link += '/persons-child-big/' + idosellbooking_widgetStart.getAttribute("data-persons-child-big");
236    }
237    if (idosellbooking_widgetStart.getAttribute("data-persons-child-small")) {
238        idosellbooking_link += '/persons-child-small/' + idosellbooking_widgetStart.getAttribute("data-persons-child-small");
239    }
240    if (idosellbooking_widgetStart.getAttribute("data-rooms")) {
241        idosellbooking_link += '/rooms/' + idosellbooking_widgetStart.getAttribute("data-rooms");
242    }
243    if (idosellbooking_widgetStart.getAttribute("data-promotion")) {
244        idosellbooking_link += '/promotion_id/' + idosellbooking_widgetStart.getAttribute("data-promotion");
245    }
246    if (idosellbooking_widgetStart.getAttribute("data-show-details")) {
247        idosellbooking_link += '/show-details/' + idosellbooking_widgetStart.getAttribute("data-show-details");
248    }
249    if (idosellbooking_widgetStart.getAttribute("data-skin")) {
250        idosellbooking_link += '/skin/' + idosellbooking_widgetStart.getAttribute("data-skin");
251    }
252    idosellbooking_link += '/from_own_button/1';
253    idosellbooking_link += getGoogleAnalyticsClientIdParam();
254    var addedParam = false;
255    if (idosellbooking_widgetStart.getAttribute("data-object")) {
256        var objectsArray = idosellbooking_widgetStart.getAttribute("data-object").split(',');
257        if (objectsArray.length) {
258            idosellbooking_link += '?';
259            var objectUrlArray = [];
260            for (i = 0; i < objectsArray.length; ++i) {
261                objectUrlArray.push('ob[' + objectsArray[i] + ']');
262            }
263            idosellbooking_link += objectUrlArray.join('&');
264            addedParam = true;
265        }
266    }
267
268    if (idosellbooking_widgetStart.getAttribute("data-offer")) {
269        var offersArray = idosellbooking_widgetStart.getAttribute("data-offer").split(',');
270        if (offersArray.length) {
271            idosellbooking_link += ((addedParam === true) ? '&amp;' : '?');
272            var offerUrlArray = [];
273            for (i = 0; i < offersArray.length; ++i) {
274                offerUrlArray.push('of[' + offersArray[i] + ']');
275            }
276            idosellbooking_link += offerUrlArray.join('&');
277            addedParam = true;
278        }
279    }
280
281    if (idosellbooking_widgetStart.getAttribute("data-promotions")) {
282        var promotionsArray = idosellbooking_widgetStart.getAttribute("data-promotions").split(',');
283        if (promotionsArray.length) {
284            idosellbooking_link += ((addedParam === true) ? '&amp;' : '?');
285            var promotionUrlArray = [];
286            for (i = 0; i < promotionsArray.length; ++i) {
287                promotionUrlArray.push('pr[' + promotionsArray[i] + ']');
288            }
289            idosellbooking_link += promotionUrlArray.join('&');
290            addedParam = true;
291        }
292    }
293
294    if ((idosellbooking_widgetStart.getAttribute("data-offer") ||
295        idosellbooking_widgetStart.getAttribute("data-object")) &&
296      idosellbooking_widgetStart.getAttribute("data-show-other-objects")) {
297        idosellbooking_link += '&showOtherOffers=' + idosellbooking_widgetStart.getAttribute("data-show-other-objects");
298    }
299
300    if (typeof page != 'undefined' && page != '') {
301        idosellbooking_link += (addedParam ? '&amp;' : '?') + 'redirect=' + page;
302        addedParam = true;
303    }
304    if ((typeof idosellbooking_affiliate_id != 'undefined') && (parseInt(idosellbooking_affiliate_id) > 0)) {
305        idosellbooking_link += (addedParam ? '&amp;' : '?') + 'booking-cpa=' + parseInt(idosellbooking_affiliate_id);
306        addedParam = true;
307    }
308
309    getGaLinkerParam().then(function (glParams) {
310        if (glParams.gl) {
311            idosellbooking_link += (addedParam ? '&' : '?') + '_gl=' + encodeURIComponent(glParams.gl);
312            addedParam = true;
313        } else if (glParams.clientId && glParams.sessionId) {
314            idosellbooking_link += (addedParam ? '&' : '?')
315              + 'gClientId='  + encodeURIComponent(glParams.clientId)
316              + '&gSessionId=' + encodeURIComponent(glParams.sessionId);
317            addedParam = true;
318        }
319
320        booking_init.load_widget(idosellbooking_link);
321    });
322}
323
324autoloadIdoSellBooking = function () {
325    var hashParams = getCookie('hash_params');
326    if (isSafari() && hashParams) {
327        document.cookie = "hash_params=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
328        document.location.href = document.URL + '#widget=' + hashParams;
329    }
330    var documentURL = decodeURIComponent(document.URL);
331    if (documentURL.indexOf('#widget?page=') != -1 || documentURL.indexOf('#widget=') != -1 || documentURL.indexOf('?hashurl=') != -1) {
332        if (documentURL.indexOf('#widget?page=') != -1) {
333            // automatyczne otwieranie widgetu, jeżeli w url jest parametr #widget?page
334            var idosellbooking_url = getParmFromHashIdoSellBooking(documentURL, 'page');
335        } else if (documentURL.indexOf('#widget=') != -1) {
336            // automatyczne otwieranie widgetu, jeżeli w url jest parametr #widget=
337            var idosellbooking_url = documentURL.substring(documentURL.indexOf('#widget=') + 8);
338            idosellbooking_url = idosellbooking_url.substring(0, idosellbooking_url.indexOf('&'));
339        } else {
340            // automatyczne otwieranie widgetu, jeżeli w url jest parametr ?hashurl=
341            var idosellbooking_url = documentURL.substring(documentURL.indexOf('?hashurl=') + 9);
342            idosellbooking_url = idosellbooking_url.substring(0, idosellbooking_url.indexOf('&'));
343        }
344
345        if (idosellbooking_url.substring(0, 7) != 'widget/') { // zabezpieczenie dla starych linków, wygenerowanych przed zmianą domyślnego modułu na wizytówkę
346            idosellbooking_url = 'widget/' + idosellbooking_url;
347        }
348        var idosellbooking_lang = (getParmFromHashIdoSellBooking(documentURL,
349          'lang')) ? getParmFromHashIdoSellBooking(documentURL, 'lang') : idosellbooking_defaultLang;
350        var idosellbooking_link = idosellbooking_domain + '/widget/booking/defaultchoice/language/' + idosellbooking_lang +
351          '?redirect=' + idosellbooking_url;
352
353        getGaLinkerParam().then(function (glParams) {
354            if (glParams.gl) {
355                idosellbooking_link += '&_gl=' + encodeURIComponent(glParams.gl);
356            } else if (glParams.clientId && glParams.sessionId) {
357                idosellbooking_link += '&gClientId='  + encodeURIComponent(glParams.clientId)
358                  + '&gSessionId=' + encodeURIComponent(glParams.sessionId);
359            }
360
361            booking_init.load_widget(idosellbooking_link);
362        });
363    }
364};
365
366function isSafari() {
367    var ua = navigator.userAgent.toLowerCase();
368    if (ua.indexOf('safari') !== -1 && ua.indexOf('chrome') === -1) {
369        return true;
370    }
371    return false;
372}
373
374function getCookie(cname) {
375    var name = cname + "=";
376    var decodedCookie = decodeURIComponent(document.cookie);
377    var ca = decodedCookie.split(';');
378    for (var i = 0; i < ca.length; i++) {
379        var c = ca[i];
380        while (c.charAt(0) == ' ') {
381            c = c.substring(1);
382        }
383        if (c.indexOf(name) == 0) {
384            return c.substring(name.length, c.length);
385        }
386    }
387    return false;
388}
389(function() {
390    setTimeout(autoloadIdoSellBooking, 500);
391})();
392
393if (typeof idosellbooking_acp_configuration == 'object' && idosellbooking_acp_configuration.widgetDomain) {
394    (function(configuration) {
395        if (typeof sessionStorage != 'undefined') {
396            if (sessionStorage.getItem('IdoSellBooking.ACP.initData') === null) {
397                sessionStorage.setItem('IdoSellBooking.ACP.initData', JSON.stringify({
398                    referrer: document.referrer,
399                    location: window.location.href
400                }));
401            }
402        }
403
404        window.addEventListener("message", function(event) {
405            if (event.origin == configuration.widgetDomain) {
406                if (event.data.action == 'ActivityTracking.getStats') {
407                    const data = {
408                        viewportX: window.innerWidth,
409                        viewportY: window.innerHeight,
410                        referrer: document.referrer,
411                        location: window.location.href
412                    };
413
414                    if (typeof sessionStorage != 'undefined') {
415                        data.initData = JSON.parse(sessionStorage.getItem('IdoSellBooking.ACP.initData'));
416                    }
417
418                    event.source.postMessage({action: 'ActivityTracking.setStats', data: data}, configuration.widgetDomain);
419                } else if (event.data.action == 'Widget.OpenReservationDetails') {
420                    window.location.href = event.data.OpenReservationDetailsUrl;
421                }
422            }
423        }, false);
424    })(idosellbooking_acp_configuration);
425} else {
426    if (typeof console == 'object') {
427        console.info('ACP: Unable to get configuration.');
428    }
429}
430$(document).ready(function() {
431    $("#menuToggle").click(function(e) {
432        $(this).parent().next().toggle();
433        $("#menuToggle").parent().toggleClass("mobile-top-shadow");
434        return false;
435    });
436
437    $("#menuToggle2").click(function(e) {
438        $(this).parent().next().toggle();
439        $("#menuToggle2").parent().toggleClass("mobile-top-shadow");
440        return false;
441    });
442
443    /**
444     * Ustawianie waluty dla wizytówki
445     */
446    $("#frontpage_currency, #frontpage_currency_mobile").change(function() {
447        var url = url_to_save_currency + '/currency/' + $(this).val();
448        if (typeof action_after_save_currency != 'undefined') {
449            url += '/url/' + action_after_save_currency;
450        }
451        if (typeof id_after_save_currency != 'undefined') {
452            url += '/id/' + id_after_save_currency;
453        }
454
455        window.location = url;
456    });
457    
458    /**
459     * Ustawianie języka dla wizytówki
460     */
461    $('.mobile-flags').find('a').each(function(i, element) {
462        $(element).click(function() {
463            var Cookies = new FrontpageCookies;
464            Cookies.setLanguage($(this).data('langid'));
465        })
466    });
467
468    /* SLIDER */
469    $('.bxslider').bxSlider({
470        //auto: true,
471        onSliderLoad: function(){
472            if (window.location.hash) {
473                window.location.hash = window.location.hash;
474            }
475        },
476        adaptiveHeight: true,
477        pager: ($('.bxslider > li').length > 1) ? true: false
478    });
479
480    $('.accommodation-slider').each(function() {
481        $(this).bxSlider({
482            onSliderLoad: function(){
483                if (window.location.hash) {
484                    window.location.hash = window.location.hash;
485                }
486            },
487            pager: false,
488            adaptiveHeight: true
489
490        });
491    });
492
493    $('.accommodation-edit-slider').each(function() {
494        $(this).bxSlider({
495            onSliderLoad: function(){
496                if (window.location.hash) {
497                    window.location.hash = window.location.hash;
498                }
499            },
500            pager: true,
501            adaptiveHeight: true
502
503        });
504    });
505
506    $('.offers-slider').each(function() {
507        $(this).bxSlider({
508            onSliderLoad: function(){
509                if (window.location.hash) {
510                    window.location.hash = window.location.hash;
511                }
512            },
513            pager: false,
514            adaptiveHeight: true
515        });
516    });
517});
518/**
519 * jQuery Cookie Plugin v1.4.1
520 * https://github.com/carhartl/jquery-cookie
521 *
522 * Copyright 2013 Klaus Hartl
523 * Released under the MIT license
524 */
525(function (factory) {
526	if (typeof define === 'function' && define.amd) {
527		// AMD
528		define(['jquery'], factory);
529	} else if (typeof exports === 'object') {
530		// CommonJS
531		factory(require('jquery'));
532	} else {
533		// Browser globals
534		factory(jQuery);
535	}
536}(function ($) {
537
538	var pluses = /\+/g;
539
540	function encode(s) {
541		return config.raw ? s : encodeURIComponent(s);
542	}
543
544	function decode(s) {
545		return config.raw ? s : decodeURIComponent(s);
546	}
547
548	function stringifyCookieValue(value) {
549		return encode(config.json ? JSON.stringify(value) : String(value));
550	}
551
552	function parseCookieValue(s) {
553		if (s.indexOf('"') === 0) {
554			// This is a quoted cookie as according to RFC2068, unescape...
555			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
556		}
557
558		try {
559			// Replace server-side written pluses with spaces.
560			// If we can't decode the cookie, ignore it, it's unusable.
561			// If we can't parse the cookie, ignore it, it's unusable.
562			s = decodeURIComponent(s.replace(pluses, ' '));
563			return config.json ? JSON.parse(s) : s;
564		} catch(e) {}
565	}
566
567	function read(s, converter) {
568		var value = config.raw ? s : parseCookieValue(s);
569		return $.isFunction(converter) ? converter(value) : value;
570	}
571
572	var config = $.cookie = function (key, value, options) {
573
574		// Write
575
576		if (value !== undefined && !$.isFunction(value)) {
577			options = $.extend({}, config.defaults, options);
578
579			if (typeof options.expires === 'number') {
580				var days = options.expires, t = options.expires = new Date();
581				t.setTime(+t + days * 864e+5);
582			}
583
584			return (document.cookie = [
585				encode(key), '=', stringifyCookieValue(value),
586				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
587				options.path    ? '; path=' + options.path : '',
588				options.domain  ? '; domain=' + options.domain : '',
589				options.secure  ? '; secure' : ''
590			].join(''));
591		}
592
593		// Read
594
595		var result = key ? undefined : {};
596
597		// To prevent the for loop in the first place assign an empty array
598		// in case there are no cookies at all. Also prevents odd result when
599		// calling $.cookie().
600		var cookies = document.cookie ? document.cookie.split('; ') : [];
601
602		for (var i = 0, l = cookies.length; i < l; i++) {
603			var parts = cookies[i].split('=');
604			var name = decode(parts.shift());
605			var cookie = parts.join('=');
606
607			if (key && key === name) {
608				// If second argument (value) is a function it's a converter...
609				result = read(cookie, value);
610				break;
611			}
612
613			// Prevent storing a cookie that we couldn't decode.
614			if (!key && (cookie = read(cookie)) !== undefined) {
615				result[name] = cookie;
616			}
617		}
618
619		return result;
620	};
621
622	config.defaults = {};
623
624	$.removeCookie = function (key, options) {
625		if ($.cookie(key) === undefined) {
626			return false;
627		}
628
629		// Must not alter options, thus extending a fresh object...
630		$.cookie(key, '', $.extend({}, options, { expires: -1 }));
631		return !$.cookie(key);
632	};
633
634}));
635FrontpageCookies = function() {};
636FrontpageCookies.prototype = {
637    defaultFrontpageCookieParams : {
638        name : 'idosellbooking_frntpg', // przy zmianie pamiętaj o zmianie stałej: Cookie::COOKIE_NAME_FRONTPAGE
639        settings : {
640            expires: 7,
641            path: '/'
642        }
643    },
644    
645    /**
646     * Zwraca język wybrany przez użytkownika dla wizytówki
647     * @throws
648     * @returns {int}
649     */
650    getLanguage : function()
651    {
652        var cookie = $.cookie(FrontpageCookies.prototype.defaultFrontpageCookieParams.name);
653        if (cookie != undefined) {
654            var FrontpageProperties = $.parseJSON(cookie);
655        } else {
656            throw 'Cookie not set';
657        }
658        
659        if (FrontpageProperties.language != undefined) {
660            return FrontpageProperties.language;
661        } else {
662            throw 'Language not set';
663        }
664    },
665    
666    /**
667     * Ustawia język dla wizytówki
668     * @param {int} languageId
669     */
670    setLanguage : function(languageId)
671    {
672        var FrontpageProperties = $.parseJSON($.cookie(FrontpageCookies.prototype.defaultFrontpageCookieParams.name));
673        FrontpageProperties.language = languageId;
674        
675        $.cookie(
676            FrontpageCookies.prototype.defaultFrontpageCookieParams.name,
677            JSON.stringify(FrontpageProperties),
678            FrontpageCookies.prototype.defaultFrontpageCookieParams.settings
679        );
680    }
681};

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.