// rooms popups

// Apply the events on page load via mootools utilities
window.addEvent('domready', function() {
    $$('a.imgPopup').addEvent('click', function() {
		//get the path to the larger popup image
		var path;
		path = this.getElement('img').src.substr(
			0,
			this.getElement('img').src.lastIndexOf('.')
		);
		path = path + "_popup.jpg";
		
		//now that we have the path, let's assign the actual
		//action we want to take place (to show a popup)
		var popupImg = new Image();
		popupImg.src = path;
		
		window.open(path, "tgImagePopup", "height=520,width=620");
		
	});
	
	$$('a.checkAvailability').addEvent('click', function() {
		showAvailability(this.name);	// we use the name attribute to refer to the index of the room
	});
	
	// now initialize data for RezEasy.
	parent.aGQXrySqrmODJs = 0;
});

function showAvailability(roomIndex) {
	parent.aGQXrySqrmODJs = roomIndex;
}




