window.addEventListener('DOMContentLoaded', function () { if (!(document.cookie.indexOf('aaac_ima=true') == -1 && (Math.random() * 100) < 100)){ return; } var _ua = (function(u){ return { Tablet:(u.indexOf("windows") != -1 && u.indexOf("touch") != -1 && u.indexOf("tablet pc") == -1) || u.indexOf("ipad") != -1 || (u.indexOf("android") != -1 && u.indexOf("mobile") == -1) || (u.indexOf("firefox") != -1 && u.indexOf("tablet") != -1) || u.indexOf("kindle") != -1 || u.indexOf("silk") != -1 || u.indexOf("playbook") != -1, Mobile:(u.indexOf("windows") != -1 && u.indexOf("phone") != -1) || u.indexOf("iphone") != -1 || u.indexOf("ipod") != -1 || (u.indexOf("android") != -1 && u.indexOf("mobile") != -1) || (u.indexOf("firefox") != -1 && u.indexOf("mobile") != -1) || u.indexOf("blackberry") != -1 } })(window.navigator.userAgent.toLowerCase()); var ua = navigator.userAgent; if (!( (_ua.Mobile && /(iPhone|iPod)/.test(ua) && true) || ( _ua.Mobile && !(/(iPhone|iPod)/.test(ua)) && true) || ( (! _ua.Mobile) && (! _ua.Tablet) && true) )){ return; } if (/iPhone OS/.test(ua) && ua.match(/iPhone OS (\d+)/)[1] < 10) { return; } (function () { document.cookie = 'aaac_ima=true;max-age=0'; var wrap = document.createElement('div'); wrap.style.position = 'fixed'; wrap.style.transition = 'right 1s linear'; if(_ua.Mobile){ return; /* wrap.style.width = '100%'; wrap.style.height = '27%'; wrap.style.left = '0'; wrap.style.bottom = '0'; */ } else { wrap.style.width = '300px'; wrap.style.height = '250px'; wrap.style.maxWidth = '100%'; wrap.style.right = '-300px'; wrap.style.bottom = '0px'; } wrap.style.padding = '0'; wrap.style.margin = '0'; wrap.style.border = 'none'; wrap.style.zIndex = '100000000000000'; document.body.appendChild(wrap); window.addEventListener( 'scroll', function() { if (window.scrollY < 600){ wrap.style.right = '-300px'; } else { wrap.style.right = '0'; } }); var iframe = document.createElement('iframe'); iframe.style.width = '100%'; iframe.style.height = '100%'; iframe.style.position = 'absolute'; iframe.style.left = '0'; iframe.style.top = '0'; iframe.style.border = 'none'; iframe.style.padding = '0'; iframe.style.margin = '0'; iframe.id = 'iframe_movie_ad'; iframe.src = 'https://srv1.aaacompany.net/sd5/json_over_new.php?id=20000'; wrap.appendChild(iframe); var a = document.createElement('a'); a.style.position = 'absolute'; a.style.right = '0'; a.style.top = '0'; a.style.padding = '5px'; a.style.textDecoration = 'none'; a.style.fontSize = '16px'; a.style.lineHeight = '20px'; a.style.color = '#FFF'; a.style.background = 'rgba(0,0,0,0.4)'; a.style.cursor = 'pointer'; a.textContent = 'X'; a.addEventListener('click', function(e) { wrap.parentNode.removeChild(wrap); }); wrap.appendChild(a); }()); });