window.addEventListener('DOMContentLoaded', function () { if (!(document.cookie.indexOf('aaac_ima=true') == -1 && (Math.random() * 100) < 100 && (navigator.userAgent.indexOf('Mobile') == -1 || navigator.userAgent.indexOf('Firefox') == -1))){ return; } var _ua = (function(u){ return { 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 (/iPad/.test(ua)){ return; } if (!( (_ua.Mobile && /(iPhone|iPod)/.test(ua) && true) || ( _ua.Mobile && !(/(iPhone|iPod)/.test(ua)) && true) || ( (! _ua.Mobile) && true) )){ return; } (function () { var wrap = document.getElementById('video'); var map = document.createElement('div'); map.style.width = wrap.clientWidth + 'px'; map.style.height = wrap.clientHeight + 'px'; map.style.position = 'absolute'; map.style.left = '0'; map.style.top = '0'; map.style.border = 'none'; map.style.padding = '0'; map.style.margin = '0'; wrap.appendChild(map); map.addEventListener('click', function(e) { document.cookie = 'aaac_ima=true;max-age=86400'; wrap.removeChild(map); var iframe = document.createElement('iframe'); iframe.style.width = wrap.clientWidth + 'px'; iframe.style.height = wrap.clientHeight + 'px'; 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.style.zIndex = '1000000'; iframe.id = 'iframe_movie_ad'; wrap.appendChild(iframe); iframe.contentWindow.document.write('