$(document).ready(function() { alt=$("#Galileo a, #Habitaciones  a, #Gastronomia  a, #Observatorio  a, #Oto-Inv  a, #Prim-Ver a").attr("alt");
/* chained call: scrollable().find("a").tooltip().overlay().gallery(); */

var strClasses = "";

if (window.lastAlbumID) {
	var i = 0;
	for (i = 0; i <= window.lastAlbumID; i++) {

		//$("#Galileo, #Habitaciones , #Gastronomia , #Observatorio , #Oto-Inv , #Prim-Ver ").find("a").overlay({
		$(".gal" + i).find("a").overlay({

			// each trigger uses the same overlay with id "gallery"
			target: '#gallery',

			// optional exposing effect with custom color
			expose: '#000',

			// clicking outside the overlay does not close it
			closeOnClick: false
			
			

		// gallery plugin
		}).gallery({

			// do not use the same disabled class name as scrollable
			disabledClass: 'inactive',
			template: '<h3>${title}</h3> <p>'+alt+'</p>',
			autohide: true
		});

		$(".scrollable").find("img").tooltip({

			// use this single tooltip element for all trigger elements
			tip: '#tooltip',
			// one configuration property 
			offset: [60, 0], 
			//effect: 'slide',
			});
	}
}
});

