$(document).ready(function() {
    // Use Cufon to replace text with fancy text.
    Cufon.replace('.tagline');
    Cufon.replace('.sectionhd');
    Cufon.replace('.navigation', {hover: true});
    
    // Adjust the top margin to compensate for Cufon.  This is done in
    // JavaScript so that visitors with JavaScript disabled, and therefore no
    // Cufon, will not be affected by the adjustment.
    $('.tagline, .content').css({
        'padding-top': '0px'
    });
    
    // Add a link to hide the content so that the background image can be
    // viewed clearly.
    $('#ft').append(
        '<p>\
            <a href="#view-bg-img" class="view-bg">(view background image)</a>\
         </p>'
    );
    
    $('.view-bg').live('click', function() {
        // Determine the correct text for the link based on whether the content
        // is hidden or not.
        if($('.content').css('display') == 'none') {
            $('.restore').remove();
        } else {
            $('body').append(
                '<p class="restore">\
                    <a href="#view-bg-img" class="view-bg">\
                        (restore content)</a>\
                 </p>'
            );
        }
        
        $('.tagline, .content, #ft').toggle('slow');
        return false;
    });
});
