You are loading two different jQuery resources:
Which never is a good practice.
Try to deactivate MegaMenu's jQuery loading somewhere in its preferences / configuration.
Also you might want to run jQuery.noConflict since there might be some other frameworks (such as MooTools etc.) that are occupying the
$-shorthand for jQuery. When visiting you website I figured that other jQuery calls are throwing "... is not a function" error.
You could also try to open the fancybox-overlay with a
jQuery('a > img').fancybox(); instead of
$('a > img').fancybox(); ($ = shorthand for 'jQuery').
Nevertheless a code sample or a link to a page where you use fancybox would be helpul.
After I dug a little deeper into your code:
I am not sure why you are using such a large, complex JS-function to manipulate the fancybox-relevant links, image urls, and stuff (
function _SmQuickView()). This makes it pretty hard to debug since fancybox actually is just a one-liner. Also the
afterShow dependencies could probably be handled easier - if they would have to at all, but I'm not sure what you're up to with this.
I tried to scale browser down to mobile size and made the
.yt-product-detail . popup-btn visible. And then fancybox using the icon link just works fine.