#780674: Patch by hutch modified by frjo to make it easy to add support for colorbox in imagepicker and other modules.