NXP-13913: reorganize lighbox js initialization