Changing $(document).ready to $(window).load