$(document).ready(function() {
LS.registerOnChangeVariant(function(variant){
// this is used on quick shop modals
var current_image = $('img', '#quick'+variant.product_id);
current_image.attr('src', variant.image_url);
// this is used on single product view
$(".cloud-zoom-gallery[data-image="+variant.image+"] > img").click();
});
})