/*
 * SimpleModal Basic Modal Dialog
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2010 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: basic.js 254 2010-07-23 05:14:44Z emartin24 $
 */

jQuery(function ($) {
	// Load dialog on page load
	//$('#basic-modal-content').modal();

	// Load dialog on click
	/*$('#basic-modal .basic').click(function (e) {
		$('#basic-modal-content').modal();

		return false;
	});*/
		$('#basic-modal').click(function (e) {
			$('#basic-modal-content').modal({
				minWidth:890,
				minHeight:500,
				//position:["35%","35%"],
						onShow: function (dialog) {
								// Access elements inside the dialog
								// Useful for binding events, initializing other plugins, etc.

								// For example:
								/*$("a", dialog.data).click(function () {
										// do something
										alert('lalala');
										return false;
								});*/
								dialog.data.html('<iframe src="./galeria-alojamiento.html?id='+idViv+'" height="490" width="880" scrolling="no" noresize="noresize" frameborder="0" style="border:0"></iframe>');
						}
			});

			return false;
		});
		$('#basic-modal2').click(function (e) {
			$('#basic-modal-content2').modal({//
						autoResize:true,
						position:["30%","30%"],
						onShow: function (dialog) {
								// Access elements inside the dialog
								// Useful for binding events, initializing other plugins, etc. 
								/**
								* sCodigoYoutube esta como global
								*/
								if (sCodigoYoutube!=undefined) dialog.data.html(sCodigoYoutube);
						}
					}
					);

			return false;
		});
		$('#basic-modal3').click(function (e) {
		$('#basic-modal-content3').modal({//
					autoResize:true,
					position:["25%","25%"],
					onShow: function (dialog) {
							// Access elements inside the dialog
							// Useful for binding events, initializing other plugins, etc. 
							if (sCodigoGoogleMaps!=undefined) dialog.data.html(sCodigoGoogleMaps);
					}
				}
				);

		return false;
	});
		 $('#basic-modal4').click(function (e) {
			$('#basic-modal-content4').modal({
				autoResize:true
			});

			return false;
	});
		 $('#basic-modal5').click(function (e) {
			$('#basic-modal-content5').modal({
				autoResize:true
			});

			return false;
	});
		 		 $('#basic-modal6').click(function (e) {
			$('#basic-modal-content6').modal({
				autoResize:true
			});

			return false;
	});
});
