
function backgroundResize() {
    var $$ = $('img').slice(0);
    var wh = $(window).height();
    var ww = $(window).width();
    var h = $$.height();
    var w = $$.width();
    var width_ratio = ww / w;
    var height_ratio = wh / h;
    if (width_ratio >= height_ratio) {
        $$.css({width: '100%', height: 'auto'});
    } else {
        $$.css({height: '100%', width: 'auto'});
    }
}

$(function() {
    // Typeface fonts
    Cufon.replace('#nav-menu a', {
        hover: true
    });
    Cufon.replace('#main-content h1, #main-content h2');
});


$(function() {
    // Add upload progress for multipart forms.
    $('form.form-with-progress[enctype=multipart/form-data]').uploadProgress();
});


