$(document).ready(function() {
	addEventListener("load", function () { setTimeout(hideURLbar, 0); }, false);
    function hideURLbar() { window.scrollTo(0, 1); }
	window.onorientationchange = orientationChange;
	$(".scrollable").scrollable({circular:true});
	$(".next, .prev").bind("click", function() {
		var video = document.getElementsByTagName('video')[0]; 
		video.pause();
		video.currentTime = 0.1;
	});
});

function orientationChange() {
	var index = $(".scrollable").scrollable().getIndex();
	$(".scrollable").scrollable().seekTo(index,0);
}
