$("a[rel='fancybox']").fancybox({ openEffect: "none", closeEffect: "none", tpl: { error: '<p class="fancybox-error"><img src="/images/no-image.png"></p>' } });