onload android orientation detection? (code supplied)
<p>So i found some handy code on SO about checking oreintation on android devices, that worked great for loading style sheets based on the rotation of the device, but my issue now is that if the device is already "landscape" (<code>90 / -90</code> in the JS) then it ignores the rules from the code below, so i need the code below to run onload, i have attempted it but it seems i just cant get it right.</p>

<p>Help please ?</p>

<pre><code>        //detect orientation change
    var supportsOrientationChange = "onorientationchange" in window,
    orientationEvent = supportsOrientationChange ? "orientationchange" : "resize";
        window.addEventListener(orientationEvent, function() {
            if(window.orientation == 90) {

                $('link[title=android]')[0].disabled=true;
                $("head").append($("&lt;link title='android_90' rel='stylesheet' href='css/android_90.css' type='text/css' /&gt;"));
            } else if (window.oreintation == -90) {

                $('link[title=android]')[0].disabled=true;
                $("head").append($("&lt;link title='android_90' rel='stylesheet' href='css/android_90.css' type='text/css' /&gt;"));
            } else if (window.oreintation == 0){

                $('link[title=android_90]')[0].disabled=true;
                $("head").append($("&lt;link title='android' rel='stylesheet' href='css/android.css' type='text/css' /&gt;"));
            } else if (window.oreintation == 180){

                $('link[title=android_90]')[0].disabled=true;
                $("head").append($("&lt;link title='android' rel='stylesheet' href='css/android.css' type='text/css' /&gt;"));
            }
        }, false);

        //check on window.load
        $(document).ready(function () {
          if(window.orientation == 90) {

                $('link[title=android]')[0].disabled=true;
                $("head").append($("&lt;link title='android_90' rel='stylesheet' href='css/android_90.css' type='text/css' /&gt;"));
            } else if (window.oreintation == -90) {

                $('link[title=android]')[0].disabled=true;
                $("head").append($("&lt;link title='android_90' rel='stylesheet' href='css/android_90.css' type='text/css' /&gt;"));
            } else if (window.oreintation == 0){

                $('link[title=android_90]')[0].disabled=true;
                $("head").append($("&lt;link title='android' rel='stylesheet' href='css/android.css' type='text/css' /&gt;"));
            } else if (window.oreintation == 180){

                $('link[title=android_90]')[0].disabled=true;
                $("head").append($("&lt;link title='android' rel='stylesheet' href='css/android.css' type='text/css' /&gt;"));
            }
        });
</code></pre>
