
$(document).ready(function() {

  // Enviar Formulari
  $('.send_form').click(function() {
    $('#'+$(this).parents("form").attr("id")).submit();
  });


  // Validar i enviar formulari
  $('.check_form').click(function(evento) {
    if(check_form()) {
      $('#'+$(this).parents("form").attr("id")).submit();
    } else {
      evento.preventDefault();
    }
  });


  // Netejar formulari
  $('.delete_form').click(function(evento) {
    delete_form();
    evento.preventDefault();
  });


  // Zebra tables: fitxa
  $('#fitxa table tr:nth-child(even)').addClass('alt');
  $('#fitxa table tr td:first-child').addClass('title');


  // Print
  $('#boto_print').click(function(){
    $("#fitxa").jqprint();
    return false;
  });

});

