!function () { function GetProducts(top) { var productArray = [{"pid":138536500,"name":"Apple iPhone 15 128GB Czarny","price":3545.0000,"sprice":"3545,00","url":"https://www.ceneo.pl/138536500;basket#pid=24529&crid=507260&cid=42164","imgurl":"//image.ceneostatic.pl/data/products/138536500/f-apple-iphone-15-128gb-czarny.jpg","newpage":true,"format":"custom","rating":4.86,"drawchance":1,"urltype":0,"position":1},{"pid":161997739,"name":"Redmi Note 13 Pro+ 12/512GB Czarny","price":1844.0000,"sprice":"1844,00","url":"https://www.ceneo.pl/161997739;basket#pid=24529&crid=507260&cid=42164","imgurl":"//image.ceneostatic.pl/data/products/161997739/f-redmi-note-13-pro-12-512gb-czarny.jpg","newpage":true,"format":"custom","rating":4.84,"drawchance":1,"urltype":0,"position":2},{"pid":165423702,"name":"Samsung Galaxy A55 SM-A5560 5G 8/128GB Czarny","price":1598.0000,"sprice":"1598,00","url":"https://www.ceneo.pl/165423702;basket#pid=24529&crid=507260&cid=42164","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":3},{"pid":158184470,"name":"Sony PlayStation 5 D Chassis (Slim)","price":2230.0000,"sprice":"2230,00","url":"https://www.ceneo.pl/158184470;basket#pid=24529&crid=507260&cid=42164","imgurl":"//image.ceneostatic.pl/data/products/158184470/f-sony-playstation-5-d-chassis-slim.jpg","newpage":true,"format":"custom","rating":4.69,"drawchance":1,"urltype":0,"position":4},{"pid":159411838,"name":"Dyson V15s Detect Submarine™","price":3898.0000,"sprice":"3898,00","url":"https://www.ceneo.pl/159411838;basket#pid=24529&crid=507260&cid=42164","imgurl":"//image.ceneostatic.pl/data/products/159411838/f-dyson-v15s-detect-submarine.jpg","newpage":true,"format":"custom","rating":4.72,"drawchance":1,"urltype":0,"position":5},{"pid":120366072,"name":"Tubolight Wkładka Antyprzebiciowa Do Opon Evo Insert Gravel Pair Niebieski 28","price":250.0000,"sprice":"250,00","url":"https://www.ceneo.pl/120366072#pid=24529&crid=507260&cid=42164","imgurl":"//image.ceneostatic.pl/data/products/120366072/f-tubolight-wkladka-antyprzebiciowa-do-opon-evo-insert-gravel-pair-niebieski-28.jpg","newpage":true,"format":"custom","rating":0.0,"drawchance":1,"urltype":0,"position":6},{"pid":161117779,"name":"Redmi Note 13 Pro 5G 8/256GB Czarny","price":1248.0000,"sprice":"1248,00","url":"https://www.ceneo.pl/161117779;basket#pid=24529&crid=507260&cid=42164","imgurl":"//image.ceneostatic.pl/data/products/161117779/f-redmi-note-13-pro-5g-8-256gb-czarny.jpg","newpage":true,"format":"custom","rating":4.85,"drawchance":1,"urltype":0,"position":7},{"pid":138027800,"name":"Meec Tools 405mm 2,2kW LS400H","price":1950.5000,"sprice":"1950,50","url":"https://www.ceneo.pl/138027800;basket#pid=24529&crid=507260&cid=42164","imgurl":"//image.ceneostatic.pl/data/products/138027800/f-meec-tools-405mm-2-2kw-ls400h.jpg","newpage":true,"format":"custom","rating":0.0,"drawchance":1,"urltype":0,"position":8},{"pid":157228947,"name":"Motorola Edge 40 Neo 12/256GB Czarny","price":1468.0000,"sprice":"1468,00","url":"https://www.ceneo.pl/157228947;basket#pid=24529&crid=507260&cid=42164","imgurl":"//image.ceneostatic.pl/data/products/157228947/f-motorola-edge-40-neo-12-256gb-czarny.jpg","newpage":true,"format":"custom","rating":4.77,"drawchance":1,"urltype":0,"position":9}]; var sum = 9; 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(9); var rows = 3, columns = 3, 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 += '
'; html += '
'; html += '
'; 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('ceneoaffcontainer507260').innerHTML = html; if(true === true){ var hrefs = document.getElementById('ceneoaffcontainer507260').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 = '//partnerzyapi.ceneo.pl/External/SaveProductClickFromRotator' + "?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 + '//analytics.ceneo.pl/trackevent?category=contextual&culture=pl-PL&action=loaded&label=24529_9d7c6216cfcbd45d50f56e324a38c5c5|False|'3558',0' + '&_=' + (new Date).getTime(); img.src = imgSrc.replace(/&/g, '&'); } } }();