/*
	SEP-2008, JAVIER AGUILAR
	
	PLUGIN PARA jQuery para AUMENTAR Y DISMINUIR LA FUENTE
	NOTA: para que funcione, la propiedad font-size debe ser en '%' o 'em' y no en 'px' o 'pt'
*/

jQuery.font = {
	units : '%',
	defaultSize : 100,
	currentSize : 100,
	maxSize: 200,
	minSize: 50,
	zoomStep: 10,
	zoom : function(newSize){
		if ((this.units!='em') || (this.units!='%')){
			this.units='%';
		}
		var stObj = (document.getElementById) ? document.getElementById('header') : document.all('header');
		document.body.style.fontSize = newSize + this.units;
		this.currentSize = newSize;
	},
	zoomIn : function(){
		if (this.currentSize <= this.maxSize){
			this.currentSize += this.zoomStep;
			this.zoom(this.currentSize);
		}else{
			this.zoom(100);
		}
	},
	zoomOut : function(){
		if (this.currentSize >= this.minSize){
			this.currentSize -= this.zoomStep;
			this.zoom(this.currentSize);
		}else{
			this.zoom(100);
		}	
	}
}

/*Ejemplo:  $.font.zoomIn() */