// JavaScript Document
function mostraAltri_eventi(puls){
	
	$(puls).click(function(){
		puls=this
		$.ajax({
			type: "POST",
			url: "controller.php",
			dataType: "json",
			data: ({
				'url': $(puls).attr('href')
			}),
			success: function(ret){
				if (ret['success']){		
					$(puls).prev().append(ret['msg'])
					$(puls).attr('href','?action=viewsection&elementid=13&pag='+ret['pag'])
					$('.aggLista:last').fadeIn("slow")
				}else{
					alert('errore')
				}
				
			},
			error : function(XMLHttpRequest, textStatus, errorThrown){
				alert(textStatus)
			}
		});
		
		return false;
	});

	
}

$(document).ready(function() {
	$('#newsletter').click(function(){
	
		$.ajax({
			type: "POST",
			url: "controller.php",
			
			data: ({
				'url': $(this).attr('href')
			}),
			success: function(msg){
				$("div#whitebox").html(msg);
				setUrl(data);
				
			},
			error : function(XMLHttpRequest, textStatus, errorThrown){
				alert(textStatus)
			}
		});
		
		return false;
	});
});
