I am at the stage where I can easily go a start up a conversation with random girls. My success has greatly increased.

However for some reason it feels weird to hug random people I don't know. For example I am with a friend at a party/bar and a group of girls that they know approach, and he hugs them and says hi. It's making me feel awkward typing this. But when is the hug appropriate?