$(function(){
    String.prototype.trim = function(){
          return this.replace(/^\s*|\s*$/g,'');
    }

    var searchVal = $("#SearchString").val();
    $("#SearchString").focus(function(){
        if ($(this).val() === searchVal)
        {
            $(this).val("");
        }
    }).blur(function(){
        if ($(this).val() === "")
        {
            $(this).val(searchVal);
        }
    });

    $("p").each(function(){
        var $this = $(this),
            trim = $this.text().trim();
        if ((trim.indexOf("&nbsp;") && trim.length < 8) || trim === ""){
            $this.remove();
        }
    });
    
    var oldMenuColor = $(".menu_item ul li a").css("color");
    $(".menu_item a, #header a, form input[type='submit']").focus(function(){
        $(this).css("color", "yellow");
    }).blur(function(){
        $(this).css("color", oldMenuColor);
    });
    
    var oldContentColor = $("#content a").css("color");
    $("#content a").focus(function(){
        $(this).css("color", "black");
    }).blur(function(){
        $(this).css("color", oldContentColor);
    });
});
