/*----------------------------------------------
	File:		general.js
	Author:		Sebastian Becker
	Date:		01/2011
----------------------------------------------*/

function updateOrientation()
{
var orientation=window.orientation;
switch(orientation) {
case 0: document.body.setAttribute("class", "portrait"); break;
case 90: document.body.setAttribute("class", "landscapeLeft"); break;
case -90: document.body.setAttribute("class", "landscapeRight"); break;
}
window.scrollTo(0,1); // scroll down to hide statusbar
}

if(navigator.userAgent.indexOf('iPhone')!=-1) {
window.addEventListener("load", function() { setTimeout(updateOrientation, 0); window.scrollTo, 0, 0, 1; } , false);
}

window.onorientationchange=updateOrientation;

function updateWeather() { $('#current').load('weatherfeed.php'); }
