<style>
.t410__col {margin: 0;}
div[class*="glzero_"]{
cursor:pointer;
border-radius: 50%;
transition:all 0.2s linear;
filter: grayscale(1);
}
div.active-gl{
box-shadow: 0 0 7px 0px #616161;
transform: rotateY(180deg);
filter: grayscale(0);
}
div[class*="glzero_"]:not(.active-gl):hover {
transform: scale(0.9);
}
.glhide {
opacity: 0!important;
min-height: 0!important;
max-height: 0!important;
pointer-events: none!important;
padding-top: 0 !important;
padding-bottom: 0 !important;
overflow: hidden !important;
}
</style>
<script>
$(document).ready(function(){
//Прописываем наши ID
let gl09ID = ['#rec289281234','#rec289280748','#rec289279716'];
$.each(gl09ID,function(index,value){
$(value).appendTo('.before-after-zero .tn-atom');
});
$('.glzero_1').addClass('active-gl');
$('.before-after-zero').find('.t-rec').not(':first').addClass("glhide");
$('div[class*="glzero_"]').click(function(){
if (!$(this).hasClass('active-gl') ){
let blockZeroGl = $(this).closest('.t-rec');
let glBtn = blockZeroGl.find('div[class*="glzero_"]').length;
let className = $(this).attr('class');
let glbtNum;
for (let i=1; i<glBtn+1;i++){
let contain = className.includes('glzero_'+i);
if (contain) glbtNum=i;
};
blockZeroGl.find('.before-after-zero').find('.t-rec').addClass("glhide");
blockZeroGl.find('.before-after-zero').find('.t-rec:eq('+(glbtNum-1)+')').removeClass("glhide");
blockZeroGl.find('div[class*="glzero_"]').removeClass('active-gl');
$(this).addClass('active-gl');
$('.t410').trigger('displayChanged');
window.dispatchEvent(new Event('resize'));
};
});
$(window).resize(function() {clearTimeout(window.resizedFinished); window.resizedFinished = setTimeout(function(){ $('.t410').trigger('displayChanged')}, 1000);});
});
</script>