Reusing functions that are loaded in a separate script file. How to exactly?

Reusing functions that are loaded in a separate script file. How to exactly?

Hello.

So, in my main script, I have this:

;$(document).ready( function () {

      function doSomething(){

      }

});

Then, a load another script for a particular page.

I do this again:
;$(document).ready( function () { 

      //but here, I cannot run doSomething();

}

Is there a simple way to access the function in the second script? Do I need to somehow extend the jQuery class and add my function there? This is probably simple, but I haven't needed to do it before, because I've always just used one script. Any help would be greatly appreciated. Thank you.