Add AJAX states to script