Adding Custom JS to CKEditor
You can edit/add CKEditor settings by implementing hook_wysiwyg_editor_settings_alter(), see Allow configuration of advanced editor settings - comment #52 and later comments for examples.

If you want your own script to run after CKEditor has loaded, maybe How to attach Javascript to a form so that it loads AFTER CKEditor can help you.