refactor anim. switch to transition anim for modern browsers. Fixes #582