I am sure many of you are members of Facebook and have seen how YouTube videos are embedded when a YouTube link is posted. What Facebook does is it generates a thumbnail of the video that can be clicked on to swap out the image and load the video in its place. This happens without any page refresh.

My questions is: Can this be done with JQuery? It seems that some nifty AJAX methods are being used, and I am wondering if it is possible to replicate this effect with the extremely popular JQuery library.