var Team = {};

$(window).bind('load', function() {	
	Team.init();
});

$(document).bind('mousemove', function(e) {	
	Team.updateWMTT(e);
});

Team = {
	
	init: function() {
		$('.team a').click(
			function() {
			Team.showWMTT(this.rel);
		});
		$('.team a').mouseout(
			function() { Team.hideWMTT(); }
		);
	},
	
	updateWMTT: function(e) {
		x = (document.all) ? window.event.x + document.body.scrollLeft+25 : e.pageX - 250;
		y = (document.all) ? window.event.y + document.body.scrollTop+170 : e.pageY + 20;
		$('#teamdetail').css('left', x + "px");
		$('#teamdetail').css('top', y + "px");
	},

	showWMTT: function(val) {
		$('#teamdetail').html('<p>' + val + '</p>')
		$('#teamdetail').fadeIn('fast');
	},

	hideWMTT: function() {
		//$('#teamdetail').css('display', 'none');
		$('#teamdetail').fadeOut('fast');
	}
}

