Responsive layouts cause javascript to run again

Hype does animation too!

If you were using the timelines within Hype, you could run this function on Layout Load + Unload: Howto: Synchronize timelines across layouts

But perhaps for your case you want to look at whether the layout has been loaded and then run whatever initialization scripts you need only if the layout has not yet been loaded (or an array of layouts have not been seen). What types of things are happening on Layout Load in your document? Can you share an example Hype file or URL?