From http://kirupa.googlecode.com/svn/trunk/easing.js