function _jx_getMapaRight(){
	
	$("#caja_mapa_right").load("/_jx_mapa_right.php", {ciudad: document.getElementById('mapa_right_ciudad').value});
	 //return false;
	
}

function _jx_getMapaIframe(){
	
	$("#caja_mapa_right").load("/_jx_mapa_iframe.php", {ciudad: document.getElementById('mapa_right_ciudad').value, iframe: 1});
	 //return false;
	
}

function _jx_getNewsRight(datoEmail){
	
	if (datoEmail=="1"){
		$("#caja_news_right").load("/_jx_news_right.php", {_home_news_email: document.getElementById('_news_right_email').value,_home_news_envio: 1}, function(){
			$("#_news_right_error").hide();
			$("#_news_right_exito").show(200);
		});
	}else{
		$("#caja_news_right").load("/_jx_news_right.php");
	}
	
}

function validarFormRightNews(){
	
	var email = $('#_news_right_email').val();
	
	if (!validar_email(email)){
		$("#_news_right_exito").hide();
		$("#_news_right_error").show(200);
		return false;
	}else{
		_jx_getNewsRight("1");
		return false;
	}
	
	
}

function validarFormContacto(){
	
	var email 	= $('#_contacto_mail').val();
	var nombre 	= $('#_contacto_nombre').val();
	var mensaje = $('#_contacto_mensaje').val();
	
	var error = true
	
	if (!validar_email(email)){
		//_contacto_error_nombre
		$('#_contacto_error_email').show(200);
		$('#_contacto_mail').addClass("buscador_contacto error");
		error = false;
	}
	
	
	if (jQuery.trim(mensaje)==''){
		//_contacto_error_nombre
		$('#_contacto_error_mensaje').show(200);
		$('#_contacto_mensaje').addClass("buscador_contacto error");
		error = false;
	}
	
	if (error==false){
		$("#_caja_contacto_exito").hide();
		$("#_caja_contacto_error").show(200);
		return false;
		
	}
	
	
}

function habilitar_enlaces(index,total){
	for (i=0;i<total;i++){
		$('#etiqueta_elnaces_'+i).removeClass("active");
		$('#lista_enlaces_'+i).hide();
	}
	
	$('#etiqueta_elnaces_'+index).addClass("active");
	
	$('#lista_enlaces_'+index).show();
	
	
	
}


function _jx_multimediaLista(pagina,seccion,tipo){
	
	
	
	$("#_multimedia_lista").load("includes/modulos/multimedia/_jx_multimedia_lista.php", {_pagina: pagina,_seccion: seccion,_tipo: tipo}, function(){
	//$("#_news_right_error").hide();
	//$("#_news_right_exito").show(200);
	});
	
	
	
}
function _jx_multimediaItem(tipo,id,src,url,titulo){
	
	$("#_multimedia_item").load("includes/modulos/multimedia/_jx_multimedia_item.php", {_tipo: tipo,_id: id,_src: src,_url: url,_titulo: titulo}, function(){
		//$("#_news_right_error").hide();
		//$("#_news_right_exito").show(200);
	});
	
}

function habilitar_multimedia_item(index,total){
	
	
	
	for (i=0;i<total;i++){
		$('#_multimedia_lista_'+i).removeClass("celda active").addClass("celda");
	}
	
	$('#_multimedia_lista_'+index).addClass("celda active");
	
}

