Can anyone help me translate this Javascript code line the Drupal Way? I need to convert this code line (it focuses the cursor to the first input of a form) to Drupal behaviourism. Can anyone help me put it the Drupal bushido way?

jQuery("input:text:visible:first").focus();
jQuery("input:text:visible:first").focus();


Becomes

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