the code works i have tested... look what i have and see if you have some sintaxis error:
first:
<script type="text/javascript">
var sTargetURL = "
http://www.google.com/";
function doRedirect()
{
setTimeout( "timedRedirect()", 5*1000 );
}
function timedRedirect()
{
window.location.href = sTargetURL;
}
</script>
then on document ready:
<script type="text/javascript">
$(document).ready(function(){$("a.fancy").fancybox({'type': 'iframe', 'height':400, 'width':550, 'autoScale': false, 'autoDimensions': false, 'padding':0, 'margin':0, 'overlayOpacity':0, 'overlayColor':'#000', 'opacity': true, 'onClosed':function(){doRedirect();}
});// end of fancybox function
});// end of ready function
</script>