/* 
pbeck:
jquery.animation-fix.js from stackoverflow comments
reduces framerate (adjust setInterval(jQuery.fx.tick, XXX)
default was 13 ms = 77 fps !
*/

jQuery.fx.prototype.custom = function( from, to, unit ) {
    this.startTime = (new Date).getTime();
    this.start = from;
    this.end = to;
    this.unit = unit || this.unit || "px";
    this.now = this.start;
    this.pos = this.state = 0;

    var self = this;
    function t( gotoEnd ) {
        return self.step(gotoEnd);
    }

    t.elem = this.elem;

    if ( t() && jQuery.timers.push(t) && !jQuery.fx.prototype.timerId ) {
        timerId = setInterval(jQuery.fx.tick, 33);
        jQuery.fx.prototype.timerId = setInterval(jQuery.fx.tick, 2050);
    }
}


