Finally sorted the on before unload bit around captions...