Thumbnail click -> lightbox
<script>
$('.p-thumbnail').click(function() {
setTimeout(
function() {
$('.p-main-image').trigger('click');
}, 50);
});
</script>
<script>
$('.p-thumbnail').click(function() {
setTimeout(
function() {
$('.p-main-image').trigger('click');
}, 50);
});
</script>