/**
http://nyromodal.nyrodev.com/
	this gives us thickbox functionality where we can influence the setting of each modal through the url.
	the author of nyroModal does not make this default functionality because he does not want to alter the url for this purpose.
	BUT this show how flexible nyrolmodal is because it can be edited to do so quite easily
	author: will caine
**/
$(function() {
	if(jQuery.fn){
		jQuery.fn.MuestraVentana = function(caption, webpage, /* optional */ alto, ancho, callback_fn) {
			if (alto == 0)
				alto = null;
			if (ancho == 0)
				ancho = null;
			jQuery.nyroModalManual({
                url: webpage,
				forceType : "iframe",
				modal: true, // Esc key or click backgrdound enabling or not
				debug:false,
				title: caption,
				caption: caption,
				width: ancho,
				minHeight: 50,
				height: alto,			  
				wrap: { // Wrapper div used to style the modal regarding the content type
					iframe: '<div style="overflow-x:hidden; overflow-y:hidden;background-color: #FFFFFF" class="wrapperIframe"></div>'
					} 
			});
			return false;
		}

		jQuery.fn.MuestraVentanaTimer = function(caption, webpage, /* optional */ alto, ancho, callback_fn) {
			if (alto == 0)
				alto = null;
			if (ancho == 0)
				ancho = null;
			jQuery.nyroModalManual({
				url: webpage,
				type : "iframe",
				debug: false, // Show the debug in the background
				modal: false, // Esc key or click backgrdound enabling or not
				width: ancho,
				minHeight: 50,
				height: alto			  
			});
			return false;
		};

		jQuery.MuestraVentana = function(caption, webpage, /* optional */ alto, ancho, callback_fn) {
			if (alto == 0)
				alto = null;
			if (ancho == 0)
				ancho = null;
			jQuery.nyroModalManual({
				url: webpage,
				forceType : "iframe",
				modal: true, // Esc key or click backgrdound enabling or not
				debug:false,
				title: caption,
				caption: caption,
				width: ancho,
				minHeight: 50,
				height: alto,			  
				wrap: { // Wrapper div used to style the modal regarding the content type
					iframe: '<div style="overflow-x:hidden; overflow-y:hidden;background-color: #FFFFFF" class="wrapperIframe"></div>'
					} 
			});
			return false;
		}

		jQuery.MuestraVentanaTimer = function(caption, webpage, /* optional */ alto, ancho, callback_fn) {
			if (alto == 0)
				alto = null;
			if (ancho == 0)
				ancho = null;
			jQuery.nyroModalManual({
				url: webpage,
				type : "iframe",
				debug: false, // Show the debug in the background
				modal: false, // Esc key or click backgrdound enabling or not
				width: ancho,
				minHeight: 50,
				height: alto			  
			});
			return false;
		}
	}else{
		alert("no encontrado el plugin nyroModal ventana : $.fn: " + $.fn );
	}
});