/**
 * TypeWriter - jQuery plugin for quick TypeWriter effects
 * http://labs.rnzmedia.co.za/
 * @requires jQuery Library: http://jquery.com/
 * 
 * Copyright (c) 2011 Riaz Sabjee
 * 
 * Dual licensed under the MIT and GPL licenses:
 * http://www.gnu.org/licenses/gpl.html
 * 
 */

(function (a) {
	a.fn.extend({
		typewriter: function (time,easing) {
			/*
			
				var b = a(this);
				a(b).each(function () {
					var d = a(b).text(), c = 0;
					a(b).text("");
					var e = setInterval(function () {
						a(b).text(d.substring(0, c++) + (c & 1 ? "_" : ""));
						c >= d.length && clearInterval(e)
					}, 100)
				})
			})
			*/
			return this.each(function () {
				var b = a(this);
				a(b).each(function () {
					var tf = a(b);
					var t = a(b).text();
					$.aease(0,t.length,time,easing,function(){var i = Math.floor(arguments[0]);
					tf.text(t.substr(0,i));
					});
				});
			});
			
		}
	})
})(jQuery);
