title: Jquery mobile orientation change returns opposite value
body: <p>I am currently working on a mobile website using jquery mobile and I encountered problem in detecting orientation change. My mobile website detects the orientation as "landscape" when in portrait mode and vice versa when testing on my Samsung Galaxy. However, working properly on iphone n HTC Desire. I did find in some forums that described that as Android bug and someone used setTimeOut to tackle it. But I can't solve the problem using that. Not sure if it's my syntax error or not. Can someone kindly enlighten me? Thanks in advance. </p>
  
  <p>Sample code will be much appreciated.</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>    $(document).ready(function() {
  
  
      $(window).bind("orientationchange", function (event) {
  
              setTimeout(detectOri(event),100);
  
      });
  
      function detectOri(event)
      {
  
          alert(event.orientation);
  
          if(event.orientation == 'portrait')
             {
  
                //load portrait mode page
             }
  
             else if(event.orientation == 'landscape')
             {
  
               //load landscape mode page
             }
  
      }
  
  });
  </code></pre>