Weakly connected oscillatory networks as assoclative and dynamic memories