var topNormal = 80, topFull = 0;

var duracion = 400;

var transUp = Fx.Transitions.Cubic.easeOut;

var transDown = Fx.Transitions.Cubic.easeOut;



var fx = new Fx.Elements($('content'), {wait:false, duration:duracion, transition: transUp});

var fxs = {};	

window.addEvent("domready",function(){

	var subir = function(e) {

		e = new Event(e);	var a = e.target;	a = $(a);

		while(a.getTag()!="div" || !a.hasClass("neo_hold"))

			a=$(a.getParent());

		if(a.hasClass("neo_hold")) {

			var b = a.getElement('div[class=neo_goup]');

			b=$(b);		

			if(b) { 

				if(b.getProperty("moving") > 0) {

					fxs[b.getProperty("moving")].stop();

					b.setProperty("moving",0);

				}



				fx = new Fx.Elements(b, {wait:false, duration:(b.getStyle("top").toInt()/topNormal)*duracion, transition: transUp});

				var o = {};   o[0]={ 'top': [topFull]};					   

				var ran = $random(0,100000);

				fxs[ran]=fx;

				b.setProperty("moving",ran);

				fx.start(o);

			}

		} 

	}



	var bajar = function(e) {

		e = new Event(e); 	var a = e.target;	a = $(a);

		while(a.getTag()!="div" || !a.hasClass("neo_hold"))

			a=$(a.getParent());

		if(a.hasClass("neo_hold")) {

			var b = a.getElement('div[class=neo_goup]');

			b=$(b);

			if(b) { 	

			    if( b.getProperty("moving") > 0) {

					fxs[b.getProperty("moving")].stop();

					b.setProperty("moving",0);						}



				fx = new Fx.Elements(b, {wait:false, duration:((topNormal-b.getStyle("top").toInt())/topNormal)*duracion, transition: transDown});

			    var o = {};	o[0]={ 'top': [topNormal]};

				b.setProperty("moving",1);

			    var ran = $random(0,100000);

			    fxs[ran]=fx;

			    b.setProperty("moving",ran);						

			    fx.start(o);

			}

		};

	};



		$$('.neo_on').addEvent("mouseenter",subir);		

		$$('.neo_on').addEvent("mouseleave",bajar);

})