//= require <mootools-core-1.3-full-nocompat>
var Tween = function(){
	
	this.Extends = Fx;

	/**
	 * The function to be called with each
	 * step in the animation.
	 */
	this.updateFunction = null;

	/**
	 * The function to be called when the
	 * animation completes.
	 */
	this.completeFunction =  null;

	this.inTween = false;

	/**
	 * @ignore
	 */
	this.initialize = function(options, updateFunction, completeFunction)
	{
		this.parent(options);
		
		this.updateFunction = updateFunction || function(){};
		this.completeFunction = completeFunction || function(){};
	};

	this.set = function(value)
	{
		if (value)
			this.updateFunction(value);
		return value;
	};

	this.complete = function()
	{
		this.completeFunction(this.to);
		this.parent();
	};

	this.startTimer = function()
	{
		this.inTween = true;
		this.parent();
	};

	this.stopTimer = function()
	{
		this.inTween = false;
		this.parent();
	};
};
Tween = new Class(new Tween());
