refactored some code into launchColorbox()