I have a jQuery animate event, with other animations within the callback event of this animation.

I need to be able to detect when everything has finished doing what it is doing, and then call a function at that time. 

As there are a few different outcomes as to what animations take place I am struggling to get it working as I need, and the above solution would clear it up completely. 

```
jQuery('.A_Item').stop().animate(Properties, 250, function () {

        var el = jQuery(sID);
        if (!IsOpen) {

            jQuery(el).stop(true, true).animateAuto("height", 250,
                function () {

                    jQuery('body').stop().animate({ scrollTop: oButton.offset().top }, 250, function () {

                        if (IsSubItem) {

                            jQuery(el).parent().stop().animateAuto("height", 500,
                                function () {
                                    var sButtonID = sID.replace('.A_Item', '').replace('#', '');
                                    jQuery('body').stop().animate({ scrollTop: jQuery('.Button[item="' + sButtonID + '"]').offset().top }, 500);
                                });

                        }

                    });
                }
            );

        }

    });

```