var $this = this;
var links = $(container).find(".link a.displayArea");
- $(links).each(function () {
- var delay = $(this).data('blinkdelay');
- if (delay === undefined || delay === null) {
- delay = 0;
- } else {
- delay = parseInt(delay);
- }
- var e = this;
-
- setTimeout(function () {
- $(e).addClass('animating').css('opacity', 1);
- TweenMax.to(e, $this.fluidbook.datas.linkBlinkTime, {
- opacity: 0, delay: .1, onComplete: function () {
- $(e).removeClass('animating').css('opacity', 1)
- }
- });
- }, delay + additionalDelay);
- });
+ if (!this.fluidbook.mobilefirst.enabled) {
+ $(links).each(function () {
+ $this.animateLink(this, additionalDelay);
+ });
+ }
if (animateBookmarks) {
}
},
+ animateLink: function (link, additionalDelay) {
+ var $this = this;
+ if (!$(link).is('.displayArea')) {
+ link = $(link).find('.displayArea');
+ }
+ if (additionalDelay === undefined) {
+ additionalDelay = 0;
+ }
+ var delay = $(link).data('blinkdelay');
+ if (delay === undefined || delay === null) {
+ delay = 0;
+ } else {
+ delay = parseInt(delay);
+ }
+
+ setTimeout(function () {
+ $(link).addClass('animating').css('opacity', 1);
+ TweenMax.to(link, $this.fluidbook.datas.linkBlinkTime, {
+ opacity: 0, delay: .1, onComplete: function () {
+ $(link).removeClass('animating').css('opacity', 1)
+ }
+ });
+ }, delay + additionalDelay);
+ },
+
zoomLink: function (link) {
var $this = this,
$("#pages .mf-nav").removeClass('hiddenzoom');
});
+ $(this.fluidbook).on('fluidbook.page.change.end', function () {
+ $this.checkScroll();
+ });
+
this.fluidbook.datas.soundTheme = '';
},
- checkScroll: function (top) {
+ checkScroll: function () {
+ this.checkFooterNavReveal();
+ this.checkLinksReveal();
+ },
+
+ checkFooterNavReveal: function () {
if (!this.fluidbook.pagetransitions.canChangePage()) {
return;
}
}
},
+ checkLinksReveal: function () {
+ var $this = this;
+ $("#links .link:not(.revealed):visible").each(function () {
+ var rect = $(this).get(0).getBoundingClientRect();
+ if (rect.top < $this.fluidbook.resize.hh) {
+ $(this).addClass('revealed');
+ if ($(this).find('a.displayArea').length > 0) {
+ $this.fluidbook.links.animateLink(this, 800);
+ } else if ($(this).is('.multimedia.notinteractive')) {
+ var url = $(this).find('iframe').attr('src');
+ var iframe = $(this).find('iframe');
+ iframe.attr('src', null);
+ setTimeout(function () {
+ $(iframe).attr('src', url);
+ }, 10);
+ }
+ }
+ });
+ },
+
beforeTransition: function (page) {
$('#pages .mf-nav').css({opacity: 0});
var $this = this;