1 2(function($){"use strict";$.fn.pin=function(options){var scrollY=0,elements=[],disabled=false,$window=$(window);options=options||{};var recalculateLimits=function(){for(var i=0,len=elements.length;i<len;i++){var $this=elements[i];if((options.minWidth&&$window.width()<=options.minWidth)||(options.maxWidth&&$window.width()>=options.maxWidth)){if($this.parent().is(".pin-wrapper")){$this.unwrap();} 3$this.css({width:"",left:"",top:"",position:""});if(options.activeClass){$this.removeClass(options.activeClass);} 4disabled=true;continue;}else{disabled=false;} 5var $container=options.containerSelector?$this.closest(options.containerSelector):$(document.body);var offset=$this.offset();var containerOffset=$container.offset();var parentOffset=$this.offsetParent().offset();if(!$this.parent().is(".pin-wrapper")){$this.wrap("<div class='pin-wrapper'>");} 6var pad=$.extend({top:0,bottom:0},options.padding||{});$this.data("pin",{pad:pad,from:(options.containerSelector?containerOffset.top:offset.top)-pad.top,to:containerOffset.top+$container.height()-$this.outerHeight()-pad.bottom,end:containerOffset.top+$container.height(),parentTop:parentOffset.top});$this.parent().css("height",$this.outerHeight());}};var onScroll=function(){if(disabled){return;} 7scrollY=$window.scrollTop();var elmts=[];for(var i=0,len=elements.length;i<len;i++){var $this=$(elements[i]),data=$this.data("pin");if(!data){continue;} 8elmts.push($this);var from=data.from,to=data.to;if(from+$this.outerHeight()>data.end){$this.css('position','');continue;} 9if(from<scrollY&&to>scrollY){!($this.css("position")=="fixed")&&$this.css({top:data.pad.top}).css("position","fixed");if(options.activeClass){$this.addClass(options.activeClass);}}else if(scrollY>=to){$this.css({left:"",top:to-data.parentTop+data.pad.top}).css("position","absolute");if(options.activeClass){$this.addClass(options.activeClass);}}else{var positionVar=(options.isWebApp)?"fixed":"";$this.css({position:positionVar,top:"",left:""});$this.css({position:"",top:"",left:""});if(options.activeClass){$this.removeClass(options.activeClass);}}} 10elements=elmts;};var update=function(){recalculateLimits();onScroll();};this.each(function(){var $this=$(this),data=$(this).data('pin')||{};if(data&&data.update){return;} 11elements.push($this);$("img",this).one("load",recalculateLimits);data.update=update;$(this).data('pin',data);});$(window).on('load',function(){update();}).resize(function(){recalculateLimits();}).bind('touchmove touchstart touchend scroll',function(){onScroll();});return this;};})(jQuery);; 12$(function(){frontvpg.modalSurveyFeedbackWarning="modal-survey-feedback-warning";frontvpg.modalMessage="modal-message";frontvpg.modalRelaunch="modal-relaunch";frontvpg.modalRelaunchSuccess="modal-relaunch-success";frontvpg.modalInsuranceReminder="modal-insurance";frontvpg.textAreaCharLimit=1000;frontvpg.modalSurveyGuidelines="modal-survey-guidelines";frontvpg.surveyAnswerToSubmit=false;frontvpg.nb_new_pax=0;frontvpg.isFirstPaxAdding=(typeof isFirstPax!=="undefined")?isFirstPax:0;$(document).find('form .section-passenger select[name*="pax\[new\]"]').each(function(){regex=/pax\[new\]\[(\d+)\]\[\w+\]/g;var res=regex.exec($(this).attr('name'));frontvpg.nb_new_pax=Math.max(frontvpg.nb_new_pax,res[1]);});$(document).find('#updatePax form .section-passenger select').each(function(){regex=/(\w+)\-(\d+)\-(\d+)/g;var res=regex.exec($(this).attr('name'));frontvpg.nb_new_pax=Math.max(frontvpg.nb_new_pax,res[1]);});frontvpg.radioSelection={};frontvpg.hashModalUsed.push(frontvpg.modalSurveyFeedbackWarning,frontvpg.modalMessage,frontvpg.modalRelaunch,frontvpg.modalRelaunchSuccess,frontvpg.modalInsuranceReminder,frontvpg.modalSurveyGuidelines);frontvpg.buildSurveyRadioQuestions=function(){$('.survey_question_radio_set').each(function(){var marksHtml='';$(this).find('input').each(function(radioKey,radioValue){var text=$(this).attr('data-label');var radioHtml=$(this)[0].outerHTML+'<label for="'+$(this).attr('id')+'">'+text+'</label>';var className=(radioKey%2)?'odd':'even';marksHtml+='<div class="'+className+'">'+radioHtml+'</div>';});$(this).html(marksHtml);});} 13frontvpg.countChar=function(element,limit){var len=$(element).val().length;
13if(!hasPlaceholderSupport()&&($(element).val()==$(element).attr('placeholder'))){len=0;} 14if(len>limit){$(element).val($(element).val().substring(0,limit));}else{$(element).siblings('.char-limit').eq(0).text(limit-len+'/'+limit);}} 15frontvpg.warningPopinCharCounter=function(element,charLimitObject,maxLimit,minLimit){var len=$(element).val().length;if(len>maxLimit){$(element).val($(element).val().substring(0,maxLimit));}else{if(minLimit>len&&len!=0){charLimitObject.parent().addClass('error');}else{charLimitObject.parent().removeClass('error');} 16charLimitObject.text((maxLimit-len));}} 17frontvpg.submitSurvey=function(){frontvpg.surveyAnswerToSubmit=true;$('<input/>').attr('type','hidden').attr('name','SurveyForm').val('Submit').appendTo('#survey-form');$('#survey-form').submit();};frontvpg.populateSurveyWarningPopinForInfra=function(data,infraId){var $modalContent=$('#'+frontvpg.modalSurveyFeedbackWarning+' .modal-content-pattern').eq(0).clone();var $modalInner=$('.modal-inner.survey-feedback-warning');var $backgorundTextArea=$('#survey-form').find('textarea[name="'+data.surveyWarningPopinData[infraId].textAreaName+'"]');$modalContent.removeClass('modal-content-pattern').addClass('modal-content');if($modalInner.find('.modal-content-wrapper .modal-content').length>0){$modalInner.find('.modal-content-wrapper').addClass('multi-hotel');$modalContent.addClass('multi-hotel');} 18if(typeof data.surveyWarningPopinData[infraId]!='undefined'&&typeof data.surveyWarningPopinData[infraId].notice!='undefined'){$modalContent.find('.body .top-line').eq(0).html(data.surveyWarningPopinData[infraId].notice);$modalContent.find('textarea').attr('name',data.surveyWarningPopinData[infraId].textAreaName).removeAttr('disabled');$backgorundTextArea.attr('disabled','disabled');$modalInner.find('.modal-content-wrapper').append($modalContent);}};frontvpg.managePaymentCardTypeFields=function(){var $internalPaymentFields=$(".input-payment-card-number, "+".input-payment-card-cryptogram, "+".input-payment-card-customer-name");var $ancvExternalPaymentFields=$(".ancv-notice");var $idealExternalPaymentFields=$(".input-payment-ideal-issuer");$("input[name=payment-form-type]").click(function() 19{switch($(this).val()) 20{case'ancv':$internalPaymentFields.parent().hide();$idealExternalPaymentFields.parent().hide();$ancvExternalPaymentFields.show();break;case'ideal':$internalPaymentFields.parent().hide();$ancvExternalPaymentFields.hide();$idealExternalPaymentFields.parent().show();break;case'sofort':$internalPaymentFields.parent().hide();$ancvExternalPaymentFields.hide();$idealExternalPaymentFields.parent().hide();break;case'bancontact':$internalPaymentFields.parent().hide();$ancvExternalPaymentFields.hide();$idealExternalPaymentFields.parent().hide();break;default:$idealExternalPaymentFields.parent().hide();$ancvExternalPaymentFields.hide();$internalPaymentFields.parent().show();break;}});};frontvpg.managePaymentSubmit=function(){var $paymentForm=$('#payment-form');var $submitBtn=$paymentForm.find('input[type=submit]');manageCardNumberField();$paymentForm.submit(function(){$submitBtn.hide();$submitBtn.after('<div class="survey-submit-loading"><img class="loading" src="{{ loaderUrl }}"/></div>');var validNumber=$paymentForm.find('#payment_card_number').val().replace(/\s/g,'');$paymentForm.find('#payment_card_number').val(validNumber);});};function manageCardNumberField() 21{var $currentCardNumber=$(document.getElementById('payment-form')).find('#payment_card_number');$currentCardNumber.on('keyup',function(){formatCreditCardNumber($(this));});$currentCardNumber.attr('maxlength',19);formatCreditCardNumber($currentCardNumber);} 22function formatCreditCardNumber($input){if($input.length>0){$input.val($input.val().replace(/\D/g,'').match(/.{1,4}|^$/g).join(' ').substr(0,19));}} 23frontvpg.manageCategoriesFields=function(){var categoryField=$(document.getElementById('contact-form-categories'));var subCategory=$(document.getElementById("contact-form-sub-category"));var haveSubCategory=false;if(typeof subCategoryList!=='undefined'&&!jQuery.isEmptyObject(subCategoryList)) 24{var categorieValue=categoryField.val();if(categorieValue&&typeof subCategoryList[categorieValue]!=='undefined') 25{if(typeof subCategoryList[categorieValue]!=='string') 26{subCategory.show();subCategory.parents('.form-container').show();haveSubCategory=true;frontvpg.generateSubCategorySelect(categorieValue);if(subCategorieValue&&typeof subCategorieValue!=="undefined") 27{subCategory.find('option[value='+subCategorieValue+']').prop('selected',true);$(document.getElementById('category-text')).html(subCategoryList[categorieValue][subCategorieValue].text).show();}} 28else 29{subCategory.hide();$(document.getElementById('category-text')).html(subCategoryList[categorieValue]).show();}} 30categoryField.on("change",function(event){currentCatValue=categoryField.val();subCategory.find('option').remove();$(document.getElementById('category-text')).html('');for(var key in subCategoryList) 31{if(subCategoryList.hasOwnProperty(key)&&key==currentCatValue&&typeof subCategoryList[key]!=='string') 32{subCategory.show();subCategory.parents('.form-container').show();haveSubCategory=true;frontvpg.generateSubCategorySelect(key);} 33else 34{subCategory.parents('.form-container').show();$(document.getElementById('category-text')).hide();if(!haveSubCategory){if(currentCatValue) 35{subCategory.hide();$(document.getElementById('category-text')).show();$(document.getElementById('category-text')).html(subCategoryList[currentCatValue]);} 36subCategory.parents('.form-container').hide();}}} 37if(haveSubCategory) 38{haveSubCategory=false;var isFirstSubCategory=Object.keys(subCategoryList[currentCatValue])[0];$(document.getElementById('category-text')).html(subCategoryList[currentCatValue][isFirstSubCategory].text).show();}});$('#contact-form-sub-category').on("change",function(event){var valueSub=$(this).val();$('#contact-form-sub-category').parents('.form-container').show();$(document.getElementById('category-text')).html(subCategoryList[categoryField.val()][valueSub].text);});}} 39frontvpg.generateSubCategorySelect=function(categoryId){if(typeof categoryId!=='undefined') 40{for(var keySub in subCategoryList[categoryId]) 41{var opt=document.createElement("option");opt.value=keySub;opt.text=subCategoryList[categoryId][keySub].label;$(document.getElementById("contact-form-sub-category")).append(opt);}}} 42frontvpg.buildSurveyRadioMarks=function(){var marksLabel='<div class="mark-label" id="mark-label-1">Heel onbevredigend</div>';marksLabel+='<div class="mark-label" id="mark-label-2">Onbevredigend</div>';marksLabel+='<div class="mark-label" id="mark-label-3">Niet erg bevredigend</div>';marksLabel+='<div class="mark-label superiour-mark-label" id="mark-label-4">Bevredigend</div>';marksLabel+='<div class="mark-label superiour-mark-label" id="mark-label-5">Heel bevredigend</div>';$('.marks').each(function(){var marksHtml='';$(this).find('input').each(function(radioKey,radioValue){var radioHtml=$(this)[0].outerHTML;var circleHtml='<span class="circle-mark inactive">'+(radioKey+1)+'</span>'+radioHtml;marksHtml+='<div class="mark">'+circleHtml+'</div>';});var html=marksHtml+marksLabel;$(this).html(html);});} 43frontvpg.buildSurveyRadioQuestions();frontvpg.buildSurveyRadioMarks();frontvpg.showMarkLabel=function($element,radioValue){$element.parents('.fsit_set_many').find('.mark-label').hide();$element.parents('.fsit_set_many').find('#mark-label-'+radioValue).show();} 44frontvpg.updateMarks=function(){$('.mark').each(function(){var radio=$(this).find('input');var radioValue=radio.val()-10;if(radio.is(':checked')){$(this).find('.circle-mark').removeClass('inactive').addClass('active');$(this).prevAll('.mark').find('.circle-mark').removeClass('inactive').addClass('active');frontvpg.showMarkLabel($(this),radioValue);}});};frontvpg.resetMarks=function($element){$element.parents('.fsit_set_many').eq(0).find('.circle-mark').each(function(){$(this).removeClass('active').addClass('inactive');});}
45frontvpg.showSurveyGuidelines=function(){frontvpg.openModal=true;window.location.href='#'+frontvpg.modalSurveyGuidelines;};$('#modal-survey-guidelines .close').on("click",function(event){window.scrollTo(0,0)});frontvpg.showFeedbackWarning=function(){frontvpg.openModal=true;window.location.href='#'+frontvpg.modalSurveyFeedbackWarning;var $surveyFeedbackWarningContainer=$('#survey-form #'+frontvpg.modalSurveyFeedbackWarning);$surveyFeedbackWarningContainer.find('textarea').on('keyup paste input',function(){var $counterSelector=$(this).parents('.input-line').find('.chars-no');var $surveyFeedbackWarningContainer=$('#survey-form #'+frontvpg.modalSurveyFeedbackWarning);frontvpg.warningPopinCharCounter($(this),$counterSelector,frontvpg.textAreaCharLimit,40);var totalInvalidTextAreas=0;$.each($surveyFeedbackWarningContainer.find('.modal-content textarea'),function(index,textArea){if($(textArea).val()==0||$(this).parent().find('.info-txt').eq(0).hasClass("error")){totalInvalidTextAreas++;}});if(totalInvalidTextAreas>0){$surveyFeedbackWarningContainer.find('.submit-button').removeClass('active').addClass('inactive');}else{$surveyFeedbackWarningContainer.find('.submit-button').removeClass('inactive').addClass('active');}});$surveyFeedbackWarningContainer.find('.submit-button').off('click').on('click',function(e){if($(this).hasClass('active')){$('#survey-form').find('input[type=submit]').replaceWith('<div class="survey-submit-loading"><img class="loading" src="{{ loaderUrl }}"/></div>');frontvpg.submitSurvey();}else{e.preventDefault();}});$('body').css('overflow','hidden');};frontvpg.manageMultipleSelectField=function(container){var selectContainer=$("select[name^='"+container+"']");var values=new Array();if(selectContainer.length!==0) 46{selectContainer.each(function(){values.push($(this).val());});var hiddenField=$("input[name~='"+container+"-data']");hiddenField.val(values.join('/'));$(document).on('change',selectContainer,function(){frontvpg.manageMultipleSelectField(container);});}};frontvpg.manageUpdateDateOrders=function(){$('.pikalendar').each(function(){var picker=new Pikaday({onSelect:function(date){if(this.getDate()!=null){this.value=picker.toString();var $section=$(this.el).parents('section.tooltip-calendar');var $form=$(this.el).parents('form');var returnValue=formatDate("dd/mm/yy",this.getDate());var dateInput=formatDate("yymmdd",this.getDate());var numbNight=(typeof dayOfDeparture!=="undefined")?nbNights:0;if($section.hasClass('isDeparture')){$form.find('input[name="dateDeparture"]').val(dateInput);var arrivalDateField=$('.date-form-container #isArrivalDate');if(typeof isHiddenReturnField!=="undefined"&&isHiddenReturnField){var currentDate=this.getDate();currentDate.setDate((currentDate.getDate())+parseInt(numbNight));arrivalDateField.text(formatDate("dd/mm/yy",currentDate));$form.find('input[name="dateArrival"]').val(formatDate("yymmdd",currentDate));frontvpg.dateArrivalUpdated=true;}}else{$form.find('input[name="dateArrival"]').val(dateInput);} 47$section.find(".calendar-button input").val(returnValue);$('.open').removeClass('open');frontvpg.filterMultiDateChange(this);}},onDraw:function(){var $self=$(this.el);var d=new Date();var currentMonthYear=d.getMonth()+'-'+d.getFullYear();var pikaMonthYear=$self.find('.pika-select-month').val()+'-'+$self.find('.pika-select-year').val();var departureDate=$('input[name="dateDeparture"]').val();if($self.find('.pika-select-year').val()<d.getFullYear()||(d.getFullYear()==$self.find('.pika-select-year').val()&&$self.find('.pika-select-month').val()<d.getMonth())){$self.find('.pika-button').each(function(){$(this).attr("disabled","disabled");});}else if(currentMonthYear==pikaMonthYear){var currentDay=d.getDate();$self.find('.pika-button').each(function(){if($(this).text()<currentDay){$(this).attr("disabled","disabled");}});} 48if(departureDate){var selectedMonth=('0'+(parseInt($self.find('.pika-select-month').val())+1)).slice(-2);var isBeforeDeparture=$self.find('.pika-select-year').val()+selectedMonth;$('.isArrival .pika-button').each(function(){if(isBeforeDeparture+('0'+$(this).text()).slice(-2)<departureDate){$(this).attr("disabled","disabled");}});} 49if(typeof isHiddenReturnField!='undefined'&&typeof dayOfDeparture!=="undefined"){frontvpg.manageDateDisplaying(this._y,this._m);} 50$('.tooltipDate').find('button.pika-prev').addClass('icon-arrow-left-t1').text('');$('.tooltipDate').find('button.pika-next').addClass('icon-arrow-right-t1').text('');var $section=$(this.el).parents('section.tooltip-calendar');var $form=$(this.el).parents('form');var defaultValue='';if($section.hasClass('isDeparture')){defaultValue=$form.find('input[name="dateDeparture"]').val();if(typeof isHiddenReturnField!=="undefined"&&isHiddenReturnField&&typeof frontvpg.dateArrivalUpdated=="undefined"){$form.find('input[name="dateArrival"]').val(defaultValue);}}else{defaultValue=$form.find('input[name="dateArrival"]').val();} 51if(defaultValue!=''&&$.isNumeric(defaultValue)){var defaultDepartureDate=new Date(parseDate(defaultValue).getTime());$(this.el).parents('section.tooltip-calendar').find('input.datepicker-input').val(formatDate('d/mm/yy',defaultDepartureDate));}}});this.parentNode.insertBefore(picker.el,this.nextSibling);});$('.tooltip-departure-slider').remove();$(document.getElementById('updateDate')).on('click','.tooltip-link',function(event){event.preventDefault();event.stopPropagation();$('.tooltipDate').removeClass('open');$(this).find('.tooltipDate').addClass('open');outsideDateClick();});} 52function parseDate(str){var y=str.substr(0,4),m=str.substr(4,2),d=str.substr(6,2);return new Date(y+'-'+m+'-'+d);} 53frontvpg.manageDateDisplaying=function(year,month) 54{var calendar=$('#tooltip-departure');calendar.find('td button').attr('disabled','disabled');var currentSelection=new Date(year,month,1);var d=new Date();if(currentSelection.getTime()>d.getTime()||(currentSelection.getMonth()==d.getMonth())){calendar.find('td:nth-child('+dayOfDeparture+') button').attr('disabled',false);} 55calendar.find('td.is-today').parent('tr').prev('tr').find('button').attr('disabled','disabled')}
56frontvpg.filterMultiDateChange=function(picker){var dateStart=picker.getDate();var dateEnd=picker.getDate();if(dateStart!=null&&dateEnd!=null){dateStart.setDate(dateStart.getDate());dateEnd.setDate(dateEnd.getDate());}} 57outsideDateClick=function(){var alertResults=function(){$('.open').removeClass('open');};$('.tooltipDate').outsideEvent(alertResults);} 58frontvpg.ContactBoxHeight=function(){if(frontvpg.targets.tablet){$(".container-box-right").height($(".container-box-left").height());}else{$(".container-box-right").height("100%");}} 59frontvpg.initReferralMobile=function(){if(frontvpg.targets.mobile){if(!$('.memberInfo').hasClass('hasDropdownList')){$('.memberInfo').addClass('hasDropdownList');$('.section-mobile').css('display','none');$('.hasDropdownList').find('i').attr('class','icon-arrow-down-t1');$('.hasDropdownList').off('click').on('click',function(event){event.preventDefault();event.stopPropagation();var current_icon=$(this).find('i');var iconStatus=current_icon.attr('data-open');$(this).parent('.basicRow').find('.section-mobile').slideUp();if(!$(this).parent('.basicRow').find('.section-mobile').is(':visible')){$(this).parent('.basicRow').find('.section-mobile').slideDown();iconStatus=current_icon.attr('data-close');} 60current_icon.attr('class',iconStatus);});}}else{$('.hasDropdownList').unbind('click');$('.memberInfo').removeClass('hasDropdownList');$('.section-mobile').css('display','none');}} 61$(document.getElementById('button-more-friends')).on('click',function(){$(document.getElementById('sponsoringEmailForm')).find('.form-container').slideDown();$(this).remove();});$(document).ready(function(){frontvpg.manageCategoriesFields();frontvpg.managePaymentCardTypeFields();frontvpg.managePaymentSubmit();frontvpg.ContactBoxHeight();frontvpg.manageMultipleSelectField('payment-form-card-expiration');frontvpg.manageUpdateDateOrders();$(document).on('cssmodal:show',function(event){var activeElement=CSSModal.activeElement;if($(activeElement).attr('id')==frontvpg.modalMessage){$(document.getElementById(frontvpg.modalMessage)).addClass('open-modal');$(document.getElementById('feedback-form-message')).val('');}}).on('cssmodal:hide',function(event){var activeElement=CSSModal.activeElement;if($(activeElement).attr('id')==frontvpg.modalMessage){$(document.getElementById(frontvpg.modalMessage)).removeClass('open-modal')} 62if($(activeElement).attr('id')==frontvpg.modalSurveyFeedbackWarning){$('#survey-form textarea[name^="fsit_open_question_dislike"]').removeAttr('disabled');$('#survey-form '+'#'+frontvpg.modalSurveyFeedbackWarning+' .modal-content textarea').attr('disabled','disabled');$('body').css('overflow','auto');}});var likeDislikeTextAreaSelector='textarea[id^="fsit_open_question_dislike"], textarea[id^="fsit_open_question_like"], textarea[id^="fsit_open_question"]';$(likeDislikeTextAreaSelector).on('keyup input',function(){frontvpg.countChar(this,frontvpg.textAreaCharLimit);});$(likeDislikeTextAreaSelector).keyup();frontvpg.updateMarks();$('.marks').on("mouseleave",function(event){frontvpg.resetMarks($(this).find('.mark').eq(0));frontvpg.updateMarks();});if(typeof validateFormUrl!='undefined'&&!frontvpg.isIE8){$('#survey-form').submit(function(e){frontvpg.clearInputsWithPlaceholder();if(!frontvpg.surveyAnswerToSubmit){e.preventDefault();var buttonSubmit=$(this).find('input[type=submit]');var buttonSubmitHTML=buttonSubmit[0].outerHTML;buttonSubmit.replaceWith('<div class="survey-submit-loading"><img class="loading" src="{{ loaderUrl }}"/></div>');$.post(validateFormUrl,$("#survey-form").serialize(),function(data){needToShowWarning=Object.keys(data.needToShowWarning);var showWarning=false;if(data.error=="00"&&needToShowWarning.length>0){$('#'+frontvpg.modalSurveyFeedbackWarning+' .modal-content-wrapper').empty();$.each(data.needToShowWarning,function(infraId,needToShowWarning){if(needToShowWarning){frontvpg.populateSurveyWarningPopinForInfra(data,infraId);showWarning=true;}});if(showWarning){tracking.sendGAEvent('siteError','lowScoreNoFeedback','formError');$('#survey-form .survey-submit-loading').replaceWith(buttonSubmitHTML);frontvpg.showFeedbackWarning();frontvpg.initPlaceholders();}} 63if(!showWarning){frontvpg.submitSurvey();}},'json').fail(function(data){frontvpg.submitSurvey();});}});} 64$('.mark').on("mouseenter mouseleave",function(event){switch(event.type){case'mouseenter':if(!frontvpg.isMobileAndTablet()){var radio=$(this).find('input');var radioValue=radio.val()-10;frontvpg.showMarkLabel($(this),radioValue);$(this).find('.circle-mark').removeClass('inactive').addClass('active');if($(this).prevAll().find('.circle-mark').length>0){$(this).prevAll().find('.circle-mark').removeClass('inactive').addClass('active');} 65if($(this).nextAll('.mark').find('.circle-mark').length>0){$(this).nextAll('.mark').find('.circle-mark').removeClass('active').addClass('inactive');}} 66break;case'mouseleave':if(!frontvpg.isMobileAndTablet()){var radio=$(this).find('input');var radioSetName=radio.attr('name');var checkedRadio=$('input[name="'+radioSetName+'"]:checked');var radioValue=checkedRadio.val()-10;if(checkedRadio.length>0){frontvpg.showMarkLabel($(this),radioValue);}else{$(this).parents('.fsit_set_many').eq(0).find('.mark-label').hide();} 67var $currentCircleMark=checkedRadio.parent('.mark').find('.circle-mark') 68$currentCircleMark.removeClass('inactive').addClass('active');$currentCircleMark.parent().prevAll('.mark').find('.circle-mark').removeClass('inactive').addClass('active');$currentCircleMark.parent().nextAll('.mark').find('.circle-mark').removeClass('active').addClass('inactive');} 69break;default:break;}});$('.mark').on("click",function(event){if($(event.target).is('input:radio')){frontvpg.updateMarks();return;} 70var $circleMark=$(this).find('.circle-mark');var radio=$(this).find('input');var radioValue=radio.val()-10;frontvpg.showMarkLabel($circleMark,radioValue);frontvpg.resetMarks($circleMark);radio.prop('checked',true);$circleMark.removeClass('inactive').addClass('active');$(this).prevAll().find('.circle-mark').removeClass('inactive').addClass('active')});$('#contact .email-form').on("click",function(event){event.preventDefault();$(document.getElementsByName('ContactForm')).show();var emailForm=$(document.getElementById('container-email-box'));var $header=$(document.getElementById('header'));var formService=$(this).attr('data-type');if(typeof(services)!='undefined'&&typeof(services[formService])!='undefined'){var first=services[formService][0];$("select#subject option").filter(function(){$(document.getElementById('subject_selected')).val(first);return $(this).val()==first;}).prop('selected',true);} 71if(emailForm.is(':hidden')){emailForm.stop().slideDown('slow');}else{emailForm.stop().slideUp('slow');}});$('#contact-form').on('submit',function(event){var form=$(this);if(!form.data('submitted')){form.data('submitted',true);}else{event.preventDefault();}});$('#proposal-contact').on("click",function(event){event.preventDefault();var feedbackForm=$('#container-feedback-box');if(feedbackForm.is(':hidden')){feedbackForm.stop().slideDown('slow');}else{feedbackForm.stop().slideUp('slow');}});$('#partner-contact').on("click",function(event){event.preventDefault();var partnerContactForm=$('#partner-container-email-box');if(partnerContactForm.is(':hidden')){partnerContactForm.stop().slideDown('slow');}else{partnerContactForm.stop().slideUp('slow');}});if(frontvpg.isWebApp){$('#contact .container-avis-box').hide();} 72if(window.location.hash=="#contact-proposal"){$('#container-feedback-box').show();} 73$(document.getElementById('email-close-popup')).on("click",function(event){event.preventDefault();
73$('.container-email-box').slideUp();});$(document.getElementById('social_fbshare')).on('click',function(event){event.preventDefault();frontvpg.shareFb({link:urlShareFacebook});});$('#updatePax .add_new_pax').click(function(e){if(frontvpg.isFirstPaxAdding){frontvpg.isFirstPaxAdding=false;$('#updatePax section#add_new_pax .btn_update, #updatePax #newPassengerContainer').show();$('#updatePax section#add_new_pax .cancelButton').show();}else{e.preventDefault();$clone=$(".section-passenger-clone").clone(true);$clone.css('display','block').removeClass('section-passenger-clone').addClass('newContentForm');frontvpg.nb_new_pax++;$clone.find('input,select').each(function(){regex=/(\w+)\-(\d+)\-(\d+)/g;var name=$(this).attr('name');var res=name.replace(regex,'$1-'+frontvpg.nb_new_pax+'-$3');$(this).attr('name',res);});$clone.insertAfter($('section.newPassengerForm section.newContentForm').last());var currentNUmberOfNewPax=parseInt($(document.getElementById('numberOfNewPaxForm')).val());$(document.getElementById('numberOfNewPaxForm')).val(currentNUmberOfNewPax+1);}});$(document).on('change','select#facebook_lists',function(){if($(this).val()){getFriends($(this).val());}else{getFriends();}});$(document).on('change','div#facebook_friends div.cell_friend input',function(){if($('div#facebook_friends div.cell_friend input:checked').length){$('#modal-share-fb #facebookPartOne .facebookPartOneSubmit').removeClass('disabled');}});$(document.getElementById('social-network')).find('a.share').on('click',function(event){event.preventDefault();frontvpg.eventSocialNetwork(this);});var $winBloc=$('#sponsoring-header').find('.win-money');var $winAmount=$winBloc.find('.win-money_amount');var $winAmountLength=$winAmount.text().length;var $winTxt=$winBloc.find('.win-money_txt');var $winTxtLength=$winTxt.text().length;if($winAmountLength>4){$winAmount.addClass('long');} 74if($winTxtLength>7){$winTxt.addClass('long-txt');} 75$('.open-relaunch').each(function(){$(this).on('click',function(event){$('#view-email').hide();$('.referral_emails').attr('disabled','disabled');$('.referral_emails').hide();$email=$(this).attr('data-email');$(document.getElementById($email)).removeAttr('disabled').show();});});$('#relaunch_all').on('click',function(){$('#view-email').show();$('.referral_emails').attr('disabled','disabled');$('.referral_emails').hide();$('.referral_emails').removeAttr('disabled');inputs=document.getElementsByTagName("input");for(index=0;index<3;++index){$(document.getElementById(inputs[index].id)).show();}});$('#view-email').on('click',function(){$('.referral_emails').show();$('#view-email').hide();});$(document).on('cssmodal:show',function(event){event.preventDefault();event.stopPropagation();var activeElement=CSSModal.activeElement;if($(activeElement).attr('id')==frontvpg.modalMessage){$(document.getElementById('feedback-form-message')).val('');window.location.hash=frontvpg.modalMessage;frontvpg.openModal=true;} 76if($(activeElement).attr('id')==frontvpg.modalRelaunch){$(document.getElementById('relaunch_message_text')).val('');$('#relaunch-email-error').html('');$('#relaunch-email-error').hide();window.location.hash=frontvpg.modalRelaunch;frontvpg.openModal=true;} 77if($(activeElement).attr('id')==frontvpg.modalInsuranceReminder){window.location.hash=frontvpg.modalInsuranceReminder;frontvpg.openModal=true;} 78if(jQuery.inArray(activeElement.id,frontvpg.hashModalUsed)!=-1&&frontvpg.openModal){$(activeElement).addClass('open-modal');}else{window.location.hash=frontvpg.preventHashTag;}}).on('cssmodal:hide',function(event){var activeElement=CSSModal.activeElement;if($(activeElement).attr('id')==frontvpg.modalMessage){$(document.getElementById(frontvpg.modalMessage)).removeClass('open-modal') 79if(frontvpg.isShowingPopup){frontvpg.isShowingPopup=false;window.location.href="{{ orderUrl }}";}} 80if($(activeElement).attr('id')==frontvpg.modalRelaunch){$(document.getElementById(frontvpg.modalRelaunch)).removeClass('open-modal') 81if(frontvpg.isShowingPopup){frontvpg.isShowingPopup=false;}} 82if($(activeElement).attr('id')==frontvpg.modalInsuranceReminder){$(document.getElementById(frontvpg.modalInsuranceReminder)).removeClass('open-modal') 83if(frontvpg.isShowingPopup){frontvpg.isShowingPopup=false;} 84window.location.href="{{ orderUrl }}";}});$("#relaunchEmailForm").submit(function(){var textareaValue=$('#relaunch_message_text').val();$('#message').val(textareaValue);$.ajax({type:"POST",dataType:"json",url:"{{ sponsoringRelaunchEmail }}",data:$("#relaunchEmailForm").serialize(),success:function(data) 85{if(!data.mailSent){$('#relaunch-email-error').html(data.errorList);$('#relaunch-email-error').show();}else{$('#relaunch-email-error').html('');
85if(data.mailSent){$('#modal-relaunch-success').find('.modal-content .relaunch-title').html(data.successMessage);window.location.hash=frontvpg.modalRelaunchSuccess;frontvpg.openModal=true;}}}});return false;});frontvpg.callInProgress=false;frontvpg.loadedBookingIds=new Array();$(".resp-table tbody").on("click",'.open-details',function(){if(frontvpg.callInProgress==false){var id=$(this).data('id');var row=$(this);if(jQuery.inArray(id,frontvpg.loadedBookingIds)==-1) 86{var preloader='<tr><td colspan="5"><div class="order_loading"><img class="loading" src="{{ loaderUrl }}"/></div></tr></td>';$("#tbody_extra_"+id).html(preloader).show();frontvpg.callInProgress=true;$.ajax({type:"POST",url:bookingDetailUrl,data:{"bookingId":id}}).done(function(htmlResponse){frontvpg.loadedBookingIds.push(id);frontvpg.callInProgress=false;if(frontvpg.targets.tablet){$('tr.'+id).css('display','block');}else{$('tr.'+id).show();} 87row.find('i').removeClass('icon-more').addClass('icon-less');$("#tbody_extra_"+id).hide().html(htmlResponse).fadeIn("slow");var hashScrollToAnchorList={flight:'transport',cruiseFerry:'carInfo',passport:'pax'};var scrollTo=hash.replace('#','');if(openBooking==id&&hashScrollToAnchorList.hasOwnProperty(scrollTo)){$('html, body').animate({scrollTop:$("#"+hashScrollToAnchorList[scrollTo]+"-"+id+"-form").offset().top},2000);}});}else{if($("#tbody_extra_"+id).is(":hidden")){row.find('i').removeClass('icon-more').addClass('icon-less');}else{row.find('i').removeClass('icon-more').addClass('icon-more');} 88$("#tbody_extra_"+id).fadeToggle("slow");}}});$('#updatePax section#list_pax a.updateAction').on('click',function(event){event.preventDefault();$(this).parent('form').submit();});$(document.getElementById('modification-choice')).on('change',function(){var url='';switch($(this).val()){case'1':url=$('option:selected',this).attr('data-url');$('.back').hide();$('.passengers-modification').css('display','none');$('.date-modification').css('display','inline-block');$('.choice').show();$('.acceptForm').show();$('.accept').hide();break;case'2':url=$('option:selected',this).attr('data-url');$('.back').hide();$('.passengers-modification').css('display','inline-block');$('.date-modification').css('display','none');$('.choice').show();$('.accept').show();$('.acceptForm').hide();break;default:$('.date-modification').hide();$('.passengers-modification').hide();$('.choice').hide();$('.back').show();break;} 89$('#orders.modification .btn.accept').attr('href',url);});$('.delete_pax').on('click',function(){var nb_checkbox=$('.delete_pax').length;var nb_checked=$('.delete_pax:checked').length;if(nb_checked<nb_checkbox){$('.delete_pax').attr("disabled",false);$('.errorMessagePaxMin').hide();if($(this).is(":checked")){$(this).parents('li').find('div.paxInfo').addClass('throughPax');$(this).parents('section').find('.btn_delete_pax').show();var aPaxChecked=[];$('.delete_pax:checked').each(function(){aPaxChecked.push($(this).attr('name'));});$('#deletedPaxs').val(aPaxChecked.join(','));}else{$(this).parents('li').find('div.paxInfo').removeClass('throughPax');$(this).parents('section').find('.btn_delete_pax').hide();}}else{$('.errorMessagePaxMin').show();$(this).attr("disabled","disabled");$(this).attr("checked",false);}});var hash=window.location.hash;if(hash.search('passport-')!=-1){var idResa=hash.replace('#passport-','');idResa=idResa.replace(/[A-Z]*/g,'');idResa=idResa.substr(2);idResa=idResa.replace(/^0+/,'');$("tr[data-id='booking-"+idResa+"']").find('.open-details').click();$('html, body').animate({scrollTop:$("#pax-"+idResa+"-form").offset().top},2000);} 90if(hash.search('flight-')!=-1){var idResa=hash.replace('#flight-','');idResa=idResa.replace(/[A-Z]*/g,'');idResa=idResa.substr(2);idResa=idResa.replace(/^0+/,'');$("tr[data-id='booking-"+idResa+"']").find('.open-details').click();$('html, body').animate({scrollTop:$("#transport-"+idResa+"-form").offset().top},2000);} 91if(typeof openBooking!="undefined"&&openBooking.length>0){$("tr[data-id='booking-"+openBooking+"']").find('.open-details').click();} 92tracking.handleTrackingSurveyPage();if($("div.error.flashMessage").length>0){$("#giftcard-form-activate").addClass("red-border");} 93if($('#form-birthdate').length){$('#form-birthdate').inputmask('99/99/9999');$('#form-birthdate').attr('type','tel');} 94$(document.getElementById('survey-guidelines')).on('click',function(e){frontvpg.showSurveyGuidelines();e.preventDefault();e.stopPropagation();});});if(frontvpg.isWebApp){frontvpg.stackHeader(false);} 95frontvpg.initReferralMobile();frontvpg.handleHeaderPage();$(window).on('resize',function(){frontvpg.initReferralMobile();frontvpg.ContactBoxHeight();});var $flashMessage=$(".flashMessage");if(!$flashMessage.hasClass('error')){$(".flashMessage").parent().delay(10000).slideUp();} 96if(typeof clearPartnerForm!=='undefined'){$('#partnerContactForm').find('input[type=text], input[type=email], input[type=number], textarea, select').val('');} 97var $openPopupCancellation=$('#openPopupCancellation');$openPopupCancellation.on('click',function(){tracking.sendGAEvent('orderInteraction','validate','cancellation');});var $checkBox=$('.cancellation-form-cgv');$checkBox.click(function(){if($checkBox.hasClass('error')){$checkBox.removeClass('error');}});$('#counterProposalReject').on('click',function(e){e.preventDefault();if($(this).hasClass('clicked')){return false;} 98$(this).addClass('clicked');$('#userOption').val(false);$(".submit-counterProposal").trigger("click");});$('#counterProposalAccept').on('click',function(e){e.preventDefault();if($(this).hasClass('clicked')){return false;} 99$('#userOption').val(true);if($('#counterProposal-form').find('#cancellation-form-cgv').length&&!$('#counterProposal-form').find('#cancellation-form-cgv').prop('checked')){$('.counterProposal-form-cgv').addClass('error');}else{$(this).addClass('clicked');$('#counterProposalAccept').addClass('button-clicked');$(".submit-counterProposal").trigger("click");}});if($openPopupCancellation.length>0){$openPopupCancellation.magnificPopup({items:{src:'#popup_cancellation',type:'inline',closeBtnInside:true}});const $cancellationFormCgv=$('#cancellation-form #cancellation-form-cgv');$openPopupCancellation.on('click',function(){if($cancellationFormCgv.length&&!$cancellationFormCgv.prop('checked')){$('.cancellation-form-cgv').addClass('error');$(".mfp-close").trigger("click");$('#errorCgvMessage').show();}});var $popupCancellation=$('#popup_cancellation') 100$popupCancellation.find('.cancelButton').on('click',function(){tracking.sendGAEvent('orderInteraction','dontCancelMyOrder','cancellationConfirmation');$(".mfp-close").trigger("click");});$popupCancellation.find('#trigger-submit').on('click',function(){const urlParam
100s=new URL(window.location.href).searchParams;$('#isDisabledFlex').val(urlParams.get('isDisabledFlex'));tracking.sendGAEvent('orderInteraction','cancelMyOrderClick','cancellationConfirmation');$(".submit-cancel").trigger("click");});} 101var submittedForm=false;$('#cancellation-form').submit(function(){if(!submittedForm){submittedForm=true;$('#cancellation-form').find('.cancelButton').prop('disabled',true);$('#cancellation-form').find('.save').css({'background-color':'#cccccc'});$('#popup_cancellation').find('.save').css({'background-color':'#cccccc'});return true;} 102return false});$('.infoCancellationFees').click(function(e){e.preventDefault();$('.infoCancellationNotice').show();$(this).hide();});$('.marks_nps .radio-content').mouseenter(function(){$(this).addClass('active');$(this).prevAll().addClass('active');$(this).nextAll().removeClass('active');}).mouseleave(function(){var $parent=$(this).parent();var $parentFindSelected=$parent.find('.selected');$parent.find('.radio-content').removeClass('active');$parentFindSelected.addClass('active');$parentFindSelected.prevAll().addClass('active');$parentFindSelected.nextAll().removeClass('active');}).click(function(){$(this).addClass('selected active');$(this).prevAll().addClass('active').removeClass('selected');$(this).nextAll().removeClass('selected');var $radio=$(this).find('input:radio');if($radio.length){$radio.prop('checked',true);}})});;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.