Do you have <a> with class="fancybox" and rel="fancyvideo" ? If you do this, you will bind Fancybox to these elements twice, and Fancybox may not like it. Try using this:
$("a.fancybox").fancybox({ 'hideOnContentClick': true });
And look what happens to only the second in place.
UPDATE : weird. The demo (http://chadly.net/demos/video-lightbox.html) creates different HTML files than your page, the demo creates <object data=...> , but yours creates <object><embed src="youtube-url"> thing. You speak:
type: 'swf'
in your Fancybox binding where the <object><embed>...</embed></object> stuff comes from. However, href points to the plain old YouTube watch page for YouTube and that href ends up as an src attribute for <embed> . The URL for embedding a YouTube video does not match the HTML video page and is probably the source of your problem.
Try replacing href , which looks like this:
http:
with such as this:
http:
The first is a simple HTML page for YouTube, the second is an embedded SWF.
UPDATE 2 . The example that you work for Fancybox 1.0.0, but you are using 1.3.4, 1.0.0, there are special checks for YouTube that are not available in later versions:
//... } else if (url.match(/youtube\.com\/watch/i)) { //...
Which of 1.0.0 and the code after that else if rewrites the URL of the HTML page (for example, http://www.youtube.com/watch?v=QmVvgSfdmJQ ) to the old embedded SWF URL (for example, http://www.youtube.com/v/QmVvgSfdmJQ ). This version issue also explains why the demo created different HTML files than yours.
So, you have version issues on top of everything else.
mu is too short
source share