6301t_store_popup_updateLazyLoad();6302}6303}63046305function t_store_prodPopup_gallery_calcMaxThumbsCount(columnSize, galleryImageRatio, thumbSize, marginBetweenThumbs) {6306var columnWidth = t_store_getColumnWidth(columnSize);6307var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;63086309// hack for popup columns6310if (windowWidth >= 960 && windowWidth <= 1240) {6311columnWidth = 440;6312
} var mainImageHeightPercent = Math.floor(galleryImageRatio * 100); var mainImageHeight = Math.floor( (mainImageHeightPercent * (columnWidth - (thumbSize + marginBetweenThumbs))) / 100 ); var maxPreviewsCount = Math.floor(mainImageHeight / (thumbSize + marginBetweenThumbs)); if ((thumbSize + marginBetweenThumbs) * (maxPreviewsCount + 1) - marginBetweenThumbs <= mainImageHeight) { maxPreviewsCount += 1; } return maxPreviewsCount;}function t_store_get_productcard_slider_html(rec, options) { var str = ''; var animationduration = 't-slds_animated-none'; var animationspeed = '300'; if (options.slider_opts.anim_speed === 'fast') { animationduration = 't-slds_animated-fast'; } if (options.slider_opts.anim_speed === 'slow') { animationduration = 't-slds_animated-slow'; animationspeed = '500'; } var thumbsbulletsWithGallerClass = ''; var hasThumbs = options.slider_opts.controls === 'thumbs' || options.slider_opts.controls === 'arrowsthumbs'; if (hasThumbs && options.sliderthumbsside === 'l') { thumbsbulletsWithGallerClass = 't-slds__thumbsbullets-with-gallery'; } str += '<div class="t-slds ' + thumbsbulletsWithGallerClass + '" style="visibility: hidden;">'; str += ' <div class="t-slds__main">'; str += ' <div class="t-slds__container" [[containerStyles]]>'; str += ' <div class="t-slds__items-wrapper ' + animationduration + ' [[noCycleClass]]" data-slider-transition="' + animationspeed + '" data-slider-with-cycle="[[isCycled]]" data-slider-correct-height="true" data-auto-correct-mobile-width="false">'; str += ' [[slides]]'; str += ' </div>'; str += ' [[arrows]]'; str += ' </div>'; str += ' </div>'; str += ' [[bullets]]'; str += '</div>'; if ( options.slider_opts.controls === 'arrows' || options.slider_opts.controls === 'arrowsthumbs' || options.slider_opts.controls === '' ) { var arrowsTplEl = rec.querySelector('.js-store-tpl-slider-arrows'); var arrowsTpl = arrowsTplEl.innerHTML; var arrowsWrapperClass = 't-slds__arrow_container ' + (options.slider_opts.cycle === '' ? 't-slds__nocycle' : ''); arrowsTpl = '<div class="' + arrowsWrapperClass + '">' + arrowsTpl + '</div>'; str = str.replace('[[arrows]]', arrowsTpl); } else { str = str.replace('[[arrows]]', ''); } if (options.slider_opts.controls === 'thumbs' || options.slider_opts.controls === 'arrowsthumbs') { var tpl = '<div class="t-slds__thumbsbullet-wrapper ' + (options.slider_slidesOpts.bgsize === 'contain' ? 't-align_center' : '') + '">[[bullets]]</div>'; str = str.replace('[[bullets]]', tpl); } else if (options.slider_opts.controls === 'dots' || options.slider_opts.controls === '') { str = str.replace('[[bullets]]', '<div class="t-slds__bullet_wrapper">[[bullets]]</div>'); } else { str = str.replace('[[bullets]]', ''); } str = str .replace( '[[containerStyles]]', options.slider_opts.bgcolor ? 'style="background-color:' + options.slider_opts.bgcolor + ';"' : '' ) .replace('[[noCycleClass]]', options.slider_opts.cycle ? '' : 't-slds__nocycle') .replace('[[isCycled]]', options.slider_opts.cycle ? 'true' : 'false'); return str;