sessionStorage.CookieDJ = 0;$("#chat-messages").append("<div class='system'><i class='icon icon-active-rollover'></i><span class='text'>Autowoot by ETD em funcionamento</span></div>");var style = document.createElement('style');style.type = 'text/css';style.innerHTML = '.systemGreen { color: rgb(24, 219, 46)!important;border-left: rgb(24, 219, 46) 3px solid!important; }';document.getElementsByTagName('head')[0].appendChild(style);API.on(API.CHAT, function (obj) {if (obj.fromID == "5266a28b96fba531f80c1b6f") {if (obj.message == "!cookie") API.sendChat("No pão tem céu ?");}});document.getElementById("woot").click();function a(c){if (c === null) {d();} else if (API.getDJ().username != API.getUser().username) {e();} else {sessionStorage.CookieDJ = sessionStorage.CookieDJ + 1;if (sessionStorage.CookieDJ == 1) {var a = $('#chat-messages'),b = a.scrollTop() > a[0].scrollHeight - a.height() - 20;$("#chat-messages").append("<div class='system'><i class='icon icon-join-booth'></i><span class='text'>Autowoot será ativado no DJ antecedência, porque você é DJ agora!</span></div>");b && a.scrollTop(a[0].scrollHeight);}}var a = $('#chat-messages'),b = a.scrollTop() > a[0].scrollHeight - a.height() - 20;$("#chat-messages").append("<div class='systemGreen system'><i class='icon icon-volume-half'></i><span class='text'>Tocando agora: " + API.getMedia().author + " - " + API.getMedia().title + "</span></div>");b && a.scrollTop(a[0].scrollHeight);}function d() {var a = $('#chat-messages'),b = a.scrollTop() > a[0].scrollHeight - a.height() - 20;$("#chat-messages").append("<div class='system'><i class='icon icon-leave-booth'></i><span class='text'>Autowoot será ativado no DJ antecedência, pois não há DJ agora!</span></div>");b && a.scrollTop(a[0].scrollHeight);}function e() {sessionStorage.CookieDJ = 0;setTimeout(function () {document.getElementById("woot").click();}, 6543);}API.on(API.DJ_ADVANCE, a)(function () {document.body.style.backgroundImage = 'url(http://i.imgur.com/A43Okjz.jpg)';}());;