var __extends=(this&&this.__extends)||(function(){var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||({__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b;})||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p];};return extendStatics(d,b);};return function(d,b){if(typeof b!=="function"&&b!==null) throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d;} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __());};})();var VCMSTripListWidget=(function(_super){__extends(VCMSTripListWidget,_super);function VCMSTripListWidget(apiLink,apiModuleName,data,target){var _this=_super.call(this,apiLink,apiModuleName,data,target)||this;_this.pagesLoaded=0;_this.btnMoreOffers=null;_this.rawListing={};_this.rawTopListing={};_this.modesMap={'offers-listing':'offers','location-map-container':'geo','region-listing':'regions',};_this.$lazyLoadContainer=$('#body-wrapper').length?$('#body-wrapper'):$(window);_this.$backBtnWrapper=$('.js-btn-back-wrapper');_this.currRegionCountry=null;_this.initiallyOpenedCountry=false;_this.initialized=false;_this.isTraveltainmentNurFlug=false;_this.showFreebies=function(_on){if(_on.attr('data-hasqtip')) return;_on.qtip({content:{text:_on.find('.content').html()},show:{solo:true,effect:false,ready:true,},hide:{fixed:true,delay:500},style:{classes:'qtip-shadow qtip-freebie text-color-19 background-color-3',tip:{mimic:'center',width:14,offset:20}},position:{my:'top left',at:'bottom center',viewport:$(window),adjust:{x:-8,method:'flipinvert'}}});};_this.container=$(target);_this.noOffers=document.createEvent('Event');_this.noOffers.initEvent('nooffers',true,false);_this.$offersList=$('#offers-listing');_this.$regionsList=$('#region-listing');_this.$modesBtnsList=$(target).find('.list-options > .btn-listing-view[data-display-mode]');_this.$modesViewsList=$(target).find('.results-listing');_this.$pagination=$(target).find('#pagination');_this.$noResultsContainer=$(target).find('#message-no-results');_this.$backToCriteriaButton=_this.$noResultsContainer.find('.change-search');_this.$clearFiltersButton=_this.$noResultsContainer.find('.clear-filters');_this.map=new LocationMap({});_this.$sortBy=$('select.sort-results').first();_this.$sortByRegionsDisabled=_this.$sortBy.find('[data-regions-disabled]');_this.$spinner=$(target).find('.skeleton');_this.hasSkeleton=_this.$spinner.length>0;if(!_this.hasSkeleton){_this.$spinner=$('.object-listing-box .triplist-pending-info');_this.$planeSpinner=$('.triplist-pending-info').find('.icon-spinner').children();} _this.$sortBy.show();_this.$sortBy.select2({minimumResultsForSearch:20,width:'resolve',});_this.$filters=$('#filters');$('.js-lmplus-nf-sort',_this.target).on('click',_this.orderSelectLMPlusNF.bind(_this));_this.$sortBy.on('change',function(){_this.setSortOrder(_this.$sortBy.val());});_this.clearButtonVisibilityCheck();var hashObj=VCMSTripListWidget.getHashObjectFromHash();_this.isTraveltainmentNurFlug=(window.isTraveltainment!==undefined&&window.isTraveltainment&&window.isNurFlugSearch!==undefined&&window.isNurFlugSearch);if(_this.isTraveltainmentNurFlug){VCMSTripListWidget.currentMode='region-listing';} else{VCMSTripListWidget.currentMode=hashObj.tab||data.resultsLayout||'offers-listing';} return _this;} VCMSTripListWidget.prototype.getOfferById=function(_ofrId){if(this.rawListing.hasOwnProperty(_ofrId)){return this.rawListing[_ofrId];} if(this.rawTopListing.hasOwnProperty(_ofrId)){return this.rawTopListing[_ofrId];} return null;};VCMSTripListWidget.prototype.pushToRawListing=function(_elements,$list,type){if($list===void 0){$list=null;} if(type===void 0){type=undefined;} var rawList=type==='top'?this.rawTopListing:this.rawListing;_elements.forEach(function(_element){if(!rawList.hasOwnProperty(_element.ofr_id)){rawList[_element.ofr_id]=_element;} else if($list){$list=$list.filter('[data_ofr_id]:not([data_ofr_id="'+_element.ofr_id+'"])');}});return $list;};VCMSTripListWidget.prototype.initMoreOffersButton=function(){var _this=this;this.btnMoreOffers=$('#load-more-offers');this.btnMoreOffers.on('click',function(){_this.loadMoreOffers();});};VCMSTripListWidget.prototype.initOfferList=function(){this.prepareRatingsSection();this.renderOfferPrice();this.checkAlternativeOffers();$(function(){$('[data-toggle="tooltip"]').tooltip();});this.enableOfferCheckAvailBtn();$(this.$offersList).on('click','.show-facilities',function(_e){$(_e.currentTarget).toggleClass('facilities-shown');$(_e.currentTarget).closest('.object-listing-elem').find('.facilities').toggle();});$(this.$offersList).on('mouseover','.hygienic-measures, .tt-special-markers [data-qtip-text]',function(_event){$(_event.currentTarget).qtip({content:{text:$(_event.currentTarget).attr('data-qtip-text')},show:{ready:true,event:'mouseover'},hide:{event:'mouseout'},style:{classes:'qtip-shadow qtip-langs qtip-no-min-width background-color-3',},position:{my:'top center',at:'bottom center',adjust:{method:'flip'},viewport:$(window)}});});};VCMSTripListWidget.prototype.openCountryRegion=function(countryId){var $regions=this.$regionsList.find('.region-container'),countryName=this.$regionsList.find("[data-country-id=\"".concat(countryId,"\"] > .region-name > h3")).text(),$countries=this.$regionsList.find('.country-container'),$backToCountries=this.$regionsList.find('#back-to-countries'),$backToCountriesName=this.$regionsList.find('#region-country-name'),$regionToOpen=$regions.filter('[data-parent='+countryId+']'),hashObj=VCMSTripListWidget.getHashObjectFromHash();this.currRegionCountry=countryId;hashObj.country=this.currRegionCountry;this.changeHash(hashObj);$countries.hide(500);$regionToOpen.show(500);$regionToOpen.find('.lazy-load').lazyload({container:this.$lazyLoadContainer[0],threshold:200,});this.$lazyLoadContainer.scrollTop(0);$backToCountriesName.text(countryName);$backToCountries.show();};VCMSTripListWidget.prototype.initRegionsListEvents=function(){var _this=this;this.$regionsList.off().on('click','.country-container .next-page',function(e){var $elem=$(e.currentTarget).closest('.country-container');_this.openCountryRegion($elem.data('country-id'));}).on('click','.region-container .choose-region',function(e){_this.updateMode('offers-listing');_this.$filters.find('.destination-select[name="des[]"]').val($(e.currentTarget).closest('.region-container').data('des')).trigger('change');}).on('click','#back-to-countries .prev-page',function(){var $regions=_this.$regionsList.find('.region-container'),$countries=_this.$regionsList.find('.country-container'),$backToCountries=_this.$regionsList.find('#back-to-countries'),hashObj=VCMSTripListWidget.getHashObjectFromHash();_this.currRegionCountry=null;delete hashObj.country;_this.changeHash(hashObj);$countries.show(500);$regions.hide();$backToCountries.hide();});};VCMSTripListWidget.prototype.initNewOffers=function(_list){if(typeof _list!==typeof void 0&&_list.length>0){this.prepareRatingsSection();this.renderOfferPrice();this.checkAlternativeOffers();this.enableOfferCheckAvailBtn();}};VCMSTripListWidget.prototype.initMap=function(){var _this=this;if(typeof this.gps==='undefined'){this.ajax('getHotelsGeo',this.getTemplateState(),function(data){_this.gps=data;_this.map.showMarkers(data,true);},true);}};VCMSTripListWidget.getEncodeHashObject=function(_data){if(jQuery.isEmptyObject(_data)){return'';} return'#'+encodeURIComponent(JSON.stringify(_data));};VCMSTripListWidget.getHashObjectFromHash=function(){var h=window.location.hash;if(h==''||h=='#'){return{};} return JSON.parse(decodeURIComponent(h.replace('#','')));};VCMSTripListWidget.setContext=function(_hash){if(_hash!==void 0){VCMScontext['f']=_hash;VCMScontext['h']=window.location.hash;} VCMScontext['rt']=VCMSTripListWidget.currentMode;VCMScontext['rs']=VCMSTripListWidget.sortOrd;};VCMSTripListWidget.prototype.init=function(){this.spinnerControl(false);var hashObj=VCMSTripListWidget.getHashObjectFromHash();var desVal=this.getLocationSearchObject()['des[]'];if(typeof hashObj['ord']!=='undefined'){this.$sortBy.val(hashObj['ord']).trigger('change');} if(typeof desVal!=='undefined'&&desVal!==''){this.$filters.find('.destination-select[name="des[]"]').val(desVal).trigger('change');} $(window).bind('update',this.update.bind(this));$(window).bind("disable-user-actions",this.disableUserActions.bind(this));$(window).bind("enable-user-actions",this.enableUserActions.bind(this));this.initOfferList();this.initMoreOffersButton();this.setUpListeners();this.setHotelImageSimpleCarousel();var MerlinQGallery=new MerlinQtipGallery();$(document).on('click','.object-listing-elem .image:not(.simple-carousel) .img-container',function(e){var $element=$(e.currentTarget).closest('.object-listing-elem'),htlCode=$element.attr('data-ofr_id'),htlTourop=$element.attr('data-ofr_tourOp'),title=$element.find('.offer-title').html();MerlinQGallery.additionalDataQtip(title,htlCode,htlTourop,'gallery',null,false);});$(document).on('click','.object-listing-elem .link-section [data-anchor="section-htl-descs"]',function(e){var $element=$(e.currentTarget).closest('.object-listing-elem'),htlCode=$element.attr('data-ofr_id'),htlTourop=$element.attr('data-ofr_tourOp'),title=$element.find('.offer-title').html(),descOnly=$element.find('.simple-carousel').length>0;MerlinQGallery.additionalDataQtip(title,htlCode,htlTourop,'descs',null,descOnly);});if(typeof hashObj.page!==typeof void 0){this.pagesLoaded=hashObj.page;} this.updateMode(VCMSTripListWidget.currentMode);if(this.selectedOnlyOneCountry()){this.openCountryRegion(this.$regionsList.find('[data-country-id]').first().attr('data-country-id'));} this.container.on('mouseover tap','.covid-info-out, .covid-info-in',function(e){$('.qtip-covid-info').remove();var covidContainer=$(e.currentTarget).closest('.covid-container');var qtipTarget=$(e.currentTarget);var text=qtipTarget.hasClass('covid-info-out')?covidContainer.find('.covid-info-out-content').parent().html():covidContainer.find('.covid-info-in-content').parent().html();qtipTarget.qtip({content:{text:text},show:{ready:true},hide:{fixed:true,},style:{classes:'qtip-shadow qtip-covid-info text-color-19 background-color-3',tip:{mimic:'center',width:14,},},events:{visible:function(_e,_api){if(window.currentDeviceType===window.DEVICETYPE_smartphone){_api.elements.tip.css('left',(qtipTarget.offset().left+(qtipTarget.width()/2)-4)+'px').css('right','unset').css('margin-left','unset');_api.elements.tooltip.css('left','15px').css('right','15px');}},},position:{viewport:$(window),my:'top center',at:'bottom center',}});});$(window).on('scroll resize',function(){$('.qtip-covid-info').remove();});};VCMSTripListWidget.prototype.updateMode=function(_mode){if(_mode===void 0){_mode=null;} if((_mode==='region-listing'||_mode===null)&&this.selectedOnlyOneRegion()){_mode='offers-listing';} if(_mode!==null){VCMSTripListWidget.currentMode=_mode;this.$modesBtnsList.removeClass('active');this.getModeButtonByMode().addClass('active');} else{VCMSTripListWidget.currentMode=this.getModeFromModeButtons();} this.changeMode();};VCMSTripListWidget.prototype.getModeFromModeButtons=function(){var $activeBtn=this.$modesBtnsList.filter('.active').first();if($activeBtn.length===0){$activeBtn=this.$modesViewsList.filter(':visible').first().addClass('.active');} return $activeBtn.attr('id');};VCMSTripListWidget.prototype.getModeButtonByMode=function(_mode){if(typeof _mode===typeof void 0){_mode=VCMSTripListWidget.currentMode;} return this.$modesBtnsList.filter("[data-display-mode=\"".concat(_mode,"\"]")).addClass('active');};VCMSTripListWidget.prototype.changeMode=function(){var hashObj=VCMSTripListWidget.getHashObjectFromHash();this.$modesViewsList.hide();this.$modesViewsList.filter('#'+VCMSTripListWidget.currentMode).show();if(VCMSTripListWidget.currentMode=='region-listing'){this.$pagination.hide();this.$noResultsContainer.hide();this.$sortByRegionsDisabled.attr('disabled','disabled');this.$sortByRegionsDisabled.addClass('hide');if(this.$sortByRegionsDisabled.prop('selected')){this.$sortBy.val('').trigger('change');} this.initRegionsListEvents();} else if(VCMSTripListWidget.currentMode=='location-map-container'){this.$pagination.hide();this.$noResultsContainer.hide();this.$sortByRegionsDisabled.removeAttr('disabled');this.$sortByRegionsDisabled.removeClass('hide');this.initMap();} else if(VCMSTripListWidget.currentMode=='offers-listing'){this.$sortByRegionsDisabled.removeAttr('disabled');this.$sortByRegionsDisabled.removeClass('hide');} hashObj['tab']=VCMSTripListWidget.currentMode;this.changeHash(hashObj);$(window).trigger('update');};VCMSTripListWidget.prototype.changeHash=function(_hashObj){VCMSTripListWidget.setContext();};VCMSTripListWidget.prototype.clearButtonVisibilityCheck=function(){if(jQuery.isEmptyObject(VCMScontext['f'])){this.$backToCriteriaButton.show();this.$clearFiltersButton.hide();} else{this.$backToCriteriaButton.hide();this.$clearFiltersButton.show();}};VCMSTripListWidget.prototype.noResultsCheck=function(result,loadMore){if(jQuery.isEmptyObject(result)){if(!loadMore){this.$noResultsContainer.show();this.spinnerControl(false);this.clearButtonVisibilityCheck();setTimeout(function(){$(window).triggerHandler('nooffers');},1000);} this.$pagination.hide();} else{this.$noResultsContainer.hide();if(VCMSTripListWidget.currentMode!=='region-listing'){this.$pagination.show();}}};VCMSTripListWidget.prototype.pagesUp=function(){this.pagesLoaded++;};VCMSTripListWidget.prototype.pagesReset=function(){this.pagesLoaded=0;var hashObj=VCMSTripListWidget.getHashObjectFromHash();delete hashObj.page;this.changeHash(hashObj);};VCMSTripListWidget.prototype.loadMoreOffers=function(){var _this=this;if(this.isDisabledMoreOffersButton()){return;} $(window).trigger('disable-user-actions');if(this.hasSkeleton){this.spinnerControl(true);} this.ajax('moreoffers',{page:this.pagesLoaded,},function(data){var newOffers=_this.pushToRawListing(data['roffers'],$(data['offers']));_this.$offersList.append(newOffers);_this.initNewOffers(newOffers);_this.pagesUp();$(window).trigger('enable-user-actions');_this.$pagination.toggle(data.moreOffersAvailable);if(_this.hasSkeleton){_this.spinnerControl(false);} initializeFullscreenImageOnGallery(_this.$offersList);initOmnibus(_this.container);},true);};VCMSTripListWidget.prototype.setSortOrder=function(val){$('body').scrollTop(0);VCMSTripListWidget.sortOrd=val;VCMSTripListWidget.setContext();this.update();};VCMSTripListWidget.prototype.orderSelectLMPlusNF=function(e){var $target=$(e.currentTarget);var $caretSpan=$('.js-lmplus-nf-sort-caret',this.target);var $caret=$caretSpan.children();var desc=$target.hasClass('active')&&$caret.hasClass('fa-caret-up');$('.js-lmplus-nf-sort',this.target).removeClass('active');$caretSpan.appendTo(($target).addClass('active'));if(desc){$caret.removeClass('fa-caret-up').addClass('fa-caret-down');this.setSortOrder('-'+$target.data('sort'));} else{$caret.removeClass('fa-caret-down').addClass('fa-caret-up');this.setSortOrder($target.data('sort'));}};VCMSTripListWidget.prototype.disableMoreOffersButton=function(){$(this.btnMoreOffers).attr('disabled','disabled').find('.fa-spinner').show();};VCMSTripListWidget.prototype.enableMoreOffersButton=function(){$(this.btnMoreOffers).removeAttr('disabled').find('.fa-spinner').hide();};VCMSTripListWidget.prototype.disableUserActions=function(){this.disableMoreOffersButton();this.disableModeButtons();};VCMSTripListWidget.prototype.enableUserActions=function(){this.enableMoreOffersButton();this.enableModeButtons();};VCMSTripListWidget.prototype.isDisabledMoreOffersButton=function(){return $(this.btnMoreOffers).attr('disabled')==='disabled';};VCMSTripListWidget.prototype.disableModeButtons=function(){this.$sortBy.prop("disabled",true);this.$modesBtnsList.addClass('disabled');};VCMSTripListWidget.prototype.enableModeButtons=function(){this.$sortBy.prop("disabled",false);this.$modesBtnsList.removeClass('disabled');};VCMSTripListWidget.prototype.update=function(){var _this=this;$(window).trigger('disable-user-actions');if(this.selectedOnlyOneRegion()){$('.show-region-listing').hide();} else{$('.show-region-listing').show();} if(VCMSTripListWidget.currentMode==='region-listing'&&this.selectedOnlyOneRegion()){this.updateMode('offers-listing');if(this.isTraveltainmentNurFlug){$('.show-offers-listing').show();} return;} if(this.isTraveltainmentNurFlug&&VCMSTripListWidget.currentMode!=='region-listing'&&!this.selectedOnlyOneRegion()){this.updateMode('region-listing');$('.show-offers-listing').hide();} if(this.initialized){this.pagesReset();localStorage.removeItem('lastSelectedOfferId');} this.spinnerControl(true);this.$backBtnWrapper.addClass('hide');this.$noResultsContainer.hide();this.$offersList.find('.object-listing-elem').remove();this.$regionsList.html('');this.ajax('getupdate',this.getTemplateState(),function(data,error){if(typeof data==='string'){try{data=JSON.parse(data);} catch(e){_this.spinnerControl(false);_this.$backBtnWrapper.removeClass('hide');return false;}} if(data['roffers'].length===0&&data['rregions'].length===0){_this.noResultsCheck(data['roffers'],false);return;} _this.pagesUp();_this.spinnerControl(false);if(_this.modesMap[VCMSTripListWidget.currentMode]=='offers'){_this.pushToRawListing(data['roffers']);if(data['rawTopOffers']&&data['rawTopOffers'].length>0){_this.pushToRawListing(data['rawTopOffers'],null,'top');} var newOffers=$(data['topOffers']+data['offers']);_this.$offersList.html(newOffers);_this.initNewOffers(newOffers);_this.$pagination.toggle(data.moreOffersAvailable);initializeFullscreenImageOnGallery(_this.$offersList);} if(_this.modesMap[VCMSTripListWidget.currentMode]=='geo'){_this.pushToRawListing(data['roffers']);_this.map.setData($.map(_this.rawListing,function(value){return[value];}));} if(_this.modesMap[VCMSTripListWidget.currentMode]=='regions'){_this.$regionsList.html(data['regions']).find('.country-container .lazy-load').lazyload({container:_this.$lazyLoadContainer[0],threshold:200,});} if($(window).scrollTop()>$('#offer-list-section').offset().top+_this.$modesViewsList.height()){$(window).scrollTop($('#offer-list-section').offset().top-$('header').height());} _this.$backBtnWrapper.removeClass('hide');$('.js-btn-check').removeAttr('disabled');$(_this.btnMoreOffers).removeAttr('disabled');$(window).trigger('enable-user-actions');if(false===_this.initialized){_this.initialized=true;} initOmnibus(_this.container);return true;},true);};VCMSTripListWidget.prototype.getTemplateState=function(){var state={resultType:this.modesMap[VCMSTripListWidget.currentMode],page:this.pagesLoaded};if(false===this.initialized){state['allPages']='1';} return state;};VCMSTripListWidget.prototype.fillHashWithAdditionalData=function(_hashObj){_hashObj.tab=VCMSTripListWidget.currentMode;_hashObj.page=this.pagesLoaded;};VCMSTripListWidget.historyReplaceState=function(_hashObj){history.replaceState(null,null,VCMSTripListWidget.getEncodeHashObject(_hashObj));};VCMSTripListWidget.historyPushState=function(_hashObj){history.pushState(null,null,VCMSTripListWidget.getEncodeHashObject(_hashObj));};VCMSTripListWidget.prototype.setUpListeners=function(){var _this=this;$('body').on('mouseover','.elem-meta .variant',function(e){_this.alternativeOffers($(e.currentTarget));}).on('click','.js-btn-check',function(e){e.preventDefault();_this.checkAvailability(e);}).on('click','#offers-listing .next-page',function(e){e.preventDefault();var $btn=$(e.currentTarget);VCMSTripListWidget.nextStepSpinner($btn);var offerId=$btn.closest('.object-listing-elem[data-ofr_id]').attr('data-ofr_id');localStorage.setItem('lastSelectedOfferId',offerId);var hashObj=VCMSTripListWidget.getHashObjectFromHash();_this.fillHashWithAdditionalData(hashObj);VCMSTripListWidget.historyPushState(hashObj);window.location.href=$btn.attr('href');});this.$modesBtnsList.on('click',function(e){var $elem=$(e.currentTarget);_this.$modesBtnsList.removeClass('active');$elem.addClass('active');_this.updateMode(_this.modesMap.hasOwnProperty($elem.attr('data-display-mode'))?$elem.attr('data-display-mode'):null);});this.$modesViewsList.on('mouseover','.object-listing-elem .freebies',function(e){_this.showFreebies($(e.currentTarget));});};VCMSTripListWidget.prototype.setHotelImageSimpleCarousel=function(){simpleCarousel(this.$offersList);this.$offersList.on('click','.load-images-handler, .img-container',function(e){var autoStart=($(e.currentTarget||e.target).hasClass('load-images-handler'));var target=$(e.currentTarget||e.target).closest('.object-listing-elem');var id=$(e.currentTarget||e.target).closest('.object-listing-elem').attr('data-ofr_id');$(target.find('img')[0]).addClass('simple-carousel-item').attr('data-ofr_id');$.getJSON('getImagesAjax?&ofr_id='+id).done(function(data){if(data.data){target.find('.load-images-handler').addClass('skeleton');fillWithAsyncData(target.find('.simple-carousel'),data.data,autoStart);} else{target.find('.load-images-handler').remove();}}).fail(function(){target.find('.load-images-handler').remove();});});};VCMSTripListWidget.prototype.enableOfferCheckAvailBtn=function(_list){if(_list===void 0){_list=$(this.target);} _list.find('.js-btn-check').removeAttr('disabled');};VCMSTripListWidget.prototype.renderOfferPrice=function(_list){if(_list===void 0){_list=$(this.target);} _list.find('.price-label').each(function(ind,elem){var $elem=$(elem);var $price=$elem.children('span').text().split('.');$elem.children('span').html($price[0]);if(parseInt($price[1])>0){$elem.children('sup');}});};VCMSTripListWidget.prototype.checkAlternativeOffers=function(_list){if(_list===void 0){_list=$(this.target);} _list.find('table.elem-meta').each(function(ind,elem){var $elem=$(elem),variants=$elem.attr('data-variants').split(',');$elem.find('.meta-value').each(function(ind2,elem2){var $elem2=$(elem2);if(variants.indexOf($elem2.attr('data-type'))>=0){$elem2.addClass('text-hover-18 variant');}});});};VCMSTripListWidget.prototype.spinnerControl=function(toggleEnabled){var _this=this;if(toggleEnabled===void 0){toggleEnabled=true;} if(this.hasSkeleton){if(this.modesMap[VCMSTripListWidget.currentMode]==='geo'){this.$spinner.find('.offer-list').hide();this.$spinner.find('.region-list').hide();} else if(this.modesMap[VCMSTripListWidget.currentMode]==='regions'){this.$spinner.find('.offer-list').hide();this.$spinner.find('.region-list').show();} else{this.$spinner.find('.offer-list').show();this.$spinner.find('.region-list').hide();} if(toggleEnabled){this.$spinner.show();} else{this.$spinner.hide();}} else{clearInterval(this.spinnerInterval);if(toggleEnabled){this.$spinner.show();this.spinnerInterval=setInterval(function(){for(var i=0;i<_this.$planeSpinner.length;i++){if($(_this.$planeSpinner[i]).hasClass('bright')){$(_this.$planeSpinner[i]).removeClass('bright').addClass('semi');} else if($(_this.$planeSpinner[i]).hasClass('semi')){$(_this.$planeSpinner[i]).removeClass('semi').addClass('semi2');} else if($(_this.$planeSpinner[i]).hasClass('semi2')){$(_this.$planeSpinner[i]).removeClass('semi2').addClass('semi3');} else if($(_this.$planeSpinner[i]).hasClass('semi3')){$(_this.$planeSpinner[i]).removeClass('semi3').addClass('bright');} else{$(_this.$planeSpinner[i]).addClass('bright');}}},350);} else{this.$spinner.hide();}}};VCMSTripListWidget.prototype.alternativeOffers=function($elem){if($elem.attr('data-hasqtip')){return;} var content=function(type){return'
| '+type.replace(':','')+' | '+''+offerTexts.priceDifference+' | '+''+ translations['priceForPerson'].replace(':','')+' | '+'
|---|---|---|
| '+' | ||