var booked_load_calendar_date_booking_options,
booked_appt_form_options,
bookedNewAppointment;
;(function($, window, document, undefined){
var $win=$(window);
$.fn.spin.presets.booked={
lines: 10,
length: 7,
width: 5,
radius: 11,
corners: 1,
rotate: 0,
direction: 1,
color: '#555',
speed: 1,
trail: 60,
shadow: false,
hwaccel: false,
className: 'booked-spinner',
zIndex: 2e9,
top: '50%',
left: '50%'
}
$.fn.spin.presets.booked_top={
lines: 11,
length: 10,
width: 6,
radius: 15,
corners: 1,
rotate: 0,
scale: 0.5,
direction: 1,
color: '#aaaaaa',
speed: 1,
trail: 60,
shadow: false,
hwaccel: false,
className: 'booked-spinner booked-spinner-top',
zIndex: 2e9,
top: '15px',
left: '50%'
}
$.fn.spin.presets.booked_white={
lines: 13,
length: 11,
width: 5,
radius: 18,
scale: 1,
corners: 1,
rotate: 0,
direction: 1,
color: '#fff',
speed: 1,
trail: 60,
shadow: false,
hwaccel: false,
className: 'booked-spinner booked-white',
zIndex: 2e9,
top: '50%',
left: '50%'
}
$win.on('resize', function(){
adjust_calendar_boxes();
resize_booked_modal();
});
$win.on('load', function(){
BookedTabs.Init();
var ajaxRequests=[];
adjust_calendar_boxes();
$('.booked-calendar-wrap').each(function(){
var thisCalendar=$(this);
var calendar_month=thisCalendar.find('div.booked-calendar').attr('data-calendar-date');
thisCalendar.attr('data-default',calendar_month);
init_tooltips(thisCalendar);
});
$('.booked-list-view').each(function(){
var thisList=$(this);
var list_date=thisList.find('.booked-appt-list').attr('data-list-date');
thisList.attr('data-default',list_date);
});
bookedRemoveEmptyTRs();
init_appt_list_date_picker();
$('.booked_calendar_chooser').change(function(e){
e.preventDefault();
var $selector=$(this),
thisIsCalendar=$selector.parents('.booked-calendarSwitcher').hasClass('calendar');
if(!thisIsCalendar){
var thisCalendarWrap=$selector.parents('.booked-calendar-shortcode-wrap').find('.booked-list-view'),
thisDefaultDate=thisCalendarWrap.attr('data-default'),
thisIsCalendar=$selector.parents('.booked-calendarSwitcher').hasClass('calendar');
if(typeof thisDefaultDate=='undefined'){ thisDefaultDate=false; }
thisCalendarWrap.addClass('booked-loading');
var args={
'action':'booked_appointment_list_date',
'nonce':booked_js_vars.nonce,
'date':thisDefaultDate,
'calendar_id':$selector.val()
};
$(document).trigger("booked-before-loading-appointment-list-booking-options");
thisCalendarWrap.spin('booked_top');
$.ajax({
url: booked_js_vars.ajax_url,
type: 'post',
data: args,
success: function(html){
thisCalendarWrap.html(html);
init_appt_list_date_picker();
setTimeout(function(){
thisCalendarWrap.removeClass('booked-loading');
},1);
}});
}else{
var thisCalendarWrap=$selector.parents('.booked-calendar-shortcode-wrap').find('.booked-calendar-wrap'),
thisDefaultDate=thisCalendarWrap.attr('data-default');
if(typeof thisDefaultDate=='undefined'){ thisDefaultDate=false; }
var args={
'action':'booked_calendar_month',
'nonce':booked_js_vars.nonce,
'gotoMonth':thisDefaultDate,
'calendar_id':$selector.val()
};
savingState(true,thisCalendarWrap);
$.ajax({
url: booked_js_vars.ajax_url,
type: 'post',
data: args,
success: function(html){
thisCalendarWrap.html(html);
adjust_calendar_boxes();
bookedRemoveEmptyTRs();
init_tooltips(thisCalendarWrap);
$(window).trigger('booked-load-calendar', args, $selector);
}});
}
return false;
});
$('body').on('click', '.booked-calendar-wrap .page-right, .booked-calendar-wrap .page-left, .booked-calendar-wrap .monthName a', function(e){
e.preventDefault();
var $button=$(this),
gotoMonth=$button.attr('data-goto'),
thisCalendarWrap=$button.parents('.booked-calendar-wrap'),
thisCalendarDefault=thisCalendarWrap.attr('data-default'),
calendar_id=$button.parents('div.booked-calendar').attr('data-calendar-id');
if(typeof thisCalendarDefault=='undefined'){ thisCalendarDefault=false; }
var args={
'action':'booked_calendar_month',
'nonce':booked_js_vars.nonce,
'gotoMonth':gotoMonth,
'calendar_id':calendar_id,
'force_default':thisCalendarDefault
};
savingState(true,thisCalendarWrap);
$.ajax({
url: booked_js_vars.ajax_url,
type: 'post',
data: args,
success: function(html){
thisCalendarWrap.html(html);
adjust_calendar_boxes();
bookedRemoveEmptyTRs();
init_tooltips(thisCalendarWrap);
$(window).trigger('booked-load-calendar', args, $button);
}});
return false;
});
$('body').on('click', '.booked-calendar-wrap .bc-row.week .bc-col', function(e){
e.preventDefault();
var $thisDate=$(this),
booked_calendar_table=$thisDate.parents('div.booked-calendar'),
$thisRow=$thisDate.parent(),
date=$thisDate.attr('data-date'),
calendar_id=booked_calendar_table.attr('data-calendar-id'),
colspanSetting=$thisRow.find('.bc-col').length;
if(!calendar_id){ calendar_id=0; }
if($thisDate.hasClass('blur')||$thisDate.hasClass('booked')&&!booked_js_vars.publicAppointments||$thisDate.hasClass('prev-date')){
}else if($thisDate.hasClass('active')){
$thisDate.removeClass('active');
$('.bc-row.entryBlock').remove();
var calendarHeight=booked_calendar_table.height();
booked_calendar_table.parent().height(calendarHeight);
}else{
$('.bc-row.week .bc-col').removeClass('active');
$thisDate.addClass('active');
$('.bc-row.entryBlock').remove();
$thisRow.after('<div class="bc-row entryBlock booked-loading"><div class="bc-col"></div></div>');
$('.bc-row.entryBlock').find('.bc-col').spin('booked');
booked_load_calendar_date_booking_options={'action':'booked_calendar_date','nonce': booked_js_vars.nonce,'date':date,'calendar_id':calendar_id};
$(document).trigger("booked-before-loading-calendar-booking-options");
var calendarHeight=booked_calendar_table.height();
booked_calendar_table.parent().height(calendarHeight);
$.ajax({
url: booked_js_vars.ajax_url,
type: 'post',
data: booked_load_calendar_date_booking_options,
success: function(html){
$('.bc-row.entryBlock').find('.bc-col').html(html);
$('.bc-row.entryBlock').removeClass('booked-loading');
$('.bc-row.entryBlock').find('.booked-appt-list').fadeIn(300);
$('.bc-row.entryBlock').find('.booked-appt-list').addClass('shown');
adjust_calendar_boxes();
}});
}
return;
});
$('body').on('click', '.booked-list-view .booked-list-view-date-prev, .booked-list-view .booked-list-view-date-next', function(e){
e.preventDefault();
var $thisLink=$(this),
date=$thisLink.attr('data-date'),
thisList=$thisLink.parents('.booked-list-view'),
defaultDate=thisList.attr('data-default'),
calendar_id=$thisLink.parents('.booked-list-view-nav').attr('data-calendar-id');
if(typeof defaultDate=='undefined'){ defaultDate=false; }
if(!calendar_id){ calendar_id=0; }
thisList.addClass('booked-loading');
var booked_load_list_view_date_booking_options={
'action':'booked_appointment_list_date',
'nonce':booked_js_vars.nonce,
'date':date,
'calendar_id':calendar_id,
'force_default':defaultDate
};
$(document).trigger("booked-before-loading-appointment-list-booking-options");
thisList.spin('booked_top');
$.ajax({
url: booked_js_vars.ajax_url,
type: 'post',
data: booked_load_list_view_date_booking_options,
success: function(html){
thisList.html(html);
init_appt_list_date_picker();
setTimeout(function(){
thisList.removeClass('booked-loading');
},1);
}});
return false;
});
bookedNewAppointment=function(e){
e.preventDefault();
var $button=$(this),
title=$button.attr('data-title'),
timeslot=$button.attr('data-timeslot'),
date=$button.attr('data-date'),
calendar_id=$button.attr('data-calendar-id'),
$thisTimeslot=$button.parents('.timeslot'),
is_list_view=$button.parents('.booked-calendar-wrap').hasClass('booked-list-view');
if(typeof is_list_view!='undefined'&&is_list_view){
var new_calendar_id=$button.parents('.booked-list-view').find('.booked-list-view-nav').attr('data-calendar-id');
}else{
var new_calendar_id=$button.parents('div.booked-calendar').attr('data-calendar-id');
}
calendar_id=new_calendar_id ? new_calendar_id:calendar_id;
booked_appt_form_options={'action':'booked_new_appointment_form','nonce': booked_js_vars.nonce,'date':date,'timeslot':timeslot,'calendar_id':calendar_id,'title':title};
$(document).trigger("booked-before-loading-booking-form");
create_booked_modal();
setTimeout(function(){
$.ajax({
url: booked_js_vars.ajax_url,
type: 'post',
data: booked_appt_form_options,
success: function(html){
$('.bm-window').html(html);
var bookedModal=$('.booked-modal');
var bmWindow=bookedModal.find('.bm-window');
bmWindow.css({'visibility':'hidden'});
bookedModal.removeClass('bm-loading');
$(document).trigger("booked-on-new-app");
resize_booked_modal();
bmWindow.hide();
$('.booked-modal .bm-overlay').find('.booked-spinner').remove();
setTimeout(function(){
bmWindow.css({'visibility':'visible'});
bmWindow.show();
},50);
}});
},100);
return false;
}
$('body').on('click', '.booked-calendar-wrap button.new-appt', bookedNewAppointment);
var profileTabs=$('.booked-tabs');
if(!profileTabs.find('li.active').length){
profileTabs.find('li:first-child').addClass("active");
}
if(profileTabs.length){
$('.booked-tab-content').hide();
var activeTab=profileTabs.find('.active > a').attr('href');
activeTab=activeTab.split('#');
activeTab=activeTab[1];
$('#profile-'+activeTab).show();
profileTabs.find('li > a').on('click', function(e){
e.preventDefault();
$('.booked-tab-content').hide();
profileTabs.find('li').removeClass('active');
$(this).parent().addClass('active');
var activeTab=$(this).attr('href');
activeTab=activeTab.split('#');
activeTab=activeTab[1];
$('#profile-'+activeTab).show();
return false;
});
}
$('body').on('click', '.booked-profile-appt-list .booked-show-cf', function(e){
e.preventDefault();
var hiddenBlock=$(this).parent().find('.cf-meta-values-hidden');
if(hiddenBlock.is(':visible')){
hiddenBlock.hide();
$(this).removeClass('booked-cf-active');
}else{
hiddenBlock.show();
$(this).addClass('booked-cf-active');
}
return false;
});
if($('#loginform').length){
$('#loginform input[type="submit"]').on('click',function(e){
if($('#loginform input[name="log"]').val()&&$('#loginform input[name="pwd"]').val()){
$('#loginform .booked-custom-error').hide();
}else{
if($('#loginform').parents('.booked-form-wrap').length){
e.preventDefault();
$('#loginform').parents('.booked-form-wrap').find('.booked-custom-error').fadeOut(200).fadeIn(200);
}}
});
}
if($('#profile-forgot').length){
$('#profile-forgot input[type="submit"]').on('click',function(e){
if($('#profile-forgot input[name="user_login"]').val()){
$('#profile-forgot .booked-custom-error').hide();
}else{
e.preventDefault();
$('#profile-forgot').find('.booked-custom-error').fadeOut(200).fadeIn(200);
}});
}
if($('.booked-upload-wrap').length){
$('.booked-upload-wrap input[type=file]').on('change',function(){
var fileName=$(this).val();
$(this).parent().find('span').html(fileName);
$(this).parent().addClass('hasFile');
});
}
$('body').on('click', '.booked-profile-appt-list .appt-block .cancel', function(e){
e.preventDefault();
var $button=$(this),
$thisParent=$button.parents('.appt-block'),
appt_id=$thisParent.attr('data-appt-id');
confirm_delete=confirm(booked_js_vars.i18n_confirm_appt_delete);
if(confirm_delete==true){
var currentApptCount=parseInt($('.booked-profile-appt-list').find('h4').find('span.count').html());
currentApptCount=parseInt(currentApptCount - 1);
if(currentApptCount < 1){
$('.booked-profile-appt-list').find('h4').find('span.count').html('0');
$('.no-appts-message').slideDown('fast');
}else{
$('.booked-profile-appt-list').find('h4').find('span.count').html(currentApptCount);
}
$('.appt-block').animate({'opacity':0.4},0);
$thisParent.slideUp('fast',function(){
$(this).remove();
});
$.ajax({
'url':booked_js_vars.ajax_url,
'method':'post',
'data':{
'action':'booked_cancel_appt',
'nonce':booked_js_vars.nonce,
'appt_id':appt_id
},
success: function(data){
$('.appt-block').animate({'opacity':1},150);
}});
}
return false;
});
$('body').on('touchstart click','.bm-overlay, .bm-window .close, .booked-form .cancel',function(e){
e.preventDefault();
close_booked_modal();
return false;
});
$('body')
.on('focusin', '.booked-form input', function(){
if(this.title==this.value){
$(this).addClass('hasContent');
this.value='';
}}).on('focusout', '.booked-form input', function(){
if(this.value===''){
$(this).removeClass('hasContent');
this.value=this.title;
}});
$('body').on('change','.booked-form input',function(){
var condition=$(this).attr('data-condition'),
thisVal=$(this).val();
if(condition&&$('.condition-block').length){
$('.condition-block.'+condition).hide();
$('#condition-'+thisVal).fadeIn(200);
resize_booked_modal();
}});
$('body').on('submit','form#ajaxlogin', function(e){
e.preventDefault();
$('form#ajaxlogin p.status').show().html('<i class="fa-solid fa-circle-notch fa-spin"></i>&nbsp;&nbsp;&nbsp;' + booked_js_vars.i18n_please_wait);
resize_booked_modal();
var $this=$(this),
date=$this.data('date'),
title=$this.data('title'),
timeslot=$this.data('timeslot'),
calendar_id=$this.data('calendar-id');
$.ajax({
type:'post',
url:booked_js_vars.ajax_url,
data:$('form#ajaxlogin').serialize(),
success:function(data){
if(data=='success'){
close_booked_modal();
var $button=$('<button data-title="' + title + '" data-timeslot="' + timeslot + '" data-date="' + date + '" data-calendar-id="' + calendar_id + '"></button>');
$button.on('click', window.bookedNewAppointment);
$button.triggerHandler('click');
$button.unbind('click', window.bookedNewAppointment);
$button.detach();
}else{
$('form#ajaxlogin p.status').show().html('<i class="fa-solid fa-triangle-exclamation" style="color:#E35656"></i>&nbsp;&nbsp;&nbsp;' + booked_js_vars.i18n_wrong_username_pass);
resize_booked_modal();
}}
});
e.preventDefault();
});
$('body').on('click','.booked-forgot-password',function(e){
e.preventDefault();
$('#ajaxlogin').hide();
$('#ajaxforgot').show();
resize_booked_modal();
});
$('body').on('click','.booked-forgot-goback',function(e){
e.preventDefault();
$('#ajaxlogin').show();
$('#ajaxforgot').hide();
resize_booked_modal();
});
$('body').on('submit','form#ajaxforgot', function(e){
e.preventDefault();
$('form#ajaxforgot p.status').show().html('<i class="fa-solid fa-circle-notch fa-spin"></i>&nbsp;&nbsp;&nbsp;' + booked_js_vars.i18n_please_wait);
resize_booked_modal();
var $this=$(this);
$.ajax({
type:'post',
url:booked_js_vars.ajax_url,
data:$('form#ajaxforgot').serialize(),
success:function(data){
if(data=='success'){
e.preventDefault();
$('#ajaxlogin').show();
$('#ajaxforgot').hide();
$('form#ajaxlogin p.status').show().html('<i class="fa-solid fa-check" style="color:#56c477"></i>&nbsp;&nbsp;&nbsp;' + booked_js_vars.i18n_password_reset);
resize_booked_modal();
}else{
$('form#ajaxforgot p.status').show().html('<i class="fa-solid fa-triangle-exclamation" style="color:#E35656"></i>&nbsp;&nbsp;&nbsp;' + booked_js_vars.i18n_password_reset_error);
resize_booked_modal();
}}
});
e.preventDefault();
});
$('body').on('click','.booked-form input#submit-request-appointment',function(e){
$('form#newAppointmentForm p.status').show().html('<i class="fa-solid fa-circle-notch fa-spin"></i>&nbsp;&nbsp;&nbsp;' + booked_js_vars.i18n_please_wait);
resize_booked_modal();
e.preventDefault();
var customerType=$('#newAppointmentForm input[name=customer_type]').val(),
customerID=$('#newAppointmentForm input[name=user_id]').val(),
name=$('#newAppointmentForm input[name=booked_appt_name]').val(),
surname=$('#newAppointmentForm input[name=booked_appt_surname]').val(),
surnameActive=$('#newAppointmentForm input[name=booked_appt_surname]').length,
guest_name=$('#newAppointmentForm input[name=guest_name]').val(),
guest_surname=$('#newAppointmentForm input[name=guest_surname]').val(),
guest_surnameActive=$('#newAppointmentForm input[name=guest_surname]').length,
guest_email=$('#newAppointmentForm input[name=guest_email]').val(),
guest_emailActive=$('#newAppointmentForm input[name=guest_email]').length,
email=$('#newAppointmentForm input[name=booked_appt_email]').val(),
password=$('#newAppointmentForm input[name=booked_appt_password]').val(),
showRequiredError=false,
ajaxRequests=[];
$(this).parents('.booked-form').find('input,textarea,select').each(function(i,field){
var required=$(this).attr('required');
if(required&&$(field).attr('type')=='hidden'){
var fieldParts=$(field).attr('name');
fieldParts=fieldParts.split('---');
fieldName=fieldParts[0];
fieldNumber=fieldParts[1].split('___');
fieldNumber=fieldNumber[0];
if(fieldName=='radio-buttons-label'){
var radioValue=false;
$('input:radio[name="single-radio-button---'+fieldNumber+'[]"]:checked').each(function(){
if($(this).val()){
radioValue=$(this).val();
}});
if(!radioValue){
showRequiredError=true;
}}else if(fieldName=='checkboxes-label'){
var checkboxValue=false;
$('input:checkbox[name="single-checkbox---'+fieldNumber+'[]"]:checked').each(function(){
if($(this).val()){
checkboxValue=$(this).val();
}});
if(!checkboxValue){
showRequiredError=true;
}}
}else if(required&&$(field).attr('type')!='hidden'&&$(field).val()==''){
showRequiredError=true;
}});
if(showRequiredError){
$('form#newAppointmentForm p.status').show().html('<i class="fa-solid fa-triangle-exclamation" style="color:#E35656"></i>&nbsp;&nbsp;&nbsp;' + booked_js_vars.i18n_fill_out_required_fields);
resize_booked_modal();
return false;
}
if(customerType=='new'&&!name||customerType=='new'&&surnameActive&&!surname||customerType=='new'&&!email||customerType=='new'&&!password){
$('form#newAppointmentForm p.status').show().html('<i class="fa-solid fa-triangle-exclamation" style="color:#E35656"></i>&nbsp;&nbsp;&nbsp;' + booked_js_vars.i18n_appt_required_fields);
resize_booked_modal();
return false;
}
if(customerType=='guest'&&!guest_name||customerType=='guest'&&guest_emailActive&&!guest_email||customerType=='guest'&&guest_surnameActive&&!guest_surname){
$('form#newAppointmentForm p.status').show().html('<i class="fa-solid fa-triangle-exclamation" style="color:#E35656"></i>&nbsp;&nbsp;&nbsp;' + booked_js_vars.i18n_appt_required_fields_guest);
resize_booked_modal();
return false;
}
if(customerType=='current'&&customerID ||
customerType=='guest'&&guest_name&&!guest_surnameActive&&!guest_emailActive ||
customerType=='guest'&&guest_name&&guest_surnameActive&&guest_surname&&!guest_emailActive ||
customerType=='guest'&&guest_name&&guest_emailActive&&guest_email&&!guest_surnameActive ||
customerType=='guest'&&guest_name&&guest_emailActive&&guest_email&&guest_surnameActive&&guest_surname){
SubmitRequestAppointment.currentUserOrGuest();
}
if(customerType=='new'&&name&&email&&password){
if(!surnameActive||surnameActive&&surname){
SubmitRequestAppointment.newUser();
}}
});
var SubmitRequestAppointment={
formSelector: '#newAppointmentForm',
formBtnRequestSelector: '.booked-form input#submit-request-appointment',
formStatusSelector: 'p.status',
formSubmitBtnSelector: '#submit-request-appointment',
apptContainerSelector: '.booked-appointment-details',
baseFields: 	[ 'guest_name','guest_surname','guest_email','action', 'customer_type', 'user_id' ],
apptFields: 	[ 'appoinment', 'calendar_id', 'title', 'date', 'timestamp', 'timeslot' ],
userFields: 	[ 'booked_appt_name','booked_appt_surname','booked_appt_email', 'booked_appt_password' ],
captchaFields: 	[ 'captcha_word', 'captcha_code' ],
currentApptIndex: false,
currentApptCounter: false,
hasAnyErrors: false,
currentUserOrGuest: function(){
var total_appts=SubmitRequestAppointment._totalAppts();
if(! total_appts){
return;
}
SubmitRequestAppointment._showLoadingMessage();
SubmitRequestAppointment._resetDefaultValues();
var data=SubmitRequestAppointment._getBaseData();
SubmitRequestAppointment.currentApptIndex=0;
SubmitRequestAppointment.currentApptCounter=1;
SubmitRequestAppointment._doRequestAppointment(data, total_appts);
},
newUser: function(){
var total_appts=SubmitRequestAppointment._totalAppts();
if(! total_appts){
return;
}
SubmitRequestAppointment._showLoadingMessage();
SubmitRequestAppointment._resetDefaultValues();
var data=SubmitRequestAppointment._getBaseData();
if(total_appts > 1){
var data_obj_with_no_reference=null;
data_obj_with_no_reference=$.extend(true, {}, data);
data_obj_with_no_reference=SubmitRequestAppointment._addUserRegistrationData(data_obj_with_no_reference);
SubmitRequestAppointment._requestUserRegistration(data_obj_with_no_reference);
data.customer_type='current';
}else{
data=SubmitRequestAppointment._addUserRegistrationData(data);
}
SubmitRequestAppointment.currentApptIndex=0;
SubmitRequestAppointment._doRequestAppointment(data, total_appts);
},
_doRequestAppointment: function(data, total_appts){
var appt_fields=SubmitRequestAppointment.apptFields;
if(SubmitRequestAppointment.currentApptIndex===0){
SubmitRequestAppointment._hideCancelBtn();
SubmitRequestAppointment._disableSubmitBtn();
SubmitRequestAppointment.hasAnyErrors=false;
}
var data_obj_with_no_reference=$.extend(true, {}, data);
for (var i=0; i < appt_fields.length; i++){
data_obj_with_no_reference[ appt_fields[i] ]=SubmitRequestAppointment._getFieldVal(appt_fields[i], SubmitRequestAppointment.currentApptIndex);
}
var calendar_id=SubmitRequestAppointment._getFieldVal('calendar_id', SubmitRequestAppointment.currentApptIndex);
data_obj_with_no_reference=SubmitRequestAppointment._addCustomFieldsData(data_obj_with_no_reference, calendar_id);
var $appt=SubmitRequestAppointment._getApptElement(SubmitRequestAppointment.currentApptIndex);
if(! $appt.hasClass('skip')){
$.ajax({
type:'post',
url:booked_js_vars.ajax_url,
data:data_obj_with_no_reference,
success:function(response){
SubmitRequestAppointment._requestAppointmentResponseHandler(response);
SubmitRequestAppointment.currentApptIndex++;
setTimeout(function(){
if(SubmitRequestAppointment.currentApptCounter===total_appts){
if(! SubmitRequestAppointment.hasAnyErrors){
SubmitRequestAppointment._onAfterRequestAppointment();
}else{
SubmitRequestAppointment._enableSubmitBtn();
SubmitRequestAppointment._showCancelBtn();
}}else{
SubmitRequestAppointment.currentApptCounter++;
SubmitRequestAppointment._doRequestAppointment(data, total_appts);
}}, 100);
}});
}else{
SubmitRequestAppointment.currentApptIndex++;
SubmitRequestAppointment.currentApptCounter++;
SubmitRequestAppointment._doRequestAppointment(data, total_appts, SubmitRequestAppointment.currentApptIndex);
}},
_totalAppts: function(){
return $(SubmitRequestAppointment.formSelector + ' input[name="appoinment[]"]').length;
},
_getBaseData: function(){
var data={},
fields=SubmitRequestAppointment.baseFields;
for(var i=0; i < fields.length; i++){
data[ fields[i] ]=SubmitRequestAppointment._getFieldVal(fields[i]);
}
data['nonce']=booked_js_vars.nonce;
data['is_fe_form']=true;
data['total_appts']=SubmitRequestAppointment._totalAppts();
return data;
},
_getFieldVal: function(field_name, field_index){
var field_name=typeof field_name==='undefined' ? '':field_name,
field_index=typeof field_index==='undefined' ? false:field_index,
selector=SubmitRequestAppointment.formSelector + ' ';
if(field_index===false){
selector +=' [name=' + field_name + ']';
return $(selector).val();
}
selector +=' [name="' + field_name + '[]"]';
return $(selector).eq(field_index).val();
},
_resetDefaultValues: function(){
$('.booked-form input').each(function(){
var thisVal=$(this).val(),
thisDefault=$(this).attr('title');
if(thisDefault==thisVal){
$(this).val('');
}});
},
_resetToDefaultValues: function(){
$('.booked-form input').each(function(){
var thisVal=$(this).val(),
thisDefault=$(this).attr('title');
if(! thisVal){
$(this).val(thisDefault);
}});
},
_addUserRegistrationData: function(data){
$.each(SubmitRequestAppointment.userFields, function(index, field_name){
data[ field_name ]=SubmitRequestAppointment._getFieldVal(field_name);
});
$.each(SubmitRequestAppointment.captchaFields, function(index, field_name){
var field_value=SubmitRequestAppointment._getFieldVal(field_name);
if(! field_value){
return;
}
data[ field_name ]=field_value;
});
return data;
},
_addCustomFieldsData: function(data, calendar_id){
var custom_fields_data=$('.cf-block [name]')
.filter(function(index){
var $this=$(this);
return parseInt($this.data('calendar-id'))===parseInt(calendar_id)&&$this.attr('name').match(/---\d+/g);
})
.each(function(index){
var $this=$(this),
name=$this.attr('name'),
value=$this.val(),
type=$this.attr('type');
if(! value){
return;
}
if(! name.match(/checkbox|radio+/g)){
data[ name ]=value;
return;
}
if(name.match(/radio+/g)&&$this.is(':checked')){
data[ name ]=value;
return;
}
if(! name.match(/radio+/g)&&typeof data[ name ]==='undefined'||! name.match(/radio+/g)&&data[ name ].constructor!==Array){
data[ name ]=[];
}
if(! $this.is(':checked')){
return;
}
data[ name ].push(value);
});
return data;
},
_requestUserRegistration: function(base_data, appt_index){
$.ajax({
type:'post',
url:booked_js_vars.ajax_url,
data:base_data,
async:false,
success:function(response){
SubmitRequestAppointment._requestUserRegistrationResponseHandler(response);
}});
},
_requestUserRegistrationResponseHandler: function(response){
var response_parts=response.split('###'),
data_result=response_parts[0].substr(response_parts[0].length - 5);
if(data_result==='error'){
return;
}},
_requestAppointment: function(response){
SubmitRequestAppointment._requestAppointmentResponseHandler(response);
},
_requestAppointmentResponseHandler: function(response){
var response_parts=response.split('###'),
data_result=response_parts[0].substr(response_parts[0].length - 5);
if(data_result==='error'){
SubmitRequestAppointment._requestAppointmentOnError(response_parts);
return;
}
SubmitRequestAppointment._requestAppointmentOnSuccess(response_parts);
},
_requestAppointmentOnError: function(response_parts){
var $apptEl=SubmitRequestAppointment._getApptElement();
$(document).trigger("booked-on-requested-appt-error",[$apptEl]);
SubmitRequestAppointment._highlightAppt();
SubmitRequestAppointment._setStatusMsg(response_parts[1]);
SubmitRequestAppointment.hasAnyErrors=true;
resize_booked_modal();
},
_requestAppointmentOnSuccess: function(response_parts){
var $apptEl=SubmitRequestAppointment._getApptElement();
$(document).trigger("booked-on-requested-appt-success",[$apptEl]);
SubmitRequestAppointment._unhighlightAppt();
},
_onAfterRequestAppointment: function(){
var redirectObj={ redirect:false };
var redirect=$(document).trigger("booked-on-requested-appointment",[redirectObj]);
if(redirectObj.redirect){
return;
}
if(booked_js_vars.profilePage){
window.location=booked_js_vars.profilePage;
return;
}
SubmitRequestAppointment._reloadApptsList();
SubmitRequestAppointment._reloadCalendarTable();
},
_setStatusMsg: function(msg){
var form_status_selector=SubmitRequestAppointment.formSelector + ' ' + SubmitRequestAppointment.formStatusSelector;
$(form_status_selector).show().html('<i class="fa-solid fa-triangle-exclamation" style="color:#E35656"></i>&nbsp;&nbsp;&nbsp;' + msg);
},
_getApptElement: function(appt_index){
var appt_index=typeof appt_index==='undefined' ? SubmitRequestAppointment.currentApptIndex:appt_index,
appt_cnt_selector=SubmitRequestAppointment.formSelector + ' ' + SubmitRequestAppointment.apptContainerSelector;
return $(appt_cnt_selector).eq(appt_index);
},
_highlightAppt: function(msg){
var $apptEl=SubmitRequestAppointment._getApptElement();
if(! $apptEl.length){
return;
}
$apptEl.addClass('has-error');
},
_unhighlightAppt: function(msg){
var $apptEl=SubmitRequestAppointment._getApptElement();
if(! $apptEl.length){
return;
}
$apptEl.removeClass('has-error').addClass('skip');
},
_enableSubmitBtn: function(){
var btn_selector=SubmitRequestAppointment.formSelector + ' ' + SubmitRequestAppointment.formSubmitBtnSelector;
$(btn_selector).attr('disabled', false);
},
_disableSubmitBtn: function(){
var btn_selector=SubmitRequestAppointment.formSelector + ' ' + SubmitRequestAppointment.formSubmitBtnSelector;
$(btn_selector).attr('disabled', true);
},
_showCancelBtn: function(){
$(SubmitRequestAppointment.formSelector).find('button.cancel').show();
},
_hideCancelBtn: function(){
$(SubmitRequestAppointment.formSelector).find('button.cancel').hide();
},
_showLoadingMessage: function(){
$('form#newAppointmentForm p.status').show().html('<i class="fa-solid fa-circle-notch fa-spin"></i>&nbsp;&nbsp;&nbsp;' + booked_js_vars.i18n_please_wait);
},
_reloadApptsList: function(){
if(! $('.booked-appt-list').length){
return;
}
$('.booked-appt-list').each(function(){
var $thisApptList=$(this),
date=$thisApptList.attr('data-list-date'),
thisList=$thisApptList.parents('.booked-list-view'),
defaultDate=thisList.attr('data-default'),
calendar_id=parseInt($thisApptList.find('.booked-list-view-nav').attr('data-calendar-id'))||0;
defaultDate=typeof defaultDate==='undefined' ? false:defaultDate;
calendar_id=calendar_id ? calendar_id:0;
thisList.addClass('booked-loading');
var booked_load_list_view_date_booking_options={
'action':'booked_appointment_list_date',
'nonce':booked_js_vars.nonce,
'date':date,
'calendar_id':calendar_id,
'force_default':defaultDate
};
$(document).trigger("booked-before-loading-appointment-list-booking-options");
thisList.spin('booked_top');
$.ajax({
url: booked_js_vars.ajax_url,
type: 'post',
data: booked_load_list_view_date_booking_options,
success: function(html){
thisList.html(html);
close_booked_modal();
init_appt_list_date_picker();
setTimeout(function(){
thisList.removeClass('booked-loading');
},1);
}});
});
},
_reloadCalendarTable: function(){
if(! $('.bc-col.active').length){
return;
}
var $activeTD=$('.bc-col.active'),
activeDate=$activeTD.attr('data-date'),
calendar_id=parseInt($activeTD.parents('table').data('calendar-id'))||0;
booked_load_calendar_date_booking_options={ 'action':'booked_calendar_date','nonce': booked_js_vars.nonce,'date':activeDate, 'calendar_id':calendar_id };
$(document).trigger("booked-before-loading-calendar-booking-options");
$.ajax({
url: booked_js_vars.ajax_url,
type: 'post',
data: booked_load_calendar_date_booking_options,
success: function(html){
$('.bc-row.entryBlock').find('.bc-col').html(html);
close_booked_modal();
$('.bc-row.entryBlock').removeClass('booked-loading');
$('.bc-row.entryBlock').find('.booked-appt-list').hide().fadeIn(300);
$('.bc-row.entryBlock').find('.booked-appt-list').addClass('shown');
adjust_calendar_boxes();
}});
}}
});
function bookedRemoveEmptyTRs(){
$('div.booked-calendar').find('.bc-row.week').each(function(){
if($(this).children().length==0){
$(this).remove();
}});
}
function savingState(show,limit_to){
show=typeof show!=='undefined' ? show:true;
limit_to=typeof limit_to!=='undefined' ? limit_to:false;
if(limit_to){
var $savingStateDIV=limit_to.find('li.active .savingState, .topSavingState.savingState, .calendarSavingState');
var $stuffToHide=limit_to.find('.monthName');
var $stuffToTransparent=limit_to.find('div.booked-calendar .bc-body');
}else{
var $savingStateDIV=$('li.active .savingState, .topSavingState.savingState, .calendarSavingState');
var $stuffToHide=$('.monthName');
var $stuffToTransparent=$('div.booked-calendar .bc-body');
}
if(show){
$savingStateDIV.fadeIn(200);
$stuffToHide.hide();
$stuffToTransparent.animate({'opacity':0.2},100);
}else{
$savingStateDIV.hide();
$stuffToHide.show();
$stuffToTransparent.animate({'opacity':1},0);
}}
$(document).ajaxStop(function(){
savingState(false);
});
function init_appt_list_date_picker(){
$('.booked_list_date_picker').each(function(){
var thisDatePicker=$(this);
var minDateVal=thisDatePicker.parents('.booked-appt-list').attr('data-min-date');
var maxDateVal=thisDatePicker.parents('.booked-appt-list').attr('data-max-date');
if(typeof minDateVal=='undefined'){ var minDateVal=thisDatePicker.attr('data-min-date'); }
thisDatePicker.datepicker({
dateFormat: 'yy-mm-dd',
minDate: minDateVal,
maxDate: maxDateVal,
showAnim: false,
beforeShow: function(input, inst){
$('#ui-datepicker-div').removeClass();
$('#ui-datepicker-div').addClass('booked_custom_date_picker');
},
onClose: function(dateText){
$('.booked_list_date_picker_trigger').removeClass('booked-dp-active');
},
onSelect: function(dateText){
var thisInput=$(this),
date=dateText,
thisList=thisInput.parents('.booked-list-view'),
defaultDate=thisList.attr('data-default'),
calendar_id=thisInput.parents('.booked-list-view-nav').attr('data-calendar-id');
if(typeof defaultDate=='undefined'){ defaultDate=false; }
if(!calendar_id){ calendar_id=0; }
thisList.addClass('booked-loading');
var booked_load_list_view_date_booking_options={
'action':'booked_appointment_list_date',
'nonce':booked_js_vars.nonce,
'date':date,
'calendar_id':calendar_id,
'force_default':defaultDate
};
$(document).trigger("booked-before-loading-appointment-list-booking-options");
thisList.spin('booked_top');
$.ajax({
url: booked_js_vars.ajax_url,
type: 'post',
data: booked_load_list_view_date_booking_options,
success: function(html){
thisList.html(html);
init_appt_list_date_picker();
setTimeout(function(){
thisList.removeClass('booked-loading');
},1);
}});
return false;
}});
});
$('body').on('click','.booked_list_date_picker_trigger',function(e){
e.preventDefault();
if(!$(this).hasClass('booked-dp-active')){
$(this).addClass('booked-dp-active');
$(this).parents('.booked-appt-list').find('.booked_list_date_picker').datepicker('show');
}});
}
var BookedTabs={
bookingModalSelector: '.booked-modal',
tabSelector: '.booked-tabs',
tabNavSelector: '.booked-tabs-nav span',
tabCntSelector: '.booked-tabs-cnt',
Init: function(){
$(document).on('click', this.tabNavSelector, this.tabsNav);
},
tabsNav: function(event){
event.preventDefault();
BookedTabs.switchToTab($(this));
BookedTabs.maybeResizeBookingModal();
},
switchToTab: function(tab_nav_item){
var $nav_item=tab_nav_item,
tab_cnt_class='.' + $nav_item.data('tab-cnt'),
$tabs_container=$nav_item.parents(BookedTabs.tabSelector);
$nav_item
.addClass('active')
.siblings()
.removeClass('active')
$tabs_container
.find(BookedTabs.tabCntSelector + ' ' + tab_cnt_class)
.addClass('active')
.siblings()
.removeClass('active');
},
maybeResizeBookingModal: function(){
if(! $(BookedTabs.bookingModalSelector).length){
return;
}
resize_booked_modal();
}}
})(jQuery, window, document);
function create_booked_modal(){
var windowHeight=jQuery(window).height();
var windowWidth=jQuery(window).width();
if(windowWidth > 720){
var maxModalHeight=windowHeight - 295;
}else{
var maxModalHeight=windowHeight;
}
jQuery('body input, body textarea, body select').blur();
jQuery('body').addClass('booked-noScroll');
jQuery('<div class="booked-modal bm-loading"><div class="bm-overlay"></div><div class="bm-window"><div style="height:100px"></div></div></div>').appendTo('body');
jQuery('.booked-modal .bm-overlay').spin('booked_white');
jQuery('.booked-modal .bm-window').css({'max-height':maxModalHeight+'px'});
}
var previousRealModalHeight=100;
function resize_booked_modal(){
var windowHeight=jQuery(window).height();
var windowWidth=jQuery(window).width();
var common43=43;
if(jQuery('.booked-modal .bm-window .booked-scrollable').length){
var realModalHeight=jQuery('.booked-modal .bm-window .booked-scrollable')[0].scrollHeight;
if(realModalHeight < 100){
realModalHeight=previousRealModalHeight;
}else{
previousRealModalHeight=realModalHeight;
}}else{
var realModalHeight=0;
}
var minimumWindowHeight=realModalHeight + common43 + common43;
var modalScrollableHeight=realModalHeight - common43;
var maxModalHeight;
var maxFormHeight;
if(windowHeight < minimumWindowHeight){
modalScrollableHeight=windowHeight - common43 - common43;
}else{
modalScrollableHeight=realModalHeight;
}
if(windowWidth > 720){
maxModalHeight=modalScrollableHeight - 25;
maxFormHeight=maxModalHeight - 15;
var modalNegMargin=(maxModalHeight + 78) / 2;
}else{
maxModalHeight=windowHeight - common43;
maxFormHeight=maxModalHeight - 60;
var modalNegMargin=(maxModalHeight) / 2;
}
jQuery('.booked-modal').css({'margin-top':'-'+modalNegMargin+'px'});
jQuery('.booked-modal .bm-window').css({'max-height':maxModalHeight+'px'});
jQuery('.booked-modal .bm-window .booked-scrollable').css({'max-height':maxFormHeight+'px'});
}
function close_booked_modal(){
var modal=jQuery('.booked-modal');
modal.fadeOut(200);
modal.addClass('bm-closing');
jQuery('body').removeClass('booked-noScroll');
setTimeout(function(){
modal.remove();
},300);
}
function init_tooltips(container){
jQuery('.tooltipster').tooltipster({
theme: 		'tooltipster-light',
animation:	'grow',
speed:		200,
delay: 		50,
offsetY:	-15
});
}
function adjust_calendar_boxes(){
jQuery('div.booked-calendar').each(function(){
var windowWidth=jQuery(window).width();
var smallCalendar=jQuery(this).parents('.booked-calendar-wrap').hasClass('small');
var boxesWidth=jQuery(this).find('.bc-body .bc-row.week .bc-col').width();
var calendarHeight=jQuery(this).height();
boxesHeight=boxesWidth * 1;
jQuery(this).find('.bc-body .bc-row.week .bc-col').height(boxesHeight);
jQuery(this).find('.bc-body .bc-row.week .bc-col .date').css('line-height',boxesHeight+'px');
jQuery(this).find('.bc-body .bc-row.week .bc-col .date .number').css('line-height',boxesHeight+'px');
if(smallCalendar||windowWidth < 720){
jQuery(this).find('.bc-body .bc-row.week .bc-col .date .number').css('line-height',boxesHeight+'px');
}else{
jQuery(this).find('.bc-body .bc-row.week .bc-col .date .number').css('line-height','');
}
var calendarHeight=jQuery(this).height();
jQuery(this).parent().height(calendarHeight);
});
};
var VamtamAnimatedNumber;
(function(undefined){
VamtamAnimatedNumber=function(settings){
this.nodeClass='.fl-node-' + settings.id;
this.wrapperClass=this.nodeClass + ' .fl-number';
this.layout=settings.layout;
this.type=settings.type;
this.number=settings.number;
this.max=settings.max;
this.speed=settings.speed;
this.wrapper=document.querySelector(this.wrapperClass);
if(this.wrapper){
this.wrapper.VamtamAnimatedNumber=this;
this._initNumber();
}};
if('IntersectionObserver' in window){
VamtamAnimatedNumber.intersectionObserver=new IntersectionObserver(function(entries){
entries.forEach(function(entry){
if(entry.intersectionRatio >=1){
entry.target.VamtamAnimatedNumber._initCount();
VamtamAnimatedNumber.intersectionObserver.unobserve(entry.target);
}});
}, {
threshold: [1]
});
}
VamtamAnimatedNumber.prototype={
nodeClass:'',
wrapperClass:'',
layout:'',
type:'',
number:0,
max:0,
speed:0,
_initNumber: function(){
var self=this;
var numString=this.wrapper.querySelector('.fl-number-int');
if(numString){
numString.innerHTML='0';
}
if(VamtamAnimatedNumber.intersectionObserver){
VamtamAnimatedNumber.intersectionObserver.observe(this.wrapper);
}else{
self._initCount();
}},
_initCount: function(){
if(this.layout=='circle'){
this._triggerCircle();
}else if(this.layout=='bars'){
this._triggerBar();
}
this._countNumber();
},
_countNumber: function(){
this._numberElement=this.wrapper.querySelector('.fl-number-string .fl-number-int');
requestAnimationFrame(this._countNumberStep.bind(this) );
},
_countNumberStep: function(now){
if(! this._numberStart){
this._numberStart=now;
}
var progress=Math.min(1,(now - this._numberStart) / this.speed);
let number=Math.ceil(this.number * progress);
this._numberElement.innerHTML='Intl' in window ? Intl.NumberFormat(document.documentElement.lang, { style: 'decimal' }).format(number):number;
if(progress < 1){
requestAnimationFrame(this._countNumberStep.bind(this) );
}},
_triggerCircle: function(){
var bar=this.wrapper.querySelector('.fl-bar'),
r=parseInt(bar.getAttribute('r'), 10),
circle=Math.PI * (r * 2),
max=this.type=='percent' ? 100:this.max,
val=Math.max(0, Math.min(this.number, max) );
if(this.type=='percent'){
var pct=(( 100 - val) / 100) * circle;
}else{
var pct=(1 -(val / max) ) * circle;
}
requestAnimationFrame(function(){
bar.style.transitionDuration=this.speed + 'ms';
bar.style.strokeDashoffset=pct;
}.bind(this) );
},
_triggerBar: function(){
var bar=this.wrapper.querySelector('.fl-number-bar');
var string=this.wrapper.querySelector('.fl-number-string');
if(this.type=='percent'){
var number=this.number > 100 ? 100:this.number;
}else{
var number=Math.ceil(( this.number / this.max) * 100);
}
var number_inside = !! this.wrapper.querySelector('.fl-number-position-default');
requestAnimationFrame(function(){
bar.style.transitionDuration=this.speed + 'ms';
bar.style.transform='scaleX(' +(this.number / this.max) + ')';
if(number_inside){
string.style.transitionDuration=this.speed + 'ms';
string.style.transform='translateX(' + 100 *(this.number / this.max - 1) + '%)';
}}.bind(this) );
}};})();
(function($){
FLBuilderPhoto=function(settings){
this.settings=settings;
this.nodeClass='.fl-node-' + settings.id;
this.image=$(this.nodeClass + ' .fl-photo-img');
this.caption=$(this.nodeClass + ' .fl-photo-caption');
this.usesLightbox=this.image.data('link-type')==='lightbox';
this._init();
};
FLBuilderPhoto.prototype={
settings:{},
nodeClass:'',
image:null,
_init: function(){
this.image
.on('mouseenter', function(e){
$(this).data('title', $(this).attr('title') ).removeAttr('title');
})
.on('mouseleave', function(e){
$(this).attr('title', $(this).data('title') ).data('title', null);
});
if(this.usesLightbox){
this._doLightbox();
}},
_doLightbox: function (){
const _self=this;
if(typeof $.fn.magnificPopup!=='undefined'){
$(`.fl-node-${ this.settings.id } a`).magnificPopup({
type: 'image',
closeOnContentClick: true,
closeBtnInside: false,
tLoading: '',
preloader: true,
image: {
titleSrc: function(item){
if(_self.caption){
return _self.caption.text();
}}
},
callbacks: {
open: function(){
$('.mfp-preloader').html('<i class="fas fa-spinner fa-spin fa-3x fa-fw"></i>');
}}
});
}},
}
function initFlPhotos(){
const photoModules=document.querySelectorAll('.fl-module-photo');
photoModules.forEach(photo=> {
const id=photo.dataset.node;
new FLBuilderPhoto( {
id: id,
})
});
}
document.addEventListener('DOMContentLoaded', function(){
if(window.FLBuilder){
FLBuilder.addHook('didCompleteAJAX', initFlPhotos);
FLBuilder.addHook('didRenderLayoutComplete', initFlPhotos);
}
initFlPhotos();
});
})(jQuery);
var wpAjaxUrl='https://casanati.com/wp-admin/admin-ajax.php';var flBuilderUrl='https://casanati.com/wp-content/plugins/beaver-builder-lite-version/';var FLBuilderLayoutConfig={anchorLinkAnimations:{duration:1000,easing:'swing',offset:100},paths:{pluginUrl:'https://casanati.com/wp-content/plugins/beaver-builder-lite-version/',wpAjaxUrl:'https://casanati.com/wp-admin/admin-ajax.php'},breakpoints:{small:768,medium:992,large:1200},waypoint:{offset:80},emptyColWidth:'0%'};(function($){if(typeof FLBuilderLayout!='undefined'){return;}
FLBuilderLayout={init:function(){FLBuilderLayout._destroy();FLBuilderLayout._initClasses();FLBuilderLayout._initBackgrounds();FLBuilderLayout._initRowShapeLayerHeight();if(0===$('.fl-builder-edit').length){FLBuilderLayout._initAnchorLinks();FLBuilderLayout._initHash();FLBuilderLayout._initForms();FLBuilderLayout._reorderMenu();}else{FLBuilderLayout._initNestedColsWidth();}
$('body').removeClass('fl-no-js');},refreshGalleries:function(element){var $element='undefined'==typeof element?$('body'):$(element),mfContent=$element.find('.fl-mosaicflow-content'),wmContent=$element.find('.fl-gallery'),mfObject=null;if(mfContent){mfObject=mfContent.data('mosaicflow');if(mfObject){mfObject.columns=$([]);mfObject.columnsHeights=[];mfContent.data('mosaicflow',mfObject);mfContent.mosaicflow('refill');}}
if(wmContent){wmContent.trigger('refreshWookmark');}},refreshGridLayout:function(element){var $element='undefined'==typeof element?$('body'):$(element),msnryContent=$element.find('.masonry');if(msnryContent.length){msnryContent.masonry('layout');}},reloadSlider:function(content){var $content='undefined'==typeof content?$('body'):$(content);if($content.find('.bx-viewport > div').length>0){$.each($content.find('.bx-viewport > div'),function(key,slider){setTimeout(function(){$(slider).data('bxSlider').reloadSlider();},100);});}},resizeAudio:function(element){var $element='undefined'==typeof element?$('body'):$(element),audioPlayers=$element.find('.wp-audio-shortcode.mejs-audio'),player=null,mejsPlayer=null,rail=null,railWidth=400;if(audioPlayers.length&&typeof mejs!=='undefined'){audioPlayers.each(function(){player=$(this);mejsPlayer=mejs.players[player.attr('id')];rail=player.find('.mejs-controls .mejs-time-rail');var innerMejs=player.find('.mejs-inner'),total=player.find('.mejs-controls .mejs-time-total');if(typeof mejsPlayer!=='undefined'){railWidth=Math.ceil(player.width()*0.8);if(innerMejs.length){rail.css('width',railWidth+'px!important');mejsPlayer.options.autosizeProgress=true;setTimeout(function(){mejsPlayer.setControlsSize();},50);player.find('.mejs-inner').css({visibility:'visible',height:'inherit'});}}});}},preloadAudio:function(element){var $element='undefined'==typeof element?$('body'):$(element),contentWrap=$element.closest('.fl-accordion-item'),audioPlayers=$element.find('.wp-audio-shortcode.mejs-audio');if(!contentWrap.hasClass('fl-accordion-item-active')&&audioPlayers.find('.mejs-inner').length){audioPlayers.find('.mejs-inner').css({visibility:'hidden',height:0});}},resizeSlideshow:function(){if(typeof YUI!=='undefined'){YUI().use('node-event-simulate',function(Y){Y.one(window).simulate("resize");});}},reloadGoogleMap:function(element){var $element='undefined'==typeof element?$('body'):$(element),googleMap=$element.find('iframe[src*="google.com/maps"]');if(googleMap.length){googleMap.attr('src',function(i,val){return val;});}},_destroy:function(){var win=$(window);win.off('scroll.fl-bg-parallax');win.off('resize.fl-bg-video');},_isTouch:function(){if(('ontouchstart'in window)||(window.DocumentTouch&&document instanceof DocumentTouch)){return true;}
return false;},_isMobile:function(){return/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent);},_initClasses:function(){var body=$('body'),ua=navigator.userAgent;if(!body.hasClass('archive')&&$('.fl-builder-content-primary').length>0){body.addClass('fl-builder');}
if(FLBuilderLayout._isTouch()){body.addClass('fl-builder-touch');}
if(FLBuilderLayout._isMobile()){body.addClass('fl-builder-mobile');}
if($(window).width()<FLBuilderLayoutConfig.breakpoints.small){body.addClass('fl-builder-breakpoint-small');}
if($(window).width()>FLBuilderLayoutConfig.breakpoints.small&&$(window).width()<FLBuilderLayoutConfig.breakpoints.medium){body.addClass('fl-builder-breakpoint-medium');}
if($(window).width()>FLBuilderLayoutConfig.breakpoints.medium&&$(window).width()<FLBuilderLayoutConfig.breakpoints.large){body.addClass('fl-builder-breakpoint-large');}
if($(window).width()>FLBuilderLayoutConfig.breakpoints.large){body.addClass('fl-builder-breakpoint-default');}
if(ua.indexOf('Trident/7.0')>-1&&ua.indexOf('rv:11.0')>-1){body.addClass('fl-builder-ie-11');}},_initBackgrounds:function(){var win=$(window);if($('.fl-row-bg-parallax').length>0&&!FLBuilderLayout._isMobile()){FLBuilderLayout._scrollParallaxBackgrounds();FLBuilderLayout._initParallaxBackgrounds();win.on('resize.fl-bg-parallax',FLBuilderLayout._initParallaxBackgrounds);win.on('scroll.fl-bg-parallax',FLBuilderLayout._scrollParallaxBackgrounds);}
if($('.fl-bg-video').length>0){FLBuilderLayout._initBgVideos();FLBuilderLayout._resizeBgVideos();var resizeBGTimer=null;win.on('resize.fl-bg-video',function(e){clearTimeout(resizeBGTimer);resizeBGTimer=setTimeout(function(){FLBuilderLayout._resizeBgVideos(e);},100);});}},_initParallaxBackgrounds:function(){$('.fl-row-bg-parallax').each(FLBuilderLayout._initParallaxBackground);},_initParallaxBackground:function(){var row=$(this),content=row.find('> .fl-row-content-wrap'),winWidth=$(window).width(),screenSize='',imageSrc={default:'',medium:'',responsive:'',};imageSrc.default=row.data('parallax-image')||'';imageSrc.medium=row.data('parallax-image-medium')||imageSrc.default;imageSrc.responsive=row.data('parallax-image-responsive')||imageSrc.medium;if(winWidth>FLBuilderLayoutConfig.breakpoints.medium){screenSize='default';}else if(winWidth>FLBuilderLayoutConfig.breakpoints.small&&winWidth<=FLBuilderLayoutConfig.breakpoints.medium){screenSize='medium';}else if(winWidth<=FLBuilderLayoutConfig.breakpoints.small){screenSize='responsive';}
content.css('background-image','url('+imageSrc[screenSize]+')');row.data('current-image-loaded',screenSize);},_scrollParallaxBackgrounds:function(){$('.fl-row-bg-parallax').each(FLBuilderLayout._scrollParallaxBackground);},_scrollParallaxBackground:function(){var win=$(window),row=$(this),content=row.find('> .fl-row-content-wrap'),speed=row.data('parallax-speed'),offset=content.offset(),yPos=-((win.scrollTop()-offset.top)/ speed),initialOffset=(row.data('parallax-offset')!=null)?row.data('parallax-offset'):0,totalOffset=yPos-initialOffset;content.css('background-position','center '+totalOffset+'px');},_initBgVideos:function(){$('.fl-bg-video').each(FLBuilderLayout._initBgVideo);},_initBgVideo:function(){var wrap=$(this),width=wrap.data('width'),height=wrap.data('height'),mp4=wrap.data('mp4'),youtube=wrap.data('youtube'),vimeo=wrap.data('vimeo'),mp4Type=wrap.data('mp4-type'),webm=wrap.data('webm'),webmType=wrap.data('webm-type'),fallback=wrap.data('fallback'),loaded=wrap.data('loaded'),videoMobile=wrap.data('video-mobile'),fallbackTag='',videoTag=null,mp4Tag=null,webmTag=null;if(loaded){return;}
videoTag=$('<video autoplay loop muted playsinline></video>');if('undefined'!=typeof fallback&&''!=fallback){videoTag.attr('poster','data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')
videoTag.css({backgroundImage:'url("'+fallback+'")',backgroundColor:'transparent',backgroundRepeat:'no-repeat',backgroundSize:'cover',backgroundPosition:'center center',})}
if('undefined'!=typeof mp4&&''!=mp4){mp4Tag=$('<source />');mp4Tag.attr('src',mp4);mp4Tag.attr('type',mp4Type);videoTag.append(mp4Tag);}
if('undefined'!=typeof webm&&''!=webm){webmTag=$('<source />');webmTag.attr('src',webm);webmTag.attr('type',webmType);videoTag.append(webmTag);}
if(!FLBuilderLayout._isMobile()||(FLBuilderLayout._isMobile()&&"yes"==videoMobile)){if('undefined'!=typeof youtube){FLBuilderLayout._initYoutubeBgVideo.apply(this);}
else if('undefined'!=typeof vimeo){FLBuilderLayout._initVimeoBgVideo.apply(this);}else{wrap.append(videoTag);}}else{videoTag.attr('src','')
wrap.append(videoTag);}
wrap.data('loaded',true);},_initYoutubeBgVideo:function(){var playerWrap=$(this),videoId=playerWrap.data('video-id'),videoPlayer=playerWrap.find('.fl-bg-video-player'),enableAudio=playerWrap.data('enable-audio'),audioButton=playerWrap.find('.fl-bg-video-audio'),startTime='undefined'!==typeof playerWrap.data('start')?playerWrap.data('start'):0,startTime='undefined'!==typeof playerWrap.data('t')&&startTime===0?playerWrap.data('t'):startTime,endTime='undefined'!==typeof playerWrap.data('end')?playerWrap.data('end'):0,loop='undefined'!==typeof playerWrap.data('loop')?playerWrap.data('loop'):1,stateCount=0,player,fallback_showing;if(videoId){fallback=playerWrap.data('fallback')||false
if(fallback){playerWrap.find('iframe').remove()
fallbackTag=$('<div></div>');fallbackTag.addClass('fl-bg-video-fallback');fallbackTag.css('background-image','url('+playerWrap.data('fallback')+')');fallbackTag.css('background-size','cover');fallbackTag.css('transition','background-image 1s')
playerWrap.append(fallbackTag);fallback_showing=true;}
FLBuilderLayout._onYoutubeApiReady(function(YT){setTimeout(function(){player=new YT.Player(videoPlayer[0],{videoId:videoId,events:{onReady:function(event){if("no"===enableAudio||FLBuilderLayout._isMobile()){event.target.mute();}
else if("yes"===enableAudio&&event.target.isMuted){event.target.unMute();}
playerWrap.data('YTPlayer',player);FLBuilderLayout._resizeYoutubeBgVideo.apply(playerWrap);event.target.playVideo();if(audioButton.length>0&&!FLBuilderLayout._isMobile()){audioButton.on('click',{button:audioButton,player:player},FLBuilderLayout._toggleBgVideoAudio);}},onStateChange:function(event){if(event.data===1){if(fallback_showing){$('.fl-bg-video-fallback').css('background-image','url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)')}}
if(stateCount<4){stateCount++;}
if(stateCount>1&&(-1===event.data||2===event.data)&&"yes"===enableAudio){player.mute();player.playVideo();audioButton.show();}
if(event.data===YT.PlayerState.ENDED&&1===loop){if(startTime>0){player.seekTo(startTime);}else{player.playVideo();}}},onError:function(event){console.info('YT Error: '+event.data)
FLBuilderLayout._onErrorYoutubeVimeo(playerWrap)}},playerVars:{playsinline:FLBuilderLayout._isMobile()?1:0,controls:0,showinfo:0,rel:0,start:startTime,end:endTime,}});},1);});}},_onErrorYoutubeVimeo:function(playerWrap){fallback=playerWrap.data('fallback')||false
if(!fallback){return false;}
playerWrap.find('iframe').remove()
fallbackTag=$('<div></div>');fallbackTag.addClass('fl-bg-video-fallback');fallbackTag.css('background-image','url('+playerWrap.data('fallback')+')');playerWrap.append(fallbackTag);},_onYoutubeApiReady:function(callback){if(window.YT&&YT.loaded){callback(YT);}else{setTimeout(function(){FLBuilderLayout._onYoutubeApiReady(callback);},350);}},_initVimeoBgVideo:function(){var playerWrap=$(this),videoId=playerWrap.data('video-id'),videoHash=playerWrap.data('video-hash'),videoPlayer=playerWrap.find('.fl-bg-video-player'),enableAudio=playerWrap.data('enable-audio'),audioButton=playerWrap.find('.fl-bg-video-audio'),player,width=playerWrap.outerWidth(),ua=navigator.userAgent;if(typeof Vimeo!=='undefined'&&videoId){const vimOptions={loop:true,title:false,portrait:false,background:true,autopause:false,muted:true,};if(videoHash.length){vimOptions.url=`https://player.vimeo.com/video/${ videoId }?h=${ videoHash }`;}else{vimOptions.id=videoId;}
player=new Vimeo.Player(videoPlayer[0],vimOptions);playerWrap.data('VMPlayer',player);if("no"===enableAudio){player.setVolume(0);}
else if("yes"===enableAudio){if(ua.indexOf("Safari")>-1||ua.indexOf("Chrome")>-1||ua.indexOf("Firefox")>-1){player.setVolume(0);audioButton.show();}else{player.setVolume(1);}}
player.play().catch(function(error){FLBuilderLayout._onErrorYoutubeVimeo(playerWrap)});if(audioButton.length>0){audioButton.on('click',{button:audioButton,player:player},FLBuilderLayout._toggleBgVideoAudio);}}},_toggleBgVideoAudio:function(e){var player=e.data.player,control=e.data.button.find('.fl-audio-control');if(control.hasClass('fa-volume-off')){control.removeClass('fa-volume-off').addClass('fa-volume-up');e.data.button.find('.fa-times').hide();if('function'===typeof player.unMute){player.unMute();}else{player.setVolume(1);}}else{control.removeClass('fa-volume-up').addClass('fa-volume-off');e.data.button.find('.fa-times').show();if('function'===typeof player.unMute){player.mute();}else{player.setVolume(0);}}},_videoBgSourceError:function(e){var source=$(e.target),wrap=source.closest('.fl-bg-video'),vid=wrap.find('video'),fallback=wrap.data('fallback'),fallbackTag='';source.remove();if(vid.find('source').length){return;}else if(''!==fallback){fallbackTag=$('<div></div>');fallbackTag.addClass('fl-bg-video-fallback');fallbackTag.css('background-image','url('+fallback+')');wrap.append(fallbackTag);vid.remove();}},_resizeBgVideos:function(){$('.fl-bg-video').each(function(){FLBuilderLayout._resizeBgVideo.apply(this);if($(this).parent().find('img').length>0){$(this).parent().imagesLoaded($.proxy(FLBuilderLayout._resizeBgVideo,this));}});},_resizeBgVideo:function(){if(0===$(this).find('video').length&&0===$(this).find('iframe').length){return;}
var wrap=$(this),wrapHeight=wrap.outerHeight(),wrapWidth=wrap.outerWidth(),vid=wrap.find('video'),vidHeight=wrap.data('height'),vidWidth=wrap.data('width'),newWidth=wrapWidth,newHeight=Math.round(vidHeight*wrapWidth/vidWidth),newLeft=0,newTop=0,iframe=wrap.find('iframe'),isRowFullHeight=$(this).closest('.fl-row-bg-video').hasClass('fl-row-full-height'),vidCSS={top:'50%',left:'50%',transform:'translate(-50%,-50%)',};if(vid.length){if(vidHeight===''||typeof vidHeight==='undefined'||vidWidth===''||typeof vidWidth==='undefined'){vid.css({'left':'0px','top':'0px','width':newWidth+'px'});vid.on('loadedmetadata',FLBuilderLayout._resizeOnLoadedMeta);return;}
if(!isRowFullHeight){if(newHeight<wrapHeight){newHeight=wrapHeight;newLeft=-((newWidth-wrapWidth)/ 2);newWidth=vidHeight?Math.round(vidWidth*wrapHeight/vidHeight):newWidth;}else{newTop=-((newHeight-wrapHeight)/2);}
vidCSS={left:newLeft+'px',top:newTop+'px',height:newHeight+'px',width:newWidth+'px',}}
vid.css(vidCSS);}
else if(iframe.length){if(typeof wrap.data('youtube')!=='undefined'){FLBuilderLayout._resizeYoutubeBgVideo.apply(this);}}},_resizeOnLoadedMeta:function(){var video=$(this),wrapHeight=video.parent().outerHeight(),wrapWidth=video.parent().outerWidth(),vidWidth=video[0].videoWidth,vidHeight=video[0].videoHeight,newHeight=Math.round(vidHeight*wrapWidth/vidWidth),newWidth=wrapWidth,newLeft=0,newTop=0;if(newHeight<wrapHeight){newHeight=wrapHeight;newWidth=Math.round(vidWidth*wrapHeight/vidHeight);newLeft=-((newWidth-wrapWidth)/2);}else{newTop=-((newHeight-wrapHeight)/2);}
video.parent().data('width',vidWidth);video.parent().data('height',vidHeight);video.css({'left':newLeft+'px','top':newTop+'px','width':newWidth+'px','height':newHeight+'px'});},_resizeYoutubeBgVideo:function(){var wrap=$(this),wrapWidth=wrap.outerWidth(),wrapHeight=wrap.outerHeight(),player=wrap.data('YTPlayer'),video=player?player.getIframe():null,aspectRatioSetting='16:9',aspectRatioArray=aspectRatioSetting.split(':'),aspectRatio=aspectRatioArray[0]/ aspectRatioArray[1],ratioWidth=wrapWidth / aspectRatio,ratioHeight=wrapHeight*aspectRatio,isWidthFixed=wrapWidth / wrapHeight>aspectRatio,width=isWidthFixed?wrapWidth:ratioHeight,height=isWidthFixed?ratioWidth:wrapHeight;if(video){$(video).width(width).height(height);}},_initHash:function(){var hash=window.location.hash.replace('#','').split('/').shift(),element=null,tabs=null,responsiveLabel=null,tabIndex=null,label=null;if(''!==hash){try{element=$('#'+hash);if(element.length>0){if(element.hasClass('fl-accordion-item')){setTimeout(function(){element.find('.fl-accordion-button').trigger('click');},100);}
if(element.hasClass('fl-tabs-panel')){setTimeout(function(){tabs=element.closest('.fl-tabs');responsiveLabel=element.find('.fl-tabs-panel-label');tabIndex=responsiveLabel.data('index');label=tabs.find('.fl-tabs-labels .fl-tabs-label[data-index='+tabIndex+']');label[0].click();FLBuilderLayout._scrollToElement(element);},100);}}}
catch(e){}}},_initAnchorLinks:function(){$('a').each(FLBuilderLayout._initAnchorLink);},_initAnchorLink:function(){var link=$(this),href=link.attr('href'),loc=window.location,id=null,element=null,flNode=false;if('undefined'!=typeof href&&href.indexOf('#')>-1&&link.closest('svg').length<1){if(loc.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&loc.hostname==this.hostname){try{id=href.split('#').pop();if(!id){return;}
element=$('#'+id);if(element.length>0){flNode=element.hasClass('fl-row')||element.hasClass('fl-col')||element.hasClass('fl-module');if(!element.hasClass('fl-no-scroll')&&(link.hasClass('fl-scroll-link')||flNode)){$(link).on('click',FLBuilderLayout._scrollToElementOnLinkClick);}
if(element.hasClass('fl-accordion-item')){$(link).on('click',FLBuilderLayout._scrollToAccordionOnLinkClick);}
if(element.hasClass('fl-tabs-panel')){$(link).on('click',FLBuilderLayout._scrollToTabOnLinkClick);}}}
catch(e){}}}},_scrollToElementOnLinkClick:function(e,callback){var element=$('#'+$(this).attr('href').split('#').pop());FLBuilderLayout._scrollToElement(element,callback);e.preventDefault();},_scrollToElement:function(element,callback){var config=FLBuilderLayoutConfig.anchorLinkAnimations,dest=0,win=$(window),doc=$(document);if(element.length>0){if('fixed'===element.css('position')||'fixed'===element.parent().css('position')){dest=element.position().top;}
else if(element.offset().top>doc.height()-win.height()){dest=doc.height()-win.height();}else{dest=element.offset().top-config.offset;}
$('html, body').stop(true).animate({scrollTop:dest},config.duration,config.easing,function(){if('undefined'!=typeof callback){callback();}
if(undefined!=element.attr('id')&&window.location.hash!=='#'+element.attr('id')){var firefox_version=window.navigator.userAgent.match(/Firefox\/(\d+)\./),firefox_version=firefox_version?parseInt(firefox_version[1],10):null;if(firefox_version!==null&&firefox_version<135){window.location.hash=element.attr('id');}else{if(history.pushState){history.pushState(null,null,'#'+element.attr('id'));}else{window.location.hash=element.attr('id');}}}});}},_scrollToAccordionOnLinkClick:function(e){var element=$('#'+$(this).attr('href').split('#').pop());if(element.length>0){var callback=function(){if(element){element.find('.fl-accordion-button').trigger('click');element=false;}};FLBuilderLayout._scrollToElementOnLinkClick.call(this,e,callback);}},_scrollToTabOnLinkClick:function(e){var element=$('#'+$(this).attr('href').split('#').pop()),tabs=null,label=null,responsiveLabel=null;if(element.length>0){tabs=element.closest('.fl-tabs');responsiveLabel=element.find('.fl-tabs-panel-label');tabIndex=responsiveLabel.data('index');label=tabs.find('.fl-tabs-labels .fl-tabs-label[data-index='+tabIndex+']');if(responsiveLabel.is(':visible')){var callback=function(){if(element){responsiveLabel.trigger($.Event('click',{which:1}));}};FLBuilderLayout._scrollToElementOnLinkClick.call(this,e,callback);}else{label[0].click();FLBuilderLayout._scrollToElement(element);}
e.preventDefault();}},_initForms:function(){if(!FLBuilderLayout._hasPlaceholderSupport){$('.fl-form-field input').each(FLBuilderLayout._initFormFieldPlaceholderFallback);}
$('.fl-form-field input').on('focus',FLBuilderLayout._clearFormFieldError);},_hasPlaceholderSupport:function(){var input=document.createElement('input');return'undefined'!=input.placeholder;},_initFormFieldPlaceholderFallback:function(){var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if('undefined'!=placeholder&&''===val){field.val(placeholder);field.on('focus',FLBuilderLayout._hideFormFieldPlaceholderFallback);field.on('blur',FLBuilderLayout._showFormFieldPlaceholderFallback);}},_hideFormFieldPlaceholderFallback:function(){var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if(val==placeholder){field.val('');}},_showFormFieldPlaceholderFallback:function(){var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if(''===val){field.val(placeholder);}},_clearFormFieldError:function(){var field=$(this);field.removeClass('fl-form-error');field.siblings('.fl-form-error-message').hide();},_initRowShapeLayerHeight:function(){FLBuilderLayout._adjustRowShapeLayerHeight();$(window).on('resize',FLBuilderLayout._adjustRowShapeLayerHeight);},_initNestedColsWidth:function(){var nestedCols=$('.fl-col-has-cols');if(nestedCols.length<=0){return;}
$(nestedCols).each(function(index,col){if($(col).width()<=0){$(col).css('width',FLBuilderLayoutConfig.emptyColWidth);}});},_adjustRowShapeLayerHeight:function(){var rowShapeLayers=$('.fl-builder-shape-layer');$(rowShapeLayers).each(function(index){var rowShapeLayer=$(this),shape=$(rowShapeLayer).find('svg'),height=shape.height(),excludeShapes='.fl-builder-shape-circle, .fl-builder-shape-dot-cluster, .fl-builder-shape-topography, .fl-builder-shape-rect';if(!rowShapeLayer.is(excludeShapes)){$(shape).css('height',Math.ceil(height));}});},_string_to_slug:function(str){str=str.replace(/^\s+|\s+$/g,'');if('undefined'==typeof window._fl_string_to_slug_regex){regex=new RegExp('[^a-zA-Z0-9\'":() !.,-_|]','g');}else{regex=new RegExp('[^'+window._fl_string_to_slug_regex+'\'":\(\) !.,-_|\\\p{Letter}]','ug');}
str=str.replace(regex,'').replace(/\s+/g,' ');return str;},_reorderMenu:function(){if($('#wp-admin-bar-fl-builder-frontend-edit-link-default li').length>1){$('#wp-admin-bar-fl-builder-frontend-duplicate-link').appendTo('#wp-admin-bar-fl-builder-frontend-edit-link-default').css('padding-top','5px').css('border-top','2px solid #1D2125').css('margin-top','5px')}}};$(function(){FLBuilderLayout.init();});})(jQuery);(function($){if(typeof FLBuilderLayoutModules!=='undefined'){return;}
FLBuilderLayoutModules={init:function(){if(0===$('.fl-builder-edit').length){FLBuilderLayoutModules._initModuleAnimations();}},_initModuleAnimations:function(){if(typeof jQuery.fn.waypoint!=='undefined'){$('.fl-animation').each(function(){var node=$(this),nodeTop=node.offset().top,winHeight=$(window).height(),bodyHeight=$('body').height(),waypoint=FLBuilderLayoutConfig.waypoint,offset='80%';if(typeof waypoint.offset!==undefined){offset=FLBuilderLayoutConfig.waypoint.offset+'%';}
if(bodyHeight-nodeTop<winHeight*0.2){offset='100%';}
node.waypoint({offset:offset,handler:FLBuilderLayoutModules._doModuleAnimation});});}},_doModuleAnimation:function(){var module='undefined'==typeof this.element?$(this):$(this.element),delay=parseFloat(module.data('animation-delay')),duration=parseFloat(module.data('animation-duration'));if(!isNaN(duration)){module.css('animation-duration',duration+'s');}
if(!isNaN(delay)&&delay>0){setTimeout(function(){module.addClass('fl-animated');},delay*1000);}else{setTimeout(function(){module.addClass('fl-animated');},1);}}};$(function(){FLBuilderLayoutModules.init();});})(jQuery);(function($){$(function(){new VamtamAnimatedNumber({id:'59ac9c28d3781',layout:'default',type:'standard',number:100,max:100,speed:1000,});});})(jQuery);(function($){$(function(){new VamtamAnimatedNumber({id:'59ac9d42b82d3',layout:'default',type:'standard',number:4,max:4,speed:1000,});});})(jQuery);(function($){$(function(){new VamtamAnimatedNumber({id:'59ac9d04129a2',layout:'default',type:'standard',number:400,max:400,speed:1000,});});})(jQuery);