$(function()
{
	$('.target_blank').attr('target', '_blank');

	if ( !$.browser.msie || ($.browser.msie && $.browser.version >= 7) )
	{
		$('#menu a').mouseover(function()
		{
			$(this).stop().css('opacity', '0').addClass('hover').fadeTo(400, 1);
		}).mouseout(function()
		{
			$(this).stop().fadeTo(400, 0);
		});

	}
	
	$(".resizable").resizable({ maxWidth: 710, maxHeight: 490, minWidth: 385, minHeight: 230});

});


function ValideContact()
{
	var obj = document.getElementById("formContact");
	var ok = true;
	ok = ok && estPresent(obj.nom,'Merci de saisir votre Nom');
	ok = ok && estPresent(obj.prenom,'Merci de saisir votre prenom');
	ok = ok && estPresent(obj.email_exp,'Merci de saisir votre email');
	ok = ok && estPresent(obj.tel,'Merci de saisir votre votre téléphone');
	ok = ok && estPresent(obj.message,'Merci de saisir votre message');

	if(ok){
		captVerif(obj);}
}

function map1()
{
	var infoBulle = '<div class="bulle"><img src="images/logo-bulle.png" alt="Taxi david Valencia" class="logo" /><p><strong>Taxi David Valencia</strong><br />4 place du villaret<br />30170 St Hyppolyte du Fort<a href="javascript:window.print()"><img src="images/imprimante.jpg" alt="Imprimer" class="print" /><a></p></div>';

	var mapHyppolyte = new GMap2(document.getElementById('map'));
	var Hyppolyte  = new GLatLng(43.964679,3.85611);
	mapHyppolyte.setCenter(Hyppolyte , 12);
 
	var markerHyppolyte = new GMarker(Hyppolyte);
	mapHyppolyte.addOverlay(markerHyppolyte);
	// Select a map type which supports aerial imagery
	mapHyppolyte.setMapType(G_NORMAL_MAP);
	mapHyppolyte.setUIToDefault();
	// Enable the additional map types within
	// the map type collection
	mapHyppolyte.enableRotation();

	GEvent.addListener(markerHyppolyte, "click", function()
	{
		markerHyppolyte.openInfoWindowHtml(infoBulle);
	});
	markerHyppolyte.openInfoWindowHtml(infoBulle);
	
	
}

function map2()
{
	var infoBulle = '<div class="bulle"><img src="images/logo-bulle.png" alt="Taxi david Valencia" class="logo" /><p><strong>Taxi David Valencia</strong><br />37 chemin de l\'églisette<br />34190 Moules et Baucels<a href="javascript:window.print()"><img src="images/imprimante.jpg" alt="Imprimer" class="print" /><a></p></div>';

	var mapHyppolyte = new GMap2(document.getElementById('map2'));
	var Hyppolyte  = new GLatLng(43.942024,3.731457);
	mapHyppolyte.setCenter(Hyppolyte , 12);
 
	var markerHyppolyte = new GMarker(Hyppolyte);
	mapHyppolyte.addOverlay(markerHyppolyte);
	// Select a map type which supports aerial imagery
	mapHyppolyte.setMapType(G_NORMAL_MAP);
	mapHyppolyte.setUIToDefault();
	// Enable the additional map types within
	// the map type collection
	mapHyppolyte.enableRotation();

	GEvent.addListener(markerHyppolyte, "click", function()
	{
		markerHyppolyte.openInfoWindowHtml(infoBulle);
	});
	markerHyppolyte.openInfoWindowHtml(infoBulle);
	
}
