$(document).ready(function() {
  
  $('.emptyBlank').each(function() {
	  
	  var defarr=$(this).attr('value');
  	defarr=defarr.split('---');

    if(defarr.length == 2){
    
      var def=defarr[0];
      var newVal=defarr[1];
      
      if(newVal.length > 0){
        $(this).val(newVal);
      }else{
        $(this).val(def);
      } 
    
    }else{
      // No --- found so assume just default in the box
    
      var def=defarr;
    
      $(this).val(def)
    
    }
  
	  
    if($(this).val() == def) {
    	$(this).css('color','#999');
    }
    
    $(this).focus(function() {
      if($(this).attr('value') == def){
        $(this).attr('value','');
        $(this).css('color','#000');
      }
    });
    
    $(this).blur(function() {
      if($(this).attr('value').length ==0){
        $(this).attr('value',def);
        $(this).css('color','#999');
      }
    });
    
  });
  
});