var initRotatingProducts = function(){
	
	setInterval("rotateProducts();", 5000);
	
}
var rotateProducts = function(){
	
	var div1 = $("#rotatingProducts > div:eq(0)")
	var thisShown = div1.children("img:visible");
	thisShown.fadeOut('normal',function(){
		$(this).next().fadeIn('normal',function(){
			$(this).prev("img").insertAfter($(this).siblings("img:last"));
		});
	});
	
	var div2 = $("#rotatingProducts div:eq(1)");
	var thisShown2 = div2.children("img:visible");
	thisShown2.fadeOut('normal',function(){
		$(this).next().fadeIn('normal',function(){
			$(this).prev("img").insertAfter(div2.children("img:last"));
		});
	});
	
}
var map = null;
function loadMap(address,text) {
  if (GBrowserIsCompatible()) {
    map = new GMap2(document.getElementById('map'));
    map.setMapType(G_NORMAL_MAP);
    map.enableDoubleClickZoom();
    keyboardhandler = new GKeyboardHandler(map);
    //--GeoCoding
	var geocoder = new GClientGeocoder();
	//var address = "101 S Ellsworth Ave Suite 402 San Mateo CA 94401" ;
	geocoder.getLatLng(
		address,
		function(point) {
			if(!point){
				alert("Address not found! : "+address);
			}else{
				map.setCenter(point, 15);
		        var marker = new GMarker(point);
		        map.addOverlay(marker);
		        marker.openInfoWindowHtml(text);
			}
		}
	);
	//--
  }
}
