$(document).ready(function() {
    // Replace header with Cufon
    Cufon.replace('#header h1', { 
        hover: true,
        textShadow: '1px 1px #333'
    });
    Cufon.replace('a.button', {
        hover: true,
        fontWeight: 'bold',
        letterSpacing: '-1px'
    });
    
    // Replaces standard input submit buttons with span buttons for Cufon text
    $('input.button').each(function(){
        $(this).hide();
        $(this).after('<span class="'+$(this).attr('class')+'">'+$(this).val()+'</span>');
    });
    $('span.button').live('click', function(e) { $(this).prev('input.button').click(); });
    
    // Now elements are spans, replace with Cufon
    Cufon.replace('span.button', {
        hover: true,
        fontWeight: 'bold',
        letterSpacing: '-1px'
    });
});

