add expect fancybox function