Everything needs to go inside the 'onload' or 'DOMready' function.
You currently have the window.onload set to run just the Shadowbox.init function. The code to add the click event to the body inner would not wait for the document to be loaded, so it would fail because the shadowbox had not been initialised, hence no body inner would exist to attach the event to.
Try using this instead of your current inline script...
window.addEvent('domready', function(){
Shadowbox.init();
$('shadowbox_body_inner').addEvent('click', function(e){
new Event(e).stop();
Shadowbox.close();
});
});
If you really want to stick with the window.onload, the it's...
window.onload = function(){
Shadowbox.init();
$('shadowbox_body_inner').addEvent('click', function(e){
new Event(e).stop();
Shadowbox.close();
});
};
Combine literacy with curiosity and a whole world of information opens up to you