820 lines
21 KiB
Plaintext
820 lines
21 KiB
Plaintext
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
</div>
|
|
</div><!--/tabMainBox-->
|
|
</div><!--/tabContent-->
|
|
|
|
<div id="pagerBottom">
|
|
<div class="td-pager-bottom">
|
|
|
|
<strong class="orange large">1</strong>
|
|
|
|
<a class="alleLink" href="/web/20120904144913/http://allegro.pl/listing.php/search?p=2&sg=0&string=ibm"><span>2</span></a>
|
|
|
|
<a class="alleLink" href="/web/20120904144913/http://allegro.pl/listing.php/search?p=3&sg=0&string=ibm"><span>3</span></a>
|
|
|
|
... <a class="alleLink" href="/web/20120904144913/http://allegro.pl/listing.php/search?p=179&sg=0&string=ibm"><span>179</span></a>
|
|
|
|
|
|
<a href="/web/20120904144913/http://allegro.pl/listing.php/search?p=2&sg=0&string=ibm" class="arrRight-bottom" title="Następna"></a>
|
|
</div>
|
|
</div>
|
|
<a id="idPrintGo" href="" class="smaller alleLink noprint"><span>Wersja do druku</span></a>
|
|
|
|
<div id="compareItems" class="pl"></div>
|
|
|
|
|
|
<!-- Footer start -->
|
|
</div> <!-- /pagecontent1 -->
|
|
|
|
<div id="footerContentBox" class="newSpecial">
|
|
<a href="#top" id="toTop"></a>
|
|
<div class="ohidden">
|
|
<div id="footerAbout">
|
|
<h2>O Allegro</h2>
|
|
<ul>
|
|
<li><a href="/web/20120904144913/http://allegro.pl/country_pages/1/0/marketing/about.php">O nas</a></li>
|
|
<li><a href="https://web.archive.org/web/20120904144913/http://kariera.allegro.pl/">Praca w Grupie Allegro</a></li>
|
|
<li><a href="/web/20120904144913/http://allegro.pl/country_pages/1/0/marketing/allforplanet/">Fundacja All For Planet</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="footerBuy">
|
|
<h2>Bezpieczne zakupy</h2>
|
|
<ul>
|
|
<li><a href="https://web.archive.org/web/20120904144913/http://uslugi.allegro.pl/pok/">Program Ochrony Kupujących</a></li>
|
|
<li><a href="/web/20120904144913/http://allegro.pl/RightsProtectionCooperationProgram.php">Współpraca w Ochronie Praw</a></li>
|
|
<li><a href="https://web.archive.org/web/20120904144913/http://uslugi.allegro.pl/sa/">Standard Allegro</a></li>
|
|
<li><a href="https://web.archive.org/web/20120904144913/http://uslugi.allegro.pl/payu/">PayU</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="footerSell">
|
|
<h2>Skuteczna Sprzedaż</h2>
|
|
<ul>
|
|
<li><a href="/web/20120904144913/http://allegro.pl/InfoPage/SellManager.php">Menedżer Sprzedaży</a></li>
|
|
<li><a href="/web/20120904144913/http://allegro.pl/country_pages/1/0/produkty-jak.php">Katalog produktów</a></li>
|
|
<li><a href="/web/20120904144913/http://allegro.pl/show_shop.php">Sklepy Allegro</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="footerMobile">
|
|
<h2>Mobilne Allegro</h2>
|
|
<ul>
|
|
<li><a rel="external" href="https://web.archive.org/web/20120904144913/http://mobilne.allegro.pl/">Aplikacja na Twój telefon</a></li>
|
|
<li><a href="https://web.archive.org/web/20120904144913/http://m.allegro.pl/">Strona mobilna</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<p class="reg">
|
|
Korzystanie z serwisu oznacza akceptację <a href="/web/20120904144913/http://allegro.pl/country_pages/1/0/user_agreement.php" class="alleLink"><span>regulaminu</span></a>
|
|
</p>
|
|
</div><!-- /footerContentBox -->
|
|
|
|
<script type="text/javascript" src="https://web.archive.org/web/20120904144913js_/http://static.allegrostatic.pl/site_images/1/0/js/ado.js"></script>
|
|
|
|
<script src="https://web.archive.org/web/20120904144913js_/http://static.allegrostatic.pl/js/libs/jquery-1.6.1.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script type="text/javascript" charset="utf-8">var $j = jQuery.noConflict();</script>
|
|
<script src="https://web.archive.org/web/20120904144913js_/http://static.allegrostatic.pl/js/libs/jquery-ui-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="https://web.archive.org/web/20120904144913js_/http://static.allegrostatic.pl/js/gtagb4.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="https://web.archive.org/web/20120904144913js_/http://static.allegrostatic.pl/js/libs/jquery.watermark.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="https://web.archive.org/web/20120904144913js_/http://static.allegrostatic.pl/js/scripts/jq_plugins-13.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="https://web.archive.org/web/20120904144913js_/http://static.allegrostatic.pl/js/scripts/mainjs-5.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="https://web.archive.org/web/20120904144913js_/http://static.allegrostatic.pl/js/scripts/showitem-gallery-2.3.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="https://web.archive.org/web/20120904144913js_/http://static.allegrostatic.pl/js/scripts/recommended-gallery-1.1.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="https://web.archive.org/web/20120904144913js_/http://static.allegrostatic.pl/js/scripts/listing-12.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
|
|
(function($){
|
|
$(function(){
|
|
$('#showMoreCats, #hideMoreCats').click(function(){
|
|
$('#categoriesList .additional, .slideInBtn, .slideOutBtn').toggle(200);
|
|
return false;
|
|
});
|
|
if ( $('.additional').length ){ $('.slideOutBtn').show(); }
|
|
});
|
|
})(jQuery);
|
|
|
|
|
|
(function($){
|
|
$(function(){
|
|
$('.priceComparerCeneoLink').click(function(event){
|
|
baseURI = encodeURIComponent(event.currentTarget.baseURI);
|
|
targetURI = encodeURIComponent(event.currentTarget.href);
|
|
$.ajax({
|
|
url: '/ceneo.php/?url=' + targetURI + '&ref=' + baseURI,
|
|
dataType: 'json'
|
|
});
|
|
});
|
|
});
|
|
})(jQuery);
|
|
|
|
|
|
(function ($) {
|
|
|
|
/**
|
|
* Wizard
|
|
*
|
|
*/
|
|
var wizard = function () {
|
|
|
|
/**
|
|
* Protected variables
|
|
*
|
|
*/
|
|
var current = {
|
|
stepElement: {},
|
|
stepData: {},
|
|
optionData: {}
|
|
},
|
|
paginElements = {
|
|
prev: {},
|
|
steps: {}
|
|
},
|
|
prevSteps = [],
|
|
showedSteps = {},
|
|
procesingLayer,
|
|
isOnLayer = false,
|
|
params = {},
|
|
hasStorage = (function () {
|
|
try {
|
|
localStorage.setItem('wizTest', 'wizTest');
|
|
localStorage.removeItem('wizTest', 'wizTest');
|
|
return true;
|
|
} catch(e) {
|
|
return false;
|
|
}
|
|
})(),
|
|
optimizerCombination = (typeof utmx !== 'undefined' && typeof utmx('combination') !== 'undefined') ? '&combination=' + utmx('combination') : '';
|
|
|
|
|
|
/**
|
|
* Init
|
|
*
|
|
* @return void
|
|
* @api publiuc
|
|
*/
|
|
var init = function (callback) {
|
|
var contener = $('#wizardContent');
|
|
// params = setConfig()
|
|
|
|
paginElements.prev = $('#prev-step a');
|
|
paginElements.steps = $('#stepsPagin li.pag');
|
|
|
|
// Ustawienia początkowych danych
|
|
current.stepElement = contener.children('div'); // Aktulnie wybrany krok (HTML Element)
|
|
showedSteps[current.stepElement.attr('id')] = true; // ID aktualnie wybranego kroku, zapisujemy w tablicy - cache
|
|
current.stepData = $(current.stepElement).data('wizard-step'); // Pobieramy dane o aktualnym kroku (nr kroku i sciezke poprzednich krokow)
|
|
current.optionData = $(current.stepElement).find('li.current').data('wizard-option') || {};
|
|
|
|
// Odświeżenie stanów buttonów nawigacji
|
|
refreshPagin();
|
|
|
|
// Zmiana kroku odbywa się po zmienia hasha
|
|
$(window).bind('hashchange', function () {
|
|
if (window.location.hash === '') {
|
|
changeStep('1-1', true);
|
|
} else if (/#wiz-cur/.test(window.location.hash)) {
|
|
if (isOnLayer) {
|
|
if (!$('#wizard').is(':visible')) {
|
|
showWizardOnLayer.showWizard();
|
|
}
|
|
}
|
|
changeStep(window.location.hash.split('#wiz-cur-')[1], true);
|
|
} else {
|
|
procesingLayerOpen();
|
|
}
|
|
});
|
|
|
|
// Wybór opcji w kroku
|
|
contener.delegate('a', 'click', function (e) {
|
|
var $this = $(this);
|
|
|
|
// Zaznaczenie wybranego elementu
|
|
$(current.stepElement).find('ul li').removeClass('current');
|
|
$this.parent().addClass('current');
|
|
|
|
// Pobranie danych wybranej opcji
|
|
current.optionData = $this.parent().data('wizard-option');
|
|
|
|
if (window.location.href === this.href) {
|
|
wiz.showWizardOnLayer.closeWizard();
|
|
return false;
|
|
}
|
|
|
|
if (/wizard/.test(this.href)) {
|
|
procesingLayerOpen();
|
|
if (hasStorage) {
|
|
localStorage.setItem('wizLastOpt', current.optionData.eq);
|
|
}
|
|
}
|
|
});
|
|
|
|
// Jeżeli w url'u są kroki wizarda, to odpalamy go i ustawiamy aktualną pozycją
|
|
if (/#wiz-cur-/.test(window.location.hash)) {
|
|
var id = 'wizard-step-' + prepareStepId(window.location.hash.split('wiz-cur-')[1]);
|
|
if (typeof showedSteps[id] !== 'undefined') {
|
|
return;
|
|
}
|
|
|
|
setTimeout(function () {
|
|
changeStep(window.location.hash.split('wiz-cur-')[1], true, function () {
|
|
if (hasStorage) {
|
|
if (typeof localStorage.wizLastOpt !== 'undefined') {
|
|
selectCurrentOption(localStorage.wizLastOpt, function () {
|
|
localStorage.removeItem('wizLastOpt');
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}, 100);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* Set config and add config class to the wizard wrapper
|
|
*
|
|
* @return params <Object>
|
|
* @api private
|
|
*/
|
|
// var setConfig = function () {
|
|
// var str = $('#wizard').attr('class'),
|
|
// opts = {};
|
|
|
|
// opts.icons = (/icons/.test(str)) ? true: false;
|
|
// opts.doubleClick = (/doubleClick/.test(str)) ? true : false;
|
|
|
|
// return opts;
|
|
// };
|
|
|
|
|
|
/**
|
|
* Refresh pagin - refresh state and href in navigation buttons
|
|
*
|
|
* @return void
|
|
* @api private
|
|
*/
|
|
var refreshPagin = function () {
|
|
// Uaktualnienie buttona prev
|
|
if (current.stepData.nr > 1) {
|
|
paginElements.prev.attr('href', '#wiz-cur-' + current.stepData.prevSteps[current.stepData.nr - 2]);
|
|
paginElements.prev.parent().removeClass('disabled');
|
|
} else {
|
|
paginElements.prev.attr('href', '#wiz-prev');
|
|
paginElements.prev.parent().addClass('disabled');
|
|
}
|
|
|
|
// Uaktualnienie stanu w numerach kroków
|
|
paginElements.steps.removeClass('current');
|
|
$(paginElements.steps).eq(current.stepData.nr - 1).addClass('current');
|
|
};
|
|
|
|
|
|
/**
|
|
* Change step
|
|
*
|
|
* @param stepData <string> - Next step path
|
|
* @param direction <bool> - Next (true) or prev (false)
|
|
* @return void
|
|
* @api private
|
|
*/
|
|
var changeStep = function (stepData, direction, callback) {
|
|
// Pobieranie ID kroku z danych z hrefa
|
|
var stepId = 'wizard-step-' + prepareStepId(stepData),
|
|
currentOptionNr;
|
|
|
|
// Sprawdzamy czy istnieje krok, jak nie to go tworzymy
|
|
if (!showedSteps[stepId]) {
|
|
procesingLayerOpen();
|
|
createStep(stepData, stepId, function () {
|
|
changeStep(stepData, direction, callback);
|
|
});
|
|
return;
|
|
}
|
|
|
|
// Jeżeli się cofamy, to czyścimy wybraną z aktualnego kroku
|
|
$(current.stepElement).find('ul li').removeClass('current');
|
|
|
|
// Ukrywamy poprzedni, wyswietlamy następny krok
|
|
procesingLayerClose();
|
|
$(current.stepElement).hide().removeClass('current');
|
|
current.stepElement = $('#' + stepId).fadeIn(1000);
|
|
|
|
currentOptionNr = getCurrentOptNr(stepData);
|
|
if (currentOptionNr) {
|
|
selectCurrentOption(currentOptionNr);
|
|
} else {
|
|
current.optionData = {};
|
|
}
|
|
|
|
// Aktualizujemy dane kroku
|
|
current.stepData = current.stepElement.data('wizard-step');
|
|
|
|
// Odświeżamy stan elementów nawigacji
|
|
refreshPagin();
|
|
|
|
if (typeof callback !== 'undefined') {
|
|
callback();
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* Create step - Create and append step HTML structure
|
|
*
|
|
* @param stepData <string> - step string like 1-1-3|2-1
|
|
* @param stepId <string> - step ID in DOM
|
|
* @param callback <function> callback
|
|
* @return void
|
|
* @api private
|
|
*/
|
|
var createStep = function (stepData, stepId, callback) {
|
|
$.ajax({
|
|
url: '/Showcat/Index.php/getWizardStep',
|
|
data: {
|
|
id: 2,
|
|
stepString: stepData
|
|
},
|
|
dataType: 'JSON',
|
|
success: function (data) {
|
|
var options = data.wizard.step.options,
|
|
frag = document.createDocumentFragment(),
|
|
stepTitle = document.createElement('h2'),
|
|
stepHTML = document.createElement('div'),
|
|
ul = document.createElement('ul'),
|
|
imgData = (function () {
|
|
var data = {};
|
|
data.width = 130,
|
|
data.height = 100,
|
|
data.ext = '.png'
|
|
|
|
return data;
|
|
})();
|
|
|
|
stepTitle.innerHTML = data.wizard.step.title;
|
|
stepHTML.id = stepId;
|
|
$(stepHTML).addClass('step');
|
|
|
|
stepHTML.setAttribute('data-wizard-step', '{"nr":"'+ (data.wizard.prevSteps.length + 1) +'","prevSteps":'+ toJsonString(data.wizard.prevSteps) +'}');
|
|
|
|
for (var i = 0, optionsLen = options.length; i < optionsLen; i++) {
|
|
var li = document.createElement('li'),
|
|
a = document.createElement('a'),
|
|
img = document.createElement('img'),
|
|
title = document.createElement('h3'),
|
|
href = (options[i].query === '') ? '#wiz-cur-' + options[i].nextStep : options[i].query + optimizerCombination + window.location.hash;
|
|
|
|
img.src = 'https://web.archive.org/web/20120904144913/http://static.allegrostatic.pl/site_images/1/0' + options[i].thumb + imgData.ext;
|
|
img.width = imgData.width;
|
|
img.height = imgData.height;
|
|
title.appendChild(document.createTextNode(options[i].text));
|
|
|
|
|
|
a.setAttribute('href', href);
|
|
a.appendChild(img);
|
|
a.appendChild(title);
|
|
li.appendChild(a);
|
|
li.setAttribute('data-wizard-option', '{"nextStep":"'+ options[i].nextStep +'","query":"'+ options[i].query +'","eq":"'+ i +'"}');
|
|
frag.appendChild(li);
|
|
}
|
|
|
|
stepHTML.appendChild(stepTitle);
|
|
ul.appendChild(frag);
|
|
stepHTML.appendChild(ul);
|
|
document.getElementById('wizardContent').appendChild(stepHTML);
|
|
showedSteps[stepId] = true;
|
|
callback();
|
|
}
|
|
});
|
|
};
|
|
|
|
|
|
/**
|
|
* Show wizard on layer
|
|
*
|
|
* @param link <jQuery HTML Element> - target
|
|
* @return void
|
|
* @api public
|
|
*/
|
|
var showWizardOnLayer = (function () {
|
|
var wizardHTML,
|
|
overlayHTML,
|
|
closeWizard,
|
|
showWizard,
|
|
start;
|
|
|
|
|
|
start = function (target) {
|
|
isOnLayer = true;
|
|
|
|
/**
|
|
* Clone and append wizart into layer
|
|
*/
|
|
wizardHTML = (function () {
|
|
var HTML = $('#wizard').clone(true),
|
|
closeLink = $('<span class="close">X</span>').bind('click', function () {
|
|
closeWizard();
|
|
});
|
|
|
|
$('#wizard').remove();
|
|
|
|
HTML.css({
|
|
position: 'fixed',
|
|
display: 'none',
|
|
width: 750 + 'px',
|
|
zIndex: 10000
|
|
}).fadeIn();
|
|
|
|
closeLink.appendTo(HTML);
|
|
|
|
HTML.addClass('layer');
|
|
$('body').append(HTML);
|
|
|
|
return HTML;
|
|
})();
|
|
|
|
/**
|
|
* Create overlay
|
|
*/
|
|
overlayHTML = (function (callback) {
|
|
var HTML = $('<div>').css({
|
|
width: $(window).width() + 'px',
|
|
height: $(window).height() + 'px',
|
|
background: '#000',
|
|
position: 'fixed',
|
|
zIndex: 8000,
|
|
top: 0,
|
|
left: 0,
|
|
opacity: 0.8,
|
|
display: 'none'
|
|
}).appendTo('body');
|
|
|
|
callback();
|
|
return HTML;
|
|
})(function () {
|
|
init();
|
|
});
|
|
|
|
/**
|
|
* Close wizard on Esc
|
|
*/
|
|
$(document).bind('keydown', function (e) {
|
|
if (e.which === 27) {
|
|
closeWizard();
|
|
}
|
|
});
|
|
|
|
/**
|
|
* Attach event for open wizard
|
|
*/
|
|
$(target).bind('click', function (e) {
|
|
e.preventDefault();
|
|
showWizard();
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Close wizard
|
|
*/
|
|
closeWizard = function () {
|
|
overlayHTML.fadeOut();
|
|
wizardHTML.fadeOut();
|
|
};
|
|
|
|
/**
|
|
* Show wizard
|
|
*/
|
|
showWizard = function () {
|
|
wizardHTML.css({
|
|
left: $(window).width() / 2 - 370 + 'px',
|
|
top: $(window).height() / 2 - (wizardHTML.outerHeight() / 2) + 'px'
|
|
}).fadeIn();
|
|
overlayHTML.css({
|
|
width: $(window).width() + 'px',
|
|
height: $(window).height() + 'px'
|
|
}).fadeIn();
|
|
};
|
|
|
|
return {
|
|
start: start,
|
|
showWizard: showWizard,
|
|
closeWizard: closeWizard
|
|
};
|
|
})();
|
|
|
|
|
|
/**
|
|
* Open procesing layer - overlay with spinner
|
|
*
|
|
* @return void
|
|
* @api private
|
|
*/
|
|
var procesingLayerOpen = function () {
|
|
procesingLayer = procesingLayer || (function () {
|
|
var div = $('<div>');
|
|
div.addClass('processing').css({
|
|
width: $('#wizard').outerWidth() + 'px',
|
|
height: $('#wizard').outerHeight() + 'px'
|
|
});
|
|
$('#wizard').append(div);
|
|
return div;
|
|
})();
|
|
|
|
procesingLayer.show();
|
|
};
|
|
|
|
|
|
/**
|
|
* Close procesing layer - hide overlay with spinner
|
|
*
|
|
* @return void
|
|
* @api private
|
|
*/
|
|
var procesingLayerClose = function () {
|
|
procesingLayer.hide();
|
|
};
|
|
|
|
|
|
/**
|
|
* Get current option
|
|
*
|
|
* @return <int> || <bool> - current option number, or false if is not selected
|
|
* @api private
|
|
*/
|
|
var getCurrentOptNr = function (step) {
|
|
var arr = step.split('|'),
|
|
par = arr[arr.length-1].split('-');
|
|
|
|
if (par.length === 3) {
|
|
return par[2];
|
|
}
|
|
|
|
return false;
|
|
};
|
|
|
|
|
|
/**
|
|
* Set current option
|
|
*
|
|
* @return void
|
|
* @api private
|
|
*/
|
|
var selectCurrentOption = function (stepNr, callback) {
|
|
var cur = current.stepElement.find('li').eq(stepNr);
|
|
|
|
cur.addClass('current');
|
|
current.optionData = cur.data('wizard-option');
|
|
|
|
if (typeof callback !== 'undefined') {
|
|
callback();
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* Prepare Step ID
|
|
*
|
|
* @param step <string> step string like 1-1-3|2-1
|
|
* @return <string> - stepID
|
|
* @api private
|
|
*/
|
|
var prepareStepId = function (step) {
|
|
var arrSplit = step.split('|'),
|
|
stepVer = arrSplit[arrSplit.length - 1].split('-');
|
|
|
|
return stepVer[0] + '-' + stepVer[1];
|
|
};
|
|
|
|
|
|
/**
|
|
* To JSON String - prepare JSON string in array
|
|
*
|
|
* @param data <object> - data object
|
|
* @return <string> - Array at JSON string
|
|
* @api private
|
|
*/
|
|
var toJsonString = function (data) {
|
|
var str = '[';
|
|
for (var i = 0, iLen = data.length; i < iLen; i++) {
|
|
str += '"' + data[i] + '"';
|
|
if (i !== iLen - 1) {
|
|
str += ',';
|
|
}
|
|
}
|
|
str += ']';
|
|
|
|
return str;
|
|
};
|
|
|
|
|
|
/**
|
|
* API
|
|
*/
|
|
return {
|
|
init: init,
|
|
showWizardOnLayer: showWizardOnLayer
|
|
};
|
|
};
|
|
|
|
var wiz = new wizard();
|
|
if (document.getElementById('show-wizard')) {
|
|
wiz.showWizardOnLayer.start(document.getElementById('show-wizard'));
|
|
} else {
|
|
wiz.init();
|
|
}
|
|
})(jQuery);
|
|
|
|
|
|
(function($) {
|
|
// show a hover tooltip if it's defined
|
|
$('.itemFS').find('.tipContent').each(function() {
|
|
var toolTip = $(this).html();
|
|
$(this).parent().helptip({event:'hover','pos':'r', css:'promoTip', body: toolTip});
|
|
});
|
|
})(jQuery);
|
|
|
|
var ckWidget = function($) {
|
|
return {
|
|
widgets: {},
|
|
|
|
prepareRequest: function(el) {
|
|
var req = 'https://web.archive.org/web/20120904144913/http://widgetcokupic.allegro.pl:9968/storage/ck/';
|
|
var id;
|
|
el.each(function() {
|
|
id = $(this).data('product-id');
|
|
req += 'widget_' + id + ',pluses_' + id + ',';
|
|
});
|
|
req += '?callback=?';
|
|
return req;
|
|
},
|
|
|
|
prepareData: function(data) {
|
|
for(var i = 0, iLen = data.length; i < iLen; i++) {
|
|
this.widgets[data[i].id[0]] = {
|
|
wg: $.parseJSON(data[i].widget[0]),
|
|
plus: $.parseJSON(data[i].pluses[0])
|
|
};
|
|
}
|
|
},
|
|
|
|
createWidget: function(data, where) {
|
|
var html = '',
|
|
rate = parseFloat(data.wg.avgm).toFixed(2),
|
|
ck_source;
|
|
|
|
var setRank = function(ckr) {
|
|
if (ckr >= 90 ) {
|
|
return 'first';
|
|
} else if (ckr >= 80) {
|
|
return 'second';
|
|
}
|
|
return 'third';
|
|
};
|
|
|
|
ck_source = (where === 'listing') ? 'ck_source=1' : 'ck_source=2';
|
|
|
|
html += '<div class="ckWidget">';
|
|
html += '<a class="ckNewRank ' + setRank(data.wg.ckrk) + '" href="' + data.wg.url + '?ck_type=1&' + ck_source + '" target="_blank"></a>';
|
|
html += '<div class="right">';
|
|
html += '<em>' + rate + '</em>';
|
|
html += (where === 'show-item') ?
|
|
'<p>(według ' + data.wg.opct + ' opinii z Cokupić.pl)</p>' :
|
|
'<p>(według <a href="' + data.wg.url + '?ck_type=0&' + ck_source + '#productNav" target="_blank">' + data.wg.opct + ' opinii</a> z Cokupić.pl)</p>';
|
|
html += '</div>';
|
|
if(where === 'product-page' || where === 'show-item' || where === 'listing') {
|
|
html += '<p class="plus"><strong>Plusy:</strong> ';
|
|
for(var i = 0, iLen = data.plus.plus.length; i <= iLen, i < 3; i++) {
|
|
html += data.plus.plus[i].name + ' (' + data.plus.plus[i].pt + '%), ';
|
|
}
|
|
html += '</p>';
|
|
}
|
|
html += '</div>';
|
|
|
|
return $(html);
|
|
},
|
|
|
|
initList: function(where) {
|
|
var that = this,
|
|
paramsIter = 2,
|
|
rows = $('[data-product-id]');
|
|
|
|
$.getJSON(this.prepareRequest(rows), function(data) {
|
|
if (data.products[0].product != null) {
|
|
that.prepareData(data.products[0].product);
|
|
|
|
rows.each(function() {
|
|
var id = $(this).data('product-id');
|
|
if (typeof that.widgets[id] !== 'undefined' && that.widgets[id].wg.ckrk >= 50) {
|
|
var col = $(this).find('.productListingParams');
|
|
var paramsWrap = col.find('.params');
|
|
var widget = that.createWidget(that.widgets[id], where);
|
|
var params = paramsWrap.find('.paramEntry');
|
|
|
|
paramsIter = (where === 'listing') ? 3 : paramsIter;
|
|
params.slice(paramsIter, params.length).hide();
|
|
if (where === 'listing') {
|
|
paramsWrap.after(widget);
|
|
} else {
|
|
paramsWrap.before(widget);
|
|
}
|
|
widget.slideDown();
|
|
}
|
|
});
|
|
}
|
|
});
|
|
},
|
|
|
|
initSingle: function() {
|
|
var that = this,
|
|
wrap = $('[data-product-id]');
|
|
|
|
$.getJSON(this.prepareRequest(wrap), function(data) {
|
|
if (data.products[0].product != null) {
|
|
that.prepareData(data.products[0].product);
|
|
|
|
var id = wrap.data('product-id');
|
|
|
|
if (typeof that.widgets[id] !== 'undefined' && that.widgets[id].wg.ckrk >= 50) {
|
|
var widget = that.createWidget(that.widgets[id], 'show-item');
|
|
wrap.find('.productParams').filter(':first').find('td').filter(':first').prepend(widget);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
var widget = new ckWidget(jQuery);
|
|
widget.initList('listing');
|
|
|
|
|
|
$j(function(){
|
|
$j('.seoTxtContainer').click(function(e) {
|
|
var el = $j(this),
|
|
curHeight = el.height(),
|
|
autoHeight = el.css('height', 'auto').height();
|
|
|
|
if(el.hasClass('seoBoxExpanded') === false){
|
|
el.height(curHeight).animate({
|
|
height: autoHeight
|
|
}, "slow" );
|
|
el.addClass('seoBoxExpanded');
|
|
}else{
|
|
el.height(autoHeight).animate({
|
|
height: "240px"
|
|
}, "slow" );
|
|
el.removeClass('seoBoxExpanded');
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
(function ($) {
|
|
var fsHelptipContent = '<a href="https://web.archive.org/web/20120904144913/http://uslugi.allegro.pl/wg/" target="_blank">Wysyłka Gratis</a> to co najmniej jedna darmowa opcja dostawy zakupionego przedmiotu. W ten sposób wygodniej dokonasz transakcji. Bez dodatkowych kosztów!',
|
|
asHelptipContent = '<a href="https://web.archive.org/web/20120904144913/http://uslugi.allegro.pl/sa/" target="_blank">Standard Allegro</a> to gwarancja udanej transakcji. Oznacza najwyższą jakość obsługi klienta. O wyróżnieniu oferty w ten sposób decydują nasze określone kryteria oraz opinie kupujących.';
|
|
|
|
if (fsHelptipContent !== '') {
|
|
$('.itemFS')
|
|
.addClass('cursorHelp')
|
|
.helptip({
|
|
event: 'hover',
|
|
hoverDelay: 250,
|
|
pos: 't',
|
|
closeClick: true,
|
|
body: fsHelptipContent
|
|
});
|
|
}
|
|
if (asHelptipContent !== '') {
|
|
$('span.itemAS')
|
|
.addClass('cursorHelp')
|
|
.helptip({
|
|
event: 'hover',
|
|
hoverDelay: 250,
|
|
pos: 't',
|
|
closeClick: true,
|
|
body: asHelptipContent
|
|
});
|
|
$('span.siIcoAS')
|
|
.addClass('cursorHelp')
|
|
.helptip({
|
|
event: 'hover',
|
|
hoverDelay: 250,
|
|
pos: 't',
|
|
closeClick: true,
|
|
body: asHelptipContent
|
|
});
|
|
}
|
|
})(jQuery);
|
|
|
|
$j("a[rel=external]").attr("target","_blank");
|
|
if(typeof ado!=="object"){ado={};ado.config=ado.preview=ado.placement=ado.master=ado.slave=function(){};}
|
|
ado.config({mode: "new", xml: false, characterEncoding: true});
|
|
|
|
</script> </body>
|
|
</html> |