$(document).ready(function(){
	
	oldCount = 0;
	
	$('input').click(function() {
		var count = $("input:checked").length;
		if(count == 1 && oldCount == 0) {
			$('#result').append(' <span id="answer">YES!</span> <img src="img/smiley.png" alt="" />');
			oldCount = 1; 
		} else if(count == 0) {
			$('#result').replaceWith('<p id="result">It is for me?</p>');
			oldCount = 0;
		}
	});
});
