var textSize = new Class({
	options: {
		increment: 2,
		fx: false,
		startSize: false
	},
	initialize: function(container, options){
		this.setOptions(options);
		this.copy = $(container);
		this.fx = new Fx.Style(container, 'font-size').start(this.options.startSize, this.options.startSize);
		this.currentSize = this.options.startSize;
		this.togglers = $('accessbility').getElements('a');
		this.active = 0;
		this.toggle();
	},
	toggle: function(){
		this.togglers[this.active].addClass('active');
		this.togglers.each(function(el, i){
			el.addEvent('click', function(e){
				new Event(e).stop();
				this.togglers[this.active].removeClass('active');
				el.addClass('active');
				this.fx.start(this.currentSize, ((i*this.options.increment)+10));
				this.currentSize = ((i*this.options.increment)+10);
				this.active = i;
			}.bind(this));
		}.bind(this));
	}
});
textSize.implement(new Options);

window.addEvent('domready', function(){
	if($('bodyCopy')) new textSize('bodyCopy', {startSize: 10});
});