



$(document).ready( function(){

});



function stindex_focus( new_focus ){

  $('.stindex-topic').removeClass('stindex-navlink-selected');
      
  $( new_focus ).addClass('stindex-navlink-selected');
   
  $( new_focus ).blur();
    
   var to_section;
   
   switch( new_focus ){
   
        case '#topic-overview' :             to_section = 0;
                                            break;
        
        case '#topic-embedded-usb' :         to_section = 1;
                                            break;
                                            
        case '#topic-bluetooth' :    
                                            to_section = 2;
                                            break;
        
        case '#topic-driver-development' :   to_section = 3;
                                            break;
        
        case '#topic-pc-communication-drivers' :    
                                            to_section = 4;
                                            break;
        
        case '#topic-incar-multimedia-control-software' :    
                                            to_section = 5;
                                            break;
                                            
        case '#topic-wifi-dlna' :    
                                            to_section = 6;
                                            break;      

        case '#topic-usbtesting' :           
                                            to_section = 7;
                                            break;                                         
                                        
   
   }
   
   var y_pixels = (to_section*350);
   
   $('#stindex-preview-pane').scrollTo( {top: y_pixels, left: 0}, 0);

}
