I have the following code:
$(function(){ //your code })
Is the shorthand for $(document).ready(). document.ready fires just after the DOM is loaded, adding a window.onload inside it is unnecessary.
IE wont fire a "pageshow" event, since it doesn't recognize it.