// JavaScript Document

window.addEvent('domready', function(){

	var szNormal = 0, szSmall  = 10, szFull = 100;
	 
	var projects = $$(".projectOuter");
	var info = $$(".projectDetailsContainer");
	var fx = new Fx.Elements(info, {wait: false, duration: 350, transition: Fx.Transitions.Cubic.easeOut});
	
	projects.each(function(proj, i){
		proj.addEvent("mouseenter", function(event) {
			var o = {};
			info.each(function(inf, j) {
				if(i == j){
					o[j] = {height: [inf.getStyle("height").toInt(), szFull]}
				}else{
					o[j] = {height: [inf.getStyle("height").toInt(), szNormal]}
				}
			});
			fx.start(o);
		});
	});

	$("projects").addEvent("mouseleave", function(event) {
		var o = {};
		info.each(function(inf, i){
			o[i] = {height: [inf.getStyle("height").toInt(), szNormal]}
		});
		fx.start(o);
	});

});
