var DeusEx;(function(n){"use strict";var t=function(){function n(n,t){var r,i;for(this.$document=n,this.$timeout=t,this.desktopHeaderElement=n.find("header.header-large"),this.mobileHeaderElement=n.find("div.header-small"),this.isMobile=this.mobileHeaderElement.is(":visible"),r=n.find("div.extract-from-scroll"),this.extraHeight=0,i=0;i<r.length;i++)this.extraHeight+=parseInt($(r[i]).css("height"))}return n.prototype.scrollTop=function(){this.$document.find(".container").scrollTop(0)},n.prototype.scrollElementTo=function(n){var e=this,t=this.$document.find(n),i,u,r,f;t.length!==0&&(i=this.$document.find(".container"),u=(this.isMobile?this.mobileHeaderElement.outerHeight():this.desktopHeaderElement.outerHeight())+this.extraHeight,i&&t&&t.length>0?(r=t[0].getBoundingClientRect().top,f=r<0||r>i.outerHeight(),f&&i.scrollTop(i.scrollTop()+r-u)):this.$timeout(function(){return e.$document.duScrollToElementAnimated(t,u)}))},n.prototype.scrollTo=function(n){this.scrollElementTo($(n))},n.$inject=["$document","$timeout"],n}(),i;n.ScrollService=t;i=angular.module("deusEx.scroll",["duScroll"]);i.service("scrollService",t)})(DeusEx||(DeusEx={})),function(){"use strict";var n=getOrCreateAngularModule("theApp",["deusEx.scroll"]);n.run(["$rootScope","$location","scrollService",function(n,t,i){n.$on("$locationChangeStart",function(n){if(t.$$path==="/scroll"){var r=t.$$url.replace("/scroll?scrollTo=","").replace(/#.*/g,"");r!==t.$$hash&&(i.scrollTo("#"+r),n.preventDefault())}})}])}(DeusEx||(DeusEx={}))