$(function(event) {
    $('div#voices_container a img').hover(oppOver,function(){});
    $('div#voices_container a.staff').each(function(idx, elem) {$(elem).hover(oppOver2($('img', $(elem).parent())), function(){});});
});

$(function(event) {
    var ratio = 0;
    setTimeout(function() {
        ratio += 2;
        $('body').css('background-position', ratio + '% 51px');
        $('html').css('background-position', '50% ' + ratio + '%');
        if (ratio < 50) setTimeout(arguments.callee, 15);
    }, 15);
});

function oppOver(event) {
    var op = 20;
    var elem = $(event.target);
    var timeId = setInterval(function() {
        elem.css({opacity: op / 100});
        op += 10;
        if (op > 100) clearInterval(timeId);
    }, 15);
}

function oppOver2(elem) {
    return function(event) {
        var op = 0;
        var timeId = setInterval(function() {
            elem.css({opacity: op / 100});
            op += 10;
            if (op > 100) clearInterval(timeId);
        }, 15);
    }
}
