I know how to wait till an animation is done with
$(\'#element\').animate(speed,function(){ //code here });
and with multiple elements with
To select everything that's being animated currently, just do $(":animated") http://api.jquery.com/animated-selector/
$(":animated")
Combining that with what you already have there, it'd just be
$(":animated").promise().done(function() { //code here });