Description
Type of accommodation: House
Outdoor Swimming Pool
Pets permitted (at an additional charge)
WiFi
Need to get in touch?
We will be happy to assist you with any questions
Monday – Friday
Saturday
9:00 am – 6:00 pm
9:00 am – 1:00 pm
+49 (0) 89 23 11 000
Alternatively you can fill out the contact form for specific enquiries, and we'll get back to you as soon as possible.
",size: 'large'});contact.init(function() {setTimeout(function() {initBtnCaptcha();initFromSubmit();initDateSelection();}, 2000);});//)}
Detached holiday villa in absolutely quiet location with large garden (2,800 m²), private pool and lovely views of the surrounding nature
This comfortable two-bedroom house is located in Brest pod Učkom at the foot of the impressive mountain Učka, in the middle of nature and yet only 35 km from the famous coastal town of Opatija. The Učka Nature Park is within easy reach and offers countless opportunities for an active holiday that perfectly combines the experience of mountains and sea. Enjoy the amazing countryside during a bike tour or extended hike. The house is located in an absolutely quiet and peaceful area, so in addition to privacy, you can also enjoy beautiful views of the countryside. Surrounded by endless fields, forests and meadows, a comfortably furnished holiday home with all amenities for a pleasant stay awaits you. And if you are drawn to the coast, the town of Opatija is only a 30-minute drive away. Poreč and Rovinj located on the west coast of Istria can be reached in about 40 minutes. Supermarket and restaurant can be found in the village of Lupoglav, which is only 4.5 km away.
House for 4-6 persons: approx. 150 m² on ground level. Comfortably furnished, the house has a living/dining area with air conditioning, fireplace, dining table and pull-out couch (160 x 200 cm), a fully equipped kitchen separated from the living room, a bedroom with double bed, a bedroom with two single beds, a bathroom with shower, and a separate WC. In the basement there is a rustic furnished lounge area with table, benches and additional kitchen. The outdoor area offers several terraces, a well-kept garden with heatable pool (5 x 9 m), as well as a covered barbecue area with large barbecue fireplace, table and benches.
Swimming pools: Please note that swimming pools are usually available for use from about mid-May to late September, depending on the weather. If not explicitly stated in the description, the swimming pool is not heated.
Further details: WiFi available free of charge. Free private parking on the property. Outdoor shower, sun loungers and an additional WC in the outdoor area.
Dogs: Please note that dogs must be registered at the time of booking, stating the breed. The cost is 7 euro per dog per day, and the fee has to be paid directly to the landlord. Number of dogs allowed: 1.
Features and services included in the rental price:
* bed linen
* towels
* final cleaning
* tourist tax
* consumption of gas, water, electricity
* air conditioning (if indicated in the description)
* heating (if indicated in the description)
* no deposit required
';var pover = obj.popover({html: true,trigger: 'manual',template: tmpl,content: msg,placement: 'auto'}).popover('show');setTimeout(function() {pover.popover('hide');}, tout);}/** * initialize the HTML templats on the page */function initTemplates() {// load the template html code into global objecttmpl_list['sel_option'] = $.trim($("#tpl_options").html());tmpl_list['flt_prices'] = $.trim($("#tpl_flt_prices").html());tmpl_list['bus_prices'] = $.trim($("#tpl_bus_prices").html());tmpl_list['obj_prices'] = $.trim($("#tpl_unit_prices").html());tmpl_list['sel_adults'] = $.trim($("#tpl_adults").html());tmpl_list['sel_children'] = $.trim($("#tpl_children").html());tmpl_list['unit_images'] = $.trim($("#tpl_unit_images").html());tmpl_list['flt_prices'] = tmpl_list['flt_prices'].replace('$days$',g_dict['lb_days']);tmpl_list['flt_prices'] = tmpl_list['flt_prices'].replace('$_days$',g_dict['lb_days']);tmpl_list['flt_prices'] = tmpl_list['flt_prices'].replace('$lb_dpt_flt$',g_dict['lb_dpt_flt']);tmpl_list['flt_prices'] = tmpl_list['flt_prices'].replace('$lb_rtn_flt$',g_dict['lb_rtn_flt']);tmpl_list['bus_prices'] = tmpl_list['bus_prices'].replace('$days$',g_dict['lb_days']);tmpl_list['bus_prices'] = tmpl_list['bus_prices'].replace('$dpt_place$',g_dict['lb_dpt_place']);// set the markup function parameter delimiter// to avoid problem within html codeMark.delimiter = ":";// set a pipe function to format the date from// dd.mm.yyyy to ISO format yyyy-mm-ddMark.pipes.fmtdate = function(str) {str = str.split('-').reverse().join('.'); return str;};Mark.pipes.testdate = function(str) {alert(str);return str;};// set a pipe to fill the departure place select boxMark.pipes.dptplace = function(str) {var id = str;var tt = g_cfg['trns_type'];if (! g_dpt_list[tt][id]) return id;//str = str.split('-').reverse().join('.'); return str + ' - ' + g_dpt_list[tt][id];};Mark.pipes.fltplace = function(str) {var id = str;var tt = g_cfg['trns_type'];if (! g_dpt_list[tt][id]) return id; return g_dpt_list[tt][id];};// set a pipe to fill the boarding select boxMark.pipes.boarding = function(str) {return g_dict['srvc_' + str];};Mark.pipes.selsrvc = function(str) {if (! g_cfg['srvc']) return '';//if (g_cfg['srvc'] == str) return 'selected="selected"';if (g_cfg['srvc'] == str) return 'selected';return '';};Mark.pipes.selunit = function(str) {if (! g_cfg['unit']) return ' ';//if (g_cfg['unit'] == str) return 'selected="selected"';if (g_cfg['unit'] == str) return 'selected';return ' ';}; Mark.pipes.fltval = function(str) {return g_flt_val + parseInt(str, 10);};//Mark.pipes.adults = function(str) {Mark.pipes.adults = function(o) {//alert(str.min_pers);var n = parseInt(o.max_adults, 10);//var i = 1;//parseInt(o.min_pers);var i = parseInt(o.min_adults, 10);var sel_pers = parseInt(g_cfg.pers.substring(0,1), 10);if (arguments.length == 2) {sel_pers = parseInt(arguments[1], 10);//alert(arguments.toSource());}var html = "";for (;i <= n;i++) {//var lbl = g_dict['lb_adults'] + ': ' + i;var lbl = i;var sel = sel_pers == i ? 'selected' : '';html += '
';}return html;//return g_dict['lb_adults'] + ': ' + str.substr(0,1);};Mark.pipes.children = function(o) {//var n = parseInt(o.max_adults);var n = parseInt(o.max_children, 10);var html = "";var sel_pers = parseInt(g_cfg.pers.substring(1,1), 10);var i = parseInt(o.min_children, 10);for (;i <= n;i++) {//for (var i = 0;i < n;i++) {//var lbl = g_dict['lb_children'] + ': ' + i;var sel = sel_pers == i ? 'selected' : '';var lbl = i;html += '
';}if (! html)html += '
';return html;//return g_dict['lb_children'] + ': ' + str.substr(1,1);};Mark.pipes.carrier = function(str) {if (! str) return '';str = str.substr(0,2);if (! g_carriers[str]) return '';return g_carriers[str];};// set a pipe to preselect a transport line(flight)Mark.pipes.checked = function(str,i) {if (g_cfg['trns_type'] == 'F') {if (i == 0) return 'checked';}else if (g_cfg['trns_type'] == 'B') {var stay = parseInt(g_cfg['stay'], 10);var days = parseInt(str, 10);if (stay == days) return 'checked';}return '';};Mark.pipes.clickable = function(str) {//alert(typeof(str));if (unitHasImage(str)) return 'img-clickable'; return '';};// set a pipe to put selected atribute to an select optionMark.pipes.selected = function(str, val) {return str == val ? ' selected ' : ''; };// set a pipe to enable or disable bus departure selection listMark.pipes.disabled = function(str, dpt) {if (g_cfg['trns_type'] == 'B') {var stay = parseInt(g_cfg['stay'], 10);var days = parseInt(str, 10);if (stay != days) return 'disabled';dpt = $.trim(dpt);if(dpt != g_cfg['period']) return 'disabled';}return '';};Mark.pipes.calcprice = function(o) {if (! o['dpt_code'] || o['dpt_code'] == '') {var pt = getUnitPaymnetType(o['uid']);if (pt == 'W') return o.price;var p = parseFloat(o.price);p *= parseInt(o['persons'], 10);return p.toFixed(2);}return o.tot_price;}; /** * check if unit has images * str = 3 chars unit code */Mark.pipes.hasarrows = function(str) {if (! g_ibe_imgs) return false;if (! g_ibe_imgs[str]) return false;return g_ibe_imgs[str].length > 1;};}/** * */function initSearchEvents() {// init departure selectionvar transport_type = $("#li_departure input[type=radio]");transport_type.each(function(i) {if (this.value == g_cfg['trns_type']) {this.checked = true;$('#dpt_' + this.value).show();$('#dpt_' + this.value).prop('disabled', false); //$('#txt_from').val('');/*delete g_cfg['trns_code'];delete g_cfg['period'];delete g_cfg['stay'];*//*g_cfg['trns_code']= '';g_cfg['period'] = '';g_cfg['stay'] = '';*/}else {this.checked = false;$('#dpt_' + this.value).prop('disabled', true);//$('#dpt_' + this.value).hide();}});transport_type.on('change',function(evt) {$(".has-error").removeClass('has-error');var prev_trns = g_cfg['trns_type'];if (prev_trns == 'F' && evt.target.value == 'A') {g_cfg['trns_type']= evt.target.value;g_cfg['trns_code']= '';//$('#li_departure select').val('');//$('#li_departure select').prop('disabled', true);$('#li_period select').val('');$('#li_period select').prop('disabled', true);$('#li_period select').hide();set_rq(null);set_rq('DPT_DATES');set_rq('RTN_DATES');apiCmd('POST', g_url, g_cfg, function(data) {setDptLocations(g_result['DPT_PLACES']);initFromDate(g_result['DPT_DATES']);//if (b_show_dp) //g_dpickf.datepick('show');if ($("#txt_from").val() != '' && $("#txt_to").val() != '') {$("#btn_search").trigger('click');}});return;}else {$('#txt_from').val('');$('#txt_to').val('');$('#txt_to').datepick('disable');g_cfg['pers'] = '';g_cfg['stay'] = '';g_cfg['period'] = '';g_cfg['infants'] = '0';g_cfg['trns_type']= evt.target.value;g_cfg['trns_code']= '';//$('#li_departure select').val('');//$('#li_departure select').prop('disabled', true);$('#li_period select').val('');$('#li_period select').prop('disabled', true);$('#li_period select').hide();$('#dpt_' + evt.target.value).show();set_rq(null);// reset the request parametersvar b_show_dp = false;// auto show datepicker//if (this.value != 'A') {if (evt.target.value != 'A') {set_rq('DPT_PLACES');//setTransportRQ();if (! $('#txt_from').val())$('#txt_from').datepick('disable');else {$('#txt_from').val('');$('#txt_from').datepick('disable');//set_rq('DPT_DATES');//b_show_dp = true;}}else {$('#txt_from').datepick('enable');set_rq('DPT_DATES');}}if (g_cfg['trns_type'] == 'B') {$("#unit_prices").addClass('noinfants');}else {$("#unit_prices").removeClass('noinfants');}apiCmd('POST', g_url, g_cfg, function(data) {setDptLocations(g_result['DPT_PLACES']);if (evt.target.value == 'A' || b_show_dp)initFromDate(g_result['DPT_DATES']);if (b_show_dp)//g_dpickf.datepick('show');$(".datepick-trigger").click();//showTransportPrices();});});//$("#li_departure select").on('change',function(evt) {$("#li_period select").on('change',function(evt) {//$(this).removeClass('err');$(this).parents('.form-group').removeClass('has-error');g_cfg['trns_code'] = this.value;g_cfg['period'] = '';g_cfg['stay'] = '';if (g_cfg['trns_code'] == 'A') $('#txt_from').val('');$('#txt_to').val('');$('#txt_to').datepick('disable');if (g_cfg['trns_code'] == '') {$('#txt_from').val('');$('#txt_from').datepick('disable');return;}//g_cfg['rq'] = new Array('DPT_DATES');set_rq(null);set_rq('DPT_DATES');apiCmd('POST', g_url, g_cfg, function(data) {initFromDate(g_result['DPT_DATES']);g_dpickf.datepick('show');//$(".datepick-trigger").click();});});$("#btn_search").on('click',function(evt) {//g_cfg['rq'].push('OBJ_PRICES');set_rq('OBJ_PRICES');set_rq('CHK_DISCADD');if(isBookingPriceRequired()) {//set_rq('CHK_PRICES');g_cfg['booking'] = bookingCheck(true);set_rq('CHK_PRICES',false);set_rq('CHK_BOOKING');}else if (isPriceCheckRequired()) {set_rq('CHK_BOOKING',false);set_rq('CHK_PRICES');}else if (! (isBookingPriceRequired() && isPriceCheckRequired())) {set_rq('CHK_PRICES',false);set_rq('CHK_BOOKING',false);}//setTransportRQ();if ((! g_cfg['pk']) || g_cfg['pk'] == '0') setTransportRQ();if (! validateSearchInput()) return;delete g_cfg['ages'];delete g_cfg['srvc'];delete g_cfg['pers'];//delete g_cfg['infants'];//g_cfg['rq'] = ['OBJ_PRICES','RTN_DATES'];// extended units list (all above 1)g_ext_units = [];$('#unit_prices > li select[name=unit]:gt(0)').each(function(i) {g_ext_units.push(this.value);});apiCmd('POST', g_url, g_cfg, function(data) {//initMaxUnits();showTransportPrices();if (data.hasOwnProperty('CHK_BOOKING')) {//var scode = data.CHK_BOOKING.status_code;var scode = getStatusCode(data.CHK_BOOKING);//if (scode == "ERROR" || scode == "INFO") {if (scode != "OK") {bootbox.alert({title: scode,message: scode + ' ' + data.CHK_BOOKING.status_num + '
' + data.CHK_BOOKING.status_txt});//$('#unit_prices > li').remove();//$("#btnBookNow").hide();showUnitPrices();showBookingPrice(scode);return;}updateUnitPrices();return;}showUnitPrices();// check if extra units were selectedfor(var i = 0;i < g_ext_units.length;i++) {var c = g_ext_units[i]; if(! c) continue; showUnitPrices(c);}showBookingPrice();var unit_block = $("#unit_prices li");var adults = unit_block.find("select[name=adults]").val();setUnitChildren(unit_block,adults);initMaxUnits();$('#btn_more_units').show();$('#btnBookNow').show();});});$('#btn_more_units').on('click',function(e) {e.preventDefault();var code = getNextUnit();//alert(code);showUnitPrices(code);showBookingPrice();});$("#sel_prsn").on('change', function(evt) {initPersonSelect(this.value);});/*$("#sel_adlt").on('change', function(evt) {initPersonSelect(this.value);});*/}/** * initialize events on prices selectio in the * transport price list and units price list */function initPriceEvents() {$("#trns_prices").on('change',function(evt) {//if (evt.target.tagName == "SELECT") {if (evt.target.tagName == "DIV") {var price = getTransportPrice();g_cfg['trns_code'] = price.code;$("#unit_prices > li").each(function(i) {var unit_block = $(this);var pers = parseInt(unit_block.find('select[name=adults]').val(), 10);var kids = 0;//unit_block.find('select[name=age][value!=""]:visible').each(function(i) {unit_block.find('select[name=age]:visible option:selected[value!=""]').each(function(i) {if (this.value >= 14) {pers += 1;return;}kids += 1;});//var trns_price = price.adults_price * parseInt(pers, 10);//trns_price += price.children_price * parseInt(kids, 10);var trns_price = calcTransportPrice(price, {adults: pers, kids: kids});unit_block.find('.trns_price').html(trns_price.toFixed(2));var unit_price = unit_block.find('.unit_price').text();var totl_price = sumPrices([unit_price,trns_price]);unit_block.find('.totl_price').html(totl_price);//g_max_units += 1;});showBookingPrice();}else if (evt.target.tagName == 'INPUT') {if (g_cfg['trns_type'] == 'B') { // highlight the seleced bus option!!! var seleced_bus = $(".seleced_bus");seleced_bus.find('button').addClass('disabled');seleced_bus.removeClass('seleced_bus');$(evt.target).closest('div.row').addClass('seleced_bus');$(evt.target).closest('div.row').find('button').removeClass('disabled');}g_cfg['stay'] = evt.target.dataset.stay;set_rq(null);if(isBookingPriceRequired()) {g_cfg['booking'] = bookingCheck(true);set_rq('CHK_BOOKING');}else {set_rq('OBJ_PRICES');set_rq('CHK_DISCADD');}if (! (! evt.target.dataset.date)) {g_cfg['period'] = evt.target.dataset.date;}// always preselect the 1st unitg_cfg['unit'] = $("#unit_prices select[name='unit']:eq(0)").val();g_cfg['obid'] = $("#unit_prices select[name='unit']:eq(0) option:selected").data('obid');apiCmd('POST', g_url, g_cfg, function(data) {if (data.hasOwnProperty('CHK_BOOKING')) {//var scode = data.CHK_BOOKING.status_code;var scode = getStatusCode(data.CHK_BOOKING);//if (scode == "ERROR" || scode == "INFO") {if (scode != "OK") {bootbox.alert({title: scode,message: scode + ' ' + data.CHK_BOOKING.status_num + '
' + data.CHK_BOOKING.status_txt});//$('#unit_prices > li').remove();//$("#btnBookNow").hide();showUnitPrices();//showBookingPrice();//return;}else {updateUnitPrices();//showBookingPrice();//return;}}else {showUnitPrices();//showBookingPrice();}// showUnitPrices();showBookingPrice();// synch the selected datevar tmpd = $.datepick.parseDate('yyyy-mm-dd',g_cfg['period']);tmpd = $.datepick.add(tmpd,g_cfg['stay'],'d');tmpd = $.datepick.formatDate('dd.mm.yyyy',tmpd);$("#txt_from").val(g_cfg['period'].split('-').reverse().join('.'));$("#txt_to").val(tmpd);});}//alert(evt.target.tagName);});$("#unit_prices").on('change',function(evt) {//$(document.body).append(evt.target.tagName);var sel = $(evt.target);var unit_block = sel.parents('li');if (sel.attr('name') == 'infants') {g_cfg['infants'] = sel.val();if (! parseInt(g_cfg['infants'], 10)) {unit_block.find('.row .infants').hide();}else {unit_block.find('.info_box .infants:last select:visible').hide();unit_block.find('.row .infants').show();unit_block.find('.info_box .infants:last select:lt(' + g_cfg['infants'] + ')').show();}return;}if (sel.attr('name') == 'unit') {var code = sel.val();var unit = g_result['OBJ_PRICES'].units[code];setUnitBoarding(unit_block, unit.srvc);setUnitPersons(unit_block, unit);//unit_block.find('select[name=age]:visible')//marker/*if (! found) {unit_block.find('select[name=adults]').val(unit.pers.man_adults);unit_block.find('select[name=children]').val(unit.pers.min_children);var n_children = unit.pers.min_children;if (n_children > 0) {g_cfg['ages'] = new Array();while(n_children--) {g_cfg['ages'].push(unit.pers.min_age);}}checkUnitPrice(unit_block);return;}*/setUnitImage(unit_block, code); disableUnitOptions();}if (sel.attr('name') == 'adults') {setUnitChildren(unit_block,sel.val());}//var pers = unit_block.find('select[name=persons]').val();var pers =unit_block.find('select[name=adults]').val() + "" +unit_block.find('select[name=children]').val();var adlt = parseInt(unit_block.find('select[name=adults]').val(), 10);var kids = parseInt(unit_block.find('select[name=children]').val(), 10);if (kids != 0) {var btnCheck = unit_block.find('.price_box .btn-check');btnCheck.hide();setUnitAgeSelection(unit_block, adlt, kids);if (sel.attr('name') == 'boarding'||sel.attr('name') == 'adults' ||sel.attr('name') == 'children'||sel.attr('name') == 'age') {if (sel.attr('name') == 'age') {setAgeSelection(unit_block, sel, adlt, kids);}var selage = getChildrenAges(unit_block);if (! selage) return;if (parseInt(selage.length, 10) < parseInt(kids, 10)) return;sel.popover('destroy');g_cfg['ages'] = selage;var uid = [ g_cfg['period'].substr(0,4), unit_block.find('select[name="unit"] option:selected').data('obid') ,//g_cfg['obj_id'], (! g_cfg['unit']) ? unit_block.find('select[name="unit"]').val() : g_cfg['unit']].join('-');var pytpe = getUnitPaymnetType(uid);//if (pytpe != 'W' || 'HAMCKR'.indexOf(g_cfg.obj_id[0]) > -1) {if (pytpe != 'W' || 'HAMCKR'.indexOf(g_cfg.obj_id.charAt(0)) > -1) {btnCheck.click();return;}}//return;}else {unit_block.find('.info_box .ages:last').hide();unit_block.find('.info_box .ages:last select').hide();}var price = getUnitPrice(unit_block);var trns_price = getTransportPrice();//var kids = parseInt(pers.substr(1,1), 10);//pers = parseInt(pers.substr(0,1), 10); unit_block.find('.price_box .unit_price').text(price);if (trns_price == null) {;; // do nothing}else {//trns_price = (trns_price.adults_price * pers) + (trns_price.children_price * kids);//trns_price = (trns_price.adults_price * adlt) + (trns_price.children_price * kids);trns_price = calcTransportPrice(trns_price, {adults:adlt, kids:kids});//unit_block.find('.price_box .trns_price').text(trns_price.toFixed(2));unit_block.find('.price_box .trns_price').text(trns_price.toFixed(2));price = sumPrices([price,trns_price]); //trns_price}unit_block.find('.price_box .totl_price').text(price);showBookingPrice();});//$("#unit_prices li .price_box input[type=button]").on('click',function(evt) {$("#unit_prices").on('click',function(evt) {evt.preventDefault();var sel = $(evt.target);var unit_block = sel.parents('li');if (evt.target.tagName == "BUTTON") {unit_block.remove();g_max_units += 1;showBookingPrice();if ($("#unit_prices > li").size() == 1) {$("#unit_prices > li:eq(0) .price_box button").hide();}return;}if (evt.target.tagName == "IMG") {if(! $(evt.target).hasClass('img-clickable')) return;showUnitImages(evt.target.dataset['code']);return;}if (evt.target.tagName == 'I') {var link = null;var direction = 0;link = $(evt.target).parents('a');if (link.hasClass('imgL'))direction = -1;else if (link.hasClass('imgR'))direction = 1;var code = unit_block.find('.info_box select[name=unit]').val();if (! g_ibe_imgs[code]) return;if (! g_ibe_img_cnt.hasOwnProperty(code)) g_ibe_img_cnt[code] = 0;g_ibe_img_cnt[code] += direction;if (g_ibe_img_cnt[code] >= g_ibe_imgs[code].length) {g_ibe_img_cnt[code] = 0;}else if (g_ibe_img_cnt[code] < 0) {g_ibe_img_cnt[code] = g_ibe_imgs[code].length-1; }var ii = g_ibe_img_cnt[code];var img = link.parents('div.row').find('img');img.attr('src', g_ibe_imgs[code][ii].thumb);} if (evt.target.type != "button") return;checkUnitPrice(unit_block);});}/** * * @param unit_block - reference to the unit block li element * checks the price agains to IBE */function checkUnitPrice(unit_block) {g_cfg['unit'] = unit_block.find('select[name=unit]').val();g_cfg['srvc'] = unit_block.find('select[name=boarding]').val();g_cfg['obid'] = unit_block.find('select[name=unit] option:selected').data('obid');//g_cfg['pers'] = unit_block.find('select[name=persons]').val();g_cfg['pers'] =unit_block.find('select[name=adults]').val() +unit_block.find('select[name=children]').val();var infants = unit_block.find('select[name=infants]:visible');g_cfg['infants'] = ! infants.size() ? 0 : infants.val();var pers = g_cfg['pers'];//g_cfg['pers'] = pers;//g_cfg['ages'] = selage;// children agesset_rq(null);set_rq('CHK_PRICES');apiCmd('POST', g_url, g_cfg, function(data) {//var scode = data.CHK_PRICES.status_code;var scode = getStatusCode(data.CHK_PRICES);if (scode != "OK") {//if (scode == "ERROR" || scode == "INFO") {bootbox.alert({title: scode,message: scode + ' ' + data.CHK_PRICES.status_num + '
' + parseErrMsg(data.CHK_PRICES) //data.CHK_PRICES.status_txt});// set the bookign to booking request//if(data.CHK_PRICES.status_num == '000') {//$("#btnBookNow").val("Send booking request");$("#btnBookNow").val(g_dict.lb_btn_request);document.forms['frmBooking'].action = g_booking + "request";//}return;}if (! data.CHK_PRICES.units[0].status)unit_block.find('input[name=status]').val('');elseunit_block.find('input[name=status]').val(data.CHK_PRICES.units[0].status);//var price = data.CHK_PRICES.amount;var price = data.CHK_PRICES.units[0].price;var trns_price = getTransportPrice();/*pers = parseInt(pers.substr(0,1)) + parseInt(pers.substr(1,1));trns_price *= pers; unit_block.find('.price_box .trns_price').text(trns_price.toFixed(2));*/if (! trns_price) {trns_price = 0;}else if (g_cfg.trns_type != 'A') {if ((! g_calc_type[data.CHK_PRICES.season]) || g_calc_type[data.CHK_PRICES.season][g_cfg.trns_type] == '1') {/*trns_price = (trns_price.adults_price * parseInt(pers.substr(0,1), 10)) +(trns_price.children_price * parseInt(pers.substr(1,1), 10));*/trns_price = calcTransportPrice(trns_price,{adults: parseInt(pers.substr(0,1), 10),kids: parseInt(pers.substr(1,1), 10)});}else if(data.CHK_PRICES.trans[0]) {trns_price = parseFloat(data.CHK_PRICES.trans[0].price);if ((! trns_price) || isNaN(trns_price)) trns_price = 0;}}/*else if(data.CHK_PRICES.trans[0]) {trns_price = parseFloat(data.CHK_PRICES.trans[0].price);if ((! trns_price) || isNaN(trns_price)) trns_price = 0;}else {trns_price = (trns_price.adults_price * parseInt(pers.substr(0,1), 10)) +(trns_price.children_price * parseInt(pers.substr(1,1), 10));}*/// check for returned price type calculationif (g_cfg.trns_type != 'A') {if (! g_calc_type[data.CHK_PRICES.season]) {}else if (g_calc_type[data.CHK_PRICES.season][g_cfg.trns_type] == '1') {price = parseFloat(price) - parseFloat(trns_price);price = price.toFixed(2);}}if (typeof price == 'string') {price = parseFloat(price);}unit_block.find('.price_box .trns_price').text(trns_price.toFixed(2));unit_block.find('.price_box .unit_price').text(price.toFixed(2));//unit_block.find('.price_box .unit_price').text(price);price = sumPrices([price,trns_price//unit_block.find('.price_box .trns_price').text()]);unit_block.find('.price_box .totl_price').text(price);showBookingPrice();});}/** * * @param data - response object * @returns - string info massage insted of status text if conitions are meet */function parseErrMsg(data) {if ((! data.info) ||(! Array.isArray(data.info))) return data.status_txt;var txt = data.info.filter(function(row) {return row.indexOf('950001') > -1;});if (txt.length == 0) return data.status_txt;return txt[0];}/** * * @param ublock - reference to the unit block li element that contains the selected children ages * @returns - array of selected children ages */function getChildrenAges(ublock) {var selage = ublock.find('.info_box .ages:last select:visible');var ages = new Array();selage.each(function(i) {if (this.value !== '') {ages.push(this.value);}});if (selage.size() != ages.length) return null;return ages;}function initMaxUnits() {g_max_units = 0;if (! g_result['OBJ_PRICES']) {//console.log("no price");//console.log(g_max_units);return;}for (var ky in g_result.OBJ_PRICES.units) {g_max_units += g_result.OBJ_PRICES.units[ky].count;}if (g_max_units > 3) g_max_units = 3;g_max_units -= $("#unit_prices > li").size();}function setUnitBoarding(unit_block,datalist) {//var tmpl = '{{srvc}}
{{/srvc}}';var srvc_object = unit_block.find('select[name="boarding"]');var srvc = srvc_object.val();var tmpl = '{{srvc}}
{{/srvc}}';//var tmpl = '{{srvc}}
{{/srvc}}';var data = {srvc: datalist};var html = Mark.up(tmpl, data);srvc_object.html(html);}/*function setUnitPersons(unit_block,datalist) {//var tmpl = '{{pers}}
{{/pers}}';var tmpl = '{{pers}}
{{/pers}}';var data = {pers: datalist};var html = Mark.up(tmpl, data);unit_block.find('select[name="persons"]').html(html);}*//*function getDateDiffDays(d1,d2) {var ms_day= 1000 * 60 * 60 * 24;var ms_diff = d2.getTime() - d1.getTime();var days = Math.floor(ms_diff / ms_day);return days;}*/function setUnitDateDiff(booking, unit_data) {var trns_type = ((! booking['trans']) || (! booking['trans']['type'])) ? 'A' : booking['trans']['type'];var diff_id = [ unit_data['date'].substr(0,4), //booking['objid'], unit_data['obid'], unit_data['unit'], trns_type].join('-');if (! g_diff_days[diff_id] ) return;var ddiff= - parseInt(g_diff_days[diff_id].dpt_days_diff, 10);unit_data.date= subDateDays(g_cfg.period, ddiff);unit_data.stay= parseInt(g_cfg.stay, 10) + ddiff;ddiff = - parseInt(g_diff_days[diff_id].rtn_days_diff, 10);unit_data.stay= parseInt(unit_data.stay, 10) + ddiff;/*var ddiff= - parseInt(g_diff_days[diff_id].dpt_days_diff, 10);unit_data.date= subDateDays(unit_data.dpt_date, ddiff);unit_data.stay= parseInt(unit_data.days, 10) + ddiff;ddiff = - parseInt(g_diff_days[diff_id].rtn_days_diff, 10);//unit_data.rtn_date= subDateDays(unit_data.rtn_date, ddiff);unit_data.stay= parseInt(unit_data.days, 10) + ddiff;*//*if(g_cfg['trns_type'] != 'A') {//var day_times_ms = (24*60*60*1000);var diff_id = unit_data['uid'].substr(0,15) + '-' + g_cfg['trns_type'];if (! (! g_diff_days[diff_id] )) {var ddiff= - parseInt(g_diff_days[diff_id].dpt_days_diff);unit_data.dpt_date= subDateDays(unit_data.dpt_date, ddiff);unit_data.days= parseInt(unit_data.days) + ddiff;ddiff = - parseInt(g_diff_days[diff_id].rtn_days_diff);unit_data.rtn_date= subDateDays(unit_data.rtn_date, ddiff);unit_data.days= parseInt(unit_data.days) + ddiff;}}*/}function setUnitPersons(unit_block,unit_data) {var n = unit_data.data[0].adults;//var tmpl = '{{pers}}
{{/pers}}';var tmpl = '{{pers|adults:' + n + '}}';var data = {pers: unit_data.pers};var html = Mark.up(tmpl, data);//if (! html) return false;var sel_adults = unit_block.find('select[name="adults"]');sel_adults.html(html);tmpl = '{{pers|children}}';html = Mark.up(tmpl, data);unit_block.find('select[name="children"]').html(html);setUnitChildren(unit_block, sel_adults.val());return true;}function setUnitChildren(unit_block,sel_adults) {var code = unit_block.find('select[name="unit"]').val();if(! code) return;var data = g_result['OBJ_PRICES'].units[code].pers;var opts = unit_block.find('select[name="children"] option');opts.prop('disabled', true); // safari , operavar sel = parseInt(sel_adults, 10);var min = parseInt(data.min_pers, 10);var max = parseInt(data.tot_pers, 10);var val = -1;opts.each(function(i) {var opt = $(this);var c = parseInt(opt.val(), 10);var t = c + sel;if (t >= min && t <= max) {if (val < 0) val = c;opt.show();opt.prop('disabled', false); // safari , opera}else {opt.hide();opt.prop('disabled', true); // safari , opera}});unit_block.find('select[name="children"]').val(val);}function setAgeSelection(unit_block, ctrl, sel_adults, sel_children) {var code = unit_block.find('select[name=unit]').val();//var age = ctrl.val();var kid_ages = unit_block.find('.info_box .ages:last select:lt(' + sel_children + ')');kid_ages.prop('disabled', true);kid_ages.prop('required', true);//ctrl.prop('disabled', false);//kid_ages.eq(0).enabled(true);unit_block.find('.info_box .ages:last select:eq(0)').prop('disabled', false);kid_ages.show();if(! g_result['OBJ_PRICES']) return;if(! g_result['OBJ_PRICES'].units) return;if(! g_result['OBJ_PRICES'].units[code]) return;var persdata = g_result['OBJ_PRICES'].units[code].pers;var adults = parseInt(sel_adults, 10);var age_selected = !( !ctrl.val()); var indx = kid_ages.index(ctrl);kid_ages.each(function(i) {var kid_age = $(this);var age = parseInt(kid_age.val(), 10);var ma = parseInt(persdata.min_age, 10);kid_age.find('option').show();kid_age.find('option').prop('disabled', false); //safari, operaif (persdata.min_age > 0) {kid_age.find('option[value!=""]').each(function() {if (parseInt(this.value, 10) < ma) {$(this).hide();$(this).prop('disabled', true); //safari, opera} });}if (age > parseInt(persdata.max_age, 10)) {adults += 1;}if (i != indx ) {if (adults >= persdata.max_adults) {ma = parseInt(persdata.max_age, 10);kid_age.find('option[value!=""]').each(function() {if (parseInt(this.value, 10) > ma) {$(this).hide();$(this).prop('disabled', true); //safari, opera} });}}if (age_selected) kid_age.prop('disabled', false);age_selected = ! (!age); });}function setUnitAgeSelection(unit_block, sel_adults, sel_children) {unit_block.find('.info_box .ages:last').show();unit_block.find('.info_box .ages:last select').hide();unit_block.find('.info_box .ages:last select').removeProp('required');//unit_block.find('.info_box .ages:last select:lt(' + pers.substr(1,1) + ')').show();//var kid_ages = unit_block.find('.info_box .ages:last select:lt(' + pers.substr(1,1) + ')');var kid_ages = unit_block.find('.info_box .ages:last select:lt(' + sel_children + ')');kid_ages.prop('disabled', true);kid_ages.prop('required', true);//kid_ages.eq(0).enabled(true);unit_block.find('.info_box .ages:last select:eq(0)').prop('disabled', false);kid_ages.show();var code = unit_block.find('select[name=unit]').val();if(! g_result['OBJ_PRICES']) return;if(! g_result['OBJ_PRICES'].units) return;if(! g_result['OBJ_PRICES'].units[code]) return;var persdata = g_result['OBJ_PRICES'].units[code].pers;var adults = parseInt(sel_adults, 10);var age_selected = false; kid_ages.each(function(i) {var kid_age = $(this);var ma = parseInt(persdata.min_age, 10);kid_age.find('option').show();if (persdata.min_age > 0) {//kid_age.find('option[value!=""]:lt(' + (ma-1) + ')').hide();kid_age.find('option[value!=""]').each(function() {if (parseInt(this.value, 10) < ma) {$(this).hide();} });}if (adults >= persdata.max_adults) {ma = parseInt(persdata.max_age, 10);//kid_age.find('option[value!=""]:gt(' + (ma-1) + ')').hide();kid_age.find('option[value!=""]').each(function() {if (parseInt(this.value, 10) > ma) {$(this).hide();} });}var age = parseInt(kid_age.val(), 10);if (age > parseInt(persdata.max_age, 10)) {adults += 1;}if (age_selected) kid_age.prop('disabled', false);age_selected = ! (!age); });}function getUnitPaymnetType(uid) {if (! g_result['OBJ_UNITS']) return null;for (var i = 0;i < g_result['OBJ_UNITS'].length;i++) {var unit = g_result['OBJ_UNITS'][i];if (unit.uid == uid.substr(0,15)) {return unit.payment;}}return null;}/** * calculates and returns the price from the unit_block * @param unit_block (jquery object reference of the selected unit li) * @returns float (text) */function getUnitPrice(unit_block) {var unit = unit_block.find('select[name="unit"]').val();var srvc = unit_block.find('select[name="boarding"]').val();var pers = unit_block.find('select[name="adults"]').val() + "" +unit_block.find('select[name="children"]').val();var objc = unit_block.find('select[name="unit"] option:selected').data('obid');var uid = [g_cfg['period'].substr(0,4), objc, //g_cfg['obj_id'], unit,srvc].join('-');var len = uid.length;uid += '-' + pers;var price = 0;/*var data = g_result['OBJ_PRICES'].units[unit].data.filter(unitByPersNum);if (! data) return price.toFixed(2);price = data[0].price * parseInt(data[0].persons);*/var ptype = getUnitPaymnetType(uid);var data = g_result['OBJ_PRICES'].units[unit].data;var max_adults = g_result['OBJ_PRICES'].units[unit].pers.max_adults;for (var i = 0;i < data.length;i++) {var tmp = data[i].uid.substr(0,len);tmp += ('-' + (data[i].adults + data[i].children));//if (data[i].uid == uid) {if (tmp == uid) {//price = data[i].price;//price = g_cfg.trns_type != 'A' ? data[i].tot_price : data[i].price;price = g_cfg.trns_type != 'A' && ptype == 'W' ? data[i].tot_price : data[i].price;if (ptype != 'W') price *= parseInt(data[i].persons, 10);price = parseFloat(price);break;}}if (price == 0 && data.length > 0) {if (ptype == 'W') {//uid = uid.substr(0,uid.length-2) + '10';uid = uid.substr(0,17) + '-10';for (var i = 0;i < data.length;i++) {var tmpuid = data[i].uid;if (g_cfg.trns_type != 'A')tmpuid = tmpuid.substr(0,tmpuid.length-2) + '10';//if (data[i].uid == uid) {if (tmpuid == uid) {//price = parseFloat(data[i].price);price = g_cfg.trns_type != 'A' ? data[i].tot_price : data[i].price;//price = parseFloat(price);break;}}// meal addition difference//var pricediff = price - parseFloat(data[0].price);var pricediff = parseFloat(price) - parseFloat(g_cfg.trns_type != 'A' ? data[0].tot_price : data[0].price);if (pricediff > 0) {var adlt = max_adults - parseInt(pers.substr(0,1),10);//price -= (data[i].boarding * adlt);if (typeof price != "number") price = parseFloat(price);price -= (data[i].boarding * adlt);}var indx = i >= data.length ? 0 : i;if (typeof price != "number") price = parseFloat(price);price += getUnitPriceAddition(unit,srvc,pers,data[indx].days);}}if (typeof price != "number") price = parseFloat(price);return price.toFixed(2);}function getUnitPriceAddition(unit, srvc, pers, stay) {var price= 0;var code= unit + srvc;if (! g_result['CHK_DISCADD']) return 0;if (! g_result['CHK_DISCADD'][code]) return 0;var extr_price = g_result['CHK_DISCADD'][code];var tots= parseInt(pers.substr(0,1), 10) + parseInt(pers.substr(1), 10);var min = parseInt(extr_price.pers_range_min, 10);var max = parseInt(extr_price.pers_range_max, 10);if (min == max && tots >= min) {price = parseFloat(extr_price.price) * parseInt(stay, 10);}else if (tots >= min && tots <= max) {price = ((tots - min) +1) * parseFloat(extr_price.price) * parseInt(stay, 10);}return price;}/** * @returns * Object containing transport related data like * code (code of the flight or bus departure station) * date- departure date * stay - stay in days */function getTransportDataPK(ttype) {var data = new Object();data['type'] = ttype;data['date'] = g_cfg['period'];data['stay'] = g_cfg['stay'];switch(ttype) {case 'B':data['code'] = $("#dpt_" + ttype).val();break;case 'F':if((! g_result['OBJ_PRICES']) || (! g_result['OBJ_PRICES'].units)) {data['code'] = $("#dpt_" + ttype).val();}else {// get first offers to take flight data var offers = Object.values(g_result['OBJ_PRICES'].units);if (offers.length > 0) {offers = offers[0].data[0];data['code'] = [offers.dpt_code, offers.dst_code, offers.trns_com].join(' ');}}break;}return data;}/** * @returns * Object containing transport related data like * code (code of the flight or bus departure station) * date- departure date * stay - stay in days */function getTransportData() {if (g_cfg['trns_type'] == 'A') return null;if (g_cfg['pk'] == '1') return getTransportDataPK(g_cfg['trns_type']);var args = arguments;var input = $("#trns_prices input:checked");if (input.size() == 0) return null;var index = input.val();if ($.isEmptyObject(index)) return null;var data = new Object();if (g_cfg['trns_type'] == 'B') {data['type'] = 'B';//data['code'] = $("#trns_prices select:eq(" + index + ")").val();//data['code'] = $("#trns_prices ul.bus_item:eq(" + index + ")").data('code');data['code'] = $("#trns_prices div[data-ddindex=" + index + "] > ul.bus_item").data('code');if (args.length == 0) { data['date'] = g_result['BUS_PRICES'][index].dpt_date;data['stay'] = g_result['BUS_PRICES'][index].days;}else if(args[0] === true) {data['date'] = g_cfg['period'];data['stay'] = g_cfg['stay'];}return data;}if (g_cfg['trns_type'] != 'F') return null;var flt_data = g_result['FLT_PRICES'][index];data['type'] = 'F';data['code'] = [ flt_data.dflt_dpt_code, flt_data.dflt_dst_code, flt_data.flt_code.replace(flt_data.dflt_dst_code,'') ].join(' ');data['link'] = flt_data.ord_code;if (args.length == 0) { data['date'] = flt_data.dflt_dpt_date;data['stay'] = flt_data.days;}else if(args[0] === true) {data['date'] = g_cfg['period'];data['stay'] = g_cfg['stay'];}return data;}/** * * @returns (object) containing selected transport price * (adults_price and childrens_price) * if not found null value is returned */function getTransportPrice() {if (g_cfg['trns_type'] == 'A') return null;//var price = 0;var price = null;if (g_cfg['trns_type'] == 'B') {var index = $("#trns_prices input:checked").val();if ($.isEmptyObject(index)) return '';price = g_result.BUS_PRICES[index].sel_item;/*var code = $("#trns_prices select:eq(" + index + ")").val();price = g_result['BUS_PRICES'][index].prices[code];//price = parseFloat(price).toFixed(2);//price = sumPrices([g_result['BUS_PRICES'][index].prices[code]]);*/return price;}if (g_cfg['trns_type'] != 'F') return '';var index = $("#trns_prices input:checked").val();if ($.isEmptyObject(index)) return '';//alert(index);if (! g_result['FLT_PRICES'][index]) return null;price = {adults_price: g_result['FLT_PRICES'][index].tot_price,children_price: g_result['FLT_PRICES'][index].tot_child_price};//price = sumPrices([g_result['FLT_PRICES'][index].tot_price]);return price;}/** * sets the global request parameter values */function setTransportRQ() {if (g_cfg['trns_type'] == 'A') {delete g_cfg['date_range'];set_rq('FLT_PRICES',false);set_rq('BUS_PRICES',false);return;}g_cfg['date_range'] = 3;if (g_cfg['trns_type'] == 'F') {set_rq('FLT_PRICES');//g_cfg['rq'].push('FLT_PRICES');}else if (g_cfg['trns_type'] == 'B')set_rq('BUS_PRICES');//g_cfg['rq'].push('BUS_PRICES');}/** * * @param item - refenrece to the html item containg transport data * sets the transport value of the dropdown menu when a selection is made by the user * and triggers the change event on the "item" element */function setTransportPrice(item) {//var item = $(item);item = $(item);var sel = item.parents('.dropdown').find('button > div');sel.html($(item).html());var code = item.data('code');var i = sel.data('ddindex');var index = g_result.BUS_PRICES[i].stations.indexOf(code);g_result.BUS_PRICES[i].sel_item = g_result.BUS_PRICES[i].options[index];$("#trns_prices").change();}/** * display the transport prices search results * in the HTML page */function showTransportPrices() {if (g_cfg['pk'] == '1') return; var ul = $("#trns_prices");if (g_cfg['trns_type'] == 'A') {ul.hide();return;}var html = null;var tmpl = null;var prices = null;if (g_cfg['trns_type'] == 'F') {prices = g_result['FLT_PRICES'];tmpl = tmpl_list['flt_prices'];var flt_prices = new Array();var i = 0;while (i < prices.length) {if (prices[i].selected != '1') break;flt_prices.push(prices[i]);i += 1;}g_flt_val = 0;var data = { list: flt_prices };html = Mark.up(tmpl, data);ul.show();/*ul.parent('div').removeClass();ul.parent('div').addClass('row trns_F');*/if (ul.hasClass('trns_B'))ul.removeClass('trns_B');ul.addClass('trns_F');// alternative flights numbervar alt_flt = prices.length - flt_prices.length;g_flt_val = i;var re = new RegExp('ALTFLT','g');html = html.replace(re,'');if (alt_flt > 0) { // append alternative flights if existsdata['list'] = prices.slice(i);var link_more = '
' +'
' +'
'.replace('', data['list'].length) +' ()'.replace('',g_dict['lb_alt_more']).replace('', data['list'].length) + '' +'
' +'
';/*html += '
';html += '' ;html += g_dict['lb_alt_more'];html += ' (' + data['list'].length + ')
';*/html += link_more;var flts = Mark.up(tmpl, data);//html += flts.replace(/class=\"\"/g,'class="altflight row"');html += flts.replace(re,'altflight');}//html = html.replace(re,'altflight');ul.html(html);var price = getTransportPrice();if (! price) $("#trns_prices input:eq(0)").attr('checked',true);return;}if (g_cfg['trns_type'] == 'B') {tmpl = tmpl_list['bus_prices'];var data = { list: g_result['BUS_PRICES'] };//ul.html(g_result['BUS_PRICES']);html = Mark.up(tmpl, data);//alert(html);ul.show();/*ul.parent('div').removeClass();ul.parent('div').addClass('trns_B');*/ul.removeClass('trns_A');ul.removeClass('trns_B');ul.addClass('trns_B');ul.html(html);/*$(".trns_B select").each(function(i) {this.value = g_result['BUS_PRICES'][i].dpt_code;});*/var price = getTransportPrice();if (! price) {$("#trns_prices input:eq(0)").attr('checked',true);}//alert(123);$("#trns_prices input:checked").closest('div.row').addClass('seleced_bus');}}/** * * @param unit_block (object) - list item cotaining unit data * @param code (string) - unit code * Sets the displayed image */function setUnitImage(unit_block, code) {var img = unit_block.find('.row img');var src = getUnitImage(code);img.prop('src',src);img.prop('data-code',code);img.attr('data-code',code);if (unitHasImage(code)) {if (! img.hasClass('img-clickable')) img.addClass('img-clickable');return;}img.removeClass('img-clickable');}/** * * @param code (string) - unit code * @returns string (image url) */function getUnitImage(code) {if (! g_ibe_imgs[code] || g_ibe_imgs[code].length == 0)return (! g_base) ? 'img/no-photos.jpg' : '/assets/img/no-photos.jpg';if (arguments.length < 2 || isNaN(arguments[1]))return g_ibe_imgs[code][0].thumb;return g_ibe_imgs[code][1].thumb;}function unitHasImage(code) { return ! (! g_ibe_imgs[code] || g_ibe_imgs[code].length == 0);}/** * Updates the unit prices of the reviously selected units with the data recevied from the server * @returns {Boolean} */function updateUnitPrices() {if(! g_result['CHK_BOOKING']) return false;if(! g_result['CHK_BOOKING']['units']) return false;var tprice= g_cfg['trns_type'] != 'A' ? getTransportPrice() : null;var ulst= g_result['CHK_BOOKING']['units'];$('#unit_prices > li').each(function(i) {var li = $(this);var d1= $.datepick.parseDate('ddmmyy',ulst[i].date_from);var d2= $.datepick.parseDate('ddmmyy',ulst[i].date_to);var days= getDateDiff(d1,d2);var sel= li.find('select[name=unit]');li.find('input[name=status]').val(ulst[i].status);sel.attr('data-date',$.datepick.formatDate('yyyy-mm-dd',d1));sel.attr('data-stay',days);d1 = $.datepick.formatDate('dd.mm.yyyy',d1);d2 = $.datepick.formatDate('dd.mm.yyyy',d2);days = d1 + ' - ' + d2 + ' (' + days + ' ' + g_dict['lb_nights'] + ')';li.find('.info_box input[type=text]:eq(0)').val(days);var pers = bookingPersCount(ulst[i].pers_order,g_result['CHK_BOOKING']['persons'],g_cfg['trns_type']);var trns_price = 0;if (tprice != null) {/*trns_price =(tprice.adults_price * pers.adults) +(tprice.children_price * pers.kids);*/trns_price = calcTransportPrice(tprice, pers);li.find('.trns_price').html(trns_price.toFixed(2));}var price = ulst[i].price;if (g_cfg.trns_type != 'A') {if (! g_calc_type[g_result['CHK_BOOKING']['season']]) {}else if (g_calc_type[g_result.CHK_BOOKING.season][g_cfg.trns_type] == '1') {price = parseFloat(price) - parseFloat(trns_price);price = price.toFixed(2);}}li.find('.unit_price').html(!price ? '0.00' : (typeof(price) == 'number' ? price.toFixed(2) : price));var tot = sumPrices([price, trns_price]);li.find('.totl_price').html(tot);});showBookingPrice();}function calcTransportPrice(trnsport_price, persons) {var adults= parseInt(persons.adults, 10);var kids= parseInt(persons.kids, 10);if (g_cfg.trns_type == 'B') {if (Array.isArray(g_cfg['ages'])) {g_cfg.ages.forEach(function(age) {age = parseInt(age, 10);if (isNaN(age)) return;if (age > 13) {adults += 1;kids -= 1;}});}}var price = (trnsport_price.adults_price * adults) +(trnsport_price.children_price * kids);return price;}function bookingPersCount(unit_persons, all_persons, trans_type) {var a = 0; // adults var k = 0; // kidsunit_persons = getUnitPersonsOrder(unit_persons);for (var i = 0;i < unit_persons.length;i++) {var indx = parseInt(unit_persons[i], 10) - 1;switch (all_persons[indx].gender) {case 'K'://case 'I'://case 'B':/*if (trans_type == 'B' && parseInt(all_persons[indx].age,10) > 14) {a += 1; }elsek += 1;*/k += 1;break;default:a += 1;break;}}return {adults: a,kids: k};}function getUnitPersonsOrder(val) {val = $.trim(val);var order = new Array();if (val.indexOf('-') > -1) {val = val.split('-');var min = parseInt(val[0] ,10);var max = parseInt(val[1] ,10);for (var i = min; i <= max; i++) {order.push(i);}return order;}if (val.indexOf(',') > -1) {val = val.split(',');for (var i = 0; i < val.length; i++) {val[i] = parseInt(val[i] ,10);order.push(val[i]);}return order;}val = parseInt(val, 10);order.push(val);return order;}function showUnitPrices() {if (g_result['OBJ_PRICES'].options.length == 0) return;var add= arguments.length == 0 || arguments[0] == -1 ? false : arguments[0];var srvc= arguments.length > 0 && arguments[0] == -1 ? true : false;var tmpl = tmpl_list['obj_prices'];var units = new Array();var sel_unit = getSelectedUnit();var code = sel_unit == null ? g_result['OBJ_PRICES'].options[0].code : sel_unit.acc_code;if (add) // predefined codecode = add;var n = parseInt($("#li_persons select[name=sel_units]").val(), 10);var price = g_cfg['trns_type'] != 'A' ? getTransportPrice() : null;//var totl_price = 0;while (n--) {if (! g_cfg['pers']) {g_cfg['pers'] = g_cfg['trns_type'] != 'A' ?g_result['OBJ_PRICES'].units[code].pers.max_adults + "0" :g_result['OBJ_PRICES'].units[code].pers.min_pers + "0";}if (! add) {sel_unit = g_result['OBJ_PRICES'].units[code].data.filter(unitByPersNum);if (! sel_unit || sel_unit.length == 0) {sel_unit = [g_result['OBJ_PRICES'].units[code].data[0]];}else if(srvc) {if ( g_cfg['srvc'] ) {sel_unit = sel_unit.filter(function(item) {return item.uid.indexOf('-' + g_cfg['srvc'] + '-') > -1;});}}}else {sel_unit = [g_result['OBJ_PRICES'].units[code].data[0]];var tmpuid = sel_unit[0].uid.split('-');g_cfg['unit'] = code;g_cfg['obid'] = tmpuid[1];g_cfg['srvc'] = tmpuid[3];g_cfg['pers'] = tmpuid[4];}var o = {options: g_result['OBJ_PRICES'].options,mainoptions: filterOptions(g_result['OBJ_PRICES'].options, false),moreoptions: filterOptions(g_result['OBJ_PRICES'].options, true),srvc : g_result['OBJ_PRICES'].units[code].srvc,//unit: sel_unit[0],//g_result['OBJ_PRICES'].units[code].data[0],unit: JSON.parse(JSON.stringify(sel_unit[0])),pers: g_result['OBJ_PRICES'].units[code].pers,img: getUnitImage(code),cod: code//img: ! g_base ? 'img/no-photos.jpg' : '/assets/img/no-photos.jpg'};//o['trns_price'] = parseFloat(price) * parseInt(o.unit.adults);if (!price) o['trns_price'] = 0; else {o['trns_price'] = parseFloat(price.adults_price) * parseInt(o.unit.adults, 10);o['trns_price'] += parseFloat(price.children_price) * parseInt(o.unit.children, 10);o['trns_price'] = o['trns_price'].toFixed(2);}var ut = getUnitPaymnetType(o.unit.uid);if (ut == 'W')o['totl_price'] = sumPrices([o['trns_price'],o.unit.tot_price]);//o['totl_price'] = sumPrices([o['trns_price'],o.unit.price]);elseo['totl_price'] = sumPrices([o['trns_price'],o.unit.tot_price]);// calc days differenceif(g_cfg['trns_type'] != 'A') {//var day_times_ms = (24*60*60*1000);var diff_id = o.unit['uid'].substr(0,15) + '-' + g_cfg['trns_type'];if (! (! g_diff_days[diff_id] )) {var ddiff= - parseInt(g_diff_days[diff_id].dpt_days_diff, 10);o.unit.dpt_date= subDateDays(o.unit.dpt_date, ddiff);o.unit.days= parseInt(o.unit.days, 10) + ddiff;ddiff = - parseInt(g_diff_days[diff_id].rtn_days_diff, 10);o.unit.rtn_date= subDateDays(o.unit.rtn_date, ddiff);o.unit.days= parseInt(o.unit.days, 10) + ddiff;}}units.push(o);g_max_units -= 1;}var data = { list: units };var html = Mark.up(tmpl, data);var ul = $("#unit_prices");ul.parents('.booking').show();//ul.parent('div').removeClass();//ul.parent('div').addClass('trns_F');if (! add) ul.html(html);else {//ul.append(html);var unit_block = $(html);ul.append(unit_block);var adlt = unit_block.find("select[name='adults']").val();if (adlt) {setUnitChildren(unit_block, adlt);}disableUnitOptions();ul.find('.btn-rm-unit').css('visibility','visible');}if (g_cfg['trns_type'] != 'A')$(".visopt").removeClass('visible_no');else$(".visopt").addClass('visible_no');// show childern optins$("#unit_prices select[name=children]").trigger('change');}function showUnitImages(unit_id) {if (! g_ltboxlst[unit_id]) {var data = {code: unit_id,images: g_ibe_imgs[unit_id]};data = Mark.up(tmpl_list['unit_images'],data);$("#unit_images").append(data);g_ltboxlst[unit_id] = $("#unit_img_" + unit_id + " a").simpleLightbox();}g_ltboxlst[unit_id].open();//alert(data);}/** * * @param unit - object (unit data) * @returns {Boolean} * used to filter the the unit data by number of persons */function unitByPersNum(unit) {if (! g_cfg['pers']) return false;var pers = parseInt(g_cfg['pers'].substr(0,1), 10) + parseInt(g_cfg['pers'].substr(1,1), 10) + "0";if (unit.uid.substr(-2) == pers) return true;var num = unit.adults + '' + unit.children;return num == pers;}/*function unitByPersNum(unit) {if (! g_cfg['pers']) return false;//if (! g_cfg['pers']) return true;//return unit.uid.substr(-2) == g_cfg['pers'];var pers = parseInt(g_cfg['pers'].substr(0,1)) + parseInt(g_cfg['pers'].substr(1,1)) + "0";return unit.uid.substr(-2) == pers;//g_cfg['pers'];}*//** * * @param data - array of objects containign departure codes and texts * sets the content of the departure bus station or airport */function setDptLocations(data) {var sel = $("#dpt_" + g_cfg['trns_type']);sel.prop('disabled', false);if (g_cfg['trns_type'] == 'A') return;/* set departure list g_dpt_list = new Object();for(var i = 0;i < data.length;i++)g_dpt_list[data[i].code] = data[i].name;*/// add the empty selection to the list of places//data.splice(0, 0, {code:'',name:'-----------'});data.splice(0, 0, {code:'',name: g_dpt_select[g_cfg['trns_type']] });var o = new Object();o['list'] = data;// render the selection optionsvar tmpl = tmpl_list['sel_option'];sel.html(Mark.up(tmpl,o));if (g_pre)sel.val(g_cfg.trns_code);}/** * initalize the departure date datepicker */function initFromDate() {var d = new Date();var year = d.getFullYear();var min_date = null;if (arguments.length > 0) {var dates = arguments[0];//g_dpt_dates = arguments[0];if (dates.length >= 1) {min_date = $.datepick.parseDate('yyyy-mm-dd', dates[0]);year = parseInt(dates[0].substring(0,4), 10);}}//alert(min_date);var dpick = $("#txt_from");if (min_date != null) {dpick.datepick('option', {minDate: min_date});dpick.datepick('enable');return;}dpick.datepick({firstDay: 1,dateFormat: 'dd.mm.yyyy',/* showTrigger: '#imgF', */minDate: min_date,yearRange: year + ':' + (year+1),onSelect: function (txt,inst) {//dpick_from.datepick('hide');if (! dateHasChanged(this)) return;dpick.trigger('change');},// beforeShow: function() {},onDate: function(date) {var d = $.datepick.formatDate('yyyy-mm-dd',date);var date_cell = new Object();date_cell['selectable'] = $.inArray(d,g_result['DPT_DATES']) > -1;/* sample codedate_cell["title"] = null;date_cell["dateClass"] = null;date_cell["selectable"] = false;*/return date_cell;}});// add change event functionality dpick.on('change',function(evt) {g_cfg['stay'] = '';if (! this.value) {g_cfg['period'] = '';$("#txt_to").val('');$("#txt_to").datepick('disable');return;}try {// check if enered date is a valid date$.datepick.parseDate('dd.mm.yyyy', this.value);$("#txt_from").parents('.form-group').removeClass('has-error');//$("#txt_from").removeClass('err');} catch(e) {//$("#txt_from").addClass('err');$("#txt_from").parents('.form-group').addClass('has-error');alert("Invalid date!");g_cfg['period'] = '';return;}g_cfg['period'] = this.value.split('.').reverse().join('-');set_rq(null);set_rq('RTN_DATES');//g_cfg['rq'] = new Array('RTN_DATES');//setTransportRQ();apiCmd('POST', g_url, g_cfg, function(data) {initToDate(g_result['RTN_DATES']);if (! g_dpickt) return;g_dpickt.datepick('show');//showTransportPrices();});});g_dpickf = dpick;}/** * initilaize the return date datepicker selection * @param dates (array of available dates) */function initToDate(dates) {//g_rtn_dates = dates;var min_date = ! dates || dates.length == 0 ? null : $.datepick.parseDate('yyyy-mm-dd', dates[0]);var dpick = $("#txt_to");if (min_date != null) {var year = min_date.getFullYear();dpick.datepick('option', {minDate: min_date});dpick.datepick('option', {yearRange: year + ':' + (year+1)});dpick.datepick('enable');dpick.val('');return;}dpick.datepick({firstDay: 1,dateFormat: 'dd.mm.yyyy',// showTrigger: '#imgT', // ---minDate: min_date,enable: false,//yearRange: year + ':c+1',onSelect: function (txt,inst) {//dpick_from.datepick('hide');if (! dateHasChanged(this)) return;dpick.trigger('change');},// beforeShow: function() {},onDate: function(date) {var d = $.datepick.formatDate('yyyy-mm-dd',date);var date_cell = new Object();//date_cell['selectable'] = $.inArray(d,g_rtn_dates) > -1;date_cell['selectable'] = $.inArray(d,g_result['RTN_DATES']) > -1;return date_cell;}});if(! g_pre)dpick.datepick('disable');dpick.on('change',function(evt) {//reset stay to empty if not return date selected if (! this.value) g_cfg['stay'] = '';var edate = null;try {// check if enered date is a valid dateedate = $.datepick.parseDate('dd.mm.yyyy', this.value);$("#txt_to").parents('.form-group').removeClass('has-error');//$("#txt_to").removeClass('err');} catch(e) {//$("#txt_to").addClass('err');$("#txt_to").parents('.form-group').addClass('has-error');alert("Invalid date!");g_cfg['stay'] = '';return;}var sdate = $.datepick.parseDate('yyyy-mm-dd', g_cfg['period']);if ( (! sdate) || (! edate)) return;// update selected units if any already selectedvar unitopts = $('#unit_prices select[name="unit"]:visible:eq(0)');if (unitopts.size() > 0) {g_cfg['unit'] = unitopts.val();g_cfg['obid'] = unitopts.find('option:selected').data('obid');}g_cfg['stay'] = getDateDiff(sdate,edate);$("#btn_search").trigger('click');});g_dpickt = dpick;}function dateHasChanged(fld) {var fldval = fld.value != '' ? fld.value.split('.').reverse().join('-') : ''; if (fld.name == 'txt_from') {return g_cfg['period'] != fldval;}var d1= $.datepick.parseDate('yyyy-mm-dd', g_cfg['period']);var d2= $.datepick.parseDate('yyyy-mm-dd', fldval);var d= getDateDiff(d1, d2);return g_cfg['stay'] != d;}function initPersonSelect() {//var unit = g_result['OBJ_UNITS'][0];var unit = getSelectedUnit();var sel_list = calcPersSelect(unit,true);var data = new Object();var html = '';//var index = 1;if (arguments.length == 0) {var tmpl = '{{list}}
{{/list}}';//data['list'] = Object.keys(sel_list);data['list'] = sel_list;html = Mark.up(tmpl,data);//$("#sel_adlt").html(html);$("#sel_prsn").html(html);sel_list = calcPersSelect(unit);//var sel_persons = getUnitPersPreselection(unit);//$("#sel_prsn").val(sel_persons);if (unit != null)$("#sel_prsn").val(unit.max_adults);}/*elseindex = parseInt(arguments[0]);var i = 0;var val = $("#sel_chld").val();html = '';while (i <= sel_list[index]) {html += '
';i++;}$("#sel_chld").html(html);if (val < i) $("#sel_chld").val(val);*/}/* * currently not in use * maybe not neededfunction getUnitPersPreselection(unit) {var sel_list = calcPersSelect(unit);alert(sel_list.toSource());var adults = 0;for(var k in sel_list) {if (sel_list[k] == '0') {var v = parseInt(k);if (v > adults) adults = v;}}return adults;}*//** * * @returns the selected unit (object) */function getSelectedUnit() {if (! g_result['OBJ_PRICES']) return null;if (! g_result['OBJ_UNITS']) return null;if (! g_cfg['unit']) return null;//g_result['OBJ_UNITS'][0];var code = g_cfg['unit'];for (var i = 0;i < g_result['OBJ_UNITS'].length;i++) {var unit = g_result['OBJ_UNITS'][i];if (! g_result.OBJ_PRICES.units[code]) continue;if(unit.acc_code == code) {return unit;} }return null;}/** * * @returns string unit code that will be used ta add the unit price block */function getNextUnit() {if (! g_result['OBJ_PRICES']) return false;var units = new Object();$("#unit_prices select[name='unit']").each(function(i) {var code = this.value;if (! units[code]) units[code] = 1;else units[code] += 1;});for(var ky in g_result.OBJ_PRICES.units) {if (! units[ky]) return ky;if (g_result.OBJ_PRICES.units[ky].count > units[ky]) return ky;}return null;}/** * * @returns null * disables or enables the unit selection dependin of the nubmer of * selected units */function disableUnitOptions() {if (! g_result['OBJ_PRICES']) return false;var units = new Object();$("#unit_prices select[name='unit']").each(function(i) {var code = this.value;if (! units[code]) units[code] = 1;else units[code] += 1;});var disable = new Object();for(var ky in g_result.OBJ_PRICES.units) {if (! units[ky]) continue;if (g_result.OBJ_PRICES.units[ky].count - units[ky] == 0) {disable[ky] = true;}}$("#unit_prices select[name='unit']").each(function(i) {var code = this.value;$(this).find("option[value!='" + code + "']").each(function(j) {var optval = this.value;if (disable[optval]) {$(this).prop('disabled',true);}else $(this).prop('disabled',false);});});}/** * * @param unit (Object) accomodation unit data * @returns {Any} * containing the number of possible selection * of adults, children regarding the total number of person selected */function calcPersSelect(unit) {if (unit == null) {if (! g_result['OBJ_UNITS']) return null;var sel = new Object();for (var i = 0;i < g_result['OBJ_UNITS'].length;i++) {var n = parseInt(g_result['OBJ_UNITS'][i].tot_pers, 10);var m = parseInt(g_result['OBJ_UNITS'][i].min_pers, 10);while(m <= n) {sel[m] = true;m += 1;}}return Object.keys(sel);}var a = parseInt(unit.max_adults, 10);var t = parseInt(unit.tot_pers, 10);var m = parseInt(unit.min_pers, 10);if (arguments.length ==2 && arguments[1] == true) {//var i = m;var sel = new Array();for(var i = m; i <= t; i++) sel.push(i);return sel;}var sel = new Object();//while(a > 0) {while(a > m-1) {sel[a] = t - a; a -= 1;}return sel;}function validateSearchInput() {if (g_cfg['trns_type'] != 'A') {if (! g_cfg['trns_code']) {$("#dpt_" + g_cfg['trns_type']).parents('.form-group').addClass('has-error');bootbox.alert(g_dict.msg_missing_dpt[g_cfg.trns_type]);return false;}else { $("#dpt_" + g_cfg['trns_type']).parents('.form-group').removeClass('has-error');}}if (! g_cfg['period']) {$("#txt_from").parents('.form-group').addClass('has-error');bootbox.alert(g_dict.msg_missing_date);return false;}else {$("#txt_from").parents('.form-group').removeClass('has-error');}if (! g_cfg['stay']) {$("#txt_to").parents('.form-group').addClass('has-error');bootbox.alert(g_dict.msg_missing_date);return false;}else {$("#txt_to").parents('.form-group').removeClass('has-error');}return true;}/** * shows / expands the alternative flight list */function showAltFlights() {var txt = arguments[0].innerHTML;if (txt.indexOf(g_dict['lb_alt_more']) == 0) {arguments[0].innerHTML = g_dict['lb_alt_less']; $('.altflight').show(250);return;}if (txt.indexOf(g_dict['lb_alt_less']) == 0) {arguments[0].innerHTML = g_dict['lb_alt_more'] + ' (' + arguments[0].dataset.altlen + ')';$('.altflight').hide(250);}}/** * * @returns {Boolean} */function isBookingPriceRequired() {//if ( $('select[name=age]:visible[value!=""]').size() > 0 ) return true;if ( $("select[name=age]:visible option:selected[value!='']").size() > 0 ) return true;return $("#unit_prices >li:visible").size() > 1;}/** * * @returns {Boolean} */function isPriceCheckRequired() {var chk = ($("#unit_prices >li:visible").size() == 1) &&($("select[name=age]:visible option:selected[value!='']").size() > 0);//($('select[name=age]:visible[value!=""]').size() > 0);return chk;}function showBookingPrice() {var price= new Array();var state= arguments.length > 0 ? arguments[0] : 'OK';$('.price_box .totl_price').each(function(i) {price.push($(this).text());});if (price.length == 0) {$("#booking_price").parents('.booking').hide();return;}g_max_units = 3 - price.length;price = sumPrices(price);$("#booking_price").parents('.booking').show();$("#booking_price label:eq(0)").text(price);$("#booking_price").css('visibility','visible');//alert(g_max_units);setTimeout(function() {var units = $("#unit_prices > li");if (units.size() > 1) {units.find(".price_box button").show();}if (units.find("input[name=status][value='RQ']").size() > 0 || state != 'OK') {$("#btnBookNow").val(g_dict.lb_btn_request);}else {$("#btnBookNow").val(g_dict.lb_btn_book);//g_booking + 'boo'document.forms['frmBooking'].action = g_booking + "booking";}if (g_max_units <= 0)$("#btn_more_units").hide();else$("#btn_more_units").show();},250);}/** * returns a sum of array of float numbers * returned number is fixes to 2 decimal places example: 101.51 */function sumPrices(prices) {if (! Array.isArray(prices)) {throw new TypeError();return;}var n = prices.length;var sum = 0;while(n--) {var num = parseFloat(prices[n]);if (num == null || isNaN(num)) continue;sum += num;//sum += parseFloat(num);}return sum.toFixed(2);}/** * validates and composes the booking data to be sent to the booking engine * bookign data is sent as base64 encoded json data */function bookingCheck() {var args = arguments;var isvalid = true;var booking = new Object();booking['lang'] = g_cfg['lang'];booking['objid'] = g_cfg['obj_id'];booking['units'] = new Array();booking['trans'] = args.length > 0 ? getTransportData(args[0]) : getTransportData();var unit = null;var ages = null;$('#unit_prices .info_box select').each(function(i) {if(! isvalid) return;if (this.name == 'unit') {unit = new Object();unit['unit'] = this.value;//extra for multicode unitsunit['obid'] = $(this).find('option:selected').data('obid');if (args.length == 0) {unit['date'] = this.dataset['date'];unit['stay'] = this.dataset['stay'];}else if (args[0] === true) {unit['date'] = g_cfg['period'];unit['stay'] = g_cfg['stay'];//setUnitDateDiff(booking, unit); //vjerovatno ne treba}setUnitDateDiff(booking, unit); //vjerovatno ne trebaages = new Array();}else if(this.name == 'age') {var age = $(this);if (age.is(':visible')) {if (age.prop('required') && age.val()=="") {var po = age.popover({trigger: 'manual',content: g_dict.lb_missing_age});po.popover('show');isvalid = false;setTimeout(function(){ po.popover('hide'); },3000); return false;} if (this.value != '') ages.push(this.value);}}else if (this.name == 'dummy') {unit['ages'] = ages;booking['units'].push(unit);}else if (this.name == 'infant') {return;}else unit[this.name] = this.value;// if (this.name == 'persons') booking['units'].push(unit);});booking['insurance'] = $("#insurance input:checked").val();booking = Base64.encode(JSON.stringify(booking));if(args.length == 1 && args[0] === true) {return booking;}$('input[name=booking]').val(booking);document.forms['frmBooking'].lang.value = g_cfg['lang'];//g_cfg['lang']return isvalid;}function getStatusCode(response) {switch (response.status_code) {case 'INFO':return response.status_num == '923' ? 'OK' : response.status_code;break;default:return response.status_code;break;}}function filterOptions(options, suboption) {var opts = options.filter(function(opt) {return suboption ? opt.code.charAt(1) == 'X' :opt.code.charAt(1) != 'X';});return opts;}/**** Base64 encode / decode* http://www.webtoolkit.info/***/ var Base64 = { // private property_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", // public method for encodingencode : function (input) {var output = "";var chr1, chr2, chr3, enc1, enc2, enc3, enc4;var i = 0; input = Base64._utf8_encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++);chr2 = input.charCodeAt(i++);chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2;enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);enc4 = chr3 & 63; if (isNaN(chr2)) {enc3 = enc4 = 64;} else if (isNaN(chr3)) {enc4 = 64;} output = output +this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); } return output;}, // public method for decodingdecode : function (input) {var output = "";var chr1, chr2, chr3;var enc1, enc2, enc3, enc4;var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++));enc2 = this._keyStr.indexOf(input.charAt(i++));enc3 = this._keyStr.indexOf(input.charAt(i++));enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4);chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) {output = output + String.fromCharCode(chr2);}if (enc4 != 64) {output = output + String.fromCharCode(chr3);} } output = Base64._utf8_decode(output); return output; }, // private method for UTF-8 encoding_utf8_encode : function (string) {string = string.replace(/\r\n/g,"\n");var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) {utftext += String.fromCharCode(c);}else if((c > 127) && (c < 2048)) {utftext += String.fromCharCode((c >> 6) | 192);utftext += String.fromCharCode((c & 63) | 128);}else {utftext += String.fromCharCode((c >> 12) | 224);utftext += String.fromCharCode(((c >> 6) & 63) | 128);utftext += String.fromCharCode((c & 63) | 128);} } return utftext;}, // private method for UTF-8 decoding_utf8_decode : function (utftext) {var string = "";var i = 0;var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) {string += String.fromCharCode(c);i++;}else if((c > 191) && (c < 224)) {c2 = utftext.charCodeAt(i+1);string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));i += 2;}else {c2 = utftext.charCodeAt(i+1);c3 = utftext.charCodeAt(i+2);string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));i += 3;} } return string;} };
{{images}}{{/images}}
{{list}}- {{options}}
- {{text}}• {{adults_price}} € pro Person• {{children_price}} € pro Kind bis 13,99 Jahre {{/options}}
Date
date & time - arr. time (flight time)
Flight route
Airline
min stay
min stay
price per person
- $lb_dpt_flt$: {{dflt_dpt_date|fmtdate}}
{{dflt_dpt_time}} - {{dflt_dst_time}} ({{dflt_time_diff}})
- $lb_rtn_flt$: {{rflt_dpt_date|fmtdate}}
{{rflt_dpt_time}} - {{rflt_dst_time}} ({{rflt_time_diff}})
- {{dflt_dpt_code|fltplace}} ({{dflt_dpt_code}})
{{dflt_flgt_num|carrier}}
- {{dflt_dst_code|fltplace}} ({{dflt_dst_code}})
{{rflt_flgt_num|carrier}}
- {{days}} $days$
{{days}} $_days$
{{tot_price}} €
45% Complete