﻿
// Search bar
var defaultSearchWords = "Search";

$(document).ready(function() {
    // Setup the search words if none are already set.
    if ($(".SearchTerms").val() == "") { $(".SearchTerms").val(defaultSearchWords); }
});

$(function() {
    // Handle the has focus event (focus).
    $(".SearchTerms").bind('focus', function() {
        if ($(this).val() == defaultSearchWords) { $(this).val(""); }
    });

    // Handle the loose focus event (blur).
    $(".SearchTerms").bind('blur', function() {
        // If no search terms have been entered put the words search in the bar.
        if ($(this).val() == "") { $(this).val(defaultSearchWords); }
    });
});
