$(function () {
    $('label.labelOver').labelOver();
    $('#partner-logos ul').scrollLogos();
});

jQuery.fn.scrollLogos = function () {
    var t = $(this);
    if ($('li', t).length > 5) {
        setInterval(function () { t.moveNext(); }, 5000);
    }
};
jQuery.fn.moveNext = function () {
    var ul = $(this);
    var last = $('li:last', ul);
    last.fadeOut(0);
    $('li:first', ul).delay(500).animate({ marginLeft: '-=180px', opacity: 0 }, 600, function () {
        var t = $(this);
        last.fadeIn(500);
        t.remove();
        $('<li />', {
            html: t.html()
        }).appendTo(ul);
    });
}
