function set_membertooltip()
{
	  $('a').each(function(){
	  	if($(this).attr('class')!="member_info")
	  	{
		  	if($(this).attr('class')!="n1")
		  	{
			  	var hrefAtt = $(this).attr('href');
				  var regexS = "[\\/]user/userprofile/([^&#]*)/";
				  var regex = new RegExp( regexS );
				  var results = regex.exec( hrefAtt );
				  if(results && (results[1]!=null || results[1]!=""))
				  {
				  		$(this).addClass('member_info');
				  		$(this).attr('rel',results[1]);
				  }	  		
		  	}	  		
	  	}
	  });
}
$(function()
{ 
	setTimeout("set_membertooltip()",2000);

      var hideDelay = 500;    
      var currentID;  
      var hideTimer = null;  
      
      // One instance that's reused to show info for the current person  
      var container = $('<div id="personPopupContainer" >'  
          + '<table width="" border="0" cellspacing="0" cellpadding="0" align="center" class="personPopupPopup">'  
         + '<tr>'  
         + '   <td class="corner topLeft"></td>'  
         + '   <td class="top"></td>'  
         + '   <td class="corner topRight"></td>'  
         + '</tr>'  
         + '<tr>'  
         + '   <td class="left">&nbsp;</td>'  
         + '   <td><div id="personPopupContent"><img src="images/progress.gif" style="margin-top:20px;margin-left:80px;" /></div></td>'  
         + '   <td class="right">&nbsp;</td>'  
         + '</tr>'  
         + '<tr>'  
        + '   <td class="corner bottomLeft">&nbsp;</td>'  
         + '   <td class="bottom">&nbsp;</td>'  
         + '   <td class="corner bottomRight"></td>'  
         + '</tr>'  
         + '</table>'  
         + '</div>');  
    
     $('body').append(container);  
     
     /*$('.member_info').live('mouseover', function()  
     {  
         // format of 'rel' tag: pageid,personguid  
         var settings = $(this).attr('rel');  
         var currentID = settings;  
         //currentID = settings[1];  
     
         // If no guid in url rel tag, don't popup blank  
         if (currentID == '')  
             return;  
    
        if (hideTimer)  
             clearTimeout(hideTimer);  
     
        var pos = $(this).offset();  
        var width = $(this).width();
        //alert($('#personPopupContainer').css('width'));
        if(parseInt((pos.left + 400))>screen.width)
            posleft = parseInt((pos.left - 300)) + 'px';
        else
            posleft = (pos.left + width) + 'px';        
        container.css({
                left: posleft,
                top: pos.top - 5 + 'px'  
        });  
    
         $('#personPopupContent').html('<img src="images/progress.gif" style="margin-top:20px;margin-left:80px;" />');
        setTimeout(function(){
             $.ajax({  
                 type: 'GET',  
                url: 'ajax_file/site_member_info/',  
                data: 'currentID=' + currentID ,  
                success: function(data)  
                {  
                     $('#personPopupContent').html(data);
                }  
             });  
         
             container.css('display', 'block');        
        },1500);    
 
    });
     
    $('.member_info').live('mouseout', function()  
    {  
         if (hideTimer)  
             clearTimeout(hideTimer);  
         hideTimer = setTimeout(function()  
         {  
             container.css('display', 'none');  
        }, hideDelay);  
    });  
     
     // Allow mouse over of details without hiding details  
     $('#personPopupContainer').mouseover(function()  
     {  
         if (hideTimer)  
             clearTimeout(hideTimer);  
     });  
     
     // Hide after mouseout  
     $('#personPopupContainer').mouseout(function()  
     {  
         if (hideTimer)  
            clearTimeout(hideTimer);  
        hideTimer = setTimeout(function()  
        {  
            container.css('display', 'none');  
        }, hideDelay);  
    });
	*/  		
});  

