The moon was shining very pleasantly out on the sea, and Jim, attracted to the window by the romantic appearance of the ocean and the heavens, thought he would further enjoy them while smoking. 
 was attracted to the window by the romantic scene of the moonlight on the sea, and thought he would enjoy it while smoking. 