/*
 * searches for all form fields of class type "prepopulated" and attaches click and blur events to see that their prepopulated values are kept
 * unless something else is entered. 
 */
$(document).ready(function() {

   //tie onclick event that clears prepopulated value
   $('.prepopulated').click(function () { 
	  if( $(this).val() == this.title )
	      $(this).val(''); 
   });
   
   //tie onblur event that resets populated value if empty
   $('.prepopulated').blur(function () { 
	  if ( $(this).val().replace(/\s*/, "") == '' ){
	  	 $(this).val( this.title );
	  } 
    });

});

