Reorder scripts loading for display popups with videos