$(document).ready(function() {
    
	$("#form-second").submit(function(e) {
    e.preventDefault(); // avoid to execute the actual submit of the form.
    var form = $(this);
    var actionUrl = form.attr('action');
		
    $.ajax({
        cache:false,
        type: "POST",
        url:'/bron.php',
        data: form.serialize(), // serializes the form's elements.
        error:function(msg){alert(msg);},
        success: function(data)
        {
            if(data.match(/^\d+$/)) {
                var urls = '/bron/';
                window.location.href = urls;
              }
          else
          {
          alert(data); // show response from the php script.
          }
        }
    });
});




});

$(document).on('click', '#comrev' , function() {
     var id = $(this).attr('data');
	 $("#n"+id).css('display','block');
});

$(document).on('click', '#comrevhide' , function() {
     var id = $(this).attr('data');
	 $("#n"+id).hide();
});

