/*
	Author: Jesse Thompson
	Date: February 25rd 2010
	
	ex:
	$("#div").from({opacity:"0",height:"0px"},
			{time:1000,onComplete:func,tween:"linear"});
*/

(function($){
		$.fn.to = function(fromCSS,options) {   
		var defaults = {
			time: 500,
			tween: null,
			onComplete: null
		};
		var obj;
		var oldCSS;
		var options = $.extend(defaults, options);
		var animTime = 500;
		
		return this.each(function() {

			var obj = $(this);
			var cpy = jQuery.extend({}, fromCSS);

			$.each(fromCSS, function(i, n){
				//cpy[i] = obj.css(i);
				//obj.css(i,n);
			});
			
			$(this).animate(cpy,options.time,options.tween,options.onComplete);
		});
};
})(jQuery);

