window.fn = {};

window.fn.open = function() {
  var $namemenu = document.getElementById('$name_menu');
  $namemenu.open();
};

window.fn.load = function(page) {
  var $namecontent = document.getElementById('$name_content');
  var $namemenu = document.getElementById('$name_menu');
  $namecontent.load(page)
    .then($namemenu.close.bind($namemenu));
};