Studyon Minte9.com
jQuery




Overlay (fancybox)



<script type="text/javascript" src="jquery-latest.js"></script>
<script type="text/javascript" src="jqueryui-min.js"></script>
<link href="jqueryui.css" media="screen" rel="stylesheet" type="text/css" />

<link href="fancybox/jquery.fancybox-1.3.2.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="fancybox/jquery.fancybox-1.3.2.js"></script>

1) On dom ready

         <script type="text/javascript">
                  $(document).ready(function() {
                           $("#hidden_link").fancybox().trigger('click');
                  );
         </script>


2) On click

         <a href='javascript:void(0)' 
                onClick="$('#overlay_1').fancybox({'hideOnOverlayClick':false, 'hideOnContentClick':false}).
                trigger('click');">
                Open
         </a>
         <p style="display: none;">
               <a id="overlay_1" href="<?php echo base_url(); ?>index.php/offer"></a>
         </p>


http://stackoverflow.com/questions/807271/how-to-launch-jquery-fancybox-on-page-load