$(function() {
	
	
	 /* This is basic - uses default settings */ 
	 //$("a#single_image").fancybox(); /* Using custom settings */ 
	 //$("a#inline").fancybox({ 'hideOnContentClick': true }); 
	 $("a.group").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': false }); 
	
	/*
	$('.reservation_l').click(function() {
	
		var href = $(this).attr('href');
		winRes = window.open(href, "windowReview","width=520,height=380,left="+((screen.width-520)/2)+",top="+((screen.height-380)/2)+",resizable,scrollbars=yes,status=1");
		winRes.focus();
		return false;
		
	});*/
	/*
	$('.gallery img').mouseover(function(){
		var options;
		$(this).effect('pulsate',options,800);
	});*/
	$("#dialog").dialog({ autoOpen: false, width: 423, height: 423 });
/*
	$('.gallery img').click(function(){
		//alert ('img');
		
		var src = $(this).attr('src');
		var tit = $(this).attr('alt');
		
		var bigSrc = src.replace(/middle/, "big");
		//alert (title);
		//var $modal = $('img[src$="'+src+'"]');
		
		//$("#dialog").attr('title', title);
		var img = $("#dialog img");
		img.attr('src', bigSrc);
		img.attr('alt', tit);
		//var src = $(this).attr('src');
		//var title = $(this).attr('alt');
		//var $modal = $('img[src$="'+src+'"]');
	
		//if ($modal.length) {
		//alert (tit);
			$("#dialog").dialog('option', 'title', tit);
			$("#dialog").dialog('open');
	});

	*/
	
	
	
   //if (GBrowserIsCompatible()) {
   	var lat = parseFloat($('#hotel_latitude').val());
   	var lng = parseFloat($('#hotel_longitude').val());
   	var hname = $('#hotel_name').val();
     var map = new GMap2(document.getElementById("map_canvas"));
     map.setCenter(new GLatLng(lat, lng), 13);
     map.addControl(new GSmallMapControl());

     var marker = new GMarker(new GLatLng(lat, lng));
     GEvent.addListener(marker, "click", function() {
       var html = '<div style=" padding-right: 10px">'+hname+'<\/div>';
       marker.openInfoWindowHtml(html);
     });
     map.addOverlay(marker);
     GEvent.trigger(marker, "click");
   //}
});

