var Site = {

	start: function(){
		if ($('klass')) Site.parseKlasses();
	},

	parseKlasses: function(){
		var moneys = $$('#klass .klass');
		var effects = Array();
		var fx = new Fx.Elements(moneys, {wait: false, duration: 200, transition: Fx.Transitions.quadOut});
		var spans = $$('#klass span');
		moneys.each(function(money, i){
			money.addEvent('mouseover', function(e){
				e = new Event(e).stop();
				var obj = {};
				obj[i] = {
					'width': [money.getStyle('width').toInt(), 380]
				};
				moneys.each(function(other, j){
					if (other != money){
						var w = other.getStyle('width').toInt();
						if (w != 169) obj[j] = {'width': [w, 169]};
					}
				});
				fx.start(obj);
			});
		});
		document.addEvent('mouseover', function(e){
			e = new Event(e);
			var rel = e.relatedTarget;
			if (!rel) return;
			if (rel.hasClass && (rel.hasClass('klasses') || rel.hasClass('klass') || rel.id == 'klass')){
				var obj = {};
				moneys.each(function(other, j){
					obj[j] = {'width': [other.getStyle('width').toInt(), 222]};
				});
				fx.start(obj);
			};
		});
	}
};

window.addEvent('domready', Site.start);
