$(document).ready(function() {
    var TO_CLEAR_STRINGS = ["search our website", "enter your email address..."];

    $('input.clear').each(function() {
        $(this).data("txt", $.trim($(this).val()));
        if ($.inArray($(this).data("txt"), TO_CLEAR_STRINGS) == -1) {
            removeGray($(this));
        }
    }).focus(function() {
        var text = $(this).val();
        if ($.trim(text) === $(this).data("txt") && $.inArray(text, TO_CLEAR_STRINGS) != -1) {
            $(this).val("");
            removeGray($(this));
        }
    }).blur(function() {
        if ($.trim($(this).val()) === "" && !$(this).hasClass("once")) {
            $(this).val($(this).data("txt"));
            setGray($(this));
        }
    });
});


function removeGray(field) {
    field.removeClass('greyText');
    field.addClass('text');
}

function setGray(field) {
    field.removeClass('text');
    field.addClass('greyText');
}