/* 300x250 & 336x280 (5) */

/* Переменная 'info' необходима для указания юридической информации о компании */

var info =
  '<strong>ООО «Рога и копыта»</strong><br>ИНН 1234567891, ОКВЭД 47.19<br><a href="rogaikopyta.ru">rogaikopyta.ru</a><br>Pb3XmBtztBP1WD7TdxPB8oGjqYoZf1wf8Gznbup';

var trimLength = 28;

var showOldPrice = true;

/* Ниже этой строчки код редактировать не рекомендуется */

var linkFont=document.createElement("LINK");linkFont.rel="stylesheet",linkFont.href="https://fonts.googleapis.com/css2?family=PT+Sans&display=swap",document.getElementById(elementId).appendChild(linkFont);var custom_script=document.createElement("SCRIPT");custom_script.onload=function(){$(document).ready((function(){function enlarge(item){var that=$(item);$(".item").addClass("item--hidden"),$(that).removeClass("item--hidden"),$(that).addClass("item--upper"),$(that).addClass("item--fullsize"),$(that).find(".price").addClass("price--visible")}function squeeze(item){var that=$(item);$(".item").removeClass("item--hidden"),$(that).removeClass("item--fullsize"),$(that).find(".price").removeClass("price--visible"),setTimeout((function(){$(that).removeClass("item--upper")}),500)}if("ontouchstart"in document.documentElement)$(".item").click((function(){if($(this).hasClass("item--fullsize"))squeeze(this);else enlarge(this)}));else $(".item").on("mouseenter",(function(){var that=$(this),timer=setTimeout((function(){enlarge(that)}),600);$(that).on("mouseleave",(function(){if(clearTimeout(timer),$(that).hasClass("item--fullsize"))squeeze(that)}))}));$(".footer__disclaimer").hover((function(){$(".footer").addClass("footer--shorten"),$(".footer__about").hide()}),(function(){$(".footer").removeClass("footer--shorten"),$(".footer__about").show()}))}))},custom_script.type="text/javascript",custom_script.src="https://cdn.adhigh.net/jquery-3.6.0.min.js",custom_script.defer="defer",document.getElementById(elementId).appendChild(custom_script);var creative=function(){var container=document.createElement("div");return container.innerHTML='<div class="wrapper"><a class="logo logo--aninone" href="[[LANDING_PAGE]]" target="_blank"><img src="https://[[SITE_LOGO]]"></a><div class="content">'+goods(0,5)+'</div><div class="footer"><a class="footer__logo" href="https://getintent.com/" target="_blank"><span>Реклама</span><img class="pic" src="https://cdn.adhigh.net/banners/dynamic-template/logo-getintent.svg"></a><div class="footer__about"><span>Рекламодатель</span></div><div class="footer__disclaimer">'+info+"</div></div></div>",container.firstChild};function numberWithSpaces(x){return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g," ")}function priceDiv(price,oldprice){return'<div class="oldprice"><em>SALE</em><span>'+numberWithSpaces(oldprice)+"</span></div>"}function goods(i,count){for(var goods="",c=0;c<count;c++){var itemName="no name model g:title";if(products[i+c].hasOwnProperty("name"))if(products[i+c].name)itemName=products[i+c].name;if(products[i+c].hasOwnProperty("model"))if(products[i+c].model)itemName=products[i+c].model;if(products[i+c].hasOwnProperty("g:title"))if(products[i+c]["g:title"])itemName=products[i+c]["g:title"];var shortenName=itemName;if(itemName.length>=trimLength)shortenName=itemName.substring(0,trimLength).trim()+"...";var price="",itemClass="item";if(void 0!==products[i+c].price&&"0"!=products[i+c].price)if(void 0!==products[i+c].oldprice&&showOldPrice&&products[i+c].oldprice!==products[i+c].price)itemClass="item item--sale",price=priceDiv(products[i+c].price,products[i+c].oldprice);else itemClass="item";goods+='<a class="'+itemClass+'" href="'+products[i+c].url+'" target="_blank"><div class="top"><div class="pic"><img src="'+products[i+c].picture+'"/></div>'+price+'</div > <div class="bottom"><span>'+shortenName+'</span><div class="button">Посмотреть</div></div><div class="fixed"><div class="price">'+numberWithSpaces(products[i+c].price)+'</div><div class="buttonf">'+shortenName+'</div><div class="buttonf buttonf--blue">Посмотреть</div></div></a>'}return goods}document.getElementById(elementId).appendChild(creative());


/* В переменных можно указывать произвольные цвета */

:root {
  --itemBackgroundColor: #373737;
  --itemForegroundColor: #ebebeb;
  --itemAccentColor: #56ccf2;
}

/* Ниже этой строчки код редактировать не рекомендуется */

:root{--footerDuration:0.2s}*,:after,:before{box-sizing:border-box}body,html{margin:0;padding:0}.wrapper{background-color:#fff;border:1px solid var(--itemBackgroundColor);font-family:PT Sans,Arial,sans-serif;height:100%;left:50%;overflow:hidden;top:50%;transform:translate(-50%,-50%);width:100%;z-index:0}.logo,.wrapper{position:absolute}.logo{font-size:0;right:4%;top:4%;transition:width .25s ease;width:calc(25% + 5px);z-index:3}.logo img{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.content{height:84%;left:4%;top:4%;width:92%}.content,.item{position:absolute}.item{display:flex;flex-direction:column;height:calc(50% - 5px);justify-content:space-between;text-decoration:none;transition:all .5s ease;width:calc(33.3% - 10px);z-index:1}.item:focus .top:before,.item:hover .top:before{background-image:linear-gradient(to bottom,var(--itemBackgroundColor),var(--itemBackgroundColor))}.item:focus .bottom,.item:hover .bottom{-webkit-font-smoothing:antialiased;background-color:var(--itemBackgroundColor);color:#fff}.item:focus .bottom>span:before,.item:hover .bottom>span:before{opacity:1;width:calc(100% - 2px)}.item.item--sale:focus .top:before,.item.item--sale:hover .top:before{background-image:linear-gradient(to bottom,var(--itemBackgroundColor),var(--itemBackgroundColor))}.item.item--sale .top:before{background-image:linear-gradient(to bottom,#eb5757,var(--itemForegroundColor) 70%)}.item.item--hidden{opacity:0}.item.item--upper{z-index:3}.item.item--fullsize{height:100%;left:0!important;top:0!important;width:100%}.item.item--fullsize .top{border-color:#fff;height:100%;max-width:46vw;width:50%}.item.item--fullsize .top:after,.item.item--fullsize .top:before{background-image:linear-gradient(180deg,#fff,#fff)!important}.item.item--fullsize .price{right:100%}.item.item--fullsize .bottom{background-color:var(--itemBackgroundColor);height:0;min-height:0;opacity:0;padding:0}.item.item--fullsize .bottom span{-webkit-font-smoothing:antialiased;color:#fff;font-size:15px;font-weight:400;line-height:20px;padding:10px 24px}.item.item--fullsize .fixed{opacity:1;right:4%;width:46%}.item:first-child{left:0;top:0}.item:nth-child(2){left:0;top:calc(55% - 5px)}.item:nth-child(3){left:calc(33.3% + 5px);top:calc(55% - 5px)}.item:nth-child(4){left:calc(66.6% + 10px);top:calc(55% - 5px)}.item:nth-child(5){left:calc(33.3% + 5px);top:0}.top{background-color:#fff;height:70%;overflow:hidden;padding:1px 1px 0;transition:height .5s ease,width .5s ease,border .5s ease;width:100%}.top,.top>*{position:relative}.top>*{z-index:2}.top .pic{background-color:#fff;border-top-left-radius:5px;border-top-right-radius:5px;height:100%}.top:before{height:100%;left:0;top:0;transition:all .6s ease;width:100%;z-index:0}.top:after,.top:before{background-image:linear-gradient(to bottom,var(--itemForegroundColor),var(--itemForegroundColor));border-radius:5px 5px 0 0;content:" ";position:absolute}.top:after{height:calc(100% - 1px);left:1px;top:1px;width:calc(100% - 2px);z-index:1}.top img{border-radius:4px 4px 0 0;height:100%;-o-object-fit:contain;object-fit:contain;transition:all .5s ease;width:100%}.item--fullsize .oldprice{bottom:28px;height:18px;line-height:8px;padding:0 14px 0 8px}.item--fullsize .oldprice em{opacity:0;position:absolute}.item--fullsize .oldprice span{opacity:1;position:static}.oldprice{-webkit-font-smoothing:antialiased;background-color:#eb5757;border-bottom-left-radius:50px;border-top-left-radius:50px;bottom:calc(100% - 18px);color:#fff;height:13px;line-height:0;padding:0 8px;position:absolute;right:0;text-align:right;transition:all .2s ease}.oldprice em{font-size:9px;font-style:normal;font-weight:700;line-height:12px}.oldprice span{font-size:12px;line-height:18px;opacity:0;position:absolute}.oldprice span:before{background-color:#fff;content:" ";height:1px;left:5px;position:absolute;top:8px;width:calc(100% - 8px)}.oldprice span:after{background-image:url("https://cdn.adhigh.net/banners/dynamic-template/pt-sans-rouble-white.svg");background-position:50%;background-repeat:no-repeat;background-size:contain;content:" ";height:18px;margin-left:2px;position:absolute;right:4px;top:50%;transform:translateY(-50%);width:6px}.price{-webkit-font-smoothing:antialiased;background-color:var(--itemBackgroundColor);border-bottom-left-radius:50px;border-top-left-radius:50px;bottom:0;color:#fff;font-size:12px;line-height:18px;padding:0 14px 0 16px;position:absolute;right:-100%;text-align:right;transition:right .5s ease,bottom .5s ease;white-space:nowrap}.price:before{background-color:var(--itemAccentColor);border-radius:8px;height:8px;left:4px;top:5px;width:8px;z-index:2}.price:after,.price:before{content:" ";position:absolute}.price:after{background-image:url("https://cdn.adhigh.net/banners/dynamic-template/pt-sans-rouble-white.svg");background-position:50%;background-repeat:no-repeat;background-size:contain;height:18px;margin-left:2px;right:4px;top:50%;transform:translateY(-50%);width:6px}.price--visible{right:0}.bottom{background-color:var(--itemForegroundColor);bottom:0;color:var(--itemBackgroundColor);flex-grow:1;font-size:8px;left:0;line-height:12px;max-width:46vw;min-height:34px;overflow:hidden;padding-bottom:0;position:absolute;text-align:center;transition:all .2s ease,background-color .2s ease,color .2s ease,opacity .5s ease;width:100%}.bottom span{align-items:center;display:flex;flex-grow:1;height:100%;justify-content:center;padding:6px 6px 5px;transition:all .5s ease;word-break:break-all}.bottom span:before{border-radius:2px;bottom:1px;content:" ";height:2px;left:1px;opacity:0;transition:all .6s ease;width:2px;z-index:2}.bottom span:before,.button{background-color:var(--itemAccentColor);position:absolute}.button{-webkit-font-smoothing:antialiased;bottom:-150%;color:#fff;font-size:15px;height:30px;left:0;line-height:30px;text-align:center;text-transform:uppercase;transition:all .5s ease;width:100%}.button.button--visible{bottom:0}.fixed{align-items:center;bottom:31px;display:flex;flex-direction:column;height:calc(50% - 5px);justify-content:flex-end;opacity:0;padding-left:10px;position:fixed;right:-150px;transition:all .5s ease;width:140px;z-index:2}.buttonf{-webkit-font-smoothing:antialiased;background-color:var(--itemBackgroundColor);color:#fff;font-size:10px;height:50px;line-height:15px;padding:10px 12px;text-align:center;width:100%}.buttonf.buttonf--blue{background-color:var(--itemAccentColor);font-size:13px;height:30px;line-height:30px;padding:0;text-transform:uppercase}.footer{-webkit-font-smoothing:antialiased;align-items:flex-end;bottom:0;color:#fff;display:flex;font-size:9px;justify-content:space-between;left:0;line-height:16px;position:absolute;text-align:center;width:100%;z-index:3}.footer.footer--shorten:before{width:calc(100% - 185px)}.footer:before{bottom:0;content:" ";height:10px;left:0;position:absolute;transition:width var(--footerDuration) ease;width:100%;z-index:-1}.footer:before,.footer__logo{background-color:var(--itemBackgroundColor)}.footer__logo{-webkit-font-smoothing:antialiased;border-top-right-radius:8px;color:#fff;height:16px;line-height:16px;overflow:hidden;padding:0 6px;position:relative;text-decoration:none;transition:all var(--footerDuration) ease;width:50px}.footer__logo:focus,.footer__logo:hover{height:28px;width:46%}.footer__logo:focus span,.footer__logo:hover span{line-height:28px;opacity:0}.footer__logo:focus .pic,.footer__logo:hover .pic{opacity:1}.footer__logo span{line-height:16px;transition:all var(--footerDuration) ease}.footer__logo .pic{left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--footerDuration) ease;width:66%}.footer__about{background-color:var(--itemBackgroundColor);border-top-left-radius:8px;height:16px;line-height:16px;padding:0 6px;text-align:center;width:80px}.footer__about:focus,.footer__about:hover{opacity:0}.footer__about:focus+.footer__disclaimer,.footer__about:hover+.footer__disclaimer{opacity:1;transform:translate(0,0)}.footer__disclaimer{background-color:rgba(55,55,55,.85);border-top-left-radius:8px;bottom:0;color:transparent;font-size:7px;line-height:10px;opacity:0;padding:12px 12px 16px;position:absolute;right:0;transform:translate(calc(100% - 80px),calc(100% - 16px));transition:all var(--footerDuration) ease,opacity .1s ease;width:185px;z-index:1}.footer__disclaimer:focus,.footer__disclaimer:hover{-webkit-font-smoothing:antialiased;color:#fff;opacity:1;transform:translate(0,0)}.footer__disclaimer strong{font-size:9px;font-weight:400}.footer__disclaimer a{-webkit-font-smoothing:antialiased;color:#56ccf2}