var lang = {} lang.loading = $("#lang").find("input[name='loading']").val(); lang.downloadLocked = $("#lang").find("input[name='downloadLocked']").val(); lang.moveTo = $("#lang").find("input[name='moveTo']").val(); openAlert = function (msg,selector,file,width,height) { if(msg != '') { if(width != '') $("#alerts").html("
"); else $("#alerts").html(""); $('.bg,.alertBox').fadeIn("very fast"); $('.alertBox').append(msg); if(width != '') { $("iframe").load(function() { $("#loading").hide(); }); } } else if (selector != '') { if(width != '') $("#alerts").html(""); else $("#alerts").html(""); $('.bg,.alertBox').fadeIn("very fast"); $('.alertBox').html($(selector).html()); } else if(file != '') { $("#alerts").html(""); $("#alerts .alertBox").load(file); $('.bg,.alertBox').fadeIn("very fast"); $('.alertBox').html(msg); } $(".bg").click(function() { closeAlert(); }); $(".byPP").click(function() { $('.alertBox').html("" + lang.loading + "..."); $(this).parent().submit(); }); } closeAlert = function () { $('.bg,.alertBox').fadeOut("very fast"); } $(document).ready(function() { $("#passInput").keydown(function(e){ if (e.keyCode == 13) $("#unlock").click(); }); if($('#polyglotLanguageSwitcher').length > 0) { $('#polyglotLanguageSwitcher').polyglotLanguageSwitcher({ effect: 'fade', testMode: true, onChange: function(evt){ $.ajax({ url: 'ajax/language.php', type: 'post', data: { lang: evt.selectedItem }, success: function(data) { location.reload(true); } }); } }); } $('#howto h3').each(function() { var tis = $(this), state = false, answer = tis.next('.answer').slideUp(); tis.click(function() { if(!tis.hasClass('active')) { $('#howto .answer').slideUp(); $('#howto h3').removeClass('active'); } state = !state; answer.toggle(500); tis.toggleClass('active',state); }); }); }); function tlite(t){document.addEventListener("mouseover",function(e){var i=e.target,n=t(i);n||(n=(i=i.parentElement)&&t(i)),n&&tlite.show(i,n,!0)})}tlite.show=function(t,e,i){var n="data-tlite";e=e||{},(t.tooltip||function(t,e){function o(){tlite.hide(t,!0)}function l(){r||(r=function(t,e,i){function n(){o.className="tlite tlite-"+r+s;var e=t.offsetTop,i=t.offsetLeft;o.offsetParent===t&&(e=i=0);var n=t.offsetWidth,l=t.offsetHeight,d=o.offsetHeight,f=o.offsetWidth,a=i+n/2;o.style.top=("s"===r?e-d-10:"n"===r?e+l+10:e+l/2-d/2)+"px",o.style.left=("w"===s?i:"e"===s?i+n-f:"w"===r?i+n+10:"e"===r?i-f-10:a-f/2)+"px"}var o=document.createElement("span"),l=i.grav||t.getAttribute("data-tlite")||"n";o.innerHTML=e,t.appendChild(o);var r=l[0]||"",s=l[1]||"";n();var d=o.getBoundingClientRect();return"s"===r&&d.top<0?(r="n",n()):"n"===r&&d.bottom>window.innerHeight?(r="s",n()):"e"===r&&d.left<0?(r="w",n()):"w"===r&&d.right>window.innerWidth&&(r="e",n()),o.className+=" tlite-visible",o}(t,d,e))}var r,s,d;return t.addEventListener("mousedown",o),t.addEventListener("mouseleave",o),t.tooltip={show:function(){d=t.title||t.getAttribute(n)||d,t.title="",t.setAttribute(n,""),d&&!s&&(s=setTimeout(l,i?150:1))},hide:function(t){if(i===t){s=clearTimeout(s);var e=r&&r.parentNode;e&&e.removeChild(r),r=void 0}}}}(t,e)).show()},tlite.hide=function(t,e){t.tooltip&&t.tooltip.hide(e)},"undefined"!=typeof module&&module.exports&&(module.exports=tlite); tlite(el => el.classList.contains('tooltip-tlite'));