﻿$(document).ready(function() {
   // Define what happens when the textbox comes under focus
   // Remove the watermark class and clear the box
   $("#searchBox2").focus(function() {
      $(this).filter(function() {
         // We only want this to apply if there's not
         // something actually entered
         return $(this).val() == "" || $(this).val() == "search anything"
      }).removeClass("watermarkOn").val("");
   });
   // Define what happens when the textbox loses focus
   // Add the watermark class and default text
   $("#searchBox2").blur(function() {
      $(this).filter(function() {
         // We only want this to apply if there's not
         // something actually entered
         return $(this).val() == ""
      }).addClass("watermarkOn").val("search anything");
   });
});
