


function getTarifs(){
	voiture=$("#voitures").val();
	date=$("#arrivee1").val();
	date1=$("#depart1").val();
	
	hour=$("#hour").val();
	hour1=$("#hour1").val();
	
	lieu=$("#lieu").val();
	lieu1=$("#lieu1").val();
	if(lieu!=0 && lieu1!=0){
	opt1=0;
	opt2=0;
	opt3=0;
	opt4=0;
	if($("#opt1").is(':checked')){
		opt1=$("#opt1").val();
	}
	if($("#opt2").is(':checked')){
		opt2=$("#opt2").val();
	}
	if($("#opt3").is(':checked')){
		opt3=$("#opt3").val();
	}
	if($("#opt4").is(':checked')){
		opt4=$("#opt4").val();
	}
	
	
	
	$("#tarifs_infos").html("<center>LOADING....</center>");
	$.ajax({
   		type: "POST",
  		url: "ajax_page.php",
   		data: "op=tarifs&voiture="+voiture+"&date="+date+"&date1="+date1+"&hour="+hour+"&hour1="+hour1+"&lieu="+lieu+"&lieu1="+lieu1+"&opt1="+opt1+"&opt2="+opt2+"&opt3="+opt3+"&opt4="+opt4,
   		success: function(msg){
			if(msg!=""){
			$("#tarifs_infos").hide();
			$("#tarifs_infos").html(msg);
			$("#tarifs_infos").slideDown();
			}
     		//alert(msg);
   		}
 	});
	}
}

$(document).ready(function(){
	$("select").change(function(){
			getTarifs();
	});
	$("input").change(function(){
			getTarifs();
	});
	$(".auto").mouseover(function() {
			$(this).addClass("auto_h");
			
		});
		$(".auto").mouseout(function() {
			$(this).removeClass("auto_h");
		});
	   
		
	
	});
$(function() {
			$('#img_auto_img_1').lightBox();
			$('#img_auto_img_2').lightBox();
			$('#img_auto_img_3').lightBox();
			$('#img_auto_img_4').lightBox();
			$('#img_auto_img_5').lightBox();
			$('#img_auto_img_6').lightBox();
			$('#img_auto_img_7').lightBox();
			$('#img_auto_img_8').lightBox();
			$('#img_auto_img_9').lightBox();
			$('#img_auto_img_10').lightBox();
			$('#img_auto_img_11').lightBox();
			$('#img_auto_img_12').lightBox();
			$('#img_auto_img_13').lightBox();
			
			
		});
