/*global document, window */


function updateOrientation() {

var orientation = window.orientation;

switch(orientation) {

case 0:
document.body.setAttribute("class","default");
break;

case 90:
document.body.setAttribute("class","landscape");
break;

case -90:
document.body.setAttribute("class","landscape");
break;
}
}

function DOMReady(fn) { if(document.addEventListener) {document.addEventListener("DOMContentLoaded", fn, false);  } } 

function checkReadyState(fn) { if(document.readyState == "interactive") {fn(); }}   

window.onDOMReady = DOMReady;  

window.onDOMReady(function()

{updateOrientation();
}



);

window.onorientationchange = updateOrientation;

