I'd move this .hide() to before the #error-window-related pieces.