$(document).ready(function(){

	//comportamiento de los formularios de la página de inicio
	$("#buscador_nombre").focus(function(){
		$(this).val("");
		$(this).css('color','#353535');		
	});
	
	$("ul.loUltimo li").hover(function(){
		$("ul.loUltimo li.selected").each(function(){
			$(this).removeClass("selected");
		});
		$("#containerPortadas").html($('ul.ultimasPortadas li#portada'+$(this).attr("class")).html());
		$(this).addClass("selected");
	});
	
	$("#buscador_nombre").keydown(function(e){
		if (e.keyCode == 13)
			$("#frmBuscador").submit();
	});
	
	//enlaces escuchados
	$("#enlsEscuchados a").click(function(){
		$("#enlsEscuchados a").each(function(){
			$(this).removeClass();
		});
		$(this).addClass('selected');
		return false;
	});
	
	$("#escuchados30dias").click(function(){
		$("#escuchadosSemanal").hide();
		$("#escuchadosMensual").show();
		$("#masEscuchados small").html('(últimos 30 días)')
	});
	
	$("#escuchados7dias").click(function(){
		$("#escuchadosMensual").hide();
		$("#escuchadosSemanal").show();
		$("#masEscuchados small").html('(últimos 7 días)')
	});
	
	//fin enlaces escuchados
	
	//enlaces descargados
	$("#enlsDescargados a").click(function(){
		$("#enlsDescargados a").each(function(){
			$(this).removeClass();
		});
		$(this).addClass('selected');
		return false;
	});
	
	$("#descargados30dias").click(function(){
		$("#descargadosSemanal").hide();
		$("#descargadosMensual").show();
		$("#masDescargados small").html('(últimos 30 días)')
	});
	
	$("#descargados7dias").click(function(){
		$("#descargadosMensual").hide();
		$("#descargadosSemanal").show();
		$("#masDescargados small").html('(últimos 7 días)')
	});
	
	//fin enlaces descargados

	
});