In the past, a gentleman would never extend his hand unless a lady extended hers first. Now, the 'highest ranking' tend to extend their hand first.
I believe the right approach is to be flexible here. Have a feel and look around at what others are doing. If you're a woman, just go ahead and extend that hand. Of course, I don't think women in general would object to shaking the hand to the man who extended his hand first.
Read some of your comments
In a group, shake the woman's hand first (if you're a guy). And if you're a woman, shake the hand which is extended to you first.