text: // console.log("activities.js loaded");
  $(document).ready(function () {
  	var tries = 0,
  		points = 0,
  		qcount = 1;
  
  
  	var score = (function () {
  		var altSelect,
  			altCorrect;
  
  		var check = function (as, ac) {
  			altSelect = as;
  			altCorrect = ac;
  			if (altSelect === altCorrect) {
  				// console.log("Acertou! -> s: "+ altSelect + " = c: "+altCorrect);
  				return 1;
  			} else {
  				// console.log("Errou! -> s: " + altSelect + " = c: " + altCorrect);
  				return 0;
  			}
  		}
  
  		var percent = function (corrects, selecteds) {
  			var calc = (100 * corrects) / selecteds,
  				finalPercent = parseFloat(calc.toFixed(2));
  
  			return finalPercent;
  		}
  
  		return {
  			check: check,
  			percent: percent
  		}
  	})();
  
  	$(".exercicios .questions .alt").on("click", function () {
  		var sc = $(".exercicios #screen-" + qcount);
  		// console.log(sc);
  		if (sc.hasClass("uk-active")) {
  			// console.log("Tries: " + tries + " | Points: " + points + " | Screen: #screen-" + qcount);
  
  			altSelect = $(this).data("a");
  			altCorrect = $(".exercicios .questions-nav .screen-" + qcount).data("correct");
  			if (!sc.hasClass("finished")) {
  				tries++;
  
  				if (score.check(altSelect, altCorrect)) { // certo
  					$(".exercicios .questions #screen-"+qcount).addClass("finished");
  					$(".exercicios .questions-nav .next").removeClass("opacity-0");
  
  					$(".exercicios .questions #screen-"+qcount+" .alt .alt-feedback").addClass("wrong");
  					$(this).children(".alt-feedback").removeClass("wrong").addClass("correct");
  
  					$(".exercicios .questions-nav .screen-"+qcount).next(".uk-disabled").removeClass("uk-disabled");
  
  					points++;
  					qcount++;
  					// console.log("Tries: " + tries + " | Points: " + points + " | Screen: #screen-" + qcount);
  				} else { // errado
  					$(this).children(".alt-feedback").addClass("wrong");
  				}
  			}
  			// console.log("Tries: " + tries + " | Points: " + points);
  		} else {
  			// console.log(sc);
  		}
  	});
  
  	// Navegação
  	$(".exercicios .questions-nav .next").on("click", function (event) {
  		event.preventDefault();
  		$(".exercicios .questions-nav .next").addClass("opacity-0");
  		UIkit.switcher($('.exercicios .uk-subnav')).show('next');
  	});
  
  	$(".exercicios .feedback-final").on("show", function () {
  		var pf = score.percent(points, tries) || 0;
  		// console.log("Porcentagem Final: "+ pf +"%");
  
  		$(".exercicios .feedback-final .tries-txt").html("<strong>" + tries + "</strong>");
  		$(".exercicios .feedback-final .points-txt").html("<strong>" + points + "</strong>");
  		$(".exercicios .feedback-final .percent-txt").html("<strong>" + pf + "</strong>");
  		$(".exercicios .feedback-final .donut-svg #d-two-svg .circle-svg").css("stroke-dasharray", (pf == 100 ? 110 : pf)+" 100");
  	});
  });