window.addEvent('domready', function() {	
	myMap = new map_animate();
});

Element.implement({
	addGreedyEvent : function(type, fnc){
		var target = this;
		this.addEvent(type,function(e){
			var a = new Event(e);
			a.target=target;
			fnc(a);
		})
	}
})

var map_animate = new Class({
		initialize : function(  ) {
		
			
			
		},
		moveNumberToLocation: function( noID, posX, posY ) {

			posX = ( posX ) - 20;
			posY = ( posY ) - 10;
			if(	$(noID).fx )
			$(noID).fx.cancel();
				$(noID).fx = new Fx.Morph( $(noID), {
									duration : 500
								}).start({
									'opacity' : 1,
									'display' : 'block',
									'margin-top' : posX,
									'margin-left' : posY
								});

		
		},
		moveNumberBack: function( noID ) {
			posX = 0;
			posY = 0;
			$(noID).fx.cancel();
			$(noID).fx = new Fx.Morph( $(noID), {
									duration : 500
								}).start({
									'opacity' : 0,
									'margin-top' : posX,
									'margin-left' : posY
								});

			
			

		
		}
});