Автор: Админ

1

Я хочу начать курить

Несмотря на то, что практически уже все знаю о том, какой вред приносит увлечение сигаретами, вопрос курения остается свободным выбором...

Adblock
detector
var autoload = true; //jquery if ("undefined" == typeof jQuery) { autoload = !1; var oScriptElem = document.createElement("script"); oScriptElem.type = "text/javascript", oScriptElem.src = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js", document.head.insertBefore(oScriptElem, document.head.getElementsByTagName("script")[0]), oScriptElem.onload = function () { pops() } } //скрывать блок рекламы, если он перекрывает контент var hideAdsContent = true; var isMobile = screen.width < 769; var poptimer; var popclosetimer; var delays = [20, 15, 15]; if (autoload) pops(); //popups function pops() { $ = jQuery; $('#pc-popup-codes > div, #mobile-popup-codes > div').each(function (i, el) { $(el).append(''); }); if (!isMobile) { if(hideAdsContent == true && $('h1.entry-title')[0].getBoundingClientRect().left < 160) return; $('#pc-popup-codes').addClass('show'); } showPop(0); $("#pc-popup-codes .pop-close, #mobile-popup-codes .pop-close").click(function () { var o = $(this).parent().index(); closePop(o), clearTimeout(popclosetimer), clearTimeout(poptimer), null != delays[o] && (poptimer = setTimeout(function () { showPop(o + 1) }, 5000)) }); } function showPop(o) { return clearTimeout(popclosetimer), console.log(new Date), isMobile ? $("#mobile-popup-codes").addClass("show") : $("#pc-popup-codes").addClass("show"), $($("#pc-popup-codes > div")[o]).show(), $($("#mobile-popup-codes > div")[o]).show(), null != delays[o] && (popclosetimer = setTimeout(function () { closePop(o), showPop(o + 1) }, 1e3 * delays[o])), o } function closePop(o) { return isMobile ? $("#mobile-popup-codes").removeClass("show") : $("#pc-popup-codes").removeClass("show"), $($("#pc-popup-codes > div")[o]).hide(), $($("#mobile-popup-codes > div")[o]).hide(), o }