      $(document).ready(function(){
 
        // set all input.text default value according to alt attribute
        $("input.text").each(function(){
          $(this).val($(this).attr("alt"));
        });
 
        // clear input.text on focus, if still in default
        $("input.text").focus(function() {
 
          if($(this).val()==$(this).attr("alt")) {
            $(this).val("");
          }
        });
 
        // if field is empty afterward, add text again
        $("input.text").blur(function() {
          if($(this).val()=="") {
            $(this).val($(this).attr("alt"));
          }
        });

        // set all input.text default value according to alt attribute
        $("textarea").each(function(){
          $(this).val($(this).attr("alt"));
        });
 
        // clear input.text on focus, if still in default
        $("textarea").focus(function() {
 
          if($(this).val()==$(this).attr("alt")) {
            $(this).val("");
          }
        });
 
        // if field is empty afterward, add text again
        $("textarea").blur(function() {
          if($(this).val()=="") {
            $(this).val($(this).attr("alt"));
          }
        });
 
      });
 


