Load a modal entirely from JS

BB product pages use JS to create and append modal to page using settings from a non loaded modal.

Create empty modal to theme and apply settings to.

Load the modal like so

$(document).on(‘click’, ‘.product .panel-preview .button’, function(e){
var $this = $(this);
e.preventDefault();
e.stopPropagation();
if(!$(‘#eModal-Panel-Preview’).length)
{
var modal = $(‘