window.addEvent('domready', function() {
	
	//SHOW BACK OF CARDS
	var showInfo = function(a) {
		$(a).getElement('.info').set('opacity', 1);
	};
	
	var hideInfo = function(a) {
		$(a).getElement('.info').set('opacity', 0);
	};
	
	$$('.mousearea').each(function(e) {
		e.addEvents({
			mouseover: function() {
				showInfo(e.getProperty('id'));
			},
			mouseout: function() {
				hideInfo(e.getProperty('id'));
			},
			mousemove: function(event) {
				$(e).getElement('.info').setStyles({
					'top': event.page.y,
					'left': event.page.x
				});
			}
		});
	});
});
