//---------------------------------------
// CONSTRUCTOR
//---------------------------------------
$(document).ready(function() {
   // horizontal scrollables. each one is circular and has its own navigator instance 
   var horizontal = $(".scrollable").scrollable({size: 1}).navigator("ul.templates");

   // main vertical scroll 
   $("#main").scrollable({ 

       // basic settings 
       vertical: true, 
       size: 1, 
       clickable: false, 

       // up/down keys will always control this scrollable 
       keyboard: 'static', 

       // assign left/right keys to the actively viewed scrollable 
       onSeek: function(event, i) { 
           horizontal.scrollable(i).focus(); 
       } 

   // main navigator (thumbnail images) 
   }).navigator("#main_navi"); 

   // when page loads setup keyboard focus on the first horzontal scrollable 
   horizontal.eq(0).scrollable().focus();
});
$(window).load(function() {
   setTimeout(function(){
      try { parent.$("#TB_iframeContent")[0].contentWindow.focus(); } catch (err) {}
   },300);
});
//---------------------------------------
// METHODS
//---------------------------------------
function _debug ($string) {
   try {
      console.log($string);
   } catch (err) {}
}
//---------------------------------------
