jQuery(function($){

  //find all glossary link and add class
  $('#portal-columns')
      .find('a[href^=./glossary/]')
          .each(function() {$(this)
              .addClass('glossary');});
  
  //show download message    
  $("#offline-box",function(){
      if (!window.google || !google.gears){
          // do something?
      } else {
          if (!google.gears.factory.hasPermission){
             message = $('#gears-messages .install');
             $(".msg-install").remove()
             $('#gears-messages').append(message.show())
          }
      }
      
  })
  
  //hide button download without refresh page
  $('.bigButton.offlineEnable').click(function(){
      if (google.gears.factory.hasPermission){
          $('#gears-messages .install').hide()
      }
  })
        
})

