Animated gif's - reload on scene change

I use jQuery to re-play animated gif’s when loading a scene and going back to scene. Code below reloads gif but does it twice. In effect animated gif is being reloaded twice during scene animation. Tried $(window).load but that doesn’t work at all. Help :wink:

<img id="eighty" src="VP.hyperesources/blank.png" width="200" height="200" />
            <script type="text/javascript">
                $(document).ready(function () {
                    $("#eighty").attr("src", "VP.hyperesources/animated.gif?" + Math.random());

This thread may help you work something out