function FontResize(_id, _sourceElementId, _startFontSize, _endFontSize, _fps, _duration) {
	var self = this;
	this.cntElementStyle;
	this.sourceElement;
	this.unsignedStep;
	this.step;
	this.cntFontSize;
	this.direction;
	this.active = 0;
	this.id = _id;
	this.sourceElementId = _sourceElementId;
	this.startFontSize = _startFontSize; //px
	this.endFontSize = _endFontSize; //px
	this.fps = _fps;
	this.duration = _duration; //ms
	
	setTimeout (function () { self.fontresize(); }, 100);
	
	this.fontResize = function() {
		self.cntFontSize += self.step;
		
		if (self.direction == '+') {
			if (self.cntFontSize > self.endFontSize)
				self.cntFontSize = self.endFontSize;
			if (self.cntFontSize < self.startFontSize)
				self.cntFontSize = self.startFontSize;
		}
		else {
			if (self.cntFontSize < self.endFontSize)
				self.cntFontSize = self.endFontSize;
			if (self.cntFontSize > self.startFontSize)
				self.cntFontSize = self.startFontSize;
		}
		self.cntElementStyle.fontSize = self.cntFontSize + "px";
		if (self.cntFontSize==self.startFontSize || self.cntFontSize==self.endFontSize) {
			self.active = 0;
			return;
		}
		else
			setTimeout(function() { self.fontResize(); }, Math.round(1000/self.fps));
	}
	
	this.enable = function() {
		self.step = self.unsignedStep;
		if (!self.active) {
			self.active = 1;
			self.fontResize();
		}
	}
	
	this.disable = function() {
		self.step = -self.unsignedStep;
		if (!self.active) {
			self.active = 1;
			self.fontResize();
		}
	}
	
	this.fontresize = function() {
		self.cntElementStyle = document.getElementById(self.id).style;
		self.sourceElement = document.getElementById(self.sourceElementId);
		self.cntFontSize = self.startFontSize;
		self.cntElementStyle.fontSize = self.cntFontSize + "px";
		
		if (self.startFontSize <= self.endFontSize)
			self.direction = '+';
		else
			self.direction = '-';
		self.unsignedStep = (self.endFontSize - self.startFontSize)/self.duration*Math.round(1000/self.fps);
		
		self.sourceElement.addEventListener("mouseover", self.enable, true);
		self.sourceElement.addEventListener("mouseout", self.disable, true);
	}
}
