Script moved into document ready