Filmmakers initially wanted Rachel McAdams to play Andy. They wanted the main role to be portrayed by a popular and famous actress. The star of The Notebook and Mean Girls had an advantage over Hathaway, who at that moment was only famous for family movies like The Princess Diaries and Ella Enchanted. However, after McAdams turned down the offer several times, explaining that she wanted to stay away from mainstream roles for a bit, the role finally went to Anne.