	<style>
	.message-redirect{
		color: red;
		font-weight: bold;
		margin-bottom: 20px;
		display: block;
	}
	#form {
		position: relative;
	}
	.att {
		position: absolute;
		width: 100%;
		height: 100%;
		background-color: #ccc;
		top: 0;
		z-index: 1;
		opacity: 0.5;
		display:none;
	}
	.img_loader img {
		width: 100px;
		display: block;
		margin: 25% auto;
	}
	.img_loader {
		position: absolute;
		z-index: 1;
		width: 100%;
		height: 100%;
		display:none;
	}
	.loader {
	margin: 25% auto;
	font-size: 10px;
	position: relative;
	text-indent: -9999em;
	border-top: 1.1em solid rgba(0,0,0, 0.7);
	border-right: 1.1em solid rgba(0,0,0, 0.7);
	border-left: 1.1em solid rgba(0,0,0, 0.7);
	border-bottom: 1.1em solid rgba(0, 0, 0, 0.2);
	border-left: 1.1em solid #ffffff;
	-webkit-transform: translateZ(0);
	-ms-transform: translateZ(0);
	transform: translateZ(0);
	-webkit-animation: load8 1.1s infinite linear;
	animation: load8 1.1s infinite linear;
	}
	.loader,
	.loader:after {
	border-radius: 50%;
	width: 7em;
	height: 7em;
	}
	@-webkit-keyframes load8 {
	0% {
	-webkit-transform: rotate(0deg);
	transform: rotate(0deg);
	}
	100% {
	-webkit-transform: rotate(360deg);
	transform: rotate(360deg);
	}
	}
	@keyframes load8 {
	0% {
	-webkit-transform: rotate(0deg);
	transform: rotate(0deg);
	}
	100% {
	-webkit-transform: rotate(360deg);
	transform: rotate(360deg);
	}
	}
	#alert_your_name,#alert_email,#alert_date_arrive,
	#alert_date_dpart,#alert_your_tele,#alert_menu_chambre,
	#alert_your_message,#alert_capt_ch{
	display:none;
	}
	.false {
	border: 2px solid red;
	padding: 7px;
	font-weight: bold;
	}
	</style>
	<link id="open-sans-css" media="all" type="text/css" href="https://aux3portes.com/wp-content/plugins/WP-Plugin-Res/js/jquery-ui/jquery-ui.css" rel="stylesheet">
	<script src="https://aux3portes.com/wp-content/plugins/WP-Plugin-Res/js/jquery-1.10.2.js"></script>
	<script src="https://aux3portes.com/wp-content/plugins/WP-Plugin-Res/js/jquery-ui/jquery-ui.js"></script>
	<script src="https://aux3portes.com/wp-content/plugins/WP-Plugin-Res/js/jquery-ui/jquery-ui-timepicker-fr.js"></script>
	<script>

	jQuery(document).ready(function($){
		
		var ajaxurl = 'https://aux3portes.com/wp-admin/admin-ajax.php';
		
		jQuery(function($){
			
			jQuery( "#date_arrive" ).datepicker(jQuery.datepicker.regional['fr']);
	        jQuery( "#date_dpart" ).datepicker(jQuery.datepicker.regional['fr']);
			
			var t = Math.floor(Math.random() * 10);
			var t2 = Math.floor(Math.random() * 10);
			// document.getElementById("capt_ch").placeholder = "Combien "+t+" + "+t2+" = ?"; 
			document.getElementById("captcha_span").innerHTML = " : "+t+" + "+t2+" = ? "; 
			document.getElementById("captcha_valide").value = t+t2; 
		});
		////////////////////////////////////////////////////////////////////////
		function Videchamp(){
			
			jQuery("#your_name").val("");
			jQuery("#email").val("");
			jQuery("#date_arrive").val("");
			jQuery("#date_dpart").val("");
			jQuery("#your_tele").val("");
			jQuery("#menu_chambre").val("");
			jQuery("#your_message").val("");
			jQuery("#alert_your_name").hide();
			jQuery("#alert_email").hide();
			jQuery("#alert_date_arrive").hide();
			jQuery("#alert_date_dpart").hide();
			jQuery("#alert_your_tele").hide();
			jQuery("#alert_menu_chambre").hide();
			jQuery("#alert_your_message").hide();
			jQuery("#alert_capt_ch").hide();
		}
		////////////////////////////////////////////////////////////////////////
		function Ajax_booking(arrive,dpart,lang,id){
			
			jQuery(".att").show();
			jQuery(".img_loader").show();
			
			var href = "https://aux3portes.com/en/";
                if(lang != "" && arrive !=""){
				if(lang == "" || lang == "fr")
					href += "/reservation/";
				if(lang == "en" )
					href += "/booking-2/";
				if(lang == "es" )
					href += "/reservacion/";
				
				var $form=$(document.createElement('form')).css({display:'none'}).attr("method","POST").attr("action",href);
				var $input_lang=$(document.createElement('input')).attr('name','lang').val(lang);
				var $input_arrive=$(document.createElement('input')).attr('name','arrive').val(arrive);
				var $input_dpart=$(document.createElement('input')).attr('name','dpart').val(dpart);
                $form.append($input_lang).append($input_arrive).append($input_dpart);
				$("body").append($form);
				$form.submit();
			}
		}
		////////////////////////////////////////////////////////////////////////
		// function Ajax_booking(arrive,dpart,lang){
			
			// if(lang != "" && arrive !=""){
				// jQuery(".att").show();
				// jQuery(".img_loader").show();
				// jQuery.post(ajaxurl,{ 'action' : 'get_room_ajax','lang' :lang,'arrive' :arrive},function(reponse){
					// jQuery("#menu_chambre").html(reponse);
					// jQuery("#menu_chambre").attr("disabled",false);
					// jQuery(".att").hide();
					// jQuery(".img_loader").hide();
					
				// })
			// }
		// }
		////////////////////////////////////////////////////////////////////////
		function comparing_date(arrive, dpart){
			
			if(arrive != "" && dpart != ""){
				arrive = arrive.split("-");
				dpart = dpart.split("-");
				
				arrive = new Date(arrive[2],arrive[1],arrive[0]);
				dpart = new Date(dpart[2],dpart[1],dpart[0]);
				if(arrive < dpart){
					return true;
				}	
				else{
					return false;
				}
					
			}
		}
		////////////////////////////////////////////////////////////////////////
		jQuery("input[name$='date-arrive']").change(function(){
			var arrive = jQuery(this).val();
			var dpart = jQuery( "#date_dpart" ).val();
			var lang = jQuery( "#lang" ).val();
			
			if(arrive != "" && dpart !=""){
				if(comparing_date(arrive, dpart))
					Ajax_booking(arrive,dpart,lang);
				else
					jQuery( "#date_dpart" ).val("");
				}
			return false;
		});
		////////////////////////////////////////////////////////////////////////
		jQuery("input[name$='date-dpart']").change(function(){
			var dpart = jQuery(this).val();
			var arrive = jQuery( "#date_arrive" ).val();
			var lang = jQuery( "#lang" ).val();
			
			if(arrive != "" && dpart !=""){
				if(comparing_date(arrive, dpart))
					Ajax_booking(arrive,dpart,lang);
				else
					jQuery( "#date_dpart" ).val("");
			}
			return false;
		});
		////////////////////////////////////////////////////////////////////////
		jQuery("#submit").click(function($){
			var cap_ = jQuery("#capt_ch").val();
			var cap_v = jQuery("#captcha_valide").val();
			
			var lang = jQuery("#lang").val();
			var nom = jQuery("#your_name").val();
			var email = jQuery("#email").val();
			var date_arrive = jQuery("#date_arrive").val();
			var date_dpart = jQuery("#date_dpart").val();
			var tel = jQuery("#your_tele").val();
			var chambre = jQuery("#menu_chambre").val();
			var message = jQuery("#your_message").val();
			
			if(nom == "")
				jQuery("#alert_your_name").show();
			if(email == "")
				jQuery("#alert_email").show();
			if(date_arrive == "")
				jQuery("#alert_date_arrive").show();
			if(date_dpart == "")
				jQuery("#alert_date_dpart").show();
			if(tel == "")
				jQuery("#alert_your_tele").show();
			if(chambre == "")
				jQuery("#alert_menu_chambre").show();
			// if(nom == "")
				// jQuery("#alert_your_message").show();
			if(cap_ == "")
				jQuery("#alert_capt_ch").show();
			
			if(cap_ == cap_v){
				$(this).submit();
				// if(nom != "" && email != "" && date_arrive != "" && date_dpart != "" && tel != "" && chambre != "" && message != "" ){
					// jQuery(".att").show();
					// jQuery(".img_loader").show();
					// jQuery.post(ajaxurl,{ 'action' : 'add_room_ajax','nom' : nom, 'email' : email, 'date_arrive' : date_arrive, 
						// 'date_dpart' : date_dpart, 'tel' : tel, 'chambre' : chambre, 'message' : message,  'lang' : lang},function(reponse){
						// console.log(reponse);
						// jQuery(".att").hide();
						// jQuery(".img_loader").hide();
						// jQuery("#alert").html(reponse);
						// jQuery("#alert").show();
						// Videchamp();
						
					// })
				// }
			}
			else{
				jQuery("#alert_capt_ch").show();
			}
			return false;
		})
	})

	</script>

	<br>
	<div id="reservation">
		<br>
	<p style="text-align: left;" class="">
		To book one room in our guesthouse, please fill out the form below. We will be happy to answer you as soon as possible. For any questions, do not hesitate to contact us by phone  00212 (0)6 60 45 52 04.		</p>
	<br>
		<form id="form" method="post" >
	
	<div class="att"><div class="loader"></div></div>
		 
			<input type="hidden" name="lang" id="lang" value="en" />
			<p class="date-arrivee">
				<input type="text" id="date_arrive" placeholder="Arrival date  *" value="" required class="inputform wpcf7-form-control" name="date-arrive"> 
				<span class="wpcf7-not-valid-tip" id="alert_date_arrive" role="alert">Please fill in the required field. </span>
			</p>
		 
			<p class="date-depart">
				<input type="text" id="date_dpart" placeholder="Date of departure *" value="" required class="inputform wpcf7-form-control" name="date-dpart">				
				<span class="wpcf7-not-valid-tip" id="alert_date_dpart" role="alert">Please fill in the required field. </span>
			</p>
	 
			<p> 
				<input type="text" placeholder="Your name " required class="inputform wpcf7-form-control" size="40" id="your_name" name="your-name">
				<span class="wpcf7-not-valid-tip" id="alert_your_name" role="alert">Please fill in the required field. </span>
	</p>
			<p> 
				<input type="email" placeholder="E-mail " required class="inputform wpcf7-form-control" name="email" id="email">
				<span class="wpcf7-not-valid-tip" id="alert_email" role="alert">Please fill in the required field. </span>
			</p>
		 
			<p>  
				<input type="tel" placeholder="Phone number " required class="inputform wpcf7-form-control" name="your-tele" id="your_tele">
				<span class="wpcf7-not-valid-tip" id="alert_your_tele" role="alert">Please fill in the required field. </span>
			</p>
	 
			<p>
				Desired room  <span class="obligatoire">*</span><br>
					<select  required id="menu_chambre" class="inputform wpcf7-form-control" name="menu-Chambre" disabled>
											</select>
				<span class="wpcf7-not-valid-tip" id="alert_menu_chambre" role="alert">Please fill in the required field. </span>
			</p>	
		 
		<div class="clearfix"></div> 
			<p>
				<textarea  class="inputmsg wpcf7-form-control" placeholder="Your message " name="your-message" id="your_message"></textarea>
				<span class="wpcf7-not-valid-tip" id="alert_your_message" role="alert">Please fill in the required field. </span>
			</p>
		 
			<p>Enter resultant  <span id="captcha_span"></span><span class="obligatoire">*</span> </p>
		 
		
		
			<p>
				<input  type="text"  id="capt_ch" required placeholder="" class="inputform wpcf7-form-control" name="captcha-6">
				<span class="wpcf7-not-valid-tip" id="alert_capt_ch" role="alert">Your entered code is incorrect.</span>
				<input type="hidden" name="captcha_valide" value="" id="captcha_valide" ?>
			</p>
		 
		
			<p>
				<input type="submit" name="reserver" class="inputsubmit wpcf7-form-control wpcf7-submit" value="Booking" id="submit">
			</p>
		 
		
		<p class="Champs_obli"><span class="obligatoire">*</span> Required fields </p>

	</form>
	<br>
	</div>

