0){
$('.clrLbl').text(colorName);
}
var selectedProduct = productInformation[key]['product']['handle'];
windowLoadFunctionCustom(selectedProduct);
// Example of rendering a specific product to a page that doesn't provide the productId in the DOM
window.ReChargeWidget.createWidget({ productId: productId , injectionParent: '.recharge-parent-class' });
setTimeout(function(){
if (GlobalE.Country != "US"){
$(".rc-container-wrapper").remove();
$(".rc_container").css("display","none");
$(".recharge-parent-class").html("");
}
else{
$(".recharge-parent-class").css("display","block");
}
if($("#rc-checkbox__1").length > 0){
$("#rc-checkbox__1").click(function(){
if($(this).prop("checked") == true){
$(".pdp-klarna-msg ").css("display","none");
}
else{
$(".pdp-klarna-msg ").css("display","");
}
});
}
}, 500);
// Change title and Url after js file load
var obj = { title: productInformation[key]['product']['handle'], url: productInformation[key]['product']['handle'] };
window.history.replaceState({}, '', obj.url);
document.title = productInformation[key]['product']['title'] + " - " + 'James Perse Los Angeles' ;
// for display selected product highlited
$("."+productId).addClass("active");
// Change for breadcrumb detail
$(".tt-breadcrumb li:nth-child(2) span").html(productInformation[key]['product']['title']);
$('.custom-wishlist-button').attr("data-swaction" , "addToWishlist");
if($(window).width() >= 576){
_swat.initializeActionButtons('.product-images-static');
}
/*
//$('#swym-'+productId).attr("data-with-epi" , true);
$('.custom-wishlist-button').attr("data-product-id" , JSON.stringify(productId));
$('.custom-wishlist-button').attr("data-product-url" , 'https://www.jamesperse.com/products/vintage-french-terry-sweatpant-heather-grey');
//$('#swym-'+productId).removeClass("swym-add-to-wishlist-view-product product_6049310572708");
// $('#swym-'+productId).addClass("swym-add-to-wishlist-view-product product_6049310572708");
// $('#swym-'+productId).addClass("swym-icon");
//$('#swym-'+productId).addClass("swym-heart swym-loaded");
$('.custom-wishlist-button').attr("aria-label" ,"Add to Wishlist");
//window._swat.initializeActionButtons('.product_tabs', '#btn-'+productId);
*/
break;
}
}
}
var tags = productInformation[key]['product'].tags;
var styleText = '';
for( tagIndex in tags){
if(tags[tagIndex].includes("style")){
var arrTagName = tags[tagIndex].split("-");
styleText = "
• Style: "+ arrTagName[1] +"
"
}
}
//$(".product_desc_outer .desc_content:nth-child(4)").find("p:nth-child(1)").html(styleText);
$('.zoom-product').each(function(){
var zoomImage = $(this);
//console.log(image);
var zoomConfig = {zoomType : "inner", cursor: "crosshair"};
var zoomActive = false;
// Remove old instance od EZ
$('.zoomContainer').remove();
zoomImage.removeData('elevateZoom');
// Update source for images
zoomImage.attr('src', $(this).data('image'));
zoomImage.data('zoom-image', $(this).data('zoom-product'));
// Reinitialize EZ
zoomImage.elevateZoom(zoomConfig);
});
var ttwindowWidth = window.innerWidth || $window.width();
var $ttPageContent = $('#tt-pageContent'),
blocks = {
ttCollapseBlock: $('.tt-collapse-block'),
ttAirSticky: $ttPageContent.find('.airSticky'),
ttInputCounter: $('.tt-input-counter'),
ttMobileProductSlider: $('.tt-mobile-product-slider'),
}
var airStickyObj = blocks.ttAirSticky,
tabObj = blocks.ttCollapseBlock.find('.tt-collapse-title');
if(ttwindowWidth >= 1024){
airStickyObj.airStickyBlock({
debug: false,
stopBlock: '.airSticky_stop-block',
offsetTop: 70,