Close the error message in Register form after 5 seconds

If you want to close the error message automatically after 5 seconds in the register form, use the jquery/javascript sample code below: