Across the world attitudes towards homosexuality roughly correlate to how wealthy and secular a country is, according to Pew Research's Global Attitudes Project.