/*
$(document).ready(function() {

   // Interceptamos el evento submit
    $('#frontendform').submit(function() {
  // Enviamos el formulario usando AJAX
        Inscribe();
        return false;
    });
})
function Inscribe(){

      var url = $("#urlAjax").val()+"frontManage.php";
      if ($("#emailInput").val() == ""){
          alert("Introduce un titulo de newsletter antes de guardar");
      }else{
          $.ajax({
                type: "POST",
                url: url,
                data: "show=SaveIns&email="+$("#emailInput").val()+"&newsletter="+$("#newsletterHidden").val()+"&lista="+$("#listSuscribes").val(),
                beforeSend: function(objeto){
                                     $("#resultado").html('<img  src="'+$("#loadingurl").val()+'" >');
                },
                success: function(datos){
                    $("#resultado").html(datos);
                }
          });
     }
}
*/
jQuery(document).ready(function() {

   // Interceptamos el evento submit
    jQuery('#frontendform').submit(function() {
  // Enviamos el formulario usando AJAX
        Inscribe();
        return false;
    });
})

function Inscribe(){

      var url = jQuery("#urlAjax").val()+"frontManage.php";
      if (jQuery("#emailInput").val() == ""){
          alert("Introduce un titulo de newsletter antes de guardar");
      }else{
          jQuery.ajax({
                type: "POST",
                url: url,
                data:
"show=SaveIns&email="+jQuery("#emailInput").val()+"&newsletter="+jQuery
("#newsletterHidden").val()+"&lista="+jQuery("#listSuscribes").val(),
                beforeSend: function(objeto){                                     
				jQuery("#resultado").html('<imgsrc="'+jQuery("#loadingurl").val()+'" >');
                },
                success: function(datos){
                    jQuery("#resultado").html(datos);
                }
          });
     }

}