function colorsi(celda){
	celda.style.color = '#FFFF00';
}
function colorno(celda){
	celda.style.color = '#FFFFFF';
}
function teclaenter(e){
	tecla = (document.all) ? e.keyCode : e.which;
	if (tecla==13) return false;
}
$(function(){
    $('#datepicker').datepicker({inline: true,
        onSelect: function(date) {
        //alert(date)
            $.post("buscar.php", {fecha:date}, function(data){
            $("#noticias").html(data);
            });
        }
    });
});
/* no click derecho */
$(document).ready(function(){
$(document).bind("contextmenu",function(e){
return false;
});
});
/*---------------*/
/*$(document).ready(function() {
	$("#example1-1").imgbox();
	
	$("#example1-2").imgbox({
		'zoomOpacity'	: true,
		'alignment'		: 'center'
	});
	
	$("#example1-3").imgbox({
		'speedIn'		: 0,
		'speedOut'		: 0
	});
	
	$("#example2-1, #example2-2").imgbox({
		'speedIn'		: 0,
		'speedOut'		: 0,
		'alignment'		: 'center',
		'overlayShow'	: true,
		'allowMultiple'	: false
	});
});*/
function compartir(id){
	$.post("compartir.php", {id:id}, function(data){
	$("#redire").html(data);
	});
}
function tituover(id){
	$.post("titulares.php", {id:id}, function(data){
	$("#titulares").html(data);
	});
}
function opinion(id){
	$.post("opinar/opinion.php", {id:id}, function(data){
	$("#o").html(data);
	});
}opinion
function noticias(id){
	$.post("noticia.php", {id:id,n:1}, function(data){
	$("#noticias").html(data);
	$('html,body').animate({scrollTop: 0}, 100);
	});
}
function secciones(id){
	$.post("noticiasecciones.php", {id:id}, function(data){
	$("#noticias").html(data);
	$('html,body').animate({scrollTop: 0}, 100);
	});
}
function videos(id){
	$.post("video.php", {id:id}, function(data){
	$("#videos").html(data);
	});
}
function votar(id){
	$.post("votar.php", {id:id}, function(data){
	$("#encuesta").html(data);
	});
}
function vervotar(){
	$.post("votar.php", {}, function(data){
	$("#encuesta").html(data);
	});
}
function galeria(){
	$.post("galeriafotos.php", {}, function(data){
	$("#contenido").html(data);
	});
}
function suplemento(){
	$.post("suplemento.php", {}, function(data){
	$("#noticias").html(data);
	$('html,body').animate({scrollTop: 0}, 100);
	});
}
/*----------------*/
function comentario(n,e,c){
	if(!n){
		alert('Por favor, ingrese su nombre completo');
		return false;
	}
	if(!e){
		alert('Por favor, ingrese su Email');
		return false;
	}
	if(!c){
		alert('Por favor, ingrese su comentario');
		return false;
	}
	$.post("resultado.php", {nombre:n,email:e,coment:c}, function(data){
	$("#escrito").html(data);
	});
}
$(document).ready(function(){
 $("#portada").click(function(evento){
    evento.preventDefault();
    $("#cargando").css("display", "inline");
     $.post("portada.php", {}, function(data){
       $("#cargando").css("display", "none");
       $("#contenido").html(data);
     });
 });
});
$(document).ready(function(){
 $("#local").click(function(evento){
    evento.preventDefault();
	var d = "local";
    $("#cargando").css("display", "inline");
     $.post("contenido.php", {seg:d}, function(data){
       $("#cargando").css("display", "none");
       $("#contenido").html(data);
     });
 });
});
$(document).ready(function(){
 $("#policial").click(function(evento){
    evento.preventDefault();
	var d = "policial";
    $("#cargando").css("display", "inline");
     $.post("contenido.php", {seg:d}, function(data){
       $("#cargando").css("display", "none");
       $("#contenido").html(data);
     });
 });
});
$(document).ready(function(){
 $("#politica").click(function(evento){
    evento.preventDefault();
	var d = "politica";
    $("#cargando").css("display", "inline");
     $.post("contenido.php", {seg:d}, function(data){
       $("#cargando").css("display", "none");
       $("#contenido").html(data);
     });
 });
});
$(document).ready(function(){
 $("#deportes").click(function(evento){
    evento.preventDefault();
	var d = "deportes";
    $("#cargando").css("display", "inline");
     $.post("contenido.php", {seg:d}, function(data){
       $("#cargando").css("display", "none");
       $("#contenido").html(data);
     });
 });
});
$(document).ready(function(){
 $("#especiales").click(function(evento){
    evento.preventDefault();
	var d = "especiales";
    $("#cargando").css("display", "inline");
     $.post("contenido.php", {seg:d}, function(data){
       $("#cargando").css("display", "none");
       $("#contenido").html(data);
     });
 });
});
$(document).ready(function(){
 $("#espectaculos").click(function(evento){
    evento.preventDefault();
	var d = "espectaculos";
    $("#cargando").css("display", "inline");
     $.post("contenido.php", {seg:d}, function(data){
       $("#cargando").css("display", "none");
       $("#contenido").html(data);
     });
 });
});
