<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">// jQuery START --&gt;
jQuery.noConflict();
jQuery(document).ready(function($) {
	// geocomplete
	// jQuery('#element_id').geocomplete();

	/*
	// caleran date picker
	jQuery('#qc_date').caleran({
	
		// target					: jQuery('#contact_form_callback_hidden'),
		showOn					:'bottom',
		autoAlign				: true,
		autoCloseOnSelect		: false, 
		format					: 'dddd, Do MMMM YYYY',
		showHeader				: false,
		showFooter				: true,
		inline					: false,
		singleDate				: false,
		calendarCount			: 2,
		oneCalendarWidth		: 220,
		locale					: jQuery('#website_current_language_short').val(),
		enableMonthSwitcher		: false,
		enableYearSwitcher 		: false,
		// icons
		prevMonthIcon			: '&lt;i class="fal fa-chevron-left"&gt;&lt;/i&gt;',
		nextMonthIcon			: '&lt;i class="fal fa-chevron-right"&gt;&lt;/i&gt;',
		rangeIcon				: '',
		headerSeparator			: '',
		// moment
		startDate				: moment().add(1, 'days'),
		minDate					: moment().add(1, 'days'),
		// ranges
		rangeLabel				: 'Zeitraum:',
		ranges					: [
		{
			title		: 'heute',
			startDate	: moment(),
			endDate		: moment()
		},
		{
			title		: 'nÃ¤chste Woche',
			startDate	: moment().add(1,'weeks').startOf('week'),
			endDate		: moment().add(1,'weeks').endOf('week')
		},
		]		
	
	});
	*/

	jQuery('#qc_date').calentim({
		showOn					:'bottom',
		autoAlign				: true,
		autoCloseOnSelect		: false, 
		format					: 'dddd, DD.MM.YYYY, HH:mm',
		showHeader				: false,
		showFooter				: false,
		inline					: false,
		singleDate				: true,
		calendarCount			: 1,
		locale					: jQuery('#website_current_language_short').val(),
		enableMonthSwitcher		: false,
		enableYearSwitcher 		: false,
		prevMonthIcon			: '&lt;i class="fal fa-chevron-left"&gt;&lt;/i&gt;',
		nextMonthIcon			: '&lt;i class="fal fa-chevron-right"&gt;&lt;/i&gt;',
		startOnMonday			: true,
		hourFormat				: '24',
		minuteSteps				: '15',
		startDate				: moment().add(0, 'days'),
		minDate					: moment().add(0, 'days'),
		limitTimeForDay: function (day) {
			var startHour = moment().add(5, 'hours').get('hour');
			var startMin  = moment().add(5, 'hours').get('minute');
			if( day.isSame(new Date(), "day") ) {
				return { start: { hour: startHour, minute: startMin, ampm: null }, end: { hour: 20, minute: 0, ampm: null } };
			} else {
				return { start: { hour: 11, minute: 0, ampm: null }, end: { hour: 20, minute: 0, ampm: null } };
			}
		}
	});

	// validation
	var container = jQuery('div.quick_contact_form_insite_booking_errors');
	// validate the form when it is submitted
	var validator = jQuery('#quick_contact_form_insite_booking').validate({
		ignore					: [],
		//errorContainer			: container,
		//errorLabelContainer		: jQuery('ul', container),
		//wrapper					: 'li',
		invalidHandler			: function(event, validator) {
			var errors 	= validator.numberOfInvalids();
			if (errors) {
				jQuery('#quick_contact_form_errors_counter').html('&lt;h3&gt;Es sind ' + validator.numberOfInvalids() + ' Fehler aufgetreten:&lt;/h3&gt;');
				// jQuery('html, body').animate({ scrollTop: 0 }, 600);
				// jQuery('html, body').animate({ scrollTop: ( $('#section_quick_contact_form').offset().top - 150 ) }, 600);
				for ( var x=0; x&lt;validator.errorList.length; x++ ) {
					raise_system_message('primary', 'far fa-exclamation-triangle', 'Fehler:', ''+validator.errorList[x].message+'', '', '', 'top', 'left', 'false');
					// console.log(validator.errorList[x].message);
					// error_message += '&lt;br/&gt;\' + validator.errorList[x].message;
				}
			}
		},
		submitHandler			: function(form) {
			var data 	= jQuery('#quick_contact_form_insite_booking').serializeArray();

			formSubmitPost(data);
			// formSubmitAjax(data);
			// jQuery('html, body').animate({ scrollTop: 0 }, 600);
			// jQuery('html, body').animate({ scrollTop: ( $('#section_quick_contact_form').offset().top - 150 ) }, 600);
		}
	});

	function formSubmitPost( data ) {
		var post_data = {};
		jQuery.each( data, function(key, value) {
			//console.log( value.name + ' -&gt; ' + value.value );
			post_data[value.name] = value.value;
		});
		
		if( jQuery('#website_current_language_short').val() == 'en' ) {
			jQuery.redirect('/en/contact', post_data);
		} else {
			jQuery.redirect('/kontakt', post_data);
		}
	}

	// submit
	/*
	function formSubmitAjax( data ) {
		jQuery.ajax({
			url			: '/modules/mod_codedesign_responsive_quick_contact/assets/ajax/mod_codedesign_responsive_quick_contact.php',
			type		: 'POST',
			data		: 'ajax=1&amp;'+data,
			dataType	: 'html',
			cache		: false,
			async		: false,
			success		: function(result){
			jQuery('#quick_contact_form, #quick_contact_form_message_presend').css({'display' : 'none'});
			jQuery('#quick_contact_form_message_sent').css({'display' : 'inline-block'});
			jQuery('#quick_contact_form_ajax').html(result);
			}
		});
	};
	*/
	
});
// jQuery ENDE --&gt;
</pre></body></html>