It'll be more efficient if you store the elements you're going to manipulate into a variable. Also, since you're doing the same thing twice, you could make it into a function.
e.g. <script type="text/javascript"> $(document).ready(function() { var getTrs = $('tbody.bevker tr'); function changeTrs(){ getTrs.each(function(i){ $(this).removeClass(); (i%2)? $(this).addClass('row0 odd') : $(this).addClass('row1 even'); }); }; changeTrs(); $('th').click(function() { changeTrs(); return false; } ); } ); </script>