var Cursor = Class.create();
Cursor.prototype = {

    xdelta: 15, ydelta: 10,
    collection: null,
    el: null,

    //name: {url: '', alt: ''}

    initialize: function(params){


        this.el = new Element('img');
        document.getElementsByTagName('body')[0].appendChild(this.el).hide();
        this.el.style.position = 'absolute';
        this.el.style.zIndex = '1000';

        this.folow = this.folow.bindAsEventListener(this);
        Event.observe(document, 'mousemove', this.folow);
    },


    attach: function(url, alt){
        this.el.src = url;
        this.el.alt = alt;
        this.el.show();
        //this.folow = this.folow.bindAsEventListener(this);
        //Event.observe(document, 'mousemove', this.folow);
    },


    folow: function(event){
        this.el.style.left = Event.pointerX(event) + this.xdelta + 'px';
        this.el.style.top = Event.pointerY(event) + this.ydelta + 'px';
    },


    reset: function(){
        this.el.src = null;
        this.el.hide();
        //Event.stopObserving(document, 'mousemove', this.folow);
    }


}// end class
