/*
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
var modal={
	close:true,
	containerCss: {width:'70%',marginLeft:'-35%',height:'75%',backgroundColor: '#ffffff', border: '1px solid #333333'},
	overlayCss: {backgroundColor: '#666666'},
	onOpen: function (dialog) {
	  dialog.overlay.fadeIn('slow', function () {
	    dialog.container.slideDown('slow', function () {
	      dialog.data.fadeIn('slow'); // See Other Notes below regarding
	                                     // data display property and
	                                     // iframe details
		  $('a.modalCloseImg').ifixpng().css({cursor:'pointer'});
		  $("#containerYouTube").hide();/*ocultamos los divs que contengan iframe*/
		  $("div.iframe").hide();
		  $("#flashBannerConciertoVoces").hide();
	    });
	  });
	},
	onClose: function (dialog) {
		onModalClose(dialog);
	}
};
/*
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
function onModalClose(dialog){
	  dialog.data.fadeOut('slow', function () {
	    dialog.container.slideUp('slow', function () {
	      dialog.overlay.fadeOut('slow', function () {
	        $.modal.close(); // must call this to have SimpleModal
	                         // re-insert the data correctly and
	                         // clean up the dialog elements
			$("#containerYouTube").show();
			$("div.iframe").show();
			$("#flashBannerConciertoVoces").show();

	      });
	    });
	  });
}

/*
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
function verContactoModal(){
	
	var alto=250;
	var ancho=500;
	var izq=($(window).width()-ancho)/2;
	var top=($(window).height()-alto)/2;
	modalContacto=modal;
	modalContacto.containerCss={left:izq+'px',top:top+'px',marginLeft:'0px',height:alto+'px',width:ancho+'px',backgroundColor: '#ffffff', border: '1px solid #333333'};
		modalContacto.onClose=function (dialog) {
			onModalClose(dialog);
			$("#containerYouTube").show();
		}
	$("#verContactoModal").modal(modalContacto);
	$("#containerYouTube").hide();

}
/*
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
function zonaDePrensa(){
	var izq=($(window).width()-500)/2;
	var alto=300;
	var top=($(window).height()-alto)/2;
	var ancho=500;
	modalPrensa=modal;
	modalPrensa.containerCss={left:izq+'px',top:top+'px',marginLeft:'0px',height:alto+'px',width:ancho+'px',backgroundColor: '#ffffff', border: '1px solid #333333'};
		modalPrensa.onClose=function (dialog) {
			onModalClose(dialog);
			$("#containerYouTube").show();
		}
	$("#zonaDePrensa").modal(modalPrensa);
	$("#containerYouTube").hide();

}
/*
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/

function zonaPrivada(){
//alert('en construcción');
}
/*
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
function verManifiestoModal(){
	var alto=dimensiones.altoPantalla;
	var ancho=dimensiones.anchoPantalla;
	modalManifiesto=modal;  
	var alto=$(window).height()-100;
	var ancho=924;
	var left=-200;
	var izq=($(window).width()-ancho)/2;	
	modalManifiesto.containerCss={left:izq+'px',marginLeft:'0px',height:alto+'px',top:'20px',width:ancho+'px',backgroundColor: '#ffffff', border: '1px solid #333333'};
		modalManifiesto.onClose=function (dialog) {
			onModalClose(dialog);
			$("#containerYouTube").show();
		}
	$("#verManifiestoModal").css({overflow:'auto'}).modal(modalManifiesto);
	$("div.wrapperInternoModal").css({height:(alto-80)+'px',overflow:'auto'});
	$("#containerYouTube").hide();
	$('a.modalCloseImg').ifixpng().css({cursor:'pointer'});

}
/*
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
function terminosLegales(){
	modalLegal=modal;
	var ancho=924;
	var izq=($(window).width()-ancho)/2;
	var alto=$(window).height()-100;
	modalLegal.containerCss={left:izq+'px',marginLeft:'0px',height:alto+'px',top:'20px',width:ancho+'px',backgroundColor: '#ffffff', border: '1px solid #333333'};
	$("#terminosLegales").modal(modalLegal);
	$("div.wrapperInternoModal").css({height:(alto-90)+'px',overflow:'auto'});
}
/*
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
function politicaPrivacidad(){
	/*modalPrivacidad=modal;
	modalPrivacidad.containerCss={width:'700px',marginLeft:'-20%',height:'500px',top:'20px',backgroundColor: '#ffffff', border: '1px solid #333333'};
	$("#politicaPrivacidad").modal(modalPrivacidad);*/
	modalPrivacidad=modal;
	var ancho=924;
	var izq=($(window).width()-ancho)/2;
	var alto=$(window).height()-100;
	modalPrivacidad.containerCss={left:izq+'px',marginLeft:'0px',height:alto+'px',top:'20px',width:ancho+'px',backgroundColor: '#ffffff', border: '1px solid #333333'};
	$("#terminosLegales").modal(modalPrivacidad);
	$("div.wrapperInternoModal").css({height:(alto-90)+'px',overflow:'auto'});
}

/*
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
function enviaMensajeModal(){
	modalMensaje=modal;
	modalMensaje.containerCss={width:'30%',marginLeft:'-15%',height:'300px',backgroundColor: '#ffffff', border: '1px solid #333333'};
		modalMensaje.onClose=function (dialog) {
			onModalClose(dialog);$("#containerYouTube").show();
		}
	$("#enviaMensajeModal").modal(modalMensaje); 
	$("#containerYouTube").hide();
}
/*
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*/
function proximamente(){
	modalMensaje=modal;
	modalMensaje.containerCss={width:'550px',marginLeft:'-15%',height:'200px',backgroundColor: '#ffffff', border: '1px solid #333333'};
		modalMensaje.onClose=function (dialog) {
			onModalClose(dialog);$("#containerYouTube").show();
		}
	$("#Proximamente").modal(modalMensaje);
	$("#containerYouTube").hide();
}
