!function(){function l(e,t){return t?this.settings.readingEventLabelPrefix+e+" pixels":e<.001?this.settings.readingEventLabelPrefix+"0%":this.settings.readingEventLabelPrefix+100*e+"%"}function d(e,t,i,n){if(!this.DEBUG_MODE){var s=function(){var e=null;null!=this.settings.gtmDataLayerName?e=this.settings.gtmDataLayerName:"undefined"!=typeof dataLayer&&"function"==typeof dataLayer.push&&(e=dataLayer);return e}();null==this.GA_TYPE&&(this.GA_TYPE=function(){var t=document.getElementsByTagName("script"),e="";for(var i in t)try{var n=t[i].getAttribute("src");if(n){if(-1!=n.indexOf("/gtm.js")){e="gtm";break}-1!=n.indexOf("/gtag")?e="gtag":-1!=n.indexOf("/analytics.js")?e="ga":-1!=n.indexOf("/ga.js")&&(e="gaq")}}catch(e){this.DEBUG_MODE&&(console.log(t[i]),console.log(e))}return e}()),"gtm"==this.GA_TYPE&&null!=s?(console.log("SOURCE: GTM"),s.push({event:this.settings.gtmEventName,eventCategory:e,eventAction:t,eventLabel:i,eventValue:n})):"gtag"==this.GA_TYPE?(console.log("SOURCE: GTAG"),gtag("event","mm_page_track",{event_category:e,event_action:t,event_label:i,event_value:n})):"ga"==this.GA_TYPE?(console.log("SOURCE: GA"),ga("send",{hitType:"event",eventCategory:e,eventAction:t,eventLabel:i,eventValue:n})):"gaq"==this.GA_TYPE&&(console.log("SOURCE: GAQ"),"undefined"!=typeof pageTracker?pageTracker._trackEvent(e,t,i,n):(_gaq.push(["_trackEvent",e,t,i,n]),_gaq.push(["pageTracker._trackEvent",e,t,i,n])))}}function t(){for(i=0;i=this.readerLocations[i]&&0=e+c)){var l=0==h.adjustX?h.bgXPosition:Math.round((f-e)*h.adjustX)+0+h.bgXOffset+"px",m=0==h.adjustY?h.bgYPosition:Math.round((f-e)*h.adjustY)+0+h.bgYOffset+"px";b.css("background-position",l+" "+m)}})})},a.fn.parallaxLockElement=function(b){var c=!1,d=a.extend({parentEl:"",offsetTop:0,additionalCSS:void 0,onLock:void 0,onRelease:void 0},b);return this.each(function(){var b=a(this),e=a(d.parentEl);a(window).scroll(function(){var f=parseInt(e.offset().top-a(window).scrollTop()-d.offsetTop),g=e.offset().top+e.outerHeight(),i=(parseInt(b.outerHeight()),e.offset().top+e.outerHeight()-(b.offset().top+b.outerHeight()));f<=0?g+i<=a(window).scrollTop()+a(window).innerHeight()?c&&(c=!1,b.css({position:"absolute",top:"inherit",bottom:i+"px"}),"function"==typeof d.onRelease&&d.onRelease(this)):(b.css({position:"fixed",top:d.offsetTop+"px",bottom:"auto"}),"function"==typeof d.onLock&&d.onLock(this),c=!0):(b.css({position:"relative",top:"auto"}),"function"==typeof d.onRelease&&d.onRelease(this),c=!1),void 0!=d.additionalCSS&&b.css(d.additionalCSS)})})},a.fn.parallaxAnimateElement=function(b){var c=new Array,d=0,e=0,f=!1,g=a.extend({frames:1,elementClass:"floatingElement",elementFrameClassRoot:"frame",startOffset:null,endOffset:null,showWhenCentered:!1,centerOffsetAnimationRange:null,lock:!1,parentEl:"",offsetTop:0,additionalCSS:void 0,onLock:void 0,onRelease:void 0},b);g.lock?a(this).parallaxLockElement({parentEl:g.parentEl,offsetTop:g.offsetTop,additionalCSS:g.additionalCSS,onLock:g.onLock,onRelease:g.onRelease}):f=!0;var h=parseInt(a(this).parent().height());if(g.showWhenCentered)null==g.centerOffsetAnimationRange?g.centerOffsetAnimationRange=1:g.centerOffsetAnimationRange.indexOf("%")!=-1?g.centerOffsetAnimationRange=parseInt(g.centerOffsetAnimationRange)/100:g.centerOffsetAnimationRange=1;else{if(null!=g.startOffset)if(g.startOffset.indexOf("%")!=-1){var i=parseInt(g.startOffset)/100;d=Math.floor(h*i)}else{var i=parseInt(g.startOffset);d=i}if(null!=g.endOffset)if(g.endOffset.indexOf("%")!=-1){var i=parseInt(g.endOffset)/100;e=Math.floor(h-h*i)}else{var i=parseInt(g.endOffset);e=i}0==d&&0==e||(h=h-e-d);for(var j=h/g.frames,k=1;k<=g.frames;k++)c.push(Math.floor(d+j*k));f&&void 0!=g.additionalCSS&&a(this).css(g.additionalCSS)}return this.each(function(){var b=a(this),d=c.length,e=g.showWhenCentered?a(this).height()*g.centerOffsetAnimationRange:a(this).height();a(window).scroll(function(){var f=b.offset().top,h=!(f+b.outerHeight()<=a(window).scrollTop()||f>=a(window).scrollTop()+a(window).height());if(h){if(g.showWhenCentered){var i=parseInt(b.offset().top-a(window).scrollTop()),j=parseInt(i+e/2),k=parseInt(a(window).innerHeight()/2),l=parseInt(j-e),m=parseInt(j+e);if(k=l&&k<=m){var n=Math.max(0,Math.min(1,1-(l+(j-k))/j));d=Math.ceil(g.frames*n)}else d=g.frames}else for(var o=parseInt(b.parent().offset().top-a(window).scrollTop()),p=o*-1+e/2,q=0;q=$(window).scrollTop()+$(window).height())},getItemInViewportCenter=function(a,b){var c=$(a).offset().top,d=$(window).height()/2;return b=b||0,!(c>=$(window).scrollTop()+d+b||c<=$(window).scrollTop()+d-b)},getStickyTopBarHeight=function(){return _stickyTopBarHeight},getIsMobile=function(){return _isMobile},getIsTablet=function(){return _isTablet},getDoParallax=function(){return _doParallax},getIsDesktop=function(){return!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},getIsIPad=function(){return navigator.userAgent.match(/iPad;.*CPU.*OS/i)},getIsResponsive=function(){return IS_RESPONSIVE},adjustLayoutAfterResize=function(){initChapterTops(!0),adjustMultiSizedImages()},adjustChapterLinksArtHeight=function(a,b){$(a).css("height",$(b).outerHeight())},adjustSizeToParentAndViewport=function(a,b){$(a).css("height",getVisibleViewport(!0)),$(a).css("width",$(b).width())},adjustScrollProgress=function(){if(0!=$(_stickyTopBarProgressBarEl).length){var e,a=-1,b=$(document).height(),c=$("body").height(),d=b-c-_stickyTopBarOffset;e=Math.round(($(document).scrollTop()-_stickyTopBarOffset)/d*100),$(_stickyTopBarProgressBarEl).css("width",e+"%");for(var f=_chapterTops.length-1;f>=0;f--)if($(document).scrollTop()>=_chapterTops[f]){a=f+1;break}return a!=-1&&adjustChapterLinks(a),a}},adjustChapterLinks=function(a){$(_chapterLinkEl).each(function(){$(this).attr("href")!="#"+a?"function"==typeof _setChapterLinkCallback&&_setChapterLinkCallback(this,!1):("function"==typeof _setChapterLinkCallback&&_setChapterLinkCallback(this,!0),_onChapter=a)})},adjustMultiSizedImages=function(){var a=$(_multiSizeImageEl);a.length&&a.each(function(){getIsResponsive()||void 0==$(this).data("src-legacy")?getIsMobile()&&void 0!=$(this).data("src-small")?$(this).attr("src",$(this).data("src-small")):getIsTablet()&&void 0!=$(this).data("src-medium")?$(this).attr("src",$(this).data("src-medium")):void 0!=$(this).data("src")&&$(this).attr("src",$(this).data("src")):$(this).attr("src",$(this).data("src-legacy"))})},toTop=function(){$("html, body").animate({scrollTop:0},600)},runTopMenuControl=function(){getIsMobile()?toggleMobileMenu(_mobileMenuEl,_topAndMobileMenuControl):toTop()},toggleMobileMenu=function(a,b){getIsMobile()&&($(a).toggle("fast"),$(b).toggle("fast"))},goToChapter=function(a){var b=$(_chapterElPrefix+a),c=b.offset().top-_stickyTopBarHeight+1,d=_onChapter>a?_onChapter-a:a-_onChapter,e=Math.floor(1e3/(_chapterTops.length-(_chapterTops.length-d)));$("html, body").animate({scrollTop:c},e,function(){adjustChapterLinks(a),"function"==typeof _chapterSetCompleteCallback&&_chapterSetCompleteCallback(a)}),_onChapter=a},animateOverflowContent=function(a,b,c,d,e){if(e==_onChapter){var f=$(a).css("background-position").split(" "),g=isNaN(b)?b:b+parseInt(f[0])+"px",h=isNaN(c)?c:c+parseInt(f[1])+"px";$(a).css({"background-position":g+" "+h})}window.setTimeout(function(){animateOverflowContent(a,b,c,d,e)},d)},cycleImages=function(a,b){var c=$(a+" .active"),d=c.next().length>0?c.next():$(a+" img:first");d.css("z-index",2),c.fadeOut(b,function(){c.css("z-index",1).show().removeClass("active"),d.css("z-index",3).addClass("active")})}; /* * FancyBox - jQuery Plugin * Simple and fancy lightbox alternative * * Examples and documentation at: http://fancybox.net * * Copyright (c) 2008 - 2010 Janis Skarnelis * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. * * Version: 1.3.4 (11/11/2010) * Requires: jQuery v1.3+ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ !function(t){var e,i,n,a,o,d,c,r,s,h,l,f,p,g=0,b={},u=[],y=0,w={},v=[],m=null,x=new Image,I=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,C=/[^\.]\.(swf)\s*$/i,k=1,O=0,j="",T=!1,S=t.extend(t("
")[0],{prop:0}),A=!1,D=function(){i.hide(),x.onerror=x.onload=null,m&&m.abort(),e.empty()},F=function(){return!1===b.onError(u,g,b)?(i.hide(),void(T=!1)):(b.titleShow=!1,b.width="auto",b.height="auto",e.html('

The requested content cannot be loaded.
Please try again later.

'),void N())},E=function(){var n,a,o,c,r,s,h=u[g];if(D(),b=t.extend({},t.fn.fancybox.defaults,"undefined"==typeof t(h).data("fancybox")?b:t(h).data("fancybox")),s=b.onStart(u,g,b),s===!1)return void(T=!1);if("object"==typeof s&&(b=t.extend(b,s)),o=b.title||(h.nodeName?t(h).attr("title"):h.title)||"",h.nodeName&&!b.orig&&(b.orig=t(h).children("img:first").length?t(h).children("img:first"):t(h)),""===o&&b.orig&&b.titleFromAlt&&(o=b.orig.attr("alt")),n=b.href||(h.nodeName?t(h).attr("href"):h.href)||null,(/^(?:javascript)/i.test(n)||"#"==n)&&(n=null),b.type?(a=b.type,n||(n=b.content)):b.content?a="html":n&&(a=n.match(I)?"image":n.match(C)?"swf":t(h).hasClass("iframe")?"iframe":0===n.indexOf("#")?"inline":"ajax"),!a)return void F();switch("inline"==a&&(h=n.substr(n.indexOf("#")),a=t(h).length>0?"inline":"ajax"),b.type=a,b.href=n,b.title=o,b.autoDimensions&&("html"==b.type||"inline"==b.type||"ajax"==b.type?(b.width="auto",b.height="auto"):b.autoDimensions=!1),b.modal&&(b.overlayShow=!0,b.hideOnOverlayClick=!1,b.hideOnContentClick=!1,b.enableEscapeButton=!1,b.showCloseButton=!1),b.padding=parseInt(b.padding,10),b.margin=parseInt(b.margin,10),e.css("padding",b.padding+b.margin),t(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){t(this).replaceWith(d.children())}),a){case"html":e.html(b.content),N();break;case"inline":if(t(h).parent().is("#fancybox-content")===!0)return void(T=!1);t('
').hide().insertBefore(t(h)).bind("fancybox-cleanup",function(){t(this).replaceWith(d.children())}).bind("fancybox-cancel",function(){t(this).replaceWith(e.children())}),t(h).appendTo(e),N();break;case"image":T=!1,t.fancybox.showActivity(),x=new Image,x.onerror=function(){F()},x.onload=function(){T=!0,x.onerror=x.onload=null,B()},x.src=n;break;case"swf":b.scrolling="no",c='',r="",t.each(b.swf,function(t,e){c+='',r+=" "+t+'="'+e+'"'}),c+='",e.html(c),N();break;case"ajax":T=!1,t.fancybox.showActivity(),b.ajax.win=b.ajax.success,m=t.ajax(t.extend({},b.ajax,{url:n,data:b.ajax.data||{},error:function(t){t.status>0&&F()},success:function(t,a,o){var d="object"==typeof o?o:m;if(200==d.status){if("function"==typeof b.ajax.win){if(s=b.ajax.win(n,t,a,o),s===!1)return void i.hide();("string"==typeof s||"object"==typeof s)&&(t=s)}e.html(t),N()}}}));break;case"iframe":P()}},N=function(){var i=b.width,n=b.height;i=i.toString().indexOf("%")>-1?parseInt((t(window).width()-2*b.margin)*parseFloat(i)/100,10)+"px":"auto"==i?"auto":i+"px",n=n.toString().indexOf("%")>-1?parseInt((t(window).height()-2*b.margin)*parseFloat(n)/100,10)+"px":"auto"==n?"auto":n+"px",e.wrapInner('
'),b.width=e.width(),b.height=e.height(),P()},B=function(){b.width=x.width,b.height=x.height,t("").attr({id:"fancybox-img",src:x.src,alt:b.title}).appendTo(e),P()},P=function(){var o,l;return i.hide(),a.is(":visible")&&!1===w.onCleanup(v,y,w)?(t.event.trigger("fancybox-cancel"),void(T=!1)):(T=!0,t(d.add(n)).unbind(),t(window).unbind("resize.fb scroll.fb"),t(document).unbind("keydown.fb"),a.is(":visible")&&"outside"!==w.titlePosition&&a.css("height",a.height()),v=u,y=g,w=b,w.overlayShow?(n.css({"background-color":w.overlayColor,opacity:w.overlayOpacity,cursor:w.hideOnOverlayClick?"pointer":"auto",height:t(document).height()}),n.is(":visible")||(A&&t("select:not(#fancybox-tmp select)").filter(function(){return"hidden"!==this.style.visibility}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"}),n.show())):n.hide(),p=Q(),M(),a.is(":visible")?(t(c.add(s).add(h)).hide(),o=a.position(),f={top:o.top,left:o.left,width:a.width(),height:a.height()},l=f.width==p.width&&f.height==p.height,void d.fadeTo(w.changeFade,.3,function(){var i=function(){d.html(e.contents()).fadeTo(w.changeFade,1,H)};t.event.trigger("fancybox-change"),d.empty().removeAttr("filter").css({"border-width":w.padding,width:p.width-2*w.padding,height:b.autoDimensions?"auto":p.height-O-2*w.padding}),l?i():(S.prop=0,t(S).animate({prop:1},{duration:w.changeSpeed,easing:w.easingChange,step:R,complete:i}))})):(a.removeAttr("style"),d.css("border-width",w.padding),"elastic"==w.transitionIn?(f=q(),d.html(e.contents()),a.show(),w.opacity&&(p.opacity=0),S.prop=0,void t(S).animate({prop:1},{duration:w.speedIn,easing:w.easingIn,step:R,complete:H})):("inside"==w.titlePosition&&O>0&&r.show(),d.css({width:p.width-2*w.padding,height:b.autoDimensions?"auto":p.height-O-2*w.padding}).html(e.contents()),void a.css(p).fadeIn("none"==w.transitionIn?0:w.speedIn,H))))},L=function(t){return t&&t.length?"float"==w.titlePosition?'
'+t+'
':'
'+t+"
":!1},M=function(){if(j=w.title||"",O=0,r.empty().removeAttr("style").removeClass(),w.titleShow===!1)return void r.hide();if(j=t.isFunction(w.titleFormat)?w.titleFormat(j,v,y,w):L(j),!j||""===j)return void r.hide();switch(r.addClass("fancybox-title-"+w.titlePosition).html(j).appendTo("body").show(),w.titlePosition){case"inside":r.css({width:p.width-2*w.padding,marginLeft:w.padding,marginRight:w.padding}),O=r.outerHeight(!0),r.appendTo(o),p.height+=O;break;case"over":r.css({marginLeft:w.padding,width:p.width-2*w.padding,bottom:w.padding}).appendTo(o);break;case"float":r.css("left",-1*parseInt((r.width()-p.width-40)/2,10)).appendTo(a);break;default:r.css({width:p.width-2*w.padding,paddingLeft:w.padding,paddingRight:w.padding}).appendTo(a)}r.hide()},z=function(){return(w.enableEscapeButton||w.enableKeyboardNav)&&t(document).bind("keydown.fb",function(e){27==e.keyCode&&w.enableEscapeButton?(e.preventDefault(),t.fancybox.close()):37!=e.keyCode&&39!=e.keyCode||!w.enableKeyboardNav||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||"SELECT"===e.target.tagName||(e.preventDefault(),t.fancybox[37==e.keyCode?"prev":"next"]())}),w.showNavArrows?((w.cyclic&&v.length>1||0!==y)&&s.show(),void((w.cyclic&&v.length>1||y!=v.length-1)&&h.show())):(s.hide(),void h.hide())},H=function(){t.support.opacity||(d.get(0).style.removeAttribute("filter"),a.get(0).style.removeAttribute("filter")),b.autoDimensions&&d.css("height","auto"),a.css("height","auto"),j&&j.length&&r.show(),w.showCloseButton&&c.show(),z(),w.hideOnContentClick&&d.bind("click",t.fancybox.close),w.hideOnOverlayClick&&n.bind("click",t.fancybox.close),t(window).bind("resize.fb",t.fancybox.resize),w.centerOnScroll&&t(window).bind("scroll.fb",t.fancybox.center),"iframe"==w.type&&t('').appendTo(d),a.show(),T=!1,t.fancybox.center(),w.onComplete(v,y,w),K()},K=function(){var t,e;v.length-1>y&&(t=v[y+1].href,"undefined"!=typeof t&&t.match(I)&&(e=new Image,e.src=t)),y>0&&(t=v[y-1].href,"undefined"!=typeof t&&t.match(I)&&(e=new Image,e.src=t))},R=function(t){var e={width:parseInt(f.width+(p.width-f.width)*t,10),height:parseInt(f.height+(p.height-f.height)*t,10),top:parseInt(f.top+(p.top-f.top)*t,10),left:parseInt(f.left+(p.left-f.left)*t,10)};"undefined"!=typeof p.opacity&&(e.opacity=.5>t?.5:t),a.css(e),d.css({width:e.width-2*w.padding,height:e.height-O*t-2*w.padding})},W=function(){return[t(window).width()-2*w.margin,t(window).height()-2*w.margin,t(document).scrollLeft()+w.margin,t(document).scrollTop()+w.margin]},Q=function(){var t,e=W(),i={},n=w.autoScale,a=2*w.padding;return i.width=w.width.toString().indexOf("%")>-1?parseInt(e[0]*parseFloat(w.width)/100,10):w.width+a,i.height=w.height.toString().indexOf("%")>-1?parseInt(e[1]*parseFloat(w.height)/100,10):w.height+a,n&&(i.width>e[0]||i.height>e[1])&&("image"==b.type||"swf"==b.type?(t=w.width/w.height,i.width>e[0]&&(i.width=e[0],i.height=parseInt((i.width-a)/t+a,10)),i.height>e[1]&&(i.height=e[1],i.width=parseInt((i.height-a)*t+a,10))):(i.width=Math.min(i.width,e[0]),i.height=Math.min(i.height,e[1]))),i.top=parseInt(Math.max(e[3]-20,e[3]+.5*(e[1]-i.height-40)),10),i.left=parseInt(Math.max(e[2]-20,e[2]+.5*(e[0]-i.width-40)),10),i},$=function(t){var e=t.offset();return e.top+=parseInt(t.css("paddingTop"),10)||0,e.left+=parseInt(t.css("paddingLeft"),10)||0,e.top+=parseInt(t.css("border-top-width"),10)||0,e.left+=parseInt(t.css("border-left-width"),10)||0,e.width=t.width(),e.height=t.height(),e},q=function(){var e,i,n=b.orig?t(b.orig):!1,a={};return n&&n.length?(e=$(n),a={width:e.width+2*w.padding,height:e.height+2*w.padding,top:e.top-w.padding-20,left:e.left-w.padding-20}):(i=W(),a={width:2*w.padding,height:2*w.padding,top:parseInt(i[3]+.5*i[1],10),left:parseInt(i[2]+.5*i[0],10)}),a},U=function(){return i.is(":visible")?(t("div",i).css("top",-40*k+"px"),void(k=(k+1)%12)):void clearInterval(l)};t.fn.fancybox=function(e){return t(this).length?(t(this).data("fancybox",t.extend({},e,t.metadata?t(this).metadata():{})).unbind("click.fb").bind("click.fb",function(e){if(e.preventDefault(),!T){T=!0,t(this).blur(),u=[],g=0;var i=t(this).attr("rel")||"";i&&""!=i&&"nofollow"!==i?(u=t("a[rel="+i+"], area[rel="+i+"]"),g=u.index(this)):u.push(this),E()}}),this):this},t.fancybox=function(e){var i;if(!T){if(T=!0,i="undefined"!=typeof arguments[1]?arguments[1]:{},u=[],g=parseInt(i.index,10)||0,t.isArray(e)){for(var n=0,a=e.length;a>n;n++)"object"==typeof e[n]?t(e[n]).data("fancybox",t.extend({},i,e[n])):e[n]=t({}).data("fancybox",t.extend({content:e[n]},i));u=jQuery.merge(u,e)}else"object"==typeof e?t(e).data("fancybox",t.extend({},i,e)):e=t({}).data("fancybox",t.extend({content:e},i)),u.push(e);(g>u.length||0>g)&&(g=0),E()}},t.fancybox.showActivity=function(){clearInterval(l),i.show(),l=setInterval(U,66)},t.fancybox.hideActivity=function(){i.hide()},t.fancybox.next=function(){return t.fancybox.pos(y+1)},t.fancybox.prev=function(){return t.fancybox.pos(y-1)},t.fancybox.pos=function(t){T||(t=parseInt(t),u=v,t>-1&&t1&&(g=t>=v.length?0:v.length-1,E()))},t.fancybox.cancel=function(){T||(T=!0,t.event.trigger("fancybox-cancel"),D(),b.onCancel(u,g,b),T=!1)},t.fancybox.close=function(){function e(){n.fadeOut("fast"),r.empty().hide(),a.hide(),t.event.trigger("fancybox-cleanup"),d.empty(),w.onClosed(v,y,w),v=b=[],y=g=0,w=b={},T=!1}if(!T&&!a.is(":hidden")){if(T=!0,w&&!1===w.onCleanup(v,y,w))return void(T=!1);if(D(),t(c.add(s).add(h)).hide(),t(d.add(n)).unbind(),t(window).unbind("resize.fb scroll.fb"),t(document).unbind("keydown.fb"),d.find("iframe").attr("src",A&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank"),"inside"!==w.titlePosition&&r.empty(),a.stop(),"elastic"==w.transitionOut){f=q();var i=a.position();p={top:i.top,left:i.left,width:a.width(),height:a.height()},w.opacity&&(p.opacity=1),r.empty().hide(),S.prop=1,t(S).animate({prop:0},{duration:w.speedOut,easing:w.easingOut,step:R,complete:e})}else a.fadeOut("none"==w.transitionOut?0:w.speedOut,e)}},t.fancybox.resize=function(){n.is(":visible")&&n.css("height",t(document).height()),t.fancybox.center(!0)},t.fancybox.center=function(){var t,e;T||(e=arguments[0]===!0?1:0,t=W(),(e||!(a.width()>t[0]||a.height()>t[1]))&&a.stop().animate({top:parseInt(Math.max(t[3]-20,t[3]+.5*(t[1]-d.height()-40)-w.padding)),left:parseInt(Math.max(t[2]-20,t[2]+.5*(t[0]-d.width()-40)-w.padding))},"number"==typeof arguments[0]?arguments[0]:200))},t.fancybox.init=function(){t("#fancybox-wrap").length||(t("body").append(e=t('
'),i=t('
'),n=t('
'),a=t('
')),o=t('
').append('
').appendTo(a),o.append(d=t('
'),c=t(''),r=t('
'),s=t(''),h=t('')),c.click(t.fancybox.close),i.click(t.fancybox.cancel),s.click(function(e){e.preventDefault(),t.fancybox.prev()}),h.click(function(e){e.preventDefault(),t.fancybox.next()}),t.fn.mousewheel&&a.bind("mousewheel.fb",function(e,i){T?e.preventDefault():(0==t(e.target).get(0).clientHeight||t(e.target).get(0).scrollHeight===t(e.target).get(0).clientHeight)&&(e.preventDefault(),t.fancybox[i>0?"prev":"next"]())}),t.support.opacity||a.addClass("fancybox-ie"),A&&(i.addClass("fancybox-ie6"),a.addClass("fancybox-ie6"),t('').prependTo(o)))},t.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}},t(document).ready(function(){t.fancybox.init()})}(jQuery); /** * v1.0 - Copyright 2015 Madden Media - All rights reserved. * * Content-specific layout functionality. These functions * make many assumptions about content contained in the page. * * NOTE: Assumes that madden-content-frameworks-v1.0.js has been loaded and * that the initial view types (mobile, tablet, etc.) have been defined. */ // mobile can call resize during scroll - we can cache width // and check if an actual resize happens var _winWidth = 0; var NUMBER_OUTER = 200; var NUMBER_INNER = 100; ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // STOCK EVENT FUNCTIONS ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // // Called on document ready // contentOnReady = function () { //flying bird var distance = $('#c1').offset().top, $window = $(window); $window.scroll(function() { if ( $window.scrollTop() >= distance ) { $("#ch1-bird").animate({left: "-150%", top: "75%" }, { duration: 3000, easing: "linear" }); } }); // set the window width _winWidth = $(window).width(); // parallax effects if (getDoParallax()) { // parallax scroll the hero image, title, and couple $("#ci0").parallaxBG({ adjustY: .12 }); $("#birds2").parallaxBG({ adjustX: -1 }); $("#c3Title").parallaxBG({ adjustY: 1.5, bgXPosition: 'center' }); // bunch of fades $("#ch1-image1").parallaxAnimateElement({ frames: 8, startOffset: "-60%", endOffset: "140%", lock: false, parentEl: "#c1Text", elementClass: "floatingElement first w3Col floatRight" }); $("#ch1-image2").parallaxAnimateElement({ frames: 8, startOffset: "-30%", endOffset: "140%", lock: false, parentEl: "#c1Text", elementClass: "floatingElement w3Col floatRight" }); $("#ch1-image3").parallaxAnimateElement({ frames: 8, startOffset: "0%", endOffset: "140%", lock: false, parentEl: "#c1Text", elementClass: "floatingElement w3Col floatRight" }); $("#ch1-image4").parallaxAnimateElement({ frames: 8, startOffset: "0%", endOffset: "140%", lock: false, parentEl: "#c1Text", elementClass: "floatingElement w3Col floatRight" }); $("#ch1-image5").parallaxAnimateElement({ frames: 8, startOffset: "0%", endOffset: "140%", lock: false, parentEl: "#c1Text", elementClass: "floatingElement w3Col floatRight" }); // Lock the Image and pullquote $("#ch2-image1").parallaxLockElement({ parentEl: "#c2", additionalCSS: { "margin-top" : "100px", "right" : "0" } }); $("#ch2-image1").parallaxAnimateElement({ frames: 8, startOffset: "-60%", endOffset: "140%", lock: false, parentEl: "#c2Text", elementClass: "floatingElement first w3Col floatRight" }); /*$("#ch2-image2").parallaxAnimateElement({ frames: 8, startOffset: "-30%", endOffset: "140%", lock: false, parentEl: "#c2Text", elementClass: "floatingElement w3Col floatRight" });*/ $("#ch3-image1").parallaxAnimateElement({ frames: 8, startOffset: "-60%", endOffset: "140%", lock: false, parentEl: "#c3Text", elementClass: "floatingElement first w3Col floatRight" }); $("#ch3-image2").parallaxAnimateElement({ frames: 8, startOffset: "-40%", endOffset: "140%", lock: false, parentEl: "#c3Text", elementClass: "floatingElement w3Col floatRight" }); $("#ch3-image3").parallaxAnimateElement({ frames: 8, startOffset: "-20%", endOffset: "140%", lock: false, parentEl: "#c3Text", elementClass: "floatingElement w3Col floatRight" }); $("#ch3-image4").parallaxAnimateElement({ frames: 8, startOffset: "0%", endOffset: "140%", lock: false, parentEl: "#c3Text", elementClass: "floatingElement w3Col floatRight" }); $("#ch3-image5").parallaxAnimateElement({ frames: 8, startOffset: "10%", endOffset: "300%", lock: false, parentEl: "#c3Text", elementClass: "floatingElement last w3Col floatRight" }); $("#ch3-image6").parallaxAnimateElement({ frames: 8, startOffset: "-50%", endOffset: "300%", lock: false, parentEl: "#c3Text", elementClass: "floatingElement w3Col floatRight" }); $("#ch3-image7").parallaxAnimateElement({ frames: 8, startOffset: "-10%", endOffset: "300%", lock: false, parentEl: "#c3Text", elementClass: "floatingElement w3Col floatRight" }); } customAdjustLayout(true); // add the complete class to the loader $("#loading").addClass("complete"); } // // Called on document scroll // contentOnScroll = function () { } // // Called on a touch move on mobile // contentOnTouchMove = function () { } // // Called on document resize // contentOnResize = function () { customAdjustLayout(); } ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // CUSTOM FUNCTIONS ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // // The frameworks was given this function to handle setting chapter buttons // when the chapter is set // // chapterEl: The chapter link DOM element // on: Is it being turned on? (true|false) // customChapterLinkAdjust = function (chapterEl, on) { $(chapterEl).attr("class", ((on) ? "navLink chapterLink noGA on" : "navLink chapterLink noGA")); } // // Adjust this specific layout after a load or resize event // // isLoad: Is this being called by a load or resize event? // customAdjustLayout = function (isLoad) { var localNotJustTouchScroll = isLoad; // is it really a resize? if ($(window).width() != _winWidth) { // yes localNotJustTouchScroll = true; _winWidth = $(window).width(); } } // // adjusts the heights for the bottom related content divs // equalizeRelatedLlinks = function () { var h1 = $("#fLink1").height(); var h2 = $("#fLink2").height(); var h3 = $("#fLink3").height(); var h4 = $("#fLink4").height(); var max = h1; max = (h2 > max) ? h2 : max; max = (h3 > max) ? h3 : max; // set all to max $(".alsoLikeLink").css("height", (max + "px")); }