You can put link like this (it will be hidden. May be before </body>
)
<a id="clickbanner" href="image.jpg" rel="gallery"></a>
And working rel attribute or class like this
$(document).ready(function() {
$("a[rel=gallery]").fancybox({
openEffect : 'elastic',
closeEffect : 'elastic',
maxWidth : 800,
maxHeight : 600
});
});
Just do it with jquery trigger function
$( window ).load(function() {
$("#clickbanner").trigger('click');
});