function load(){document.getElementById("playButton").innerHTML=langStrs[lang].playButton,document.getElementById("shareButton").innerHTML=langStrs[lang].shareButton,document.getElementById("storeButton").innerHTML=langStrs[lang].storeButton,document.getElementById("settingsButton").innerHTML=langStrs[lang].settingsButton;for(var e=document.querySelectorAll("#storeOverlay .title"),t=0;t5&&(console.log("Capped blues"),e=.8),e<.3+.45*Math.exp(-score/1200)?(colour=0,blueInRow++):e<.67+.25*Math.exp(-score/900)?(blueInRow=0,colour=1,setTimeout(function(){playing&&(colour=0,update())},Math.min(Math.max(460+400*Math.exp(-score/100)-30*Math.log(score)+200*(Math.random()-.5),400),900))):(blueInRow=0,colour=2,setTimeout(function(){(new Date).getTime()-lastClickTime>Math.max(750-4*score,350)&&lose(langStrs[lang].tooSlow)},Math.min(460+400*Math.exp(-score/100)-30*Math.log(score),900))),update()}function update(){0==colour&&(clicker.className="button round-button blue"),1==colour&&(clicker.className="button round-button red"),2==colour&&(clicker.className="button round-button green"),text.innerHTML=0==score?langStrs[lang].textlabel:score}function lose(e){parseInt(localStorage.highscore)lostTime+500)&&0==playing&&(playing=!0,score=0,colour=0,heartClippingY=0,canRespawn=!0,update(),document.body.className="playing",numberOfGames++,"true"==localStorage.showAds&&numberOfGames%5==4&&(AdMob.showInterstitial(),setTimeout(function(){AdMob.prepareInterstitial({adId:admobid.interstitial,autoShow:!1,isTesting:!1})},500),setTimeout(function(){logMessage(langStrs[lang].removeAds,4e3)},1e3)))}function menu(e){playing=!1,e.stopPropagation(),document.body.className="menu"}function share(){facebookConnectPlugin.showDialog({method:"share",href:"https://play.google.com/store/apps/details?id=com.clicky.clicky",caption:"Clicky",description:langStrs[lang].description,picture:"https://lh6.googleusercontent.com/AJvJVPTZ-l89nHSggNa6gwtDofahCQCQujivDO2et5vi2tNxl4ybOQgLRk7qLXlFOXPMLlEC=w371",share_feedWeb:!0},function(){},function(){})}function respawnCountdown(){heartClippingY<95?(heartClippingY+=1,heartRespawn.style["margin-top"]=heartClippingY+"px",heartRespawn.style["background-position-y"]=-heartClippingY+"px",heartRespawn.style.height=100-heartClippingY+"px",resCountdown=setTimeout(respawnCountdown,80)):(heartRespawn.style["margin-top"]="99px",heartRespawn.style["background-position-y"]="-99px",heartRespawn.style.height="1px",canRespawn=!1,document.getElementById("heartExplanation").style.color="rgba(200,200,200,0)")}function respawn(e){console.log("respawning"),e.stopPropagation(),parseInt(localStorage.lives)>0?canRespawn&&(playing=!0,canRespawn=!1,colour=0,update(),document.body.className="playing",localStorage.lives=parseInt(localStorage.lives)-1,livesCounter.querySelector("#livesCounter").innerHTML=localStorage.lives):(goToStore(void 0,!0),heartClippingY=0,clearTimeout(resCountdown),heartRespawn.style["margin-top"]="0px",heartRespawn.style["background-position-y"]="0px",heartRespawn.style.height="100px")}function goToSettings(){document.body.className="settings","false"==localStorage.sound?settingsOverlay.querySelector("#soundButton").className="offButton":settingsOverlay.querySelector("#soundButton").className=""}function goToStore(e,t){document.body.className="store",playing?(storeOverlay.querySelector("#storeGoToMenu").style.display="none",storeOverlay.querySelector("#storeGoToGame").style.display="block",storeOverlay.querySelector("#storeGoToLoser").style.display="none"):void 0!=t?(storeOverlay.querySelector("#storeGoToMenu").style.display="none",storeOverlay.querySelector("#storeGoToGame").style.display="none",storeOverlay.querySelector("#storeGoToLoser").style.display="block"):(storeOverlay.querySelector("#storeGoToMenu").style.display="block",storeOverlay.querySelector("#storeGoToGame").style.display="none",storeOverlay.querySelector("#storeGoToLoser").style.display="none"),keepRefreshingStore()}function keepRefreshingStore(){"store"==document.body.className?(store.refresh(),setTimeout(keepRefreshingStore,1e3)):store.refresh()}function continueGame(){document.body.className="playing"}function goToLoser(){document.body.className="loser"}function toggleSound(){"false"==localStorage.sound?localStorage.sound="true":localStorage.sound="false",goToSettings()}function playSound(e){try{"true"==localStorage.sound&&("tap"==e?score%2==0?(tapSound.seekTo(0),tapSound.play()):(tapSound2.seekTo(0),tapSound2.play()):"achievement"==e?achievementSound.play():"error"==e?errorSound.play():"purchase"==e&&purchaseSound.play())}catch(e){}}function shareScore(e){e.stopPropagation(),facebookConnectPlugin.showDialog({method:"share",href:"https://play.google.com/store/apps/details?id=com.clicky.clicky",caption:langStrs[lang].shareTitle,description:langStrs[lang].shareDescription1+score+langStrs[lang].shareDescription2,quote:langStrs[lang].shareDescription1+score+langStrs[lang].shareDescription2,share_feedWeb:!0},function(){},function(){})}function videoRewardCountdown(){--videoTimeLeft>0?(document.getElementById("videoCountdown").innerHTML="("+videoTimeLeft+"s)",setTimeout(videoRewardCountdown,1e3),document.getElementById("freelife").className="storeButton disabled"):(document.getElementById("videoCountdown").innerHTML="",document.getElementById("freelife").className="storeButton")}function openCredits(){document.body.className="credits"}function closeCredits(){document.body.className="settings"}var clicker,text,loserOverlay,menuOverlay,heartRespawn,livesCounter,settingsOverlay,storeOverlay,admobid={},lang="en",blueInRow=1,tapSound,tapSound2,achievementSound,errorSound,purchaseSound,playing=!1,lastClickTime,lostTime,canRespawn=!0,score=0,colour=0,heartClippingY=0,numberOfGames=0,langStrs={en:{playButton:"Play",shareButton:"Share",storeButton:"Store",settingsButton:"Settings",freeLife:"1 free life!",watchVideo:"Watch video",loading:"Loading...",textlabel:"Click?",loseReason:"You lost!",loserScore:"You scored 0 points",heartExplanation:"(Tap heart to continue this game)",shareHighscore:"Share highscore!",shareScore:"Share score",goToMenu:"Menu",goBack:"Back",soundButton:"  Sound  ",buy:"Buy ",highscore:"New highscore!",points:" points!",notRed:"Not red!",tooSlow:"Too slow!",removeAds:"Remove ads in the store!",description:"Just press the button",shareTitle:"New Clicky score!",shareDescription1:"I got ",shareDescription2:" points in Clicky! How many can you get?",highscoreText:"Highscore: 0 points",credits:"Credits"},fr:{playButton:"Jouer",shareButton:"Partager",storeButton:"Magasin",settingsButton:"Options",freeLife:"1 vie gratuite!",watchVideo:"Regarder la vidéo",loading:"Chargement...",textlabel:"Cliquez",loseReason:"Vous avez perdu!",loserScore:"Vous avez obtenu 0 points",heartExplanation:"(Appuyez sur le coeur pour continuer)",shareHighscore:"Partagez highscore!",shareScore:"Partagez score",goToMenu:"Menu",goBack:"Retour",soundButton:"  Son  ",buy:"Acheter ",highscore:"Nouveau highscore!",points:" points!",notRed:"Pas rouge!",tooSlow:"Trop lent!",removeAds:"Enlevez les pubs au magasin!",description:"Appuyez sur le bouton",shareTitle:"Nouveau score Clicky!",shareDescription1:"J'ai eu ",shareDescription2:" points sur Clicky! Peux-tu faire mieux?",highscoreText:"Highscore: 0 points",credits:"Infos"},es:{playButton:"Jugar",shareButton:"Compartir",storeButton:"Tienda",settingsButton:"Ajustes",freeLife:"¡1 vida gratis!",watchVideo:"Ve el vídeo",loading:"Cargando...",textlabel:"Click?",loseReason:"Perdiste",loserScore:"Has obtenido 0 puntos",heartExplanation:"(Pulsa el corazón para continuar)",shareHighscore:"¡Compartir récord!",shareScore:"Compartir puntuación",goToMenu:"Menú",goBack:"Atrás",soundButton:"  Sonido  ",buy:"Comprar ",highscore:"¡Nuevo récord!",points:" puntos",notRed:"¡Rojo no!",tooSlow:"¡Muy lento!",removeAds:"¡Quita los anuncios en la tienda!",description:"Pulsa el botón",shareTitle:"¡Nuevo resultado en Clicky!",shareDescription1:"¡He sacado ",shareDescription2:" puntos en Clicky! ¿Puedes superarlo?",highscoreText:"Récord: 0 puntos",credits:"Créditos"}};document.addEventListener("deviceready",onReady,!1);var resCountdown,videoTimeLeft=60;