Different layout on orientation change

Hello everyone, I’m new on cocos2d-x. I’m working on my game using cocos2d-x with marmalade.
I want my game to have different layout placement on landscape and portrait orientation but I don’t know how to detect when the orientation is changed. can someone help me how to detect when orientation changed? should I use Notification node or something?
thanks