
function PaginaEspaiArt(padre) {

	var instancia = this;
	
	this._estructura = document.createElement("div");	
	this._contenedorGaleria = null;
	this._contenedorTexto = null;

	$.ajax({url:"php/datosEspaiArt.php", dataType:"text", success:function(datos){
		var json = jQuery.parseJSON(datos);
		instancia._contenedorGaleria = document.createElement("div");
		$(instancia._contenedorGaleria).attr("id","ContenedorGaleria");
		$(instancia._contenedorGaleria).css("width","760px");
		$(instancia._contenedorGaleria).css("height","452px");
		$(instancia._estructura).append(instancia._contenedorGaleria);

		new GaleriaSimple(instancia._contenedorGaleria, json.imagenes);

		instancia._contenedorTexto = document.createElement("div");
		$(instancia._contenedorTexto).css("width","677px");
		var textoSpan = document.createElement("span");
		$(textoSpan).addClass("etiqueta");
		$(textoSpan).addClass("infoTexto");
		$(textoSpan).data("cat", json.texto.cat);
		$(textoSpan).data("cast", json.texto.cast);
		$(textoSpan).data("eng", json.texto.eng);
		$(instancia._contenedorTexto).append(textoSpan);
		$(instancia._estructura).append(instancia._contenedorTexto);
		
		$(padre).empty();
		$(padre).prepend(instancia._estructura);
		
		var idioma = $("#aplicacion").data("idioma");
		var texto = $(textoSpan).data(idioma);
		$(textoSpan).html(texto);
		
		actualizarEtiquetas();
	}});
	
	this.getEstructura=function()
	{
		return this._estructura;
	};

}
