You need:
jQuery
jQuery Fancybox plug in
jQuery cookies plug in
Code: Select all
<__script__ type="text/javascript">
function popup() {
var COOKIE_NAME = 'supercookie';
if($.cookie(COOKIE_NAME) != 'active') {
$.cookie(COOKIE_NAME, 'active', { expires: 7 });
$("a.fancybox").trigger("click");
}
}
$(document).ready(function(){
$("a.fancybox").fancybox({
'overlayOpacity' : 0.8,
'autoScale' : false,
'overlayColor' : 'black',
'overlayShow' : true
});
$('#s1').cycle('fade');
});
</__script>
Next you need to create a link within your page for the .trigger (click)
I couldnt get it to work without the link on the page but if you figure out a way round it let me know

and then finally
Code: Select all
</__body onload="popup()">