﻿$jq(document).ready(function () {
    var text = document.getElementById("searchTextBox");

    var button = document.getElementById("searchButton");

    var into = "Search by product or keyword";

    text.value = into;

    $jq(text).click(function () {
        if (this.value == into) {
            this.value = "";
        }
    });

    $jq(text).blur(function () {
        if (this.value.length == 0) {
            this.value = into;
        }
    });

    $jq(text).keypress(function (event) {
        if (event.keyCode == '13') {
            event.preventDefault();

            document.getElementById('searchButton').click();
        }
    });
})
