Use of greybox popup to show shopping basket at an ecommerce website

I have the following scenario : In an ecommerce website, when a user adds an item to the basket, greybox will popup with the basket content.
If the user wants to continue shopping, then clicks a button on popup window and window closes. If the user wants to go to the checkout page then the user clicks a button and the popup window closes. After that, the parent window redirects to the checkout page (may be with some querystring parameters that need to be passed from child window).

I am quite new to greybox, any help -with sample code, if possible- is appreciated.



Not exactly what you are looking for, but this may help: