var tp = 1;

var $j = jQuery.noConflict();

function subscribe() {
	$j.ajax({
     	type: "GET",
		dataType: "html",
        url: "/suscripcion.php",
        data: "email="+$j('#email').val()+"&accion=subscribe",
		error: function(msg,a,b,c,d) {
			alert("error:"+msg);
			alert(a + "\n" + b + "\n" + c + "\n" + d + "\n")
		},
        success: function(msg){
        	$j('#newsletterForm').html(msg);
        }
    });	
}
function unsubscribe() {
	$j.ajax({
     	type: "GET",
		dataType: "html",
        url: "/suscripcion.php",
        data: "email="+$j('#email').val()+"&accion=unsubscribe",
		error: function(msg,a,b,c,d) {
			alert("error:"+msg);
			alert(a + "\n" + b + "\n" + c + "\n" + d + "\n")
		},
        success: function(msg){
        	$j('#newsletterForm').html(msg);
        }
    });	
}