Effect = function(fps, d, equation){
	var o = this;
	o.fps = fps; o.target = d;
	o.equation = equation || Math.linearTween;
	o.onframe = function(c){
		var n = o.equation(c, o.ini, o.end, o.fps * o.duration); n = (o.rev ? o.end - n : n);
		if(o.prop instanceof Function)
			o.prop(d, c, n);
		else
			d.style[o.prop] = n + o.unit;
	}
	o.onstop = function(c){
		this.onEnd && this.onEnd(this.target);
	}
	o.init = function(prop, unit, ini, end, dur){
		o.prop = prop, o.unit = unit, o.duration = dur;
		if(o.rev = ini > end)
			o.ini = -end, o.end = ini;
		else
			o.ini = ini, o.end = end;
		o.frames = o.fps * dur;
		o.start();
	}
}
Effect.prototype = new TimeLine;
