$(document).ready(function(){
    // set all input.text default value according to alt attribute
    $("input.clearableForm").each(function(){
      $(this).val($(this).attr("alt"));
    });

    // clear input.text on focus, if still in default
    $("input.clearableForm").focus(function() {

      if($(this).val()==$(this).attr("alt")) {
        $(this).val("");
      }
    });

    // if field is empty afterward, add text again
    $("input.clearableForm").blur(function() {
      if($(this).val()=="") {
        $(this).val($(this).attr("alt"));
      }
    });
});