{"id":422,"date":"2016-03-02T13:13:41","date_gmt":"2016-03-02T12:13:41","guid":{"rendered":"http:\/\/aux3portes.com\/reservation\/?lang=en"},"modified":"2018-09-12T12:10:25","modified_gmt":"2018-09-12T11:10:25","slug":"reservation","status":"publish","type":"page","link":"https:\/\/aux3portes.com\/en\/reservation\/","title":{"rendered":"Booking"},"content":{"rendered":"\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":14,"featured_media":803,"parent":0,"menu_order":15,"comment_status":"closed","ping_status":"closed","template":"reservation.php","meta":{"_acf_changed":false,"footnotes":""},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Booking | Aux3Portes<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/aux3portes.com\/en\/reservation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Booking | Aux3Portes\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aux3portes.com\/en\/reservation\/\" \/>\n<meta property=\"og:site_name\" content=\"Aux3Portes\" \/>\n<meta property=\"article:modified_time\" content=\"2018-09-12T11:10:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/aux3portes.com\/wp-content\/uploads\/2016\/03\/maison-hotes-03-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1170\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/aux3portes.com\/en\/reservation\/\",\"url\":\"https:\/\/aux3portes.com\/en\/reservation\/\",\"name\":\"Booking | Aux3Portes\",\"isPartOf\":{\"@id\":\"https:\/\/aux3portes.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/aux3portes.com\/en\/reservation\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/aux3portes.com\/en\/reservation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/aux3portes.com\/wp-content\/uploads\/2016\/03\/maison-hotes-03-1.jpg\",\"datePublished\":\"2016-03-02T12:13:41+00:00\",\"dateModified\":\"2018-09-12T11:10:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/aux3portes.com\/en\/reservation\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/aux3portes.com\/en\/reservation\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/aux3portes.com\/en\/reservation\/#primaryimage\",\"url\":\"https:\/\/aux3portes.com\/wp-content\/uploads\/2016\/03\/maison-hotes-03-1.jpg\",\"contentUrl\":\"https:\/\/aux3portes.com\/wp-content\/uploads\/2016\/03\/maison-hotes-03-1.jpg\",\"width\":1170,\"height\":420},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/aux3portes.com\/en\/reservation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/aux3portes.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Booking\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/aux3portes.com\/#website\",\"url\":\"https:\/\/aux3portes.com\/\",\"name\":\"Aux3Portes\",\"description\":\"Guest house in the Kasbah\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/aux3portes.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Booking | Aux3Portes","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/aux3portes.com\/en\/reservation\/","og_locale":"en_US","og_type":"article","og_title":"Booking | Aux3Portes","og_url":"https:\/\/aux3portes.com\/en\/reservation\/","og_site_name":"Aux3Portes","article_modified_time":"2018-09-12T11:10:25+00:00","og_image":[{"width":1170,"height":420,"url":"https:\/\/aux3portes.com\/wp-content\/uploads\/2016\/03\/maison-hotes-03-1.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/aux3portes.com\/en\/reservation\/","url":"https:\/\/aux3portes.com\/en\/reservation\/","name":"Booking | Aux3Portes","isPartOf":{"@id":"https:\/\/aux3portes.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/aux3portes.com\/en\/reservation\/#primaryimage"},"image":{"@id":"https:\/\/aux3portes.com\/en\/reservation\/#primaryimage"},"thumbnailUrl":"https:\/\/aux3portes.com\/wp-content\/uploads\/2016\/03\/maison-hotes-03-1.jpg","datePublished":"2016-03-02T12:13:41+00:00","dateModified":"2018-09-12T11:10:25+00:00","breadcrumb":{"@id":"https:\/\/aux3portes.com\/en\/reservation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aux3portes.com\/en\/reservation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/aux3portes.com\/en\/reservation\/#primaryimage","url":"https:\/\/aux3portes.com\/wp-content\/uploads\/2016\/03\/maison-hotes-03-1.jpg","contentUrl":"https:\/\/aux3portes.com\/wp-content\/uploads\/2016\/03\/maison-hotes-03-1.jpg","width":1170,"height":420},{"@type":"BreadcrumbList","@id":"https:\/\/aux3portes.com\/en\/reservation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/aux3portes.com\/en\/"},{"@type":"ListItem","position":2,"name":"Booking"}]},{"@type":"WebSite","@id":"https:\/\/aux3portes.com\/#website","url":"https:\/\/aux3portes.com\/","name":"Aux3Portes","description":"Guest house in the Kasbah","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/aux3portes.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/aux3portes.com\/en\/wp-json\/wp\/v2\/pages\/422"}],"collection":[{"href":"https:\/\/aux3portes.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/aux3portes.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/aux3portes.com\/en\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/aux3portes.com\/en\/wp-json\/wp\/v2\/comments?post=422"}],"version-history":[{"count":2,"href":"https:\/\/aux3portes.com\/en\/wp-json\/wp\/v2\/pages\/422\/revisions"}],"predecessor-version":[{"id":1429,"href":"https:\/\/aux3portes.com\/en\/wp-json\/wp\/v2\/pages\/422\/revisions\/1429"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aux3portes.com\/en\/wp-json\/wp\/v2\/media\/803"}],"wp:attachment":[{"href":"https:\/\/aux3portes.com\/en\/wp-json\/wp\/v2\/media?parent=422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}