/*
	This will enable us to use this function in case we load a page using AJAX
*/
jQuery(document).ready( function($) {
	$("input[default]").each( function() {

		var defaultValue = $(this).attr("default");
		var currentValue = $(this).val();

		// This will make sure not to replace exisitng values
		if( !currentValue ) {
			$(this).val( defaultValue ).addClass('input-before-focus');
		}

		$(this).focus( function() {
			if( $(this).val() == defaultValue ) {
				$(this).val('').removeClass('input-before-focus');
			}
		});

		$(this).blur( function() {
			var currentVal = $(this).val();

			if( currentVal == '' ) {
				$(this).val(defaultValue).addClass('input-before-focus');
			}
		});
	}); // end function
});