(function(){
function init(){
var calendar = new Calendarista.calendar({
'id': 'calendarista_1'
, 'calendarMode': 12
, 'firstDayOfWeek': 7 , 'ajaxUrl': 'https://lafoiretogo2000.tg/wp-admin/admin-ajax.php'
, 'projectId': 1
, 'dateFormat': 'dd/mm/yy'
, 'thumbnails': [] , 'appointment': -1 , 'bookingDaysMinimum': 0 , 'bookingDaysMaximum': 0 , 'dayCountMode': 0 , 'searchResultStartTime': ''
, 'searchResultEndTime': ''
, 'timeDisplayMode': 0 , 'enableMultipleBooking': 0 , 'clearLabel': 'Clear'
, 'seasons': [] , 'minTime': 0 , 'maxTime': 0 , 'returnSameDay': 0 , 'returnOptional': 0 , 'repeatPageSize': 10 })
, gmaps;
this.$nextButton = calendar.$root.find('button[name="next"]');
this.$nextButton.on('click', function(e){
var $multiDateSelection = calendar.$root.find('input[name="multiDateSelection"]')
, bookingDaysMinimum = calendar.bookingDaysMinimum
, multiDatesVal = $multiDateSelection.val()
, multiDates = multiDatesVal ? multiDatesVal.split(';') : []
, sel = (multiDates.length > 0 && (!bookingDaysMinimum || multiDates.length >= bookingDaysMinimum)) ? '.calendarista-dynamicfield.calendarista_parsley_validated' : null;
if(!Calendarista.wizard.isValid(calendar.$root, sel)){
e.preventDefault();
return false;
}else if (multiDates.length > 0){
calendar.$startDate.parsley().reset();
}
calendar.unload();
if(gmaps){
gmaps.unload();
}
});
}
if (window.addEventListener){
window.addEventListener('load', onload, false);
} else if (window.attachEvent){
window.attachEvent('onload', onload);
}
function onload(e){
init();
}
})();
(function(){
"use strict";
function init(){
new Calendarista.wizard({
'id': 'calendarista_1'
, 'wizardAction': 'calendarista_wizard'
, 'ajaxUrl': 'https://lafoiretogo2000.tg/wp-admin/admin-ajax.php'
, 'prevIndex': 0 , 'nextIndex': 2 , 'stepCounter': 3 , 'appointment': 0
, 'steps': [{"name":"calendar","counter":1,"label":"Date et heure"},{"name":"form","counter":2,"label":"D\u00e9tails"},{"name":"checkout","counter":3,"label":"Validation de la r\u00e9servation"}] , 'selectedStepName': 'calendar'
, 'selectedStepIndex': 1 });
}
if (window.addEventListener){
window.addEventListener('load', onload, false);
} else if (window.attachEvent){
window.attachEvent('onload', onload);
}
function onload(e){
init();
}
})();