
var hoverEffect;

var hover_animation = Class.create({
		
	initialize: function(conteiner, cuanto) {
    	this.conteiner = $$('#' + conteiner + ' div a');
		this.cuanto = cuanto;
		this.set_listeners();
  	},

	set_listeners: function() {
		var obj = this;
		//this.conteiner.childElements().each(function(element){
			this.conteiner.each(function(element){
			element.setStyle({ 'position':'relative' });
			
			element.observe('mouseover', function(event){
			  obj.mouseOverItem(element);
			});
			
			element.observe('mouseout', function(event){
			  obj.mouseOutItem(element);
			});
		})
		
	},
	
	/*** ANIMATION HOVER ***/

 	mouseOverItem: function(element) {
		var obj = this;
		hoverEffect = new Effect.Morph(element, {
			style:'top: '+ obj.cuanto +'px;',
			duration:0.3
		});
	},

	mouseOutItem: function(element) {
		hoverEffect.cancel();
		element.morph('top: 0px;',{duration:0.3});
	}
	

});






