Update ajax-functions.php

Fixed a blog switching bug and added localization.