Jquery + Ajax Verify if New Site URL is available

On the wp-signup.php page there is an input for your desired URL. If the user enters a url slug that is already in use, on the page submit they get the error: "Sorry, that site already exists!" How tricky would it be to check this before the page submits? So client-side, maybe with some ajax and jquery?