document.addEventListener('DOMContentLoaded',function(){const images=document.querySelectorAll('#thumbs img');const input=document.getElementById('ptpian_theme');images.forEach(function(img){img.addEventListener('click',function(){const index=img.getAttribute('data-index');input.value='thumb'+index+'.png';images.forEach(i=>i.classList.remove('hover'));img.classList.add('hover')})})})