put all js into a callable function, allowing multiple centerstage containers