// source --> https://oddilpoutnici.cz/wp-content/themes/hestia-child/js/camp-ajax-handle.js?ver=7.0.2 
jQuery(document).ready( function(){
		jQuery('.js-vyprava').each(function(){
			var vyprava = jQuery(this).data('vyprava')
			var formId = jQuery(this).data('formid')
			loadSelectedCamp(vyprava, jQuery(this), formId);
		});
	});

	function reloadConcreteCamp(tripName){
		jQuery('.js-vyprava').each(function(){
			var vyprava = jQuery(this).data('vyprava');
			if (tripName == vyprava){
				loadSelectedCamp(vyprava, jQuery(this));
			}
		});
	}

	function loadSelectedCamp(campType, targetDiv, formId){
		jQuery.ajax({
				url : campAjaxParams.ajax_url,
				data : {
				action : 'campLoadAction',
				nonce : campAjaxParams.aj_demo_nonce,
				camp_type: campType,
				cachePrevent: new Date().getTime(),
				id: formId,
				leadersEnabled: false,
headers: {'Cache-Control': 'no-cache, no-store, must-revalidate', 
					    'Pragma': 'no-cache', 
					    'Expires': '0'}
			},
				success : function( response ) {
				targetDiv.html(response.data);
			},
			error : function( response ) {
				alert('Error retrieving the information: ' + response.status + ' ' + response.statusText);
				console.log(response);
			}
		});
	};