$(document).ready(function(){


// DETECTION NAVIGATEUR
//---------------------

/*
http://stackoverflow.com/questions/454875/how-to-do-browser-detection-with-jquery-1-3-with-browser-msie-deprecated
http://perishablepress.com/press/2009/12/13/simple-browser-detection/
*/
	$("#navigateur").hide();

    var userAgent = navigator.userAgent.toLowerCase();
	
	$.browser = {
    	version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
    	safari: /webkit/.test( userAgent ),
    	opera: /opera/.test( userAgent ),
    	msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
    	mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
    };

	
	if ($.browser.msie) {
		$("#navigateur").show();
	}

	function IsThisBrowserIE6() {
    	return ((window.XMLHttpRequest == undefined) && (ActiveXObject != undefined))
	}

	function browserLessThanIE7(){
   	return (/MSIE ((5\\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
	}



						   

// DEBUT : GESTION FORMULAIRE $
//--------------------------

$("#contact_form").submit(function(){

var str = $(this).serialize();

   $.ajax({
   type: "POST",
   url: "contact.php",
   data: str,
   success: function(msg){
   
$("#note").ajaxComplete(function(event, request, settings){

if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
result = '<div class="notification_ok">Votre message a bien \351t\351 envoy\351, merci.</div>';
$("#fields").hide();
}
else
{
result = msg;
}

$(this).html(result);

});

}

 });

return false;

});
// FIN : GESTION FORMULAIRE $
//--------------------------

});

/* GESTION DES ACCENTS POUR LE JAVASCRIPT

http://www.pyrat.net/JavaScript-alert-et-accents.html
http://www.pjb.com.au/comp/diacritics.html

    * é : \351
    * è : \350
    * ê : \352
    * à : \340


*/

