function ChangeSize(object, direction, pixels) {
	this.Object = $(object);
	this.Direction = direction ? direction == 1 || direction == 2 ? direction : 1 : 1;
	this.Pixels = pixels;
	this.InitialWidth = this.Object.offsetWidth;
	this.InitialHeight = this.Object.offsetHeight;
	this.Moving = {grow: false, shrink: false};
	
	this.grow = function(obj, timeout) {
		if(obj.Object.offsetHeight >= this.InitialHeight + this.Pixels && obj.Object.offsetWidth >= this.InitialWidth + this.Pixels || this.Moving.shrink) {
			this.Moving.grow = false;
		} else {
			obj.Object.style.width = (obj.Object.offsetWidth + 2) + "px";
			obj.Object.style.height = (obj.Object.offsetHeight + 2) + "px";
			obj.Object.style.left = (obj.Object.offsetLeft - 1) + "px";
			obj.Object.style.top = (obj.Object.offsetTop - 1) + "px";
			window.setTimeout(bindFunction(function() {this.grow(obj)}, this), timeout);
		}
	}
	
	this.shrink = function(obj, timeout) {
		if(obj.Object.offsetHeight <= this.InitialHeight && obj.Object.offsetWidth <= this.InitialWidth || this.Moving.grow) {
			this.Moving.shrink = false;
		} else {
			obj.Object.style.width = (obj.Object.offsetWidth - 2) + "px";
			obj.Object.style.height = (obj.Object.offsetHeight - 2) + "px";
			obj.Object.style.left = (obj.Object.offsetLeft + 1) + "px";
			obj.Object.style.top = (obj.Object.offsetTop + 1) + "px";
			window.setTimeout(bindFunction(function() {this.shrink(obj)}, this), timeout);
		}
	}
	
	this.Object.onmouseover = bindFunction(function() {
		if(this.Moving.shrink) {
			this.Moving.shrink = false;
		}
		if(!this.Moving.grow) {
			this.Moving.grow = true;
			window.setTimeout(bindFunction(function() {this.grow(this, 20)}, this), 20);
		}
	}, this);
	
	this.Object.onmouseout = bindFunction(function() {
		if(this.Moving.grow) {
			this.Moving.grow = false;
		}
		if(!this.Moving.shrink) {
			this.Moving.shrink = true;
			window.setTimeout(bindFunction(function() {this.shrink(this, 20)}, this), 20);
		}
	}, this);
}
