var map;
var tinyIcon = new GIcon();

tinyIcon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
tinyIcon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
tinyIcon.iconSize = new GSize(12, 20);
tinyIcon.shadowSize = new GSize(22, 20);
tinyIcon.iconAnchor = new GPoint(6, 20);
tinyIcon.infoWindowAnchor = new GPoint(5, 1);


var baseIcon = new GIcon(G_DEFAULT_ICON);
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(20, 34);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);

function createMarker(point, index, desc) {
  // Create a lettered icon for this point using our icon class
  var letter = String.fromCharCode("A".charCodeAt(0) + index);
  var letteredIcon = new GIcon(tinyIcon);

  // letteredIcon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";



  // Set up our GMarkerOptions object
  markerOptions = { icon:letteredIcon };
  var marker = new GMarker(point, markerOptions);

  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(desc);
  });
  
  return marker;
}

function initialize() {
  if (GBrowserIsCompatible()) {
    	map = new GMap2(document.getElementById("locationmap"));
    	map.setMapType(G_HYBRID_MAP)
    	
    	
    	
    	var latlng0 = new GLatLng(41.136969,-8.631413); // porto office
    	
    	
		map.addOverlay(new createMarker(latlng0,0, "<strong>Daydream</strong>"));		
		
    	
		zoomLevel = 16;
		toCentre = latlng0;
    			
    			
    	}
    	
    	
    	map.setCenter(toCentre, zoomLevel);
    	map.setUIToDefault();		
	}
$(document).ready(function(){
	initialize();
})