// JavaScript Document

//window.addEventListener('onorientationchange' in window ? 'orientationchange' : 'resize', setHeight, false);

function setHeight() {
	//$.mobile.fixedToolbars.show(true);
}

$(document).bind("mobileinit", function(){
	$.support.touchOverflow = true;
  	$.mobile.touchOverflowEnabled = true;
	$.mobile.fixedToolbars.show(true);
});	

$('#page').live("pageinit", function(){
	if (navigator.userAgent.match(/Android/i)) {
		window.scrollTo(0,0); // reset in case prev not scrolled  
		var nPageH = $(document).height();
		var nViewH = window.outerHeight;
		if (nViewH > nPageH) {
		  nViewH = nViewH / window.devicePixelRatio;
		  $('BODY').css('height',nViewH + 'px');
		}
		window.scrollTo(0,1);
	}	
});


