

	  //<![CDATA[
    var map = null;
	
    var geocoder = null;
    
    function gload() 
    {   
        map = new GMap2(document.getElementById("GMAP"));
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        geocoder = new GClientGeocoder();
        geocoder.getLatLng(
          "cala pira sardegna italia",          
          function(point) 
          {
            if (!point) 
            {
              alert(" not found");
            } 
            else 
            {
              map.setCenter(point, 14);
			   map.setMapType(G_SATELLITE_MAP);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml("Noi Siamo QUI!!<br />Cala Pira");
            }
          });
      
    }
  
    //]]>



window.addEvent('domready', function(){	
						
					$('Home').addEvent('click', function(e) {
					e = new Event(e).stop();
					
					var url = "Home.html";
					 
						/**
						 * The simple way for an Ajax request, use onRequest/onComplete/onFailure
						 * to do add your own Ajax depended code.
						 */
						new Ajax(url, {
							method: 'get',
							update: $('log')
						}).request();
									});
					
					
					$('CalaPira').addEvent('click', function(e) {
						e = new Event(e).stop();
					 
						var url = "CalaPira.html";
					 
						/**
						 * The simple way for an Ajax request, use onRequest/onComplete/onFailure
						 * to do add your own Ajax depended code.
						 */
						new Ajax(url, {
							method: 'get',
							update: $('log')
						}).request();
					});
					$('ChiSiamo').addEvent('click', function(e) {
						e = new Event(e).stop();
					 
						var url = "ChiSiamo.html";
					 
						/**
						 * The simple way for an Ajax request, use onRequest/onComplete/onFailure
						 * to do add your own Ajax depended code.
						 */
						new Ajax(url, {
							method: 'get',
							update: $('log')
						}).request();
					});
					$('DoveSiamo').addEvent('click', function(e) {
						e = new Event(e).stop();
										 
						var url = "DoveSiamo.html";
					 
						/**
						 * The simple way for an Ajax request, use onRequest/onComplete/onFailure
						 * to do add your own Ajax depended code.
						 */
						new Ajax(url, {
							method: 'get',
							update: $('log'),
							onComplete: function(){for (var i=0;i<100000;i++); gload();}
						}).request();
					});
					
					$('Galleria').addEvent('click', function(e) {
						e = new Event(e).stop();
					 
						var url = "galleria.html";
					 
						/**
						 * The simple way for an Ajax request, use onRequest/onComplete/onFailure
						 * to do add your own Ajax depended code.
						 */
						new Ajax(url, {
							method: 'get',
							update: $('log')
						}).request();
					});
	
			var szNormal = 130, szSmall  = 119, szFull   = 174;
			
			var kwicks = $$("#Voci .voci");
			
			var fx = new Fx.Elements(kwicks, {wait: false, duration: 300, transition: Fx.Transitions.Back.easeOut});
			
			kwicks.each(function(kwick, i) {
				kwick.addEvent("mouseenter", function(event) {
					var o = {};
					o[i] = {  width: [kwick.getStyle("width").toInt(), szFull] }
					kwicks.each(function(other, j) {
						if(i != j) {
							var w = other.getStyle("width").toInt();
							if(w != szSmall) o[j] = {width: [w, szSmall]};
						}
					});
					fx.start(o);
				});
			});




			
			/*$("Voci").addEvent("mouseleave", function(event) {
				var o = {};
				kwicks.each(function(kwick, i) {
					o[i] = {width: [kwick.getStyle("width").toInt(), szNormal]}
				});
				fx.start(o);
			})*/
			
		}); 


