$(document).ready(function() { 

	$(':text:not(.search-text)').addClass('text-input');
   
	// Selects
	$('select').focus(function () {
		$(this).addClass('focus');
	}); 
	
	// Inputs and textareas
	$(':text:not(.search-text), textarea').each(function (i) {
		
		var initial_value = $(this).attr('value');
	
		$(this).focus(function () {
			$(this).addClass('focus');
		
			// Clear only initial value
			if ($(this).attr('value') === initial_value) {
				$(this).attr('value', '');
			}
		}); 
	});
	
	// Restore border line color on focus
	$(':text, select, textarea').blur(function () {
		$(this).removeClass('focus');
	});
} );     
function cleardefault(object, defaultText, replaceText) {
	if (object.value == defaultText) {
		object.value = replaceText;    
	}
}
