function initialize() {
  var latLng = new google.maps.LatLng(center_lat, center_lng);

  var map = new google.maps.Map(document.getElementById('map_canvas'), {
    zoom: zoom,
    center: latLng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  });

  var ib = new InfoBox({
    content: "",
    boxStyle: {
    },
    alignBottom: true,
    pixelOffset: new google.maps.Size(-91, -22),
    closeBoxMargin: "10px 10px 0 0"
  });

  over_info_box = false;

  $('#info-box').live('mouseenter',function() {
      over_info_box = true;
  }).live('mouseleave', function() {
      over_info_box = false;
  });

  var markers = Array();

  for (var i = 0; i < developments.length; i++) {
    markers[i] = new google.maps.Marker({
      position: new google.maps.LatLng(developments[i].lat, developments[i].lng),
      map: map,
      icon: '/images/dundas/map-marker-' + developments[i].type + '.png',
      shadow: new google.maps.MarkerImage('/images/dundas/map-marker-shadow.png',
        new google.maps.Size(51.0, 40.0),
        new google.maps.Point(0, 0),
        new google.maps.Point(5.0, 25.0)
      )
    });
    
    google.maps.event.addListener(markers[i], "mouseover", function(content, marker) {
      return function() {
        if (!over_info_box) {
          ib.setContent(content);
          ib.open(map, marker);
        }
      }
    }(developments[i].content, markers[i]));
  }
}

var firstSlide = true;
var slideDescription = ''; 

function changeSlideDescription() {
  if (!firstSlide) {
    slideDescription = $('.description', this).html();
    $('#slideshow-description').fadeOut('normal', function() {
      $('#slideshow-description').html( slideDescription );
      $('#slideshow-description').fadeIn();
    });
  } else {
    firstSlide = false;
  }
}

