 Math.pow;
var now = function() { return new Date().getTime(); };

// Quad beizer where t is between 0 and 1.
function quadBezier(t, p0, p1, p2, p3) {
  return pow(1 - t, 3) * p0 +
         3 * pow(1 - t, 2) * t * p1 +
         (1 - t) * pow(t, 2) * p2 +
         pow(t, 3) * p3;
}

function easeIn(t) {
  return quadBezier(t, 0.4, 0.0, 1, 1);
}

function cssColorWithAlpha(cssColor, alpha) {
    var parts = cssColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
    if (typeof alpha == 'undefined') {
        alph