Do not animate if duration set to zero

Update minified version, hoist vars