jQuery(document).ready(function(){
		if (typeof(G_NORMAL_MAP) != "undefined")
		{	
				if (typeof(mapCenterLat) != "undefined"&&typeof(mapCenterLng) != "undefined"&&typeof(mapCenterLng) != "mapZoomInt")
				{
					jQuery('#map').jmap('init', {'mapType':G_NORMAL_MAP,'mapCenter':[Number(mapCenterLat), Number(mapCenterLng)],'mapZoom':Number(mapZoomInt)});
					
					jQuery( "#userinfolist li.userinfo" ).each(
						function(){
							var lat = jQuery(this).children(".latitude").attr("title");
							var lng = jQuery(this).children(".longitude").attr("title");
							var info = jQuery(this).children("#userinfo").html();
							var iconImg = jQuery(this).children("img").attr("src");
							
							var tinyIcon = new GIcon(G_DEFAULT_ICON);
							tinyIcon.image = iconImg;
							tinyIcon.iconSize = new GSize(12, 20);
							tinyIcon.shadowSize = new GSize(22, 20);
							tinyIcon.iconAnchor = new GPoint(6, 20);
							tinyIcon.infoWindowAnchor = new GPoint(5, 1);
							
							jQuery('#map').jmap('AddMarker', {
								'pointLatLng': [lat,lng],
								'pointHTML': info,
								'pointIcon':tinyIcon
								});			
						}					
					);
				}
		}	
       	});
//if you installed our tooltips plugin before, please remove this function codes.       	
function addFriend(user_id){
	tb_show(getPhrase('profile.add_to_friends'), $.ajaxBox('map.addfriend', 'user_id='+user_id+'&width=420&height=250'));
}