javascript fancy box
===

    <div style="display: none;" id="example"></div>
    <script>
    $(document).ready(function(){
       var dialogOpts = {
		modal: true,
		bgiframe: true,
		autoOpen: false,
		height: 415,
		width: 715,
		draggable: true,
		resizeable: true,
	};
     $("#example").dialog(dialogOpts);
	$('[id^=p_]').click(function(){
	   id = this.id.split('_');
	   id = id[1];
 	   $('#example').load('ajax.php?id='+id);
   	   $('#example').dialog('open');
	   return false;
	});
	    
      });
     </script>

What changes I have to make if I want to open fancybox instead of dialogue box.
Thanks in advance.