if (!lolapps) var lolapps = {}
if (!lolapps.page) lolapps.page = {
    cur: 0,
    gotoSlide: function(idx) {
        if (idx >=0 && idx <=6) {
            $("#billboard_wrapper > div:visible").fadeOut(1000);
            $("#billboard_wrapper > div:eq(" + idx + ")").fadeIn(1000);
            this.cur = idx;
        }
    },
    nextSlide: function() {
        if (this.cur < 6 )
            this.cur++;
        else 
            this.cur = 0;
        this.gotoSlide(this.cur);
    },
    previousSlide: function() {
        if (this.cur > 0 )
            this.cur--;
        else
            this.cur = 6;
        this.gotoSlide(this.cur);
    },
    nextClick:function() {
        clearInterval(this.timer);
        this.nextSlide();
    },
    previousClick:function() {
        clearInterval(this.timer);
        this.previousSlide();
    }
}

$(function() {
    lolapps.page.timer = setInterval(function() { lolapps.page.nextSlide() }, 6000);
});