if (typeof cls_InovaDiamonds_Iframe === 'undefined') {
class InovaDiamonds_Iframe {
Get_Info_Product(Request_From) {
//
//
var o_Grid = document.getElementsByClassName('ProductListWrapper');
if (o_Grid) {
o_Grid = o_Grid[0]
var ar = o_Grid.getElementsByClassName('Grid__Cell Grid__Cell--item');
if (ar.length == 0) {
cls_InovaDiamonds_Iframe.User_Ring = (meta.product.id + '');
}
else{
cls_InovaDiamonds_Iframe.User_Ring = '';
cls_InovaDiamonds_Iframe.Mode = 'list';
for (var i = 0; i < ar.length; i++) {
var ar_A = ar[i].getElementsByClassName('wishlist-button')[0];
if (ar_A) {
var SKU = ar_A.getAttribute('data-product-id');
cls_InovaDiamonds_Iframe.User_Ring += ',' + SKU;
}
}
}
}
else {
cls_InovaDiamonds_Iframe.User_Ring = (meta.product.id + '');
}
}
Print_Buttons(data, type_prod){
var _View = '';
//
_View = 'block'
if (cls_InovaDiamonds_Iframe.Mode == 'list') {
//if (document.location.href.indexOf('mode=view') > 0) {
var SVG = ''
var ar_data = data.split(',');
var o_Grid = document.getElementsByClassName('ProductListWrapper')[0];
var ar = o_Grid.getElementsByClassName('Grid__Cell Grid__Cell--item');
var scr = document.createElement('STYLE')
var st_st = '.im_try{font-size:0px;position:absolute;z-index:19;cursor:pointer;}.im_try img{width:100%}'
if (cls_InovaDiamonds_Iframe.WA___Flag_Mobile == '1') {
st_st += '.im_try{width:22px;right:10px;top:10px;}'
}
else {
st_st += '.im_try{width:82.8px;right:10px;top:8px;} .vto_l{font-size: 11px;color:#707070;padding:2px 7px;font-weight:300;letter-spacing:.1em;font-family: var(--heading-font-family)}'
}
scr.innerHTML = st_st;
for (var i = 0; i < ar.length; i++) {
var aa = ar[i].getElementsByClassName('ProductItem__Wrapper')
if (aa.length > 0) {
var ar_A = ar[i].getElementsByClassName('wishlist-button')[0];
if (ar_A) {
var SKU = ar_A.getAttribute('data-product-id');
for (var j = 0; j < ar_data.length; j++) {
var ar_i = ar_data[j].split('-');
if (ar_i[0] == SKU) {
if (ar_i[2] == '1') {
var o = document.createElement('DIV')
o.setAttribute('onclick', 'cls_InovaDiamonds_Iframe.Show_Ring("' + SKU + '","","")');
o.setAttribute('class', 'im_try')
if (cls_InovaDiamonds_Iframe.WA___Flag_Mobile == '1') {
if (aa[0].getElementsByClassName('ProductItem__CompareButton').length > 0){
o.style.top = (ar[i].getElementsByClassName('ProductItem__ImageWrapper')[0].clientHeight - 32) + 'px'
o.style.left = '13px'
}
o.innerHTML = SVG.replace(/WWW/g, '22')
}
else {
if (aa[0].getElementsByClassName('ProductItem__CompareButton').length > 0){
o.style.top = '77px'
o.style.right = '13px'
}
o.innerHTML = '
TRY ON
' + SVG.replace(/WWW/g, '20') + '
';
}
aa[0].appendChild(o)
}
}
}
}
}
}
o_Grid.appendChild(scr)
//}
}
else {
var icon = '';
if (cls_InovaDiamonds_Iframe.WA___Flag_Mobile == 1) {
var ar = document.getElementsByClassName('Product__SlideshowNavScroller')
if (ar.length > 0) {
var A = document.createElement('DIV')
var st_1 = 'left:20px;top:26px;';
if (ar[0].style.display == 'none') {
st_1 = 'left:0px;width:100%;bottom:-14px;'
}
A.setAttribute('style', 'z-index:333;position:absolute;' + st_1 + '')
A.innerHTML = '
'
+ '
' + icon.replace(/HHH/g, '27') + '
TRY ON
'
var o = document.getElementsByClassName('Product__Gallery--withThumbnails')[0]
o.appendChild(A)
}
else {
var A = document.createElement('DIV')
A.setAttribute('style', 'z-index:333;position:absolute;left:25px;top:25px;')
A.innerHTML = '
'
+ '
' + icon.replace(/HHH/g, '27') + '
TRY ON
'
document.getElementsByClassName('flickity-viewport')[0].appendChild(A)
}
}
else {
var o = document.getElementsByClassName('Product__SlideshowNavScroller')[0]
var A = document.createElement('A')
A.setAttribute('onclick', 'return(false)')
A.setAttribute('class', 'Product__SlideshowNavImage AspectRatio')
A.innerHTML = ''
+ '