$(document).ready(function()
{
	if (!supports_input_placeholder())
		$('input[placeholder]').placeholder();
});

/* Check if placeholders on inputs is supported. From: http://diveintohtml5.org/detect.html#input-types */

function supports_input_placeholder()
{
	var i = document.createElement('input');
	return 'placeholder' in i;
}

/* Javascript fallback. From: http://github.com/sunny/provide-html5/ */

$.fn.placeholder = function() 
{
	return $(this)
	.focus(function()
	{
		if ($(this).val() === $(this).attr('placeholder'))
			$(this).val('');
		$(this).css('color', 'rgb(0,0,0)');
	})
	.blur(function()
	{
		if ($(this).val() === '')
			$(this).val($(this).attr('placeholder'));
		$(this).css('color', 'rgb(102,102,102)');
	}).blur();
}

