Add body class while animating

Im trying to add a class on body while the pane is animating, to do this i add a function on the 'animating' event who add a class on the body and other function who remove this class on the event 'animated'.

http://jsfiddle.net/Us8DT/

As you can see in the fiddle, the class 'snapjs-(left/right)' dont get removed after the panel close.