The primary definition of jealousy is a feeling of resentment towards a rival, but a less used definition is a feeling of protectiveness for what you have
The original definition of jealousy is actually what Homer said, strictly limited to worrying about losing something you already have. You might say a dragon jealously guards their treasure, or a jealous girlfriend might be worried their guy is talking to another girl so they are worried they'll lose him to the new girl.
.
It wouldn't be correct to say "Omg! She has the perfect hair, I'm soo jealous." because you don't have her hair, you just wish you did. Wanting something somebody else has is the definition of envy. Today however, both definitions are just used by jealous. If I had to hazard a guess why, I'd say people were more reluctant to say envy as its considered a "cardinal sin" whereas the word jealousy wasn't considered as terrible a vice.
Your scenario in which you said "Omg! she has the perfect hair, I'm soo jealous" works just fine with the word jealousy, as the primary definition of the word describes a feeling of resentment toward a rival or their success. The definition that refers to diligently guarding something would be the third definition. Don't believe me? Check here http://v1.memecaptain.com/ed754f.png
.
It wouldn't be correct to say "Omg! She has the perfect hair, I'm soo jealous." because you don't have her hair, you just wish you did. Wanting something somebody else has is the definition of envy. Today however, both definitions are just used by jealous. If I had to hazard a guess why, I'd say people were more reluctant to say envy as its considered a "cardinal sin" whereas the word jealousy wasn't considered as terrible a vice.