made links named, and added link open/close events