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 (geoLocationCode != "US"){
$(".rc-container-wrapper").remove();
$(".rc_container").css("display","none");
$(".recharge-parent-class").html("");
}
else{
$(".recharge-parent-class").css("display","block");
if( $('.recharge-parent-class').find('.rc_container_wrapper:visible').length > 0 ){
if( $('.shopify-product-form .rc_container_wrapper.rc_container_wrapper:visible').length > 1 ){
$('.recharge-parent-class').css('display', 'none');
}
}
}
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-black');
//$('#swym-'+productId).removeClass("swym-add-to-wishlist-view-product product_6049307689124");
// $('#swym-'+productId).addClass("swym-add-to-wishlist-view-product product_6049307689124");
// $('#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] +"
"
}
}
/* Display Style Dynamically on Color Swithc - Start */
$('.product_desc_outer .desc_content p').each(function(){
var htmlStyleInfor = $(this).html();