$(function() {
    $("table").each(function(i) {
        $(this).find("tr:even").addClass("alt");
    });
    // Change the focus only when the field is empty.
    if ($("#query-input").attr('value') == '') {
        $("#query-input").focus();
    }
});

