		function sendFormAjax() {
		
			var dataString = $("#ajaxform form").serialize();
			
			_gaq.push(['_trackPageview', 'mailing/mailing_directactivation.php' ]);
			
					$.ajax({
						
					type: 'POST',
					 url: "mailing/mailing_directactivation.php",
					  data: dataString,
					  contentType: 'application/x-www-form-urlencoded; charset=iso-8859-1;',
					  cache: false,
					  dataType: 'html',
					 
					  success: function(data) {
						
						$('#ajaxform').html(data);
						refreshform();
					  }
					});
					
					  
		}
		function sendCvFormAjax() {
			
			boyxcallback.hide();
			
			
			var dataString = $(".boxy-inner form").serialize();
			_gaq.push(['_trackPageview', 'send_cv.php?ajax=1' ]);

					$.ajax({
						
					type: 'POST',
					 url: "send_cv.php?ajax=1",
					  data: dataString,
					  contentType: 'application/x-www-form-urlencoded; charset=iso-8859-1;',
					  cache: false,
					  dataType: 'html',
					 
					  success: function(data) {
						$('.boxy-modal-blackout').remove();
						createBoxy(data);
						//alert("ok");
					  }
					});
					
					  
		}
		function refreshform() {
			$("#bt_suscribe").bind('click', function(event) {
				//alert("Yoouuu");
						event.preventDefault();
						sendFormAjax();
						
			});
			$("#ajxok").bind('click', function(event) {
					event.preventDefault();
					_gaq.push(['_trackPageview', 'mailing/mailing_directactivation.php?init=1' ]);
					$.ajax({
						
					 type: 'POST',
					 url: "mailing/mailing_directactivation.php?init=1",
					 contentType: 'application/x-www-form-urlencoded; charset=iso-8859-1;',
					 cache: false,
					 dataType: 'html',
					 success: function(data) {
						
						$('#ajaxform').html(data);
						refreshform();
					  }
					});
			});
		
		}
		function sendCV() {
			
		}
		
/* Vérifis si le doc est pret a être executé */
var boyxcallback = null;
function createBoxy(data) {
	
	boyxcallback = new Boxy(data, {title: "test", modal:true, modalcloseable:true});
						
						 $(".boxy-inner .close").hover(function() {
						   jQuery("img", this).stop().fadeTo('fast', 0);
						},function() {
						   jQuery("img", this).stop().fadeTo('fast', 1);
						});
						
			
			$(".bt_send_bggreen").click( function(event) {
				//alert("Yoouuu");
						event.preventDefault();
					
						
			});	
}
$(document).ready(function() {
		
		refreshform();
	
		$("a.boxy").bind('click', function(event) {
			
			event.preventDefault();
			var url = $(this).attr("href");
			
			if(url.indexOf('?')>0) { url = url+"&iframe=1"; } else { url = url+"?iframe=1"; }
			
			var boxy1 = $(this).attr("name");
			createBoxy('<iframe src ="'+url+'" width="590" height="540" scrolling="no" frameborder="0"></iframe>');
			
			/*	
			$.ajax({
					type: 'POST',
					 url: url,
					  contentType: 'application/x-www-form-urlencoded; charset=iso-8859-1;',
					  cache: false,
					  dataType: 'html',
					 
					  success: function(data) {
						createBoxy(data);
					  }
			});
				
				*/	
					
			
		});
		
		
		

        $("h1.title a").hover(function() {
                $(this).stop().animate({ color : "#353535" }, "fast");
        },function() {
                 $(this).stop().animate({ color: "#5e5e5e" }, "fast");
        });
		
		
        $(".footer form input").hover(function() {
			if ( $(this).hasClass("error") ) {  $(this).stop().animate({ backgroundColor: "#f8582d" }, "fast"); } else {
                $(this).stop().animate({ backgroundColor: "#8b9700" }, "fast"); }
        },function() {
			if ( $(this).hasClass("error") ) {  $(this).stop().animate({ backgroundColor: "#f8402d" }, "fast"); } else {
                 $(this).stop().animate({ backgroundColor: "#7b8600" }, "fast"); }
        });
		
		
		
		$(".arrow_dup a").click(function(event) {
					event.preventDefault();
					$('html, body').animate({scrollTop: $("#top").offset().top}, $(document).height()*0.3 );
					
		});
		
		$(".contact_bt").click(function(event) {
					event.preventDefault();
					//alert( $(document).height() );
					$('html, body').animate({scrollTop: $("#bottom").offset().top}, $(document).height()*0.3 );
					
		});
		
	    $(".arrow_dup a").hover(function() {
               jQuery("img", this).stop().fadeTo('fast', 0);
        },function() {
               jQuery("img", this).stop().fadeTo('fast', 1);
        });
		

		
		
	if(!$.browser.msie){
		
		
        $(".footer .footerOver a").hover(function() {
               jQuery("img", this).stop().fadeTo('fast', 0);
               jQuery("span", this).stop().animate({ color : "#b2c200" }, "fast");
        },function() {
               jQuery("img", this).stop().fadeTo('fast', 1);
               jQuery("span", this).animate({ color: "#5e5e5e" }, "fast");
        });
		
		
		
	}
	else {
		 $(".footer .footerOver a").hover(function() {
               jQuery("img", this).stop().css({ visibility: "hidden" });
               jQuery("span", this).stop().animate({ color : "#b2c200" }, "fast");
        },function() {
               jQuery("img", this).stop().css({ visibility: "visible" });
               jQuery("span", this).animate({ color: "#5e5e5e" }, "fast");
        });
		
		
	}

}); //$(document).ready(function() {

