detect orientation event in mobile device by window.orientation