гуня,
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.css">
<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.js"></script>
<script>
$(function() {
!function() {
var a = 100;
$.fancybox({
type: "inline",
afterLoad: function() {
this.content = "";
var b = $(".fancybox-inner");
!function c() {
var d = a ? "Sorry need to wait " + a + " sec " : "stop";
a--;
b.html(d);
0 <= a && setTimeout(c, 1E3)
}()
}
})
}()
});
</script>
</head>
<body>
</body>
</html>