$(function () {
    $("#search input[type='text']")
        .keyup(function () {
            if (this.value == '')
                $(this).addClass('text_inactive')
        })
        .keydown(function () {
            if ($(this).hasClass('text_inactive'))
                $(this).removeClass('text_inactive');
        }).val('').addClass('text_inactive');
});
