<script type="text/javascript"> $(document).ready(function() { $(".fancybox").fancybox({ type:"image" }); }); </script>