/* updateOrientation checks the current orientation, sets the body's class attribute to portrait, landscapeLeft, or landscapeRight, 
   and displays a descriptive message on "Handling iPhone or iPod touch Orientation Events".  */
function updateOrientation()
{
	/*window.orientation returns a value that indicates whether iPhone is in portrait mode, landscape mode with the screen turned to the
	  left, or landscape mode with the screen turned to the right. */
	var orientation=window.orientation;
	switch(orientation)
	{
	
		case 0:
				/* Portrait */
				$("#pagePanel").removeClass();
				$(".header").css("width","300px");
				$(".featureProject").css("width","300px");
				break;	
				
		case 90:
				/* Landscape left */
				$("#pagePanel").removeClass();
				$("#pagePanel").addClass("landscape");
				$(".header").css("width","460px");
				$(".featureProject").css("width","460px");
				break;
		
		case -90:	
				/* Landscape Right */
				$("#pagePanel").removeClass();
				$("#pagePanel").addClass("landscape");
				$(".header").css("width","460px");
				$(".featureProject").css("width","460px");
				break;
	}

}

// Point to the updateOrientation function when iPhone switches between portrait and landscape modes.
window.onorientationchange=updateOrientation;

updateOrientation();

	
		


