Having problem with positioning jQuery UI modal dialog

Having problem with positioning jQuery UI modal dialog

I am trying to make the modal dialog appear at top of the page. Previously it was easy with position but with the redesigned position api, I cant make it work. Leafing through the docs i am trying this one - position: {my: "top", at: "top", of: window}, in fact i tried every possible combination. What should I do?