var MenuSmooth = new Class({
    Implements: Options,
    options: {
        duration: '500',
        elements: null,
        color1: '#595965',
        color2: '#faec8f'
    },

    initialize: function(options){
        this.setOptions(options);
        this.setTweenToElements();
    },

    setTweenToElements: function(){
        if (this.options.elements != null)
        {
            var hrefElement;
            this.options.elements.each(function(el)
                {
                    hrefElement = el.getElement('a');
                    if (hrefElement != null){
                    el.addEvents({
                    'mouseenter': function(){
                        hrefElement = el.getElement('a');
                        hrefElement.set('tween', {duration: this.options.duration});
                        hrefElement.tween('color', this.options.color2);
                        el.set('tween', {duration: 200});
                        el.tween('margin-left', 10);
                        
                    }.bind(this),
                    'mouseleave': function(){
                        hrefElement = el.getElement('a');
                        hrefElement.set('tween', {duration: this.options.duration});
                        hrefElement.tween('color', this.options.color1);
                        el.set('tween', {duration: 200});
                        el.tween('margin-left', 0);
                    }.bind(this)
                });}
                },this
            );
        }
    }
});
