
var slider = null; 
var now_i = 0; 
var last_i = 0; 
  
var timer = null;  
  
function movePanel() { 
if (slider == null) { 
return; 
}
if (now_i == last_i) {
now_i = (now_i + 1) % 3;
} 
$('.others .tab' + last_i).removeClass('highlighted'); 
$('.others .tab' + now_i).addClass('highlighted'); 
last_i = now_i; 
var offset = - (947*now_i); 
$('.panel-container', slider).animate({ marginLeft: offset }, 1000, 'easeInOutExpo'); 
clearTimeout(timer); 
timer = setTimeout("movePanel()", 10000); 
}; 
  
$().ready(function() { 
  slider = $('#slider').codaSlider({ 
  autoSlide: false, 
  dynamicTabs: false, 
  dynamicArrows: false 
  }); 
  
  $('.others a').click(function() { 
var t = $(this); 
if (t.hasClass('tab0')) { 
now_i = 0; 
} else if (t.hasClass('tab1')) { 
now_i = 1; 
} else if (t.hasClass('tab2')) { 
now_i = 2; 
} 
movePanel(); 
  }); 
  
  timer = setTimeout("movePanel()", 10000); 
  
});
