var url_base='process/';



	

    $(document).ready(function() {
		
	
		
		$("[id^='charbody']").hide();
		$("[id^='charhead']").css("border-left","1px solid #000");

		$("#charbody-1").show();
		
		$(".boton").hover(function(){
				$('body').css('cursor', 'pointer'); 
			},function(){
				$('body').css('cursor', 'auto'); 
		});
		
		$("[id^='charhead']").click(function(){
				id=$(this).attr('id').replace(/charhead-/,"");
				$("[id^='charbody']").hide("fast");
				$("#charbody-"+id).show("fast");
		});
	
	
		//$(".menuitem").fadeTo("fast",0.8);
		
			$(".menuitem").hover(function(){
		//	$(this).fadeTo("fast",1);
			}
			,function(){
		//	$(this).fadeTo("slow",0.8);	
 		});


		$("#boton_comment").hover(function(){
				$('body').css('cursor', 'pointer'); 
			},function(){
				$('body').css('cursor', 'auto'); 
		});
		

		$('#boton_comment').click(function(){
			var t=$(this);
			var tipo_comment=$('[name="tipo_comment"]').val();
			var id_comment=$('[name="id_comment"]').val();
			var nick=$('[name="nick"]').val();
			var comment=$('[name="comment"]').val();
			$.post("system/process/post_comment.php", { type:tipo_comment, id_commented: id_comment,nick:nick,new_comment:comment },
  				 function(data) {
					var html=$(".caja_comentarios").html();
					$(".caja_comentarios").html(data+html);
					$('[name="nick"]').val('');
					$('[name="comment"]').val('');
  		 	});
		});

 
 });
 
 
 
 		



