PubManager = {

    init : function(){    
        this.pubNumbers = parseInt($('.pub_330_173').length)-1;
        this.current = 0;
        $('#pub_330_173_' + this.current).css('display', 'block');        
        if(this.pubNumbers >= 1)
            this.start();               
    },  
    
    start : function(){        
        var closure = this;        
        this.interval = window.setInterval(function(){                        
            closure.showNext();
        }, 10000);
    },   
    
    showNext : function(){        
        var number = this.current >= this.pubNumbers ? 0 : this.current+1;
        $('#pub_330_173_' + this.current).fadeOut(600);
        $('#pub_330_173_' + number).fadeIn(600);        
        this.current = number;
    }    
};

$(document).ready(function(){
    PubManager.init();
});



