﻿$(document).ready(function () {
    // Adds "Search" placeholder to the header search box
    $(".header_search_text").val('Search');
    $("#header_search_form").attr('action', 'search_results.aspx');

    // On click, if the placeholder is still present, we remove it to allow for the user's input
    $(".header_search_text").click(function () {
        if ($(this).val() == 'Search') {
            $(this).val('');
        }
    });

    // When the search input box loses focus and has no user input, we replace the placeholder for obvious ux reasons
    $(".header_search_text").blur(function () {
        if ($(this).val() == '') {
            $(this).val('Search');
        }
    });
});

