Используйте метод window.load, как предложено в документах :
<script type="text/javascript">
Shadowbox.init({
skipSetup: true
});
$(window).load(function() {
// open a welcome message as soon as the window loads
Shadowbox.open({
content: '<div id="welcome-msg">Welcome to my website!</div>',
player: "html",
title: "Welcome",
height: 350,
width: 350
});
});
</script>