I was looking to do the same thing. I want to use the SmartMenu on 100s of pages, but I wanted to maintain only one file with the menu bar as it changes from time to time.
You are right, this is a question of timing for loading the external file.
After fiddling around a little bit, here is the code that works. It basically wait for the content to be inserted/loaded before initiating the menu. Therefore it should work.
Replace the initial code to initiate the SmartMenus:
With this code which will load the file /YourMenuFile.html and then once completed, will initiate the smartmenus and only then.