/*
 * Blue Static Site
 *
 * Copyright (c)2010 by Blue Static. All Rights Reserved.
 * This file may not be reproduced in any way without permission.
 */

$(document).ready(function() {
    /*
     * Make the navigation items navigate when the block, but not the link, is clicked.
     */
    var nav_items = $("#navigation > ul > li");
    nav_items.click(function(e) {
        var $a = $(this).children("a");
        window.location = $a.attr("href");
    });

    /*
     * Add placeholder to the blog search field.
     */
    var blog_search = $("#searchform > #s");
    var search_str = "Search\u2026";
    if (blog_search)
    {
        if ($(blog_search).val() == "")
            $(blog_search).val(search_str);
        $(blog_search).focus(function(e) {
            if ($(this).val() == search_str)
                $(this).val("");
        });
        $(blog_search).blur(function(e) {
            if ($(this).val() == "")
                $(this).val(search_str);
        });
    }
});

