Add a public API for setting animation's duration

This commit fixes issue #2. Before animation's duration was hardcoded to 0.25 seconds. Now it's set by default to 0.25, but it's possible to change it.