$(function () {
    $('#searchbox').keypress(function (e) {
        if (e.which == 13) {
            var q = $(this).val();
            if (q != '') {
                window.location.href = '/search/' + q;
            }
        }
    });
});