Adept.Core.namespace('AdeptCms');

AdeptCms.RollOver = Class.create(Adept.Controller, {

    outSrc: null,
    overSrc: null,
    
    initialize: function($super, id, overSrc) 
    {   
        $super(id);
        this.overSrc = overSrc;
        Adept.Observer.addListener(id, 'mouseover', this.onMouseOver.bind(this));
        Adept.Observer.addListener(id, 'mouseout', this.onMouseOut.bind(this));
    },
    
    onMouseOver: function(event) 
    {
        this.outSrc = this.getElement().src;
        this.getElement().src = this.overSrc;
    },
    
    onMouseOut: function(event) 
    {
        this.getElement().src = this.outSrc;
    }

});