Recently I was given a task to make LightBox and VideoBox work on same page, where we have Images and Video to show. However, Videobox is inspired by Lightbox as per developer, they are not compatible with each other. The reason I found is that they share few variable and hence they are breaking each other’s code. Now since we need functionality to be done, I have give to find a quick alternative solution..When my company said quick solution they mean a solution in next 1 hr.
Let us check what we can do..Lightbox, read image tag with a tag and show image based on those, and this is what Videobox do, it read for “rel=vidbox” in anchor tag, and then it detect the type of video source to display the item in bigger div. What I do is I modify it to recognize images as well, i.e. if we put rel=”vidbox” in anchor tag for your images, (something we do in lightbox) my modified VideoBox code will read and check for extension jpg, jpeg, gif,png and if found i write “custom code” in variable this.other to show img tag instead of SWFObject or other.
Now VideoBox is no more a video only box, and it can handle Images for me as well :).
Download modified VideoBox Code