$(document).ready(function (){
    cat_search = $('input#search_query');
    cat_filler = 'search catalogue';
    blog_search = $('form#searchform input#s');
    blog_filler = 'search blog';
    cat_search.focus(function(){
        if ($(this).val() == cat_filler){
            $(this).val('');
        }
    });
    cat_search.blur(function(){
        if ($(this).val().length < 1){
            $(this).val(cat_filler);
        }
    });
    cat_search.trigger('blur');
    blog_search.focus(function(){
        if ($(this).val() == blog_filler){
            $(this).val('');
        }
    });
    blog_search.blur(function(){
        if ($(this).val().length < 1){
            $(this).val(blog_filler);
        }
    });
    blog_search.trigger('blur');
    
    order = $('ul#order');
    times = $('div#times')
    pos = order.position();
    times.show().css({
        top:pos.top + order.innerHeight() - 1,
        left:pos.left + ((order.innerWidth() - times.innerWidth()) / 2)
    }).hover(
        function(){
            $('> div:hidden', this).stop(true, true).slideDown(300);
        },
        function(){
            $('> div:visible', this).stop(true, true).slideUp(300);
        }
    );
});

