fixed animantion + unittest

Added unitest with qunit. First test. And fixed one error in with
animation.