$(function()
{
	// Zet de de waarde van inputs met een titel naar de titel
	$('input[title]').each(function()
	{
		$(this).val($(this).attr('title'));
	});
	
	// Als een input met titel de focus krijgt haal 'm dan weg
	$('input[title]').focus(function()
	{
		if ($(this).val() == $(this).attr('title'))
		{
			$(this).val('');
		}
	
	// Of zet 'm er weer neer als het veld leeg is en hij verliest de focus
	}).blur(function()
	{
		if ($(this).val().replace(' ', '') == '')
		{
			$(this).val($(this).attr('title'));
		}
	});
	
	// Als een formulier gesubmit wordt, maak alle velden
	// leeg waarvan de waarde hetzelfde is als de titel
	$('form').submit(function()
	{
		$(this).find('input[title]').each(function()
		{
			if ($(this).val() == $(this).attr('title'))
			{
				$(this).val('');
			}
		});
	});
});
