var $j = jQuery.noConflict();

function loadIntro(){
	document.getElementById("popup").className='popup';
	document.getElementById("bgpopup").className='bgpopup';
	
	$j("#bgpopup").animate({ 
	    	opacity: 0.7,  
	    }, 1500 );
	
    $j("#popup").animate({
			opacity: 1,
    	}, 1200 );
}

function closeIntro(){
	$j("#bgpopup").animate({ 
    	opacity: 0,  
    }, 1000 );

	$j("#popup").animate({
		opacity: 0,
	}, 700 );
	
	setTimeout(removePopup,1000);
}

function removePopup() {
	document.getElementById("popup").className='popup_h';
	document.getElementById("bgpopup").className='bgpopup_h';
}

function createTabbedMarker(point,html1,html2,label1,label2) {
    var marker = new GMarker(point);
    GEvent.addListener(marker, "click", function() {
      marker.openInfoWindowTabsHtml([new GInfoWindowTab(label1,html1), new GInfoWindowTab(label2,html2)]);
    });
    return marker;
}

function load() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    map.setCenter(new GLatLng(46.019436, 4.637834), 15);
    map.addControl(new GLargeMapControl());
  	map.addControl(new GMapTypeControl());
  	map.setMapType(G_HYBRID_MAP);
  	
  	var point = new GLatLng(46.019436,4.637834);
  	var marker = createTabbedMarker(point, "It's here", "", "", "");
  	map.addOverlay(marker);
  }
}

function initialize() {
	var map = new GMap2(document.getElementById("map_canvas"));
	map.setCenter(new GLatLng(46.01966,4.637475), 17);
	map.setUIToDefault();
	map.setMapType(G_HYBRID_MAP);
	
	var point = new GLatLng(46.01966,4.637475);
	map.addOverlay(new GMarker(point));
}