(function(){
function init(){
var calendar = new Calendarista.calendar({
'id': 'calendarista_17'
, 'calendarMode': 1
, 'firstDayOfWeek': 7 , 'ajaxUrl': 'https://www.tuftme.com/wp-admin/admin-ajax.php'
, 'projectId': 17
, 'dateFormat': 'dd/mm/yy'
, 'thumbnails': [] , 'appointment': -1 , 'bookingDaysMinimum': 0 , 'bookingDaysMaximum': 0 , 'searchResultStartTime': ''
, 'searchResultEndTime': ''
, 'timeDisplayMode': 0 , 'enableMultipleBooking': 0 , 'clearLabel': 'Clear'
, 'seasons': [] , 'minTime': 0 , 'maxTime': 0 })
, gmaps;
this.$nextButton = calendar.$root.find('button[name="next"]');
this.$nextButton.attr('data-calendarista-closed', true);
this.$nextButton.prop('disabled', true).addClass('ui-state-disabled');
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_17'
, 'wizardAction': 'calendarista_wizard'
, 'ajaxUrl': 'https://www.tuftme.com/wp-admin/admin-ajax.php'
, 'prevIndex': 0 , 'nextIndex': 2 , 'stepCounter': 3 , 'appointment': 0
, 'steps': [{"name":"calendar","counter":1,"label":"Date and time"},{"name":"form","counter":2,"label":"Details"},{"name":"checkout","counter":3,"label":"Check out"}] , 'selectedStepName': 'calendar'
, 'selectedStepIndex': 1 });
}
if (window.addEventListener){
window.addEventListener('load', onload, false);
} else if (window.attachEvent){
window.attachEvent('onload', onload);
}
function onload(e){
init();
}
})();