// Check if browser supports HTML5 input placeholder
function supports_input_placeholder() {
	var i = document.createElement('input');
	return 'placeholder' in i;
}

// Change input text on focus
if ($('.wpcf7-form').length != 0) {
	if (!supports_input_placeholder()) {
		// initialize placeholder text
		$('input[type="text"]').each(function(){
			var self = $(this);
			
			self.val(self.attr('placeholder'));
		});
		
		// remove on focus, replace on blur
		$('input[type="text"]').focus(function(){
			var self = $(this);
			if (self.val() == self.attr('placeholder')) self.val('');
		}).blur(function(){
			var self = $(this), value = $.trim(self.val());
			if(value == '') self.val(self.attr('placeholder'));
		});
	} else {
		$(':text').focus(function(){
			$(this).css('color', '#000');
		});
	}
}
