$(document).ready(function() {
  // Disable all top level menu links
  $('#navigation > li > a').click(function() {
    return false;
  });
  
  // Initialise overlay
  Overlay.initialise();
  
  var rpc = new Jamiedia.RPC({ url: baseUrl+'api' });
  
  // Bind all news links to show the full article linked to it
  $('#termsofuse-link').click(function() {
    
    // Show the overlay
    Overlay.show('Terms of use');
    
    // Invoke RPC call
    rpc.invoke('getTerms', {
    }, function(data) {
      Overlay.setContent('<h2>'+data.title+'<\/h2>'+data.body);
    });
    
    return false; 
  });
});
