How Media Affects Voting