Here is the code for initialization
<head>
<script type="text/javascript">
function initialize(){
var image = '../images/mblue.png';
var latlng = new google.maps.LatLng(12, 13);
var myOptions = {
zoom: 15,
center: latlng,
mapTypeControl: true,
mapTypeControlOptions: {
position: google.maps.ControlPosition.RIGHT_BOTTOM
},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("googleMapInner"), myOptions);
var marker = new google.maps.Marker({
position: latlng,
map: map,
title: 'test',
icon: image
});
var infoWindow = new google.maps.InfoWindow({
content: "test"
});
google.maps.event.addListener(marker, 'click', function() {
infoWindow.open(map,marker);
});
idleListener = google.maps.event.addListener(map, 'idle', function() {
google.maps.event.trigger(marker, 'click');
google.maps.event.removeListener(idleListener);
});
}
jQuery(document).ready(function(){
initialize();
});
</script>
<script type="text/javascript" src="
http://maps.google.com/maps/api/js?sensor=true&language=en"></script>
</head>
<body>
<div id="googleMapInner">
</div>
</body>