There's another issue in the resize function for orientationchange; if you first zoom a liitle bit and after that do the orientationchange, the image is not at the right postion!
I just added the resetZoom() at the end and now it works fine for me: