Step 1
Load facebox
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="src/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
Step 2
Writing th efunction tp pop up an image with a link on page load
<script language="javascript">
$(document).ready(function() {
$.facebox.settings.opacity = 0.9;
$('a[rel*=facebox]').facebox();
$.facebox('<a href="http://abc.lk" target="blank"><img src="src/offer.jpg"></a>');
});
</script>