/* <![CDATA[ */

function bug(a) {
//	$("#debug").html("<?=$oikein;?> - "+a);
}

function points(a,l){
	if (out) {
		var echo = 50;
	}	
	else {
		var neg = (eval(l-a)/100).toFixed(0);
		var pos = 100-eval(neg);
		var echo = eval(pos)+50;
	}
	old_result = $("#points").attr("value");
	new_result = eval(old_result)+eval(echo);

	bug("neg:" + neg +"pos:" + pos +"respond time:" + echo + " new result:" + new_result);

	$("#points").attr("value",new_result);
}


$(function(){ 
	

	$(".button").hover(
		function () {
			$(this).find(".button_inner").css({backgroundImage:"url(images/v01_h.jpg)"})
			$(this).css({backgroundImage:"url(images/v02_h.jpg)"})
			$(this).find("img").attr("src","images/v03_h.jpg")
		},
		function () {
			$(this).find(".button_inner").css({backgroundImage:"url(images/v01_n.jpg)"})
			$(this).css({backgroundImage:"url(images/v02_n.jpg)"})
			$(this).find("img").attr("src","images/v03_n.jpg")
		}
	);
});


/* <![CDATA[ */



