function debug(msg){
    //console.log('++++++++++  '+msg+'  ++++++++++');
}

function banner(){
    this.index           = 0;
    this.banner_num      = 5;
    this.timeline		 = 5000;
    this.intervalProcess = null;
    debug('new');
    this.init();
}
banner.prototype.init = function(){
    debug('init');
    this.change_handle();
    this.start();
}
banner.prototype.start = function(){
    debug('start');
    var _this = this;
    this.intervalProcess = setInterval(function(){
        _this.change_handle();
    },this.timeline);
}

banner.prototype.stop = function(){
    debug('stop');
    clearInterval(this.intervalProcess);
}
banner.prototype.change_handle = function(){
    if (this.index > this.banner_num-1) {
        this.index = 0;
    }
    debug('change_handle__'+this.index);
    this.change(this.index)
    this.index += 1;
}
banner.prototype.change = function(index){
	$('#info_gonggao ol a').removeClass('current');
    $('#info_gonggao ol a').eq(index).addClass('current');
	$('#info_gonggao ul li').removeClass('current');
	$('#info_gonggao ul li').eq(index).addClass('current');
}
$(function(){
    var Banner = new banner();
    $('#info_gonggao ol a').mouseover(function(){
        var index = $('#info_gonggao ol a').index(this);
        Banner.change(index);
        debug('button__'+index);
        Banner.index = parseInt(index)+1;
    });
});
