Executing the stop() method causes corruption of element's original attributes

Description

When you execute the stop() method on an animation, some corruption to the original element can occur. This is because the animate() method automatically changes some properties of the element in order to get the correct visual effect.

In normal circumstances the original state of the element is restored during the step() method when the "done" condition is true.

The problem is when you call the stop() method on an element these original properties are overwritten with properties of the element in it's current stopped state.

If you click the "Timed Animation" button you'll see that the "overflow" on "Menu 1" is lost.

This is because midway through the animation queue, the stop() method is called on the element. Since the animate() method automatically sets the overflow to hidden (for animating height,) after the stop() method is called and we attempt to restore the element to it's original height, the animate() method sees that the overflow is currently set to "hidden" and therefore never properly removes the overflow value when the animation is done.

I've been able to fix this by tracking the original properties of the element and then clearing the settings once the queue is emptied.