I want you to act as a web developer and please write some code for me to create a lightbox effect for the images on the website.
I want you to act as a web developer and please write some code for me to create a lightbox effect for the images on the website. Enable/disable animation: When opened: The image should “inflate” from its thumbnail position to its final location (with a zoom animation), accompanied by a fade-in effect for the mask layer. This requires obtaining the position of the thumbnail using the `getBoundingClientRect()` method. When closed: The animation plays in reverse, and the image shrinks back to its thumbnail size. Animations require the use of transform and transition to achieve a smooth 60fps. Navigation features: If a page contains multiple lightbox images, support for “Previous” and “Next” buttons should be provided. Use the keyboard arrow keys (left/right arrows) to switch between images.