var infoPane = new Class({

    Implements: [Options, Events],
    options: {
        parentElement: '',
        infoElement: '',
        hoverDuration: 100,
        leaveDuration: 100,
        animationHover : '',
        animationLeave : ''
    },
    infoPane : '',
    initialize: function(options) {
        this.setOptions(options);
        
        infoPane = this;
        var options = infoPane.options;
        infoPane.parent = $$(options.parentElement);
        infoPane.target = $$(infoPane.parent.getElement(options.infoElement));
                
        infoPane.parent.each(function(el) {
            el.addEvents({
                'mouseenter' : function() {
                    infoPane.reset();
                    el.getElement(options.infoElement).set('morph', { duration: options.hoverDuration }).morph(options.animationHover);
                },
                'mouseleave' : function() {
                    el.getElement(options.infoElement).set('morph', { duration: options.leaveDuration }).morph(options.animationLeave);
                }
            });
        });
        
    },
    reset : function() {
        var options = infoPane.options;
        infoPane.target.set('morph', { duration: options.leaveDuration }).morph(options.animationLeave);
    }

});
