The problem is that the the CSS file (which defines the position of #page_1) might not be loaded when your script runs.
Changing $(document).ready() to $(window).load() will certainly work, but it's not what you want to do.
Your answer can be found in the jQuery API reference
, which is always a better place to start your troubleshooting than internet forums:
When using scripts that rely on the value of CSS style properties, it's important to reference external stylesheets or embed style elements before referencing the scripts.
So, just do that, and you will be fine.