} function toggleShipping(evt) { if ($('.shippingWrapper form:visible').length) { $('.shippingWrapper form').hide(); $('.shippingOpenLink').show(); } else { $('.shippingWrapper form').show(); $('.shippingOpenLink').hide();	} } $(document).ready(function() { getVideoImages(); $(document).on('click','.videoPreview',showVideo); $(document).on('click','.enquiry',function() { $('#itemEnquiryLink').click(); document.getElementById('itemEnquiryForm').scrollIntoView({behavior:'smooth',block: "start", inline: "nearest"}); }); $('.gallery').featherlightGallery(); $('#mainImg').imagesLoaded(function() { var i = new Image(); var origImg = document.getElementById('itemMainImage'); if (origImg) { i.src = origImg.src; if (i.width < $('.itemMainImage').width()) { $('#itemImage').width(i.width); var w = 270; if (i.width > 270) { w = i.width; } $('#itemLHS').css('flex','0 0 '+w+'px'); } } else { $('#itemLHS').remove();	} }); });	