Need some jquery help

I have a form with 2 fields.

The first field data needs to be verified before the user can go on to step 2. I have already written and tested the method to do this, and it uses ajax validation nicely.

The next step is to hide the 2nd input field. If the first field does not validate, an error message is rendered. A that point I need to:

  1. Reset focus to the first field

  2. Have the user resubmit the data

If the 1st field data does validate we should show the second field.

Once both fields are filled in I will use the onChange of the 2nd field to trigger form submission. Looking for help with the hiding/showing and focus parts. Thanks.