$(document).ready(function(){

		$('area').click(function(){ 
			return false;
		});
		$('area').mouseover(function(e) {
    	//var tip = $(this).attr('title');   
      //$(this).attr('title','');
      $('body').append(
      	 '<div id="tooltip">'
      	+'	<div class="tiphead">'
      	+'		<div class="tipheadleft">&nbsp;</div>'
      	+'	</div>'        	        	
      	+'	<div class="tipbody">'
      	+'		<div class="tipbodyleft">&nbsp;</div>'        	
      	+' 		<div class="tipbodycontent"><div class="tiploading">&nbsp;</div></div>'
      	+' 	</div>'
      	+'	<div class="tipfoot">'
      	+'		<div class="tipfootleft">&nbsp;</div>'
      	+'	</div>'        	
      	+'</div>'
      );             
      $('#tooltip').css('top', e.pageY + 10 );
      $('#tooltip').css('left', e.pageX + 20 );
      
      
      //$('#tooltip').fadeIn('500');
      //$('#tooltip').fadeTo('10',1.0);
      
      
      /*
      var headw = $('#tooltip').width() - 9;
      var footw = $('#tooltip').width() - 46;
      $('#tooltip .tiphead').css({'width' : headw+'px'});
      $('#tooltip .tipfoot').css({'width' : footw+'px'});
      */
      
      $('#tooltip').show('500');
      //$('#tooltip').hide('10',1.0);
      
      var tip = $(this).attr('alt');                 
      var data = 'eID=eva_locations&action=showTip&tip=' + tip;			  		
		  $.ajax({
				url: "index.php",			
				type: "GET",
				data: data,
				success: function(resp){												
					$('.tipbodycontent').html(resp);
					
		      var headw = $('#tooltip').width() - 9;
		      var footw = $('#tooltip').width() - 46;
		      $('#tooltip .tiphead').css({'width' : headw+'px'});
		      $('#tooltip .tipfoot').css({'width' : footw+'px'});
		      					
				}
			});
        
        
         
    }).mousemove(function(e) {
        $('#tooltip').css('top', e.pageY + 10 );
        $('#tooltip').css('left', e.pageX + 20 );
         
    }).mouseout(function() {
        //$(this).attr('title',$('.tipBody').html());
        $('body').find('#tooltip:first').remove();         
    });
	
	
	/*
	$('area').click(function(){ 
		return false;
	});
	$('area').hover(function() { 
    var url = $(this).attr('href'); 
    var id = $(this).attr('alt'); 
    var coords = $(this).attr('coords').split(','); 
    // FADEIN
    
    
    
  	return false; 
	},function() {				
		// FADEOUT
		
		return false;
	});
	*/
	
	/*
	$('.toolTip').hover(
		function() {
		this.tip = this.title;
		$(this).append(
			'<div class="toolTipWrapper">'
				+'<div class="toolTipTop"></div>'
				+'<div class="toolTipMid">'
					+this.tip
				+'</div>'
				+'<div class="toolTipBtm"></div>'
			+'</div>'
		);
		this.title = "";
		this.width = $(this).width();
		$(this).find('.toolTipWrapper').css({left:this.width-22})
		$('.toolTipWrapper').fadeIn(300);
	},
	function() {
		$('.toolTipWrapper').fadeOut(100);
		$(this).children().remove();
			this.title = this.tip;
		}
	);
	*/
	
	
});
