Can anyone help me translate this Javascript code line the Drupal Way?
jQuery("input:text:visible:first").focus();


Becomes

Drupal.behaviors.focustextfield = function(context) {
  $("input:text:visible:first:not(.focustextfield-procd)", context).addClass("focustextfield-procd").focus();
}