


var $h;
//var $m;

function arrow(){
	console.log('arrowinit');
		$h = $(".arrow2");
		//$m = $("#mpin");
		
		$h.css({
			"transform": "rotate(0deg)",
			"transform-origin": "50% 100%",
			"left": (($h.parent().width() * 0.5) - ($h.width() * 0.5) + 0) + "px",
			"top": (($h.parent().height() * 0.5) - ($h.height() - 0))+ "px"
		});		
}

function init(){
	
/*
	require(["jquery-rotation"], function(){

		console.log("rotaaaaaaaaaaaaaaa");
		$(".arrow").rotate();
		
	});*/	

	

   // lastPage ();
}



//Stop audio and video
function validAudio(){
	console.log("stop audio");
    $("audio").trigger("pause");
    $("video").trigger("pause");         
}



function setTime(h){	
	var hdeg = (h % 12) * 30;

	$h.css({"transform": "rotate(" + hdeg + "deg)", "transition": "all 0.5s ease-in-out"});

	if (h === 2.5){
		setTimeout(function() { 
			$("#btnPopUp1").click();
		}, 1000);
	}	
	else if (h === 4.5){
		setTimeout(function() { 
			$("#btnPopUp2").click();
		}, 1000);
	}	
	else if (h === 6.5){
		setTimeout(function() { 
			$("#btnPopUp3").click();
		}, 1000);
	}	
	else if (h === 9){
		setTimeout(function() { 
			$("#btnPopUp4").click();
		}, 1000);
	}	
}


