
/* metu + top search */


$(document).ready(function() {

    $("#menu li").hover(makeTall, makeShort);

    $('#top_find')
        .click(function() { $(this).val("") })
        .blur(function() { if ($(this).val() == "") { $(this).val("Search"); } })
        .bind('keypress', function(e) {
            var code = (e.keyCode ? e.keyCode : e.which);
            if (code == 13 && $(this).val() != "Search") {
                return Find();
            }
        });
        $('#top_find_cmd').click(function() { if ($('#top_find').val() != "Search") { return Find(); } });
});

function Find() {
    document.location = "/result/" + $('#top_find').val();
    return false;
}

function makeTall() { $(this).find("div").fadeIn(0); }
function makeShort() { $(this).find("div").fadeOut(0); }

/* other */

function Delete() { return confirm("Delete this item?") }
function back() { window.history.back(); }



