$(document).ready(function () {
	
			
		

	$('.box').hover(
		
		//Mouseover, fadeIn the hidden hover class	
		function() {
		
		$(this).css({"background-image":"url('images/fond_b.png')"});
		$(this).css({"background-position":"center bottom"});


		
		}, 
	
		//Mouseout, fadeOut the hover class
		function() {

	$(this).css({"background-image":"url('images/spacer.gif')"});
		
	});

	var date_jour = new Date();
  $('.datetime').datepicker({
  

    duration: '',
	minDate:'0', maxDate:'+36500',
    showTime: false,
    closeText: 'Valider', closeStatus: 'Fermer sans modifier',
    prevText: '&lt;Préc', prevStatus: 'Voir le mois précédent',
    nextText: 'Suiv&gt;', nextStatus: 'Voir le mois suivant',
    currentText: 'Courant', currentStatus: 'Voir le mois courant',
    monthNames: ['janvier','février','mars','avril','mai','juin',
    'juillet','août','septembre','octobre','novembre','décembre'],
    monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
    'Jul','Aoû','Sep','Oct','Nov','Déc'],
    monthStatus: 'Voir un autre mois', yearStatus: 'Voir un autre année',
    weekHeader: 'Sm', weekStatus: '',
    dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
    dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
    dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
dateFormat: 'yy-mm-dd', 
    firstDay: 0
     });
     
       




 $('#various2').click(function() {
        
var date2 = $("#date2").val();        
var date1 = $("#date1").val();
var nb_voyageurs_ok = $("#nb_voyageurs_ok").val();
var heure_retour_ = $("#heure_retour_").val();
var heure_convoc_ = $("#heure_convoc_").val();

$("#date_1").val(date1);
$("#date_2").val(date2);			
$("#heure_retour_").val(heure_retour_);		
$("#heure_convoc_").val(heure_convoc_);		
$("#nb_voyageurs_ok").val(nb_voyageurs_ok);		

			if(date1 != "" && date2 != ""){
			$.post("contact_.php", { 
			
			date1_: date1,
			date2_: date2,
			nb_voyageurs_ok: nb_voyageurs_ok,
			heure_retour_: heure_retour_,
			heure_convoc_: heure_convoc_,
			devis:"ok"  },
			
			function(data){	
			$('#contenu_fichier_ajax').html(data);
		
			if(data == "Veuillez nous contacter au 01.64.27.14.99 <br/><br/>"){
				
			  $("#various2").css("display","none");

			}else{ $("#various2").css("display","block");}
			
			});			
             }else{
			 alert("La date de départ et d'arrivée est obligatoire");
			 javascript:window.open('index.html', '_self');
			 }
			 
			 }); 


 $('#testcalc').click(function() {
        
var date2 = $("#dt2").val();        
var date1 = $("#dt1").val();
var nb_voyageurs_ok = $("#1nb_voyageurs_ok").val();
var heure_retour_ = $("#1heure_retour_").val();
var heure_convoc_ = $("#1heure_convoc_").val();

$("#date_1").val(date1);
$("#date_2").val(date2);			
$("#1heure_retour_").val(heure_retour_);		
$("#1heure_convoc_").val(heure_convoc_);		
$("#1nb_voyageurs_ok").val(nb_voyageurs_ok);		

			if(date1 != "" && date2 != ""){
			$.post("contact_.php", { 
			
			date1_: date1,
			date2_: date2,
			nb_voyageurs_ok: nb_voyageurs_ok,
			heure_retour_: heure_retour_,
			heure_convoc_: heure_convoc_,
			devis:"ok"  },
			
			function(data){	
			$('#contenu_fichier_ajax').html(data);
		
			if(data == "Veuillez nous contacter au 01.64.27.14.99 <br/><br/>"){
				
			  $("#testcalc").css("display","none");

			}else{ $("#testcalc").css("display","block");}
			
			});			
             }else{
			 alert("La date de départ et d'arrivée est obligatoire");
			 javascript:window.open('index.html', '_self');
			 }
			 
			 }); 
			 
			 
			 
 $('#form1').click(function() {

 			var date2 = $("#date2").val();        
            var date1 = $("#date1").val();

			var heure_retour_ = $("#heure_retour_").val();
			var min_retour_ = $("#min_retour_").val();
			var heure_convoc_ = $("#heure_convoc_").val();
			var min_convoc_ = $("#min_convoc_").val();
			var nb_voyageurs_ok = $("#nb_voyageurs_ok").val();	

var nb_vol = $("#nb_vol").val();
var nb_vol_2 = $("#nb_vol_2").val();
var dest = $("#dest").val();
var nb_voyageurs = $("#nb_voyageurs").val();
var nom = $("#nom").val();
var prenom = $("#prenom").val();
var email = $("#email").val();
var tel = $("#tel").val();
var checkR = $("#checkR").val();

$("#nb_vol").val(nb_vol);		
$("#nb_vol_2").val(nb_vol_2);		
$("#dest").val(dest);		
$("#nom").val(nom);		
$("#prenom").val(prenom);		
$("#email").val(email);		
$("#tel").val(tel);		
$("#checkR").val(checkR);		


            $("#date_1").val(date1);
			$("#date_2").val(date2);
			
			$("#heure_retour_ok").val(heure_retour_);		
			$("#min_retour_ok").val(min_retour_);		
			$("#heure_convoc_ok").val(heure_convoc_);		
			$("#min_convoc_ok").val(min_convoc_);		
			$("#nb_voyageurs_ok_").val(nb_voyageurs_ok);	
			
			
			if(date1 != "" && date2 != "" && tel != "" && email !="" ){
			$.post("contact_.php", { date_1: date1, date_2: date2,reservation:"ok",heure_convoc:heure_convoc_,heure_retour:heure_retour_,min_convoc:min_convoc_,min_retour:min_retour_,nb_vol:nb_vol,dest:dest,nb_vol_2:nb_vol_2,nb_voyageurs:nb_voyageurs_ok,nom:nom,prenom:prenom,email:email,tel:tel,checkR:checkR},
			function(data){
//			$('body').html(data);
//			document.PAYBOX.submit();
			 alert("Votre demande de réservation a bien été envoyée.\n\rVous allez recevoir un mail de confirmation dans les 24 heures.\n\rPour une confirmation immédiate veuillez téléphoner au 01.64.27.14.99");
			 $.fancybox.close();
			});			
             }
			 
}); 

		 
 $('#form2').click(function() {
        
var date2_ = $("#date2_").val();        
var date1_ = $("#date1_").val();
var heure_convoc2 = $("#heure_convoc2").val();
var heure_retour2 = $("#heure_retour2").val();
var nb_vol2 = $("#nb_vol_2").val();
var dest2 = $("#dest2").val();
var nb_voyageurs2 = $("#nb_voyageurs2").val();
var nom2 = $("#nom2").val();
var prenom2 = $("#prenom2").val();
var email2 = $("#email2").val();
var tel2 = $("#tel2").val();
var checkR = $("#checkR").val();

$("#date1_").val(date1);
$("#date2_").val(date2);		
$("#heure_convoc2").val(heure_convoc2);		
$("#heure_retour2").val(heure_retour2);		
$("#nb_vol2").val(nb_vol2);		
$("#dest2").val(dest2);		
$("#nom2").val(nom2);		
$("#prenom2").val(prenom2);		
$("#email2").val(email2);		
$("#tel2").val(tel2);		
$("#checkR").val(checkR);		
			
			if(date1_ != "" && date2_ != "" && tel2 != "" && email2 != ""){
			$.post("contact_.php", { date_1: date1_, date_2: date2_,reservation:"ok",heure_convoc:heure_convoc2,heure_retour:heure_retour2,nb_vol_2:nb_vol2,dest:dest2,nb_voyageurs:nb_voyageurs2,nom:nom2,prenom:prenom2,email:email2,tel:tel2,checkR:checkR},
			function(data){	
			 alert("Votre demande de réservation a bien été envoyée.\n\rVous allez recevoir un mail de confirmation dans les 24 heures.\n\rPour une confirmation immédiate veuillez téléphoner au 01.64.27.14.99");
			 $.fancybox.close();
			});			
             }else{
			 alert("Merci de bien vouloir saisir les champs obligatoires");
			 }
			 
}); 		  
			  
			$('#various2').click(function() {
        	var date2 = $("#date2").val();        
            var date1 = $("#date1").val();
            $("#date_1").val(date1);
			$("#date_2").val(date2);		
             });
			 
	
            
});



