I tested your code in jsfiddle and it works fine in Chrome. Just added this:
<button id="show">show</button>
<button id="hide">hide</button>
and this:
overlay.init();
overlay.$('show').onclick = function () { overlay.show();};
overlay.$('hide').onclick = function () {overlay.hide();};