$(document).ready(function(){
	$('#infoPanel').hover( function() {
	$(this).animate({
		width: 600},
		400, function() {
			$('#'+currentStory).fadeIn('fast');
		});
}, function() {
	$('#'+currentStory).fadeOut('fast');
	$(this).animate({
		width: 120},
		400, function() {
		$('#'+currentStory).hide();
	});
	});
});
var currentStory = null;
function initialize() {
    var latlng = new google.maps.LatLng(37.330586004391655, 11.1375);
    var myOptions = {
      zoom: 2,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    var markerKatrina = new google.maps.Marker({
        position: new google.maps.LatLng(30.121078718402543, -88.70624999999995),
        map: map,
        title: 'katrina'
      });
    var markerChina_Sichuan = new google.maps.Marker({
        position: new google.maps.LatLng(30.178079111338004, 104.03789062500005),
        map: map,
        title: 'China_Sichuan'
      });
    google.maps.event.addListener(markerKatrina, 'mouseover', function() {
    	showResume(this);
    	highlightInfoPanel();
    });
    google.maps.event.addListener(markerChina_Sichuan, 'mouseover', function() {
    	showResume(this);
    	highlightInfoPanel();
    });
}
function showResume(e) {
	$('#infoPanel > *').hide();
	$('#'+e.title+'Resume').show();
	$('#'+e.title+'Resume').attr('visibility', 'visible');
	currentStory = e.title+'Full';
}
function highlightInfoPanel() {
	$('#infoPanel').animate({
		width: 125},
		100, function () {
			$('#infoPanel').animate({
				width: 120},
				100);
		});
}
