/*
function ticker() {
    var quotes = $(".ticker li").hide();
    var transition = 500;
    var wait = 10000;
    var length = quotes.length;
    var i = 0;

    (function(){
        $(quotes[i++] || []).fadeIn(transition).animate({borderWidth: "0px"}, wait).fadeOut(transition, arguments.callee);
        if(i==length){i=0;}
    })();

}
*/


// This works fine, but makes no sense with only 4 quotes 
function rnd(max) {
    var rnd = Math.floor(Math.random()*max);
    return rnd;
}

function ticker() {
    $(".ticker li").hide();
    
    var quotes = $(".ticker li");
    var transition = 500;
    var wait = 10000;
    var max = quotes.length;
    
    $(quotes[rnd(max)]).fadeIn(transition).animate({borderWidth: "0px"}, wait).fadeOut(transition, ticker);
}
