/**
 * This class simply provides a way to handle multiple click
 * by showing a div under the mouse cursor.
 */

var myCursor = new Abstract({

	init: function() {
		this.cursor = new Element('img', {
						id: 'cursor',
						src: js_contextPath + '/img/cursor/cursor.gif',
						alt: ''
					});
				
		
		document.addEvent('mousemove',this.moveCursor.bindAsEventListener(this));
		
	}, 
	'attachCursor':function( parentObj ){
		parentObj = parentObj || document.body;
		this.cursor.inject ( parentObj );
	},
	moveCursor: function( e ) {
		e = new Event(e);
		this.cursor.setStyles({
				'top': (e.page.y - 5),
				'left': (e.page.x - 5)
			});
	},
	
	show: function () {
		this.cursor.setStyle('display','block');
	},
	
	hide: function () {
		this.cursor.setStyle('display','none');
	}
	
	
});

// Starting the cursor...
myCursor.init();
window.addEvent('domready', function() {
	myCursor.attachCursor( document.body );
});




