Bilety PKP i autobusowe | Rozkład jazdy PKP, PKS, Busy

Bilety PKP i autobusowe | Rozkład jazdy PKP, PKS, Busy

[] 0) {if (suggestedTypeProperty.get() === 'AUTO’) {$completionToolbar.find(„.:pressed:first”).removeClass(„:pressed”).end().find(„input[value=” +getSuggestionGroupTypeByItemType(toReturn[0].t) +”]:first”).parents(„label:first”).addClass(„:pressed”);} else if (suggestedTypeProperty.get() === 'ALL’) {$completionToolbar.find(„input[value=” +getSuggestionGroupTypeByItemType(„ALL”) +”]:first”).parents(„label:first”).addClass(„:pressed”);}if (countries.length >= 1) {$flagsToolbar.show();$flagsToolbar.find(„.frmButtonFlat”).removeClass(„selected”).hide();for(var i = 0; i < countries.length; i++) {country = countries[i];if (country == country.toUpperCase()){country = country.toLowerCase();$flagsToolbar.find("#acFlag_" + country).addClass("selected");}$flagsToolbar.find("#acFlag_" + country).css("display", "");}} else {$flagsToolbar.hide();}if (search4More !== true) {/* czy pokazać przycisk Więcej wyników podpowiedzi */i = 0;if (toReturn[i].isFake) i++;if (toReturn[i].sm == "true") {toReturn.push({"n": 'MORE',"id": '_' + (new Date()).getTime(),"isFake": true,"isSearch4More": true});}}}search4More = false;} catch (exc) {toReturn = [];}return toReturn;}function getFakeItemCode(oRow) {if (oRow.n == 'MORE') {return ['n n ]]>’].join(„”);} else {return [”].join(„”);}}function formatSuggestionItem(oRow) {if (oRow.isFake === true) {return getFakeItemCode(oRow);}var icon,name = oRow.n,additionalInfo = oRow.a[0],depot = „”,tmp;switch (oRow.t) {case „CITY”:icon = AutoCompleteUtils.ICONS.CITY;break;case „BIG_CITY”:icon = AutoCompleteUtils.ICONS.BIG_CITY;break;case „VERY_BIG_CITY”:icon = AutoCompleteUtils.ICONS.VERY_BIG_CITY;break;case „RAIL_STOP”:icon = AutoCompleteUtils.ICONS.RAIL_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „BUS_STOP”:icon = AutoCompleteUtils.ICONS.BUS_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „URBAN_STOP”:icon = AutoCompleteUtils.ICONS.URBAN_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „FERRY_STOP”:icon = AutoCompleteUtils.ICONS.FERRY_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „DOOR2DOOR”:icon = AutoCompleteUtils.ICONS.BUS_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „GROUP_STOP”:icon = AutoCompleteUtils.ICONS.GROUP_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „STREET”:icon = AutoCompleteUtils.ICONS.STREET;break;case „ADDRESS”:icon = AutoCompleteUtils.ICONS.ADDRESS;break;case „LINE”:/* 'city-info line ’ + oRow.a[1].toLowerCase(), */name = ['[’, oRow.n, ’]u2192′, oRow.a[3]].join(”);icon = AutoCompleteUtils.ICONS[oRow.a[1]];additionalInfo = getPlaceDetails(oRow);break;case „POI”:icon = AutoCompleteUtils.ICONS.POI;break;case „GEO_POINT”:icon = AutoCompleteUtils.ICONS.GEO_POINT;break;}if (oRow.d === „true”) {depot = ” [DWORZEC]”;}return [’

’, ” , name, depot, ”, ”, additionalInfo, ’

’].join(„”);}function prepareAdditionalStop(oRow) {var info = oRow.a,city = oRow.cai;var toReturn = city;if (info.length > 1) {var title = info[1],carriers = title.split(’,’),i,carriersText;if (carriers.length > 0) {toReturn = [toReturn, ’
’, carriers[0]].join(„”);}if (carriers.length > 1) {toReturn = [toReturn, ’, ’, carriers[1]].join(„”);}if (carriers.length > 2) {/*toReturn = [toReturn, „… (więcej)”].join(„”);*/carriersText = [];var $type;/* wersja II Patryka */if (carriers.length > 30) {carriersText.push(carriers[0].substr(carriers[0].indexOf(„:”) + 2));for (i = 1; i

mt_adplace_blog_post_img
  • ’);carriersText.push(carriers[0].substr(carriers[0].indexOf(„:”) + 2));for (i = 1; i
  • „);carriersText.push(carriers[i].trim());}carriersText.push(„
  • „);$type = 'short’;}$tooltipText = $(”).html(carriersText.join(”));$additionalMore = $(”).text(’więcej’).after($tooltipText);toReturn = [toReturn, „… („, $additionalMore.parent().html(), „)”].join(„”);}}return toReturn;}function getPlaceDetails(oRow) {if (oRow === null) {return ”;}var cityInfo = „”;switch (oRow.t) {case „CITY”:case „BIG_CITY”:case „VERY_BIG_CITY”:cityInfo = oRow.a[0];break;case „RAIL_STOP”:case „BUS_STOP”:case „URBAN_STOP”:case „FERRY_STOP”:case „DOOR2DOOR”:case „GROUP_STOP”:cityInfo = oRow.cai;break;case „STREET”:case „ADDRESS”:case „GEO_POINT”:cityInfo = oRow.a[0];break;case „POI”:cityInfo = „”; /* uzupełnić */break;/*case „GEO_POINT”:cityInfo = „Punkt geograficzny”;break;*/case „LINE”:return oRow.a[2] || 'uFEFF’;}return cityInfo;}function updatePlaceAndIcon(oRow) {var $container = $input.parent();$container.removeClass();$container.addClass($containerDefaultClasses);if (oRow === null) {$placeDetails.text(”);return;}$container.addClass(„icon icon-left”);if (oRow.t === 'LINE’) {$container.addClass(AutoCompleteUtils.ICONS[oRow.a[1]]);} else {$container.addClass(AutoCompleteUtils.ICONS[oRow.t] || ”);}$placeDetails.html(getPlaceDetails(oRow));}function toggleIconAndDetails(bHide) {if (bHide === true) {$placeDetails.hide();$input.css(’padding-left’, ”);return;}$placeDetails.show();}function updateScopeCookie(oRow) {/* MZ */if (oRow !== null) {var cityId = oRow.cid;if (oRow.t === 'CITY’|| oRow.t === 'BIG_CITY’|| oRow.t === 'VERY_BIG_CITY’) {cityId = oRow.id;}if (typeof cityId !== 'undefined’ && cityId !== null && cityId !== „0” && cityId.length > 0) {var cookieValue = EPodroznik.Utils.Cookies.getCookie(„scope”) || „”;var scopeConnections = „”;var scopeTimetables = „”;if (cookieValue.indexOf(„s”) !== -1) {var a = cookieValue.split(„s”, 2);scopeConnections = a[0];scopeTimetables = a[1];}if( 'SOURCE’ === 'TIMETABLES’) {scopeTimetables = appendToMagicString(cityId, scopeTimetables, 4);} else {scopeConnections = appendToMagicString(cityId, scopeConnections, 6);}EPodroznik.Utils.Cookies.setCookie(„scope”, scopeConnections + „s” + scopeTimetables, 365);}}}function appendToMagicString(cityId, magicString, count) {if (magicString.length > 0) {var splitted = magicString.split(„.”);if (splitted.length > count – 1) {splitted = splitted.slice(1, count);}magicString = splitted.join(„.”) + „.”;}magicString += cityId;return magicString;}function onSelect(oEvent, liNode, oRow, modifiers) {var cursor, $cursor, data;if (oRow == null) {selectedItem.set(null);} else if (oRow.isFake === true) {modifiers.updateInput = false;modifiers.hideResults = false;if (oRow.isSearch4More === true) {search4More = true;var top = liNode.clientTop;$input.triggerHandler(„keydown”, [true]);}selectedItem.set(null);} else {selectedItem.set(oRow);}return false;}function onTypeChange(oldValue, newValue) {$completionToolbar.find(„.:pressed:first”).removeClass(„:pressed”).end().find(’input[value=’ + newValue + ’]’).parents(„label:first”).addClass(„:pressed”);if (oldValue !== newValue) {search4More = false;$input.trigger(„keydown”, [true]);}}function prepareParameters(sInputText) {var toReturn = {query: sInputText,type: suggestedTypeProperty.get(),requestKind: 'SOURCE’};if (search4More === true) {toReturn.more = true;}toReturn.countryCode = chosenCountryCode;toReturn.forcingCountryCode = forcingCountryCode;return toReturn;}function getValue (row) {switch (row.t) {case „CITY”:case „BIG_CITY”:case „VERY_BIG_CITY”:case „RAIL_STOP”:case „BUS_STOP”:case „URBAN_STOP”:case „FERRY_STOP”:case „DOOR2DOOR”:case „GROUP_STOP”:return row.n;case „LINE”:return [row.n, 'u2192′, row.a[0].split(’, ’)[1]].join(”);case „POI”:case „GEO_POINT”:return row.n;case „STREET”:case „ADDRESS”:var city = row.c;city = city.replace(„M.”, „”);city = city.replace(„st.”, „”);city = $.trim(city);return city + „, ” + row.n;}}var $input,$containerDefaultClasses,$completionToolbar,$status,$suggestions,$additionalFeatures,$placeDetails,completerParams,suggestedTypeProperty,chosenCountryCode = „”,forcingCountryCode,search4More,selectedItem,last;completerParams = {minChars: 1,resultsClass: „autocomplete ac_results ep-content searcher-suggest layer-content dropdown-layer”,posByOffset: true,wrapAround: true,dontSetWidth: true,parseData: parseSuggestionResponse,formatItem: formatSuggestionItem,getValue: getValue,prepareParametersMap: prepareParameters,cacheLength: 0,delay: 100,isCrossDomain : false,timeout: 60 * 1000,selectFirstOnBlur: true};$input = $(’#frm_1635877263743 input[name$=.fromText]’);$completionToolbar = $(’#ac_1635877263747>.frmToolbar’);$flagsToolbar = $(’#ac_1635877263747>.flags’);$status = $(’

    ’);search4More = false;forcingCountryCode = false;if (enforceSuggestedType != undefined && enforceSuggestedType != null) {suggestedTypeProperty = new ObservableProperty(enforceSuggestedType);} else {if (EPodroznik.Utils.Cookies.getCookie(„suggestionMode”)) {if (EPodroznik.Utils.Cookies.getCookie(„suggestionMode”) === „ALL”) {suggestedTypeProperty = new ObservableProperty(„ALL”);} else if (EPodroznik.Utils.Cookies.getCookie(„suggestionMode”) === „AUTO”) {suggestedTypeProperty = new ObservableProperty(„AUTO”);}} else {if ((EPodroznik.WidgetConfig != undefined) && (EPodroznik.WidgetConfig.suggestedDefaultTypeAll === „true”)) {suggestedTypeProperty = new ObservableProperty(„ALL”);} else {suggestedTypeProperty = new ObservableProperty(„AUTO”);}}suggestedTypeProperty.addChangeListener(onTypeChange);}selectedItem = new ObservableProperty(null);selectedItem.addChangeListener(function (oldValue, newValue) {if (oldValue === newValue) {return;}updatePlaceAndIcon(newValue);toggleIconAndDetails(newValue === null);updateScopeCookie(newValue);if (newValue !== null) {last = getValue(newValue);} else {last = ”;}$input.trigger(’suggestion_updated’, [newValue]);});function getSuggestionsMetrics() {var toReturn = {top: 0, left: 0};toReturn.top = $suggestions.get(0).offsetTop;if ($completionToolbar.size() > 0) {toReturn.top += $completionToolbar.get(0).offsetHeight;}toReturn.left = $suggestions.get(0).offsetLeft + $suggestions.get(0).offsetWidth;return toReturn;}$input.one(„ac_init”, function (oEvent, resultsContainer) {$suggestions = $(resultsContainer);$placeDetails = $(”).insertAfter($input.parent()).addClass(„city-info”);$containerDefaultClasses = $input.parent().attr(„class”);}).bind(„ac_beforerequest”, function (oEvent, resultsContainer) {$status.text(’Trwa wyszukiwanie…’);$(this).trigger(’ep_change’);}).bind(„ac_listrendered”, function (oEvent, resultsContainer, data) {if ($input.val() === ”) {$suggestions.hide();forcingCountryCode = false; }$status.prependTo(resultsContainer);$completionToolbar.insertBefore($status);$flagsToolbar.insertAfter($completionToolbar);$flagsToolbar.find(’.frmButtonFlat’).unbind(„click”).bind(„click”, function (oEvent) {myId = $(this).attr(’id’);chosenCountryCode = myId.substring(7, myId.length);forcingCountryCode = true;$input.trigger(„keydown”, [true]);});var $resultsContainer = $(resultsContainer);if (data.length ’ + 'Spróbuj wpisać bardziej ogólną nazwę, np. miasto’ + ”;$status.html($html).show();$flagsToolbar.hide();} else {$status.hide();$input.get(0).autocompleter.makeActive(0);}$suggestions.find(„.additionalMore”).unbind(„tooltip_before_show”).bind(„tooltip_before_show”, function(event) {var $more = $epodroznik(this);var $tooltip = $epodroznik(„#tooltip”);var $x = $more.offset().left – $more.width() / 2;if ($more.hasClass(„short”)) {$x -= 20;}var $y = $more.offset().top + $more.outerHeight() + 25;$tooltip.css({left: Math.max(0, $x), top: $y});$tooltip.addClass(„carrier-dropdown-layer”);}).unbind(„tooltip_after_hide”).bind(„tooltip_after_hide”, function(event) {$epodroznik(„#tooltip”).removeClass(„carrier-dropdown-layer”);});}).bind(„ac_itemselected”, onSelect).bind(„blur.toggleicon”, function () {var exc, d;try {if (last !== ”) {d = this.autocompleter.getData();if (d && d.length && d.length === 1) {if (d[0] !== selectedItem.get()) {$input.trigger(’ac_itemselected’, [null, d[0], {}]);}}}} catch (exc) {} finally {if (selectedItem.get() !== null) {this.value = last = getValue(selectedItem.get());}}}).bind(„ac_show”, function (oEvent) {}).bind(’ep_change’, (function () {return function (oEvent, a) {if ($input.val() === ”) {forcingCountryCode = false;}if (this.value === last) {return;}last = this.value;if (selectedItem.get() !== null) {$(this).triggerHandler(’ac_itemselected’, [null, null, {}]);}};}())).bind(’keyup’, function (oEvent) {$(this).trigger(’ep_change’, [oEvent]);}).autocomplete(’/public/suggest.do’, completerParams);$input.get(0).getSelectedItem = function () {return selectedItem.get();};$input.get(0).setSelectedItem = function (oItem) {selectedItem.set(oItem);};$completionToolbar.find(„label”).bind(„click.suggestiontypechanged”, function (oEvent) {oEvent.stopPropagation();oEvent.preventDefault();var input = $(this).find(„input:first”).get(0);suggestedTypeProperty.set(input.value);$input.get(0).autocompleter.showResults();last = ”;$input.trigger(’ep_change’);});} catch (exc) {if (window.console && window.console.error) {console.error(exc);}try {EPodroznik.Utils.Log.exception(exc);} catch (exc) {}}}(window, $epodroznik, undefined)); 0) {if (suggestedTypeProperty.get() === 'AUTO’) {$completionToolbar.find(„.:pressed:first”) .removeClass(„:pressed”).end().find(„input[value=” +getSuggestionGroupTypeByItemType(toReturn[0].t) +”]:first”).parents(„label:first”).addClass(„:pressed”);} else if (suggestedTypeProperty.get() === 'ALL’) {$completionToolbar.find(„input[value=” +getSuggestionGroupTypeByItemType(„ALL”) +”]:first”).parents(„label:first”).addClass(„:pressed”);}if (countries.length >= 1) {$flagsToolbar.show();$flagsToolbar.find(„.frmButtonFlat”).removeClass(„selected”).hide();for(var i = 0; i < countries.length; i++) {country = countries[i];if (country == country.toUpperCase()){country = country.toLowerCase();$flagsToolbar.find("#acFlag_" + country).addClass("selected");}$flagsToolbar.find("#acFlag_" + country).css("display", "");}} else {$flagsToolbar.hide();}if (search4More !== true) {/* czy pokazać przycisk Więcej wyników podpowiedzi */i = 0;if (toReturn[i].isFake) i++;if (toReturn[i].sm == "true") {toReturn.push({"n": 'MORE',"id": '_' + (new Date()).getTime(),"isFake": true,"isSearch4More": true});}}}search4More = false;} catch (exc) {toReturn = [];}return toReturn;}function getFakeItemCode(oRow) {if (oRow.n == 'MORE') {return ['n n ]]>

    ’].join(„”);} else {return [”].join(„”);}}function formatSuggestionItem(oRow) {if (oRow.isFake === true) {return getFakeItemCode(oRow);}var icon,name = oRow.n,additionalInfo = oRow.a[0],depot = „”,tmp;switch (oRow.t) {case „CITY”:icon = AutoCompleteUtils.ICONS.CITY;break;case „BIG_CITY”:icon = AutoCompleteUtils.ICONS.BIG_CITY;break;case „VERY_BIG_CITY”:icon = AutoCompleteUtils.ICONS.VERY_BIG_CITY;break;case „RAIL_STOP”:icon = AutoCompleteUtils.ICONS.RAIL_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „BUS_STOP”:icon = AutoCompleteUtils.ICONS.BUS_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „URBAN_STOP”:icon = AutoCompleteUtils.ICONS.URBAN_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „FERRY_STOP”:icon = AutoCompleteUtils.ICONS.FERRY_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „DOOR2DOOR”:icon = AutoCompleteUtils.ICONS.BUS_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „GROUP_STOP”:icon = AutoCompleteUtils.ICONS.GROUP_STOP;additionalInfo = prepareAdditionalStop(oRow);break;case „STREET”:icon = AutoCompleteUtils.ICONS.STREET;break;case „ADDRESS”:icon = AutoCompleteUtils.ICONS.ADDRESS;break;case „LINE”:/* 'city-info line ’ + oRow.a[1].toLowerCase(), */name = ['[’, oRow.n, ’]u2192′, oRow.a[3]].join(”);icon = AutoCompleteUtils.ICONS[oRow.a[1]];additionalInfo = getPlaceDetails(oRow);break;case „POI”:icon = AutoCompleteUtils.ICONS.POI;break;case „GEO_POINT”:icon = AutoCompleteUtils.ICONS.GEO_POINT;break;}if (oRow.d === „true”) {depot = ” [DWORZEC]”;}return [’

    ’, ” , name, depot, ”, ”, additionalInfo, ’

    ’].join(„”);}function prepareAdditionalStop(oRow) {var info = oRow.a,city = oRow.cai;var toReturn = city;if (info.length > 1) {var title = info[1],carriers = title.split(’,’),i,carriersText;if (carriers.length > 0) {toReturn = [toReturn, ’
    ’, carriers[0]].join(„”);}if (carriers.length > 1) {toReturn = [toReturn, ’, ’, carriers[1]].join(„”);}if (carriers.length > 2) {/*toReturn = [toReturn, „… (więcej)”].join(„”);*/carriersText = [];var $type;/* wersja II Patryka */if (carriers.length > 30) {carriersText.push(carriers[0].substr(carriers[0].indexOf(„:”) + 2));for (i = 1; i

  • ’);carriersText.push(carriers[0].substr(carriers[0].indexOf(„:”) + 2));for (i = 1; i
  • „);carriersText.push(carriers[i].trim());}carriersText.push(„
  • „);$type = 'short’;}$tooltipText = $(”).html(carriersText.join(”));$additionalMore = $(”).text(’więcej’).after($tooltipText);toReturn = [toReturn, „… („, $additionalMore.parent().html(), „)”].join(„”);}}return toReturn;}function getPlaceDetails(oRow) {if (oRow === null) {return ”;}var cityInfo = „”;switch (oRow.t) {case „CITY”:case „BIG_CITY”:case „VERY_BIG_CITY”:cityInfo = oRow.a[0];break;case „RAIL_STOP”:case „BUS_STOP”:case „URBAN_STOP”:case „FERRY_STOP”:case „DOOR2DOOR”:case „GROUP_STOP”:cityInfo = oRow.cai;break;case „STREET”:case „ADDRESS”:case „GEO_POINT”:cityInfo = oRow.a[0];break;case „POI”:cityInfo = „”; /* uzupełnić */break;/*case „GEO_POINT”:cityInfo = „Punkt geograficzny”;break;*/case „LINE”:return oRow.a[2] || 'uFEFF’;}return cityInfo;}function updatePlaceAndIcon(oRow) {var $container = $input.parent();$container.removeClass();$container.addClass($containerDefaultClasses);if (oRow === null) {$placeDetails.text(”);return;}$container.addClass(„icon icon-left”);if (oRow.t === 'LINE’) {$container.addClass(AutoCompleteUtils.ICONS[oRow.a[1]]);} else {$container.addClass(AutoCompleteUtils.ICONS[oRow.t] || ”);}$placeDetails.html(getPlaceDetails(oRow));}function toggleIconAndDetails(bHide) {if (bHide === true) {$placeDetails.hide();$input.css(’padding-left’, ”);return;}$placeDetails.show();}function updateScopeCookie(oRow) {/* MZ */if (oRow !== null) {var cityId = oRow.cid;if (oRow.t === 'CITY’|| oRow.t === 'BIG_CITY’|| oRow.t === 'VERY_BIG_CITY’) {cityId = oRow.id;}if (typeof cityId !== 'undefined’ && cityId !== null && cityId !== „0” && cityId.length > 0) {var cookieValue = EPodroznik.Utils.Cookies.getCookie(„scope”) || „”;var scopeConnections = „”;var scopeTimetables = „”;if (cookieValue.indexOf(„s”) !== -1) {var a = cookieValue.split(„s”, 2);scopeConnections = a[0];scopeTimetables = a[1];}if( 'DESTINATION’ === 'TIMETABLES’) {scopeTimetables = appendToMagicString(cityId, scopeTimetables, 4);} else {scopeConnections = appendToMagicString(cityId, scopeConnections, 6);}EPodroznik.Utils.Cookies.setCookie(„scope”, scopeConnections + „s” + scopeTimetables, 365);}}}function appendToMagicString(cityId, magicString, count) {if (magicString.length > 0) {var splitted = magicString.split(„.”);if (splitted.length > count – 1) {splitted = splitted.slice(1, count);}magicString = splitted.join(„.”) + „.”;}magicString += cityId;return magicString;}function onSelect(oEvent, liNode, oRow, modifiers) {var cursor, $cursor, data;if (oRow == null) {selectedItem.set(null);} else if (oRow.isFake === true) {modifiers.updateInput = false;modifiers.hideResults = false;if (oRow.isSearch4More === true) {search4More = true;var top = liNode.clientTop;$input.triggerHandler(„keydown”, [true]);}selectedItem.set(null);} else {selectedItem.set(oRow);}return false;}function onTypeChange(oldValue, newValue) {$completionToolbar.find(„.:pressed:first”).removeClass(„:pressed”).end().find(’input[value=’ + newValue + ’]’).parents(„label:first”).addClass(„:pressed”);if (oldValue !== newValue) {search4More = false;$input.trigger(„keydown”, [true]);}}function prepareParameters(sInputText) {var toReturn = {query: sInputText,type: suggestedTypeProperty.get(),requestKind: 'DESTINATION’};if (search4More === true) {toReturn.more = true;}toReturn.countryCode = chosenCountryCode;toReturn.forcingCountryCode = forcingCountryCode;return toReturn;}function getValue (row) {switch (row.t) {case „CITY”:case „BIG_CITY”:case „VERY_BIG_CITY”:case „RAIL_STOP”:case „BUS_STOP”:case „URBAN_STOP”:case „FERRY_STOP”:case „DOOR2DOOR”:case „GROUP_STOP”:return row.n;case „LINE”:return [row.n, 'u2192′, row.a[0].split(’, ’)[1]].join(”);case „POI”:case „GEO_POINT”:return row.n;case „STREET”:case „ADDRESS”:var city = row.c;city = city.replace(„M.”, „”);city = city.replace(„st.”, „”);city = $.trim(city);return city + „, ” + row.n;}}var $input,$containerDefaultClasses,$completionToolbar,$status,$suggestions,$additionalFeatures,$placeDetails,completerParams,suggestedTypeProperty,chosenCountryCode = „”,forcingCountryCode,search4More,selectedItem,last;completerParams = {minChars: 1,resultsClass: „autocomplete ac_results ep-content searcher-suggest layer-content dropdown-layer”,posByOffset: true,wrapAround: true,dontSetWidth: true,parseData: parseSuggestionResponse,formatItem: formatSuggestionItem,getValue: getValue,prepareParametersMap: prepareParameters,cacheLength: 0,delay: 100,isCrossDomain : false,timeout: 60 * 1000,selectFirstOnBlur: true};$input = $(’#frm_1635877263743 input[name$=.toText]’);$completionToolbar = $(’#ac_1635877263759>.frmToolbar’);$flagsToolbar = $(’#ac_1635877263759>.flags’);$status = $(’

    ’);search4More = false;forcingCountryCode = false;if (enforceSuggestedType != undefined && enforceSuggestedType != null) {suggestedTypeProperty = new ObservableProperty(enforceSuggestedType);} else {if (EPodroznik.Utils.Cookies.getCookie(„suggestionMode”)) {if (EPodroznik.Utils.Cookies.getCookie(„suggestionMode”) === „ALL”) {suggestedTypeProperty = new ObservableProperty(„ALL”);} else if (EPodroznik.Utils.Cookies.getCookie(„suggestionMode”) === „AUTO”) { suggestedTypeProperty = new ObservableProperty(„AUTO”);}} else {if ((EPodroznik.WidgetConfig != undefined) && (EPodroznik.WidgetConfig.suggestedDefaultTypeAll === „true”)) {suggestedTypeProperty = new ObservableProperty(„ALL”);} else {suggestedTypeProperty = new ObservableProperty(„AUTO”);}}suggestedTypeProperty.addChangeListener(onTypeChange);}selectedItem = new ObservableProperty(null);selectedItem.addChangeListener(function (oldValue, newValue) {if (oldValue === newValue) {return;}updatePlaceAndIcon(newValue);toggleIconAndDetails(newValue === null);updateScopeCookie(newValue);if (newValue !== null) {last = getValue(newValue);} else {last = ”;}$input.trigger(’suggestion_updated’, [newValue]);});function getSuggestionsMetrics() {var toReturn = {top: 0, left: 0};toReturn.top = $suggestions.get(0).offsetTop;if ($completionToolbar.size() > 0) {toReturn.top += $completionToolbar.get(0).offsetHeight;}toReturn.left = $suggestions.get(0).offsetLeft + $suggestions.get(0).offsetWidth;return toReturn;}$input.one(„ac_init”, function (oEvent, resultsContainer) {$suggestions = $(resultsContainer);$placeDetails = $(”).insertAfter($input.parent()).addClass(„city-info”);$containerDefaultClasses = $input.parent().attr(„class”);}).bind(„ac_beforerequest”, function (oEvent, resultsContainer) {$status.text(’Trwa wyszukiwanie…’);$(this).trigger(’ep_change’);}).bind(„ac_listrendered”, function (oEvent, resultsContainer, data) {if ($input.val() === ”) {$suggestions.hide();forcingCountryCode = false;}$status.prependTo(resultsContainer);$completionToolbar.insertBefore($status);$flagsToolbar.insertAfter($completionToolbar);$flagsToolbar.find(’.frmButtonFlat’).unbind(„click”).bind(„click”, function (oEvent) {myId = $(this).attr(’id’);chosenCountryCode = myId.substring(7, myId.length);forcingCountryCode = true;$input.trigger(„keydown”, [true]);});var $resultsContainer = $(resultsContainer);if (data.length ’ + 'Spróbuj wpisać bardziej ogólną nazwę, np. miasto’ + ”;$status.html($html).show();$flagsToolbar.hide();} else {$status.hide();$input.get(0).autocompleter.makeActive(0);}$suggestions.find(„.additionalMore”).unbind(„tooltip_before_show”).bind(„tooltip_before_show”, function(event) {var $more = $epodroznik(this);var $tooltip = $epodroznik(„#tooltip”);var $x = $more.offset().left – $more.width() / 2;if ($more.hasClass(„short”)) {$x -= 20;}var $y = $more.offset().top + $more.outerHeight() + 25;$tooltip.css({left: Math.max(0, $x), top: $y});$tooltip.addClass(„carrier-dropdown-layer”);}).unbind(„tooltip_after_hide”).bind(„tooltip_after_hide”, function(event) {$epodroznik(„#tooltip”).removeClass(„carrier-dropdown-layer”);});}).bind(„ac_itemselected”, onSelect).bind(„blur.toggleicon”, function () {var exc, d;try {if (last !== ”) {d = this.autocompleter.getData();if (d && d.length && d.length === 1) {if (d[0] !== selectedItem.get()) {$input.trigger(’ac_itemselected’, [null, d[0], {}]);}}}} catch (exc) {} finally {if (selectedItem.get() !== null) {this.value = last = getValue(selectedItem.get());}}}).bind(„ac_show”, function (oEvent) {}).bind(’ep_change’, (function () {return function (oEvent, a) {if ($input.val() === ”) {forcingCountryCode = false;}if (this.value === last) {return;}last = this.value;if (selectedItem.get() !== null) {$(this).triggerHandler(’ac_itemselected’, [null, null, {}]);}};}())).bind(’keyup’, function (oEvent) {$(this).trigger(’ep_change’, [oEvent]);}).autocomplete(’/public/suggest.do’, completerParams);$input.get(0).getSelectedItem = function () {return selectedItem.get();};$input.get(0).setSelectedItem = function (oItem) {selectedItem.set(oItem);};$completionToolbar.find(„label”).bind(„click.suggestiontypechanged”, function (oEvent) {oEvent.stopPropagation();oEvent.preventDefault();var input = $(this).find(„input:first”).get(0);suggestedTypeProperty.set(input.value);$input.get(0).autocompleter.showResults();last = ”;$input.trigger(’ep_change’);});} catch (exc) {if (window.console && window.console.error) {console.error(exc);}try {EPodroznik.Utils.Log.exception(exc);} catch (exc) {}}}(window, $epodroznik, undefined));

    Source

    / 5.

    Biuro podróży at promarTRAVEL | Website | + posts

    Planujesz urlop, ale nie masz ochoty organizować samodzielnie całego wyjazdu? Czujesz, że logistyka może cię przerosnąć? Postaw na profesjonalną pomoc w tym temacie! Dowiedz się, czym warto się kierować, wybierając najlepsze biuro podróży.

    Written by Promar

    Planujesz urlop, ale nie masz ochoty organizować samodzielnie całego wyjazdu? Czujesz, że logistyka może cię przerosnąć? Postaw na profesjonalną pomoc w tym temacie! Dowiedz się, czym warto się kierować, wybierając najlepsze biuro podróży.

    Leave a comment