!function () { function GetProducts(top) { var productArray = [{"pid":165013996,"name":"realme 12 Pro+ 5G 12/512GB Niebieski","price":1985.0000,"sprice":"1985,00","url":"https://www.ceneo.pl/165013996#pid=24529&crid=490586&cid=42160","imgurl":"//image.ceneostatic.pl/data/products/165013996/f-realme-12-pro-5g-12-512gb-niebieski.jpg","newpage":true,"format":"custom","rating":4.82,"drawchance":1,"urltype":0,"position":1},{"pid":165423702,"name":"Samsung Galaxy A55 SM-A5560 5G 8/128GB Czarny","price":1546.0000,"sprice":"1546,00","url":"https://www.ceneo.pl/165423702#pid=24529&crid=490586&cid=42160","imgurl":"//image.ceneostatic.pl/data/products/165423702/f-samsung-galaxy-a55-sm-a5560-5g-8-128gb-czarny.jpg","newpage":true,"format":"custom","rating":4.81,"drawchance":1,"urltype":0,"position":2},{"pid":147752165,"name":"Samsung Galaxy S23 5G SM-S911 8/256GB Czarny","price":2827.0000,"sprice":"2827,00","url":"https://www.ceneo.pl/147752165#pid=24529&crid=490586&cid=42160","imgurl":"//image.ceneostatic.pl/data/products/147752165/f-samsung-galaxy-s23-5g-sm-s911-8-256gb-czarny.jpg","newpage":true,"format":"custom","rating":4.86,"drawchance":1,"urltype":0,"position":3},{"pid":157145077,"name":"Apple iPhone 15 Pro 128GB Tytan Czarny ","price":4449.0000,"sprice":"4449,00","url":"https://www.ceneo.pl/157145077#pid=24529&crid=490586&cid=42160","imgurl":"//image.ceneostatic.pl/data/products/157145077/f-apple-iphone-15-pro-128gb-tytan-czarny.jpg","newpage":true,"format":"custom","rating":4.86,"drawchance":1,"urltype":0,"position":4},{"pid":163003573,"name":"Samsung Galaxy S24 SM-S921 8/128GB Czarny","price":3098.0000,"sprice":"3098,00","url":"https://www.ceneo.pl/163003573#pid=24529&crid=490586&cid=42160","imgurl":"//image.ceneostatic.pl/data/products/163003573/f-samsung-galaxy-s24-sm-s921-8-128gb-czarny.jpg","newpage":true,"format":"custom","rating":4.86,"drawchance":1,"urltype":0,"position":5}]; var sum = 5; var result = []; var i = 0, n = 0; for (var n = 0; n < top; n++) { var r = Math.floor(Math.random() * sum); var lsum = 0; for (i = 0; i < productArray.length; i++) { var prod = productArray[i]; lsum += prod.drawchance; if (r < lsum) { sum -= prod.drawchance; result.push(prod); productArray.splice(i, 1); break; } } } return result; } function htmlEncode(value){ var div = document.createElement('div'); var text = document.createTextNode(value); div.appendChild(text); return div.innerHTML; } var html = ''; var products = GetProducts(5); var rows = 1, columns = 5, r = 0, c = 0; html += '
'; for (r = 0; r < rows; r++) { html += '
'; for (c = 0; c < columns; c++) { var idx = (r * columns) + c; var product = products[idx]; if(product){ var rating = Math.round(product.rating * 20); html += '
'; html += '
' html += ''; html += '' + product.name + ''; html += ''; html += product.name + ''; html += '
'; if(product.urltype == 1){ html += ''; html += 'Sprawdź'; } } html += '
'; } html += '
'; } html += '
'; html += ''; html += '
'; html += '
'; try { var _logo = document.getElementById('ceneoaff-logo'); if (_logo != null) { _logo.parentNode.removeChild(_logo); } } catch (err) { } if($CeneoAP.options.ad_onAfterRender != null) $CeneoAP.options.ad_onAfterRender(); document.getElementById('ceneoaffcontainer490586').innerHTML = html; if(false === true){ var hrefs = document.getElementById('ceneoaffcontainer490586').querySelectorAll(".ceneoaff-items a"); for (i = 0; i < hrefs.length; i++) { var href = hrefs[i]; (function(href) { href.addEventListener('click', function(event){ var pid = href.closest('div.ceneoaff-item').getAttribute('data-pid'); var request = '' + "?productId=" + pid + "&creationId=" + $CeneoAP.options.ad_creation + "&referrerUrl=" + encodeURIComponent(window.location); var img = new Image(); img.src = request; }, false); })(href); } var percentage = 0; var trackView = false; if(percentage === 100){ trackView = true; } else{ var rotatorRandomVal = Math.floor((Math.random() * 100) + 1); if(rotatorRandomVal < percentage){ trackView = true; } } if(trackView){ var stamp = parseInt(new Date().getTime()/86400, 10); var img = new Image(); var imgSrc = location.protocol + '' + '&_=' + (new Date).getTime(); img.src = imgSrc.replace(/&/g, '&'); } } }();