added fancybox gem and cleaned up code