var speed = 300;

function fieldFocus()
{
	if ($(this).val() == 'Votre Nom Complet'
		|| $(this).val() == 'email'
		|| $(this).val() == 'Your website URL'
		|| $(this).val() == 'Objet de votre email'
		|| $(this).val() == 'Tapez Votre Message ici'
		)
	{
		$(this).animate({
		    color: '#ffffff'
		}, speed, function() { $(this).val(''); $(this).css('color', '#000000'); });
	}

	if ($(this).val() != 'Votre Nom Complet'
		|| $(this).val() != 'email'
		|| $(this).val() != 'Your website URL'
		|| $(this).val() != 'Objet de votre email'
		|| $(this).val() != 'Tapez Votre Message ici'
		)
	{
		$(this).animate({
		    color: '#000000'
		}, speed);
	}
}

function fieldBlur()
{
	if ($(this).val() == 'Votre Nom Complet'
		|| $(this).val() == 'email'
		|| $(this).val() == 'Your website URL'
		|| $(this).val() == 'Objet de votre email'
		|| $(this).val() == 'Tapez Votre Message ici')
	{
		$(this).stop();
		$(this).css('color', '#ffffff');
	}
	
	if ($(this).val() != '')
	{
		$(this).animate({
		    color: '#aaaaaa'
		}, speed);
	}

	if ($(this).val() == '')
	{
		$(this).stop();
		$(this).css('color', '#ffffff');
		
		if ($(this).attr('id') == 'contact_name') { $(this).val('Votre Nom Complet'); }
		if ($(this).attr('id') == 'contact_email') { $(this).val('email'); }
		if ($(this).attr('id') == 'contact_website') { $(this).val('Your website URL'); }
		if ($(this).attr('id') == 'contact_subject') { $(this).val('Objet de votre email'); }
		if ($(this).attr('id') == 'contact_message') { $(this).val('Tapez Votre Message ici'); }
		
		$(this).animate({
		    color: '#aaaaaa'
		}, speed);
	}
}

$(document).ready(function() 
{
	$('.contact-form').focus(fieldFocus);
	$('.contact-form').blur(fieldBlur);
});

