    function do_colored()
    {
       var add_style = false;

         $('#id_specif tbody tr').each(
                function(){

              if ($(this).hasClass ("colored")) {
                   $(this).removeClass("colored");
                }


                    if(($(this).css("display")) != 'none')
                        {
                            if (add_style == true)
                                {
                                    $(this).addClass("colored");
                                    add_style = false;
                                }
                             else
                                {
                                    add_style = true;
                                }
                            //$(this).addClass("colored");

                        }
                });

    }
  $(document).ready(function(){
    $("#id_specif").tablesorter({headers:{0:{sorter:false}}});

      do_colored();


  var theTable = $('#id_specif')



  $("#filter").keyup(function() {
    $.uiTableFilter( theTable, this.value );


     do_colored();

  })




    $('#id_specif tbody tr').live('click', function(event) {


            if ($(this).hasClass ("graybg")) {
               $(this).removeClass("graybg");
            }



         $(this).addClass("selected_th");

    });

});

