homeIntro = function() {
     var currentSet = 1;
     var lastSet = 0;
     var timer = 0;
     this.changeSet = function(set,hold) {
          if(set != currentSet) {
               lastSet=currentSet;
               currentSet=set;
               if(!hold) {
                    clearInterval(this.timer);
                    this.timer = setInterval("sh.autoChange()",5000); 
               }
               $("#shbi-c"+currentSet+"").fadeTo("fast",1);
               if(lastSet > 0) {
                    $("#shbi-c"+lastSet+"").fadeTo("fast",0.2);
                    //$("#hi_balls_s"+lastSet+" img").fadeOut();
                    $("#shbc-c"+lastSet+"").fadeOut("fast",function(){
                         $("#shbc-c"+currentSet+"").fadeIn("fast");
                    });
                    
               }
          }
     }
     this.autoChange = function() {
          if(currentSet < 4) this.changeSet((currentSet+1),true);
          else this.changeSet(1,true);
     }
     this.start = function() {
          this.timer = setInterval("sh.autoChange()",5000);
     }
}
var sh = new homeIntro;

$(document).ready(function(){
     sh.start();
     $("#shbi li").css("opacity",0.2);
     $("#shbi-c1").fadeTo("fast",1);
     $("#shbc-c1").fadeTo("fast",1);
     $('.table tr:odd').addClass('odd');
     $('.table tr:even').addClass('even');
});
