Dárky
k nákupu<\/div><\/li>");
if (typeof(localStorage) !== 'undefined' && localStorage !== null) {
var previousAuthState = localStorage.getItem('auth_state');
localStorage.setItem('auth_state', '0');
if (previousAuthState === '1') {
window.dispatchEvent(new Event('auth-state-change'));
}
}
});
var productAsGiftAvailable = "none";
var productAsGiftSkus = [];
var productAsGiftButtonText = "";
var showMcPriceBox = false;
$(document).ready(function() {
if (productAsGiftAvailable=='all') {
$('.product-as-gift-trigger').text(productAsGiftButtonText);
$('.result-list-products__cart-link-half__gift').css('display', 'inline-block');
$('.product-as-gift-trigger').show().css('display', 'inline-block');
var cartButton = $('.result-list-products__cart-link');
cartButton.removeClass('cross-sell__cart-link').addClass('cross-sell__cart-link-half');
cartButton.removeClass('result-list-products__cart-link').addClass('result-list-products__cart-link-half');
$('a.result-list-products__modal-link.md-trigger').attr('data-showproductasgift',"1");
$('a.result-list-products__cart-link--color.md-trigger').attr('data-showproductasgift',"1");
} else if (productAsGiftAvailable=='skus') {
$('.product-as-gift-trigger').text(productAsGiftButtonText);
$.ajax({
'type': 'POST',
'url': '/cart/getparams/param/prodgiftskus/r/0',
}).success(function(response) {
productAsGiftSkus = response.skus;
var sku;
for(i in productAsGiftSkus) {
sku = productAsGiftSkus[i];
$('.js-prodgift-'+sku).css('display', 'inline-block');
$('.js-prodgift-'+sku).show();
var cartButton = $('.js-add-'+sku);
cartButton.removeClass('cross-sell__cart-link').addClass('cross-sell__cart-link-half');
cartButton.removeClass('result-list-products__cart-link').addClass('result-list-products__cart-link-half');
}
});
} else {
$('.product-as-gift-trigger').hide();
var cartButton = $('.result-list-products__cart-link-half');
cartButton.removeClass('result-list-products__cart-link-half').addClass('result-list-products__cart-link');
}
if (showMcPriceBox) {
$('.product-overview__inside-bottom').show();
}
});
try {
} catch (e) {
console.error('Optional /cartmini/show script failed:', e);
}