Add the ajax_loading function