I don't think it has much to do with Nadal losing. Fans are fickle and like to back a winner. But they gravitate towards people who have the right image for them. If you have one champion who is very good-looking in a stereotypical way, and another who is not, fans will latch on to perceived image. Look at Borg - he was blond, long hair, and he had the right image. In fact, no one knew anything about him, and his whole rep was built on a myth. We only got to find out things about Borg later in his life, and some of them were not very pretty.
Young Rafa had huge appeal because he was marketable, on top of winning. He had the long hair, the pirate look, and he was a perfect foil for Federer. If he had been equally talented but looked like Stapanek, same winning ways and same style of play, he probably would have been hated.
That's just about people being impressed by looks/image.
Novak does not have the right image for the US, and maybe to some extent (but less so) in Western Europe. Maybe some of his behaviors have prejudiced fans against him a bit, but I think it's mostly about image and marketing.
I think his lack of popularity is more about image than anything else, which is really superficial and shallow, but that's the way the world works.