I take it you are trying to bind a click event to the button in the following line:
$("#dialog").html("<img src='" + $(this).next().find('img').attr('src') + "' width='150' + height='150'>"+"<label>"+"<br/>"+ $(this).next().find('img').attr('price')+"<br/>"+"</label>"+"<label>"+$(this).next().find('img').attr('desc')+"</label>"+"<br />"+"<input type='button' value='@(Model.ProductPrice.AvailableForPreOrder ? T("ShoppingCart.PreOrder") : T("ShoppingCart.AddToCart"))' class='button-2 product-box-add-to-cart-button' onclick= (a)/>");
You can do this by after the line that inserts the button into the dom (ie anywhere below the above line):
$("#dialog").find('.product-box-add-to-cart-button').on('click', function() {});