"A female crocodile or alligator doesn't sit on her eggs to keep them warm. She covers them with soil and vegetation, and as this material starts to "compost," the nest mound heats up. But don't think the temperature of an alligator nest is a trivial matter. The nest is made with just the right mixture of mud and vegetation to create a precise range of internal temperatures. Why so specific? Because the sex of hatchling crocs and gators is determined by the temperature within the nest! Eggs incubated at around 89 degrees Fahrenheit produce females, while those at temperatures below 87 degrees produce mainly males. In a well-constructed croc nest the eggs on top will be a few degrees cooler than those closer to the bottom, and -- VOILA! -- when the babies hatch there are usually an equal number of males and females.

This phenomenon (known as temperature-determined sex) is amazing, but it's not unique, also occurring in turtles and lizards. The sex of human babies, however, is not known to be affected by the temperature of their parents' compost heap."

eNature.com

Now that's a mouthful to contemplate...