jQuery(document).ready(function(){

	jQuery('#header').click(function(){
		tb_show(null,'formcatcher.php?height=500&amp;width=800',false);
	});
	
	jQuery('#content').click(function(){
		tb_show(null,'formcatcher.php?height=500&amp;width=800',false);
	});

	jQuery('#mailform').submit(function(){
		var email = jQuery('input#mail').val();
		if(VerifForm(email) == false){
			alert('Veuillez saisir un mail de la forme "nom@domaine.com"');
			return false;
		}
	});
	
	jQuery('#mail').focus(function(){
		if($(this).val() == "@"){
			$(this).val('');
		}
	});
	
	jQuery('#mail').blur(function(){
		if($(this).val() == ""){
			$(this).val('@');
		}
	});	
	
	
	
	/**/
	
	jQuery('#big_cta').hover(function(){
		jQuery("#cta").css('background-position','top left');
	});
	
	jQuery('#big_cta').mouseleave(function(){
		jQuery("#cta").css('background-position','bottom left');
	});
	
	
});

function VerifForm(email)
	{
	adresse = email;
	var place = adresse.indexOf("@",1);
	var point = adresse.indexOf(".",place+1);
	if ((place > -1)&&(adresse.length >2)&&(point > 1)){
		return(true);
	}
	else{
	return(false);
	}
}