//Creado con Ardora - www.webardora.net
//bajo licencia Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)
//para otros usos contacte con el autor
$(document).ready(function(){
$("#c_boca").hide();
$("#c_farinxe").hide();
$("#c_esofago").hide();
$("#c_estomago").hide();
$("#c_delgado").hide();
$("#c_groso").hide();
$("#c_ano").hide();
$("#g_boca").hide();
$("#g_farinxe").hide();
$("#g_esofago").hide();
$("#g_estomago").hide();
$("#g_delgado").hide();
$("#g_groso").hide();
$("#g_ano").hide();
document.addEventListener("touchstart", touchHandler, true);document.addEventListener("touchmove", touchHandler, true);document.addEventListener("touchend", touchHandler, true);document.addEventListener("touchcancel", touchHandler, true);
$("svg").each(function () { $(this)[0].setAttribute("preserveAspectRatio","xMinYMin meet") });
 $("svg").each(function () { $(this)[0].setAttribute("viewBox","0 0 872 988")});
$("svg").each(function () { $(this)[0].setAttribute("width", "530px") });
$("svg").each(function () { $(this)[0].setAttribute("height", "601px") });
$("#b_boca").on("touchstart mouseover", function(e) {$("#b_boca").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_boca").removeClassSVG("c_Resaltar");});
$("#b_boca").on("touchstart mouseover", function(e) {$("#c_boca").addClassSVG("c_Mostra");$("#c_boca").toggle();}).on("touchend mouseout", function(e) {$("#c_boca").removeClassSVG("c_Mostra");$("#c_boca").toggle();});
$("#b_boca").on("touchstart mouseover", function(e) {$("#g_boca path,#g_boca rect,#g_boca polygon,#g_boca ellipse,#g_boca circle,#g_boca text,#g_boca line,#g_boca polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_boca").toggle();}).on("touchend mouseout", function(e) {$("#g_boca path,#g_boca rect,#g_boca polygon,#g_boca ellipse,#g_boca circle,#g_boca text,#g_boca line,#g_boca polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_boca").toggle();});
$("#b_farinxe").on("touchstart mouseover", function(e) {$("#b_farinxe").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_farinxe").removeClassSVG("c_Resaltar");});
$("#b_farinxe").on("touchstart mouseover", function(e) {$("#c_farinxe").addClassSVG("c_Mostra");$("#c_farinxe").toggle();}).on("touchend mouseout", function(e) {$("#c_farinxe").removeClassSVG("c_Mostra");$("#c_farinxe").toggle();});
$("#b_farinxe").on("touchstart mouseover", function(e) {$("#g_farinxe path,#g_farinxe rect,#g_farinxe polygon,#g_farinxe ellipse,#g_farinxe circle,#g_farinxe text,#g_farinxe line,#g_farinxe polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_farinxe").toggle();}).on("touchend mouseout", function(e) {$("#g_farinxe path,#g_farinxe rect,#g_farinxe polygon,#g_farinxe ellipse,#g_farinxe circle,#g_farinxe text,#g_farinxe line,#g_farinxe polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_farinxe").toggle();});
$("#b_esofago").on("touchstart mouseover", function(e) {$("#b_esofago").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_esofago").removeClassSVG("c_Resaltar");});
$("#b_esofago").on("touchstart mouseover", function(e) {$("#c_esofago").addClassSVG("c_Mostra");$("#c_esofago").toggle();}).on("touchend mouseout", function(e) {$("#c_esofago").removeClassSVG("c_Mostra");$("#c_esofago").toggle();});
$("#b_esofago").on("touchstart mouseover", function(e) {$("#g_esofago path,#g_esofago rect,#g_esofago polygon,#g_esofago ellipse,#g_esofago circle,#g_esofago text,#g_esofago line,#g_esofago polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_esofago").toggle();}).on("touchend mouseout", function(e) {$("#g_esofago path,#g_esofago rect,#g_esofago polygon,#g_esofago ellipse,#g_esofago circle,#g_esofago text,#g_esofago line,#g_esofago polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_esofago").toggle();});
$("#b_estomago").on("touchstart mouseover", function(e) {$("#b_estomago").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_estomago").removeClassSVG("c_Resaltar");});
$("#b_estomago").on("touchstart mouseover", function(e) {$("#c_estomago").addClassSVG("c_Mostra");$("#c_estomago").toggle();}).on("touchend mouseout", function(e) {$("#c_estomago").removeClassSVG("c_Mostra");$("#c_estomago").toggle();});
$("#b_estomago").on("touchstart mouseover", function(e) {$("#g_estomago path,#g_estomago rect,#g_estomago polygon,#g_estomago ellipse,#g_estomago circle,#g_estomago text,#g_estomago line,#g_estomago polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_estomago").toggle();}).on("touchend mouseout", function(e) {$("#g_estomago path,#g_estomago rect,#g_estomago polygon,#g_estomago ellipse,#g_estomago circle,#g_estomago text,#g_estomago line,#g_estomago polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_estomago").toggle();});
$("#b_delgado").on("touchstart mouseover", function(e) {$("#b_delgado").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_delgado").removeClassSVG("c_Resaltar");});
$("#b_delgado").on("touchstart mouseover", function(e) {$("#c_delgado").addClassSVG("c_Mostra");$("#c_delgado").toggle();}).on("touchend mouseout", function(e) {$("#c_delgado").removeClassSVG("c_Mostra");$("#c_delgado").toggle();});
$("#b_delgado").on("touchstart mouseover", function(e) {$("#g_delgado path,#g_delgado rect,#g_delgado polygon,#g_delgado ellipse,#g_delgado circle,#g_delgado text,#g_delgado line,#g_delgado polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_delgado").toggle();}).on("touchend mouseout", function(e) {$("#g_delgado path,#g_delgado rect,#g_delgado polygon,#g_delgado ellipse,#g_delgado circle,#g_delgado text,#g_delgado line,#g_delgado polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_delgado").toggle();});
$("#b_groso").on("touchstart mouseover", function(e) {$("#b_groso").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_groso").removeClassSVG("c_Resaltar");});
$("#b_groso").on("touchstart mouseover", function(e) {$("#c_groso").addClassSVG("c_Mostra");$("#c_groso").toggle();}).on("touchend mouseout", function(e) {$("#c_groso").removeClassSVG("c_Mostra");$("#c_groso").toggle();});
$("#b_groso").on("touchstart mouseover", function(e) {$("#g_groso path,#g_groso rect,#g_groso polygon,#g_groso ellipse,#g_groso circle,#g_groso text,#g_groso line,#g_groso polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_groso").toggle();}).on("touchend mouseout", function(e) {$("#g_groso path,#g_groso rect,#g_groso polygon,#g_groso ellipse,#g_groso circle,#g_groso text,#g_groso line,#g_groso polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_groso").toggle();});
$("#b_ano").on("touchstart mouseover", function(e) {$("#b_ano").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_ano").removeClassSVG("c_Resaltar");});
$("#b_ano").on("touchstart mouseover", function(e) {$("#c_ano").addClassSVG("c_Mostra");$("#c_ano").toggle();}).on("touchend mouseout", function(e) {$("#c_ano").removeClassSVG("c_Mostra");$("#c_ano").toggle();});
$("#b_ano").on("touchstart mouseover", function(e) {$("#g_ano path,#g_ano rect,#g_ano polygon,#g_ano ellipse,#g_ano circle,#g_ano text,#g_ano line,#g_ano polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_ano").toggle();}).on("touchend mouseout", function(e) {$("#g_ano path,#g_ano rect,#g_ano polygon,#g_ano ellipse,#g_ano circle,#g_ano text,#g_ano line,#g_ano polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_ano").toggle();});
$("#t_boca").on("touchstart mouseover", function(e) {$("#c_boca").addClassSVG("c_Mostra");$("#c_boca").toggle();}).on("touchend mouseout", function(e) {$("#c_boca").removeClassSVG("c_Mostra");$("#c_boca").toggle();});
$("#t_boca").on("touchstart mouseover", function(e) {$("#g_boca path,#g_boca rect,#g_boca polygon,#g_boca ellipse,#g_boca circle,#g_boca text,#g_boca line,#g_boca polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_boca").toggle();}).on("touchend mouseout", function(e) {$("#g_boca path,#g_boca rect,#g_boca polygon,#g_boca ellipse,#g_boca circle,#g_boca text,#g_boca line,#g_boca polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_boca").toggle();});
$("#t_boca").on("touchstart mouseover", function(e) {$("#b_boca").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_boca").removeClassSVG("c_Resaltar");});
$("#t_farinxe").on("touchstart mouseover", function(e) {$("#b_farinxe").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_farinxe").removeClassSVG("c_Resaltar");});
$("#t_farinxe").on("touchstart mouseover", function(e) {$("#c_farinxe").addClassSVG("c_Mostra");$("#c_farinxe").toggle();}).on("touchend mouseout", function(e) {$("#c_farinxe").removeClassSVG("c_Mostra");$("#c_farinxe").toggle();});
$("#t_farinxe").on("touchstart mouseover", function(e) {$("#g_farinxe path,#g_farinxe rect,#g_farinxe polygon,#g_farinxe ellipse,#g_farinxe circle,#g_farinxe text,#g_farinxe line,#g_farinxe polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_farinxe").toggle();}).on("touchend mouseout", function(e) {$("#g_farinxe path,#g_farinxe rect,#g_farinxe polygon,#g_farinxe ellipse,#g_farinxe circle,#g_farinxe text,#g_farinxe line,#g_farinxe polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_farinxe").toggle();});
$("#t_delgado").on("touchstart mouseover", function(e) {$("#b_delgado").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_delgado").removeClassSVG("c_Resaltar");});
$("#t_delgado").on("touchstart mouseover", function(e) {$("#c_delgado").addClassSVG("c_Mostra");$("#c_delgado").toggle();}).on("touchend mouseout", function(e) {$("#c_delgado").removeClassSVG("c_Mostra");$("#c_delgado").toggle();});
$("#t_delgado").on("touchstart mouseover", function(e) {$("#g_delgado path,#g_delgado rect,#g_delgado polygon,#g_delgado ellipse,#g_delgado circle,#g_delgado text,#g_delgado line,#g_delgado polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_delgado").toggle();}).on("touchend mouseout", function(e) {$("#g_delgado path,#g_delgado rect,#g_delgado polygon,#g_delgado ellipse,#g_delgado circle,#g_delgado text,#g_delgado line,#g_delgado polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_delgado").toggle();});
$("#t_groso").on("touchstart mouseover", function(e) {$("#b_groso").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_groso").removeClassSVG("c_Resaltar");});
$("#t_groso").on("touchstart mouseover", function(e) {$("#c_groso").addClassSVG("c_Mostra");$("#c_groso").toggle();}).on("touchend mouseout", function(e) {$("#c_groso").removeClassSVG("c_Mostra");$("#c_groso").toggle();});
$("#t_groso").on("touchstart mouseover", function(e) {$("#g_groso path,#g_groso rect,#g_groso polygon,#g_groso ellipse,#g_groso circle,#g_groso text,#g_groso line,#g_groso polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_groso").toggle();}).on("touchend mouseout", function(e) {$("#g_groso path,#g_groso rect,#g_groso polygon,#g_groso ellipse,#g_groso circle,#g_groso text,#g_groso line,#g_groso polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_groso").toggle();});
$("#t_ano").on("touchstart mouseover", function(e) {$("#b_ano").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_ano").removeClassSVG("c_Resaltar");});
$("#t_ano").on("touchstart mouseover", function(e) {$("#c_ano").addClassSVG("c_Mostra");$("#c_ano").toggle();}).on("touchend mouseout", function(e) {$("#c_ano").removeClassSVG("c_Mostra");$("#c_ano").toggle();});
$("#t_ano").on("touchstart mouseover", function(e) {$("#g_ano path,#g_ano rect,#g_ano polygon,#g_ano ellipse,#g_ano circle,#g_ano text,#g_ano line,#g_ano polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_ano").toggle();}).on("touchend mouseout", function(e) {$("#g_ano path,#g_ano rect,#g_ano polygon,#g_ano ellipse,#g_ano circle,#g_ano text,#g_ano line,#g_ano polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_ano").toggle();});
$("#t_esofago").on("touchstart mouseover", function(e) {$("#b_esofago").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_esofago").removeClassSVG("c_Resaltar");});
$("#t_esofago").on("touchstart mouseover", function(e) {$("#c_esofago").addClassSVG("c_Mostra");$("#c_esofago").toggle();}).on("touchend mouseout", function(e) {$("#c_esofago").removeClassSVG("c_Mostra");$("#c_esofago").toggle();});
$("#t_esofago").on("touchstart mouseover", function(e) {$("#g_esofago path,#g_esofago rect,#g_esofago polygon,#g_esofago ellipse,#g_esofago circle,#g_esofago text,#g_esofago line,#g_esofago polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_esofago").toggle();}).on("touchend mouseout", function(e) {$("#g_esofago path,#g_esofago rect,#g_esofago polygon,#g_esofago ellipse,#g_esofago circle,#g_esofago text,#g_esofago line,#g_esofago polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_esofago").toggle();});
$("#t_estomago").on("touchstart mouseover", function(e) {$("#b_estomago").addClassSVG("c_Resaltar");}).on("touchend mouseout", function(e) {$("#b_estomago").removeClassSVG("c_Resaltar");});
$("#t_estomago").on("touchstart mouseover", function(e) {$("#c_estomago").addClassSVG("c_Mostra");$("#c_estomago").toggle();}).on("touchend mouseout", function(e) {$("#c_estomago").removeClassSVG("c_Mostra");$("#c_estomago").toggle();});
$("#t_estomago").on("touchstart mouseover", function(e) {$("#g_estomago path,#g_estomago rect,#g_estomago polygon,#g_estomago ellipse,#g_estomago circle,#g_estomago text,#g_estomago line,#g_estomago polyline").each(function(){$(this).addClassSVG("c_Mostra");});$("#g_estomago").toggle();}).on("touchend mouseout", function(e) {$("#g_estomago path,#g_estomago rect,#g_estomago polygon,#g_estomago ellipse,#g_estomago circle,#g_estomago text,#g_estomago line,#g_estomago polyline").each(function(){$(this).removeClassSVG("c_Mostra");});$("#g_estomago").toggle();});
createBar();
});
function touchHandler(event) {var touch = event.changedTouches[0];var simulatedEvent = document.createEvent("MouseEvent");simulatedEvent.initMouseEvent({touchstart: "mousedown",touchmove: "mousemove",touchend: "mouseup"}[event.type], true, true, window, 1,
touch.screenX, touch.screenY,touch.clientX, touch.clientY, false,false, false, false, 0, null);touch.target.dispatchEvent(simulatedEvent);event.preventDefault();};
function randomSort(){
}
function isCorrect(){
}
function goTime(){clearInterval(timeInterval);showMessage("Time");}
function showSol(oldTypeGame){ 
}
function imaUp(ima){$("body").css("overflow","hidden");$("#ardoraActCanvas").attr({"width": $(window).width(),"height": $(window).height()});document.getElementById("ardoraActCanvas").style.zIndex=15;document.getElementById("ardoraActCanvas").style["visibility"]="visible";
document.getElementById("ardoraActCanvas").style["position"] = "fixed";document.getElementById("ardoraActCanvas").style["left"]=0;document.getElementById("ardoraActCanvas").style["top"]=0;
var alpha=0;var delta=0.03;var canvas=document.getElementById("ardoraActCanvas");var context=canvas.getContext("2d");context.beginPath();context.fillStyle="rgba(0, 0, 0, 0.25)";context.fillRect(0, 0, context.canvas.width, context.canvas.height);context.fill();var imageObj=new Image();
imageObj.onload = function() {var xCenterIma=($("#ardoraActCanvas").width()-imageObj.width) / 2;var yCenterIma=($("#ardoraActCanvas").height()-imageObj.height) / 2;context.beginPath();context.shadowColor ="rgba(0, 0, 0, 0.25)";context.shadowBlur = 10;
context.shadowOffsetX=10;context.shadowOffsetY=10;context.fill();context.beginPath();context.strokeStyle="rgba(0,0,0,1)";context.fillStyle ="rgba(255,255,255,1)";context.fillRect(xCenterIma-5,yCenterIma-5,imageObj.width+10,imageObj.height+10);
context.fill();context.rect(xCenterIma-5,yCenterIma-5,imageObj.width+10,imageObj.height+10);context.stroke();context.fill();context.shadowBlur=0;context.shadowOffsetX=0;context.shadowOffsetY = 0;loop();
function loop(){alpha+=delta;if (alpha<=1){context.clearRect(xCenterIma,yCenterIma,imageObj.width,imageObj.height);context.globalAlpha=alpha;context.drawImage(imageObj,xCenterIma,yCenterIma);requestAnimationFrame(loop);}}};
imageObj.src =ima;$("#ardoraActCanvas").css("cursor", "pointer");$("#ardoraActCanvas").click(function() {document.getElementById("ardoraActCanvas").style.zIndex=0;document.getElementById("ardoraActCanvas").style["visibility"]="hidden";canvas.width=canvas.width;$("body").css("overflow","visible");$("#ardoraActCanvas").attr({"width":2,"height":2});});}
window.requestAnimationFrame=(function(){return  window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame    || function( callback ){window.setTimeout(callback, 10000 / 60);};})();
function paintBack(){}
function svgFWords(input) {var output = ""; var chr1, chr2, chr3 = ""; var enc1, enc2, enc3, enc4 = "";var i = 0;
var btest = /[^A-Za-z0-9\+\/\=]/g; if (btest.exec(input)) { alert("Invalid characters");} input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
do { enc1 = wordsStr.indexOf(input.charAt(i++)); enc2 = wordsStr.indexOf(input.charAt(i++)); enc3 = wordsStr.indexOf(input.charAt(i++)); enc4 = wordsStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);if (enc3 != 64) {output = output + String.fromCharCode(chr2);} if (enc4 != 64) {output = output + String.fromCharCode(chr3);}
chr1 = chr2 = chr3 = ""; enc1 = enc2 = enc3 = enc4 = "";} while (i < input.length);return unescape(output);}
Array.prototype.in_array=function(){ for(var j in this){ if(this[j]==arguments[0]){return true;}}return false;}
$.fn.addClassSVG = function(className){$(this).attr("class", function(index, existingClassNames) {return existingClassNames + " " + className;}); return this;};
$.fn.removeClassSVG = function(className){$(this).attr("class", function(index, existingClassNames) {var re = new RegExp(className, "g");return existingClassNames.replace(re, "");}); return this;};
