I'm trying to debug a bit of code and can't seem to figure out why this won't work. I've read through the AJAX/AJAX events on the Jquery site, read through several Stack threads and still this won't work. The script is showing and hiding DIVs during an AJAX call. The DIV with the "loading" animated gif won't show, so it appears to the user that nothing is going on. I was able to get the div to show with a settimeout, but the animation wasn't running. below is the code, anyone have any pointers for me?

function ajax_email_proc() {
    $("div#email_proc_form").hide();          // hide form
    $("div#emaiL_proc_saving").show();     // show loading gif
    $('.procselector:checked').each(function(index) {
        for (var i=0; i< email_array.length; i++) {
	});//close ajax function
} // for email array loop
}); // each loop