Calling a function outside of .js file, can it be done?

Calling a function outside of .js file, can it be done?

In my index file I have global.js sourced into the head, which contains the following function.

function gotoShop() {
   
   currentPage = "shop";
   
   checkMenu();
   
   $('div#holder').scrollTo({top:'0px', left:'2860px'}, scrollSpeed);
   return false;
   
}


I'm trying to call this function from the index file by using (with script tags) :

$(document).ready(function(){

   gotoShop();

});


But it doesn't work, the function works fine when called inside the global.js file, so basically how can I call it outside?