
            // Add event listeners to the container of this animation element
            // Mouse over event
            //            parent.addEventListener("mouseover", function () {
            //                enterAnim(anims[idx], false)
            //            }, false);
            //            // Mouse down event
            //            parent.addEventListener("mousedown", function () {
            //                playAnim(anims[idx], false)
            //            }, false);
        });
        animList.push(thisAnim); // Add the loaded animation to the animList array
    }
    return animList;
}

function enterAnim(anim, loop) {
    if (anim.isPaused) {
        anim.loop = loop;
        anim.playSegments([0, 120], true);
    }
}

function exitAnim(anim) {
    if (anim.isPaused) {
        anim.loop = false;
        anim.playSegments([180, 210], false);
    }
}

function pauseAnim(anim) {
    if (!anim.isPaused) {
        anim.loop = false;
    }
}
