//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
var vW=850;var vH=653;var iW=850;var iH=653;var isFull=false;
function createBar(){var element = document.createElement("div");element.setAttribute("id", "ardNavBar");$(element).css("position","fixed");$(element).css("z-index", 998);
$(element).css("right",0);$(element).css("bottom",0);
document.getElementById("ardoraMain").appendChild(element);
$(element).html('<p id="startBut" title="" class="butfont butLe">i</p>');
$("#startBut").on("touchstart click",function(e){if ($("#ardNB").length>0){$("#ardNB").animate({height:"0px"},500);$("#ardNB").promise().done(function(){$("#ardNB").remove();});$("#startBut").text("i");}else{
$("#startBut").text("E");var NB = document.createElement("div");NB.setAttribute("id", "ardNB");$(NB).css("position","fixed");$(NB).css("z-index", 998);
$(NB).css("right",0);$(NB).css("bottom","40px");$(NB).css("width",35);$(NB).css("height",0);
var codeAud ='<p id="plusBut" title="Acercar" class="butfont butLe">h</p><p id="zeroBut" title="Tamaño inicial" class="butfont butLe">Y</p><p id="minusBut" title="Alonxar" class="butfont butLe">j</p><p id="infoBut" title="Información" class="butfont butLe">k</p><p id="fullBut" title="Pantalla completa" class="butfont butLe">H</p>'
$(NB).html(codeAud);document.getElementById("ardoraMain").appendChild(NB);$(NB).animate({height:"200px"},500);
$("#plusBut").on("touchstart click",function(v){vW=vW+50;vH=vH+38;$("svg").each(function () { $(this)[0].setAttribute("width",vW.toString()+"px") });$("svg").each(function () { $(this)[0].setAttribute("height",vH.toString()+"px") });centerSvg();});
$("#zeroBut").on("touchstart click",function(v){vW=iW;vH=iH;$("svg").each(function () { $(this)[0].setAttribute("width",vW.toString()+"px") });$("svg").each(function () { $(this)[0].setAttribute("height",vH.toString()+"px") });centerSvg();});
$("#minusBut").on("touchstart click",function(v){vW=vW-50;vH=vH-38;$("svg").each(function () { $(this)[0].setAttribute("width",vW.toString()+"px") });$("svg").each(function () { $(this)[0].setAttribute("height",vH.toString()+"px") });centerSvg();});
$("#fullBut").on("touchstart click",function(v){if (!isFull){var e = document.getElementById("ardoraMain");if (e.requestFullscreen) {e.requestFullscreen();} else if (e.mozRequestFullScreen) {e.mozRequestFullScreen();} else if (e.webkitRequestFullScreen) {e.webkitRequestFullScreen();}
document.addEventListener("fullscreenchange", function() {if (!document.fullscreen) {$("#imaFull").remove();}}, false);document.addEventListener("mozfullscreenchange", function() {if (!document.mozFullScreen) {$("#imaFull").remove();}}, false);
document.addEventListener("webkitfullscreenchange", function() {if (!document.webkitIsFullScreen) {$("#imafull").remove();;}}, false);isFull=true;}
else{var docElement, request;docElement = document;request = docElement.cancelFullScreen || docElement.webkitCancelFullScreen || docElement.mozCancelFullScreen || docElement.msCancelFullScreen || docElement.exitFullscreen; if (typeof request != "undefined" && request) {request.call(docElement);} isFull=false;}
});
$("#infoBut").on("touchstart click",function(v){if ($("#ardeInfo").length==0){var eInfo = document.createElement("div");eInfo.setAttribute("id", "ardeInfo");var codeAud = "<p>" + "© 2005–2016 Keith Enevoldsen elements.wlonk.com Creative Commons Attribution-ShareAlike 4.0 International License. Tradución ao galego de José M. Bouzán." + "</p>";
$(eInfo).html(codeAud);$(eInfo).css("z-index", 999);$(eInfo).css("margin",0);$(eInfo).css("position","fixed");document.getElementById("ardoraMain").appendChild(eInfo);eIH=$(eInfo).css("height");$(eInfo).css("height",0);eIW=($(document).width()-$(eInfo).width()) / 2;$("#ardeInfo").css("marginLeft", eIW.toString()+"px");
$(eInfo).css("bottom", "0px");$(eInfo).animate({height:eIH},500);setTimeout(function(){$("#ardeInfo").animate({height:"0px"},500);$("#ardeInfo").promise().done(function(){$("#ardeInfo").remove();})},5000);}});
}});}
