window.adf||(window.adf={});adf.shared=adf.shared||{};adf.shared.impl=adf.shared.impl||{};adf.shared.impl.animationUtils={};adf.shared.impl.animationUtils._browserSpecificNames={};
adf.shared.impl.animationUtils.transition=function(a,b,d,e){var f=e.dimensionsFromParent,g=e.finishedFunction,h=e.animationEnabled,k=e.isRtl,l=e.fineLogger,m=null!=b,n=null!=d,p=adf.shared.impl.animationUtils,q=new p.AnimationContext(g,e.callbackParams),r=function(){};p._isRtl=k;p._fineLogger=l;null==p._agentTypeAndVersion&&(p._agentTypeAndVersion=p._getAgentTypeAndVersion(navigator.userAgent));try{k=!1;!m&&!n?k=!0:m&&(n&&b.parentNode!=d.parentNode)&&(k=!0,p._fineLogger("AdfAnimationUtils: transition common parent prerequisite was violated"));
m&&"none"==b.style.display&&(k=!0,p._fineLogger("AdfAnimationUtils: transition currentElement display !\x3d none prerequisite was violated"));n&&"none"==d.style.display&&(k=!0,p._fineLogger("AdfAnimationUtils: transition newElement display !\x3d none prerequisite was violated"));if(k)return null!=g&&adf.shared.impl.animationUtils._requestAnimationFrame(p.getProxyFunction(q,q._performFinish)),r;h||(a="none");h=g=null;if(null!=a){var s=p._agentTypeAndVersion[0],u=p._agentTypeAndVersion[1];0==a.indexOf("slide")&&
p._isMinimumAgentMet(s,u,"gecko",16,"trident",6,"webkit",533.1)?(h=a.substring(5).toLowerCase(),g=p._slide):0==a.indexOf("flip")&&p._isMinimumAgentMet(s,u,"gecko",19,"trident",6,"webkit",533.1)?(h=a.substring(4).toLowerCase(),g=p._flip):"fade"==a&&p._isMinimumAgentMet(s,u,"gecko",16,"trident",6,"webkit",533.1)&&(g=p._fade)}""==h&&(h="start");if(null==g||m&&!b.addEventListener||n&&!d.addEventListener)p._restoreStyles(b),p._restoreStyles(d),m&&(b.style.display="none"),adf.shared.impl.animationUtils._requestAnimationFrame(p.getProxyFunction(q,
q._performFinish));else{if(m&&n&&!f){var t=b.style,v=b.offsetWidth,w=b.offsetHeight;t.position="absolute";t.top="0px";t.width=v+"px";t.height=w+"px"}r=g(q,b,d,e,f,h)}}catch(z){p._fineLogger("AdfAnimationUtils: unable to perform transition due to problem:"),p._fineLogger(z)}return r};adf.shared.impl.animationUtils.getProxyFunction=function(a,b){var d=new Function("var f\x3darguments.callee; return f._func.apply(f._owner, arguments);");d._owner=a;d._func=b;return d};
adf.shared.impl.animationUtils._fade=function(a,b,d,e,f,g){var h=adf.shared.impl.animationUtils,k=null!=b,l=null!=d;k&&h._setOpacity(b,"1");l&&(h._saveStyles(d),h._setOpacity(d,"0"),d.style.zIndex="1",adf.shared.impl.animationUtils._ensureAppliedStyle(d,"opacity",1));adf.shared.impl.animationUtils._requestAnimationFrame(function(){k&&h._setTransition(b,"all .2s ease-in-out");l&&h._setTransition(d,"all .2s ease-in-out");k&&a.addTransitionEndA(b,function(){b.style.display="none"});l&&a.addTransitionEndB(d,
function(){h._restoreStyles(d)});k&&h._setOpacity(b,"0");l&&h._setOpacity(d,"1")});return h.getProxyFunction(a,a.cancelFunction)};
adf.shared.impl.animationUtils._slide=function(a,b,d,e,f,g){var h=adf.shared.impl.animationUtils,k=null!=b,l=null!=d;l&&h._saveStyles(d);var m=!1;e=!1;if("up"==g||"down"==g)m=!0;if("right"==g||"down"==g)e=!0;h._isRtl?"start"==g&&(e=!0):"end"==g&&(e=!0);var n=!f;k&&n&&h._setOpacity(b,"1");var p;f=m?"offsetHeight":"offsetWidth";f=e?l?d[f]:b[f]:k?b[f]:d[f];e=e?-1*f:f;p=-1*e;l&&(m?h._setTransformTranslate(d,"0,"+e+"px"):h._setTransformTranslate(d,e+"px,0"),e=adf.shared.impl.animationUtils._getBrowserSpecificName("transform"),
adf.shared.impl.animationUtils._ensureAppliedStyle(d,e,"none"));adf.shared.impl.animationUtils._requestAnimationFrame(function(){k&&h._setTransition(b,"all 125ms ease-in-out");l&&h._setTransition(d,"all 125ms ease-in-out");k&&a.addTransitionEndA(b,function(){b.style.display="none"});l&&a.addTransitionEndB(d,function(){h._restoreStyles(d)});m?k&&h._setTransformTranslate(b,"0,"+p+"px"):k&&h._setTransformTranslate(b,p+"px,0");l&&h._setTransformTranslate(d,"0,0");k&&n&&h._setOpacity(b,"0")});return h.getProxyFunction(a,
a.cancelFunction)};
adf.shared.impl.animationUtils._flip=function(a,b,d,e,f,g){var h=adf.shared.impl.animationUtils,k=null!=b,l=null!=d,m=null;k?m=b.parentNode:l&&(m=d.parentNode);k&&h._saveStyles(b);l&&h._saveStyles(d);h._saveStyles(m);var n=!1,p=!1;if("up"==g||"down"==g)n=!0;if("right"==g||"up"==g)p=!0;h._isRtl?"start"==g&&(p=!0):"end"==g&&(p=!0);g=h._agentTypeAndVersion[0];e=!0==e.parentFlipAllowed&&"trident"!=g;"webkit"==g&&534.3>h._agentTypeAndVersion[1]&&(e=!1);e?h._flipInset(a,h,b,k,d,l,m,n,p,f):h._flipOnPageLayer(a,
h,b,k,d,l,m,n,p);return h.getProxyFunction(a,a.cancelFunction)};
adf.shared.impl.animationUtils._flipOnPageLayer=function(a,b,d,e,f,g,h,k,l){var m=0,n=0;g&&(m=f.offsetWidth,n=f.offsetHeight);e&&(m=Math.max(m,d.offsetWidth),n=Math.max(n,d.offsetHeight));if(g){b._setBackfaceVisibility(f,"hidden");b._setTransformStyle(f,"preserve-3d");f.style.width=m+"px";f.style.height=n+"px";k?b._setTransformRotateX(f,l?"-180deg":"180deg"):b._setTransformRotateY(f,l?"-180deg":"180deg");var p=adf.shared.impl.animationUtils._getBrowserSpecificName("transform");adf.shared.impl.animationUtils._ensureAppliedStyle(f,
p,"none")}e&&(b._setBackfaceVisibility(d,"hidden"),b._setTransformStyle(d,"preserve-3d"),d.style.width=m+"px",d.style.height=n+"px",k?b._setTransformRotateX(d,"0deg"):b._setTransformRotateY(d,"0deg"));m=adf.shared.impl.animationUtils._agentTypeAndVersion[0];n=adf.shared.impl.animationUtils._agentTypeAndVersion[1];"webkit"==m?"webkit"==m&&534.3<=n&&(m=adf.shared.impl.animationUtils._getBrowserSpecificName("perspective"),h.style[m]="2000px"):"trident"!=m&&(h.style.perspective="2000px");adf.shared.impl.animationUtils._requestAnimationFrame(function(){e&&
b._setTransition(d,"all .2s ease-in-out");g&&b._setTransition(f,"all .2s ease-in-out");e&&a.addTransitionEndA(d,function(){d.style.display="none";b._restoreStyles(d);b._restoreStyles(h)});g&&a.addTransitionEndB(f,function(){b._restoreStyles(f);b._restoreStyles(h)});k?(e&&b._setTransformRotateX(d,l?"180deg":"-180deg"),g&&b._setTransformRotateX(f,"0deg")):(e&&b._setTransformRotateY(d,l?"180deg":"-180deg"),g&&b._setTransformRotateY(f,"0deg"))})};
adf.shared.impl.animationUtils._flipInset=function(a,b,d,e,f,g,h,k,l,m){var n=h.parentNode;a.addExtraCancelFunction(function(){b._flipInsetExtraCancel(d,e,f,g,h,n)});b._saveStyles(n);m=adf.shared.impl.animationUtils._getBrowserSpecificName("perspective");n.style[m]="2000px";b._setTransformStyle(h,"preserve-3d");var p=m=0;g&&(m=f.offsetWidth,p=f.offsetHeight);e&&(m=Math.max(m,d.offsetWidth),p=Math.max(p,d.offsetHeight));if(g){b._setBackfaceVisibility(f,"hidden");f.style.width=m+"px";f.style.height=
p+"px";k?b._setTransformValue(f,"perspective(2000px) rotateX("+(l?"180deg":"-180deg")+")"):b._setTransformValue(f,"perspective(2000px) rotateY("+(l?"-180deg":"180deg")+")");var q=adf.shared.impl.animationUtils._getBrowserSpecificName("transform");adf.shared.impl.animationUtils._ensureAppliedStyle(f,q,"none")}e&&(b._setBackfaceVisibility(d,"hidden"),d.style.width=m+"px",d.style.height=p+"px",k?b._setTransformValue(d,"perspective(2000px) rotateX(0deg)"):b._setTransformValue(d,"perspective(2000px) rotateY(0deg)"));
k?b._setTransformOrigin(h,l?"center bottom":"center top"):b._setTransformOrigin(h,l?"left center":"right center");adf.shared.impl.animationUtils._requestAnimationFrame(function(){b._setTransition(h,"all .2s ease-in-out");a.addTransitionEndA(h,function(){e&&(b._restoreStyles(d),d.style.display="none");g&&b._restoreStyles(f);b._flipInsetExtraCancel(d,e,f,g,h,n)});k?b._setTransformValue(h,"perspective(2000px) "+(l?"translateY(-100%) rotateX(180deg)":"translateY(100%) rotateX(-180deg)")):b._setTransformValue(h,
"perspective(2000px) "+(l?"translateX(100%) rotateY(180deg)":"translateX(-100%) rotateY(-180deg)"))})};adf.shared.impl.animationUtils._flipInsetExtraCancel=function(a,b,d,e,f,g){a=adf.shared.impl.animationUtils;a._restoreStyles(f);a._restoreStyles(g)};
adf.shared.impl.animationUtils._ensureAppliedStyle=function(a,b,d){null!=a.ownerDocument.defaultView.getComputedStyle&&(a=a.ownerDocument.defaultView.getComputedStyle(a)[b],a==d&&adf.shared.impl.animationUtils._fineLogger("AdfAnimationUtils: computed style had unexpected value: "+a))};
adf.shared.impl.animationUtils._getTransitionEndEventName=function(){if(null==adf.shared.impl.animationUtils._transitionEndEventName){var a="transitionend",b=document.createElement("div"),d={WebkitTransition:"webkitTransitionEnd",transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend"},e;for(e in d)if(void 0!==b.style[e]){a=d[e];break}adf.shared.impl.animationUtils._transitionEndEventName=a}return adf.shared.impl.animationUtils._transitionEndEventName};
adf.shared.impl.animationUtils._getBrowserSpecificName=function(a){if(null==adf.shared.impl.animationUtils._browserSpecificNames[a]){var b=a,d=a.charAt(0).toUpperCase()+a.substring(1),e=document.createElement("div"),f={};f["Webkit"+d]="webkit"+d;f[b]=b;f["O"+d]="o"+d;f["Moz"+d]="moz"+d;for(var g in f)if(void 0!==e.style[g]){b=g;break}adf.shared.impl.animationUtils._browserSpecificNames[a]=b}return adf.shared.impl.animationUtils._browserSpecificNames[a]};
adf.shared.impl.animationUtils._requestAnimationFrame=function(a){for(var b=0,d=["webkit","ms","moz","o"],e=0;e<d.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[d[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[d[e]+"CancelAnimationFrame"]||window[d[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(a){var d=(new Date).getTime(),e=Math.max(0,16-(d-b)),k=window.setTimeout(function(){a(d+e)},e);b=d+e;return k});
window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)});window.requestAnimationFrame(a)};adf.shared.impl.animationUtils._isMinimumAgentMet=function(a,b){var d=arguments.length;if(1==d%2)return adf.shared.impl.animationUtils._fineLogger("AdfAnimationUtils: invalid number of minimum agent requirement arguments: "+d),!1;for(var e=2;e<=d-2;e+=2)if(a==arguments[e]){if(b>=arguments[1+e])return!0;break}return!1};
adf.shared.impl.animationUtils._getAgentTypeAndVersion=function(a){var b=adf.shared.impl.animationUtils._parseFloatVersion,d=null,e=-1;a=a.toLowerCase();-1!=a.indexOf("msie")||-1!=a.indexOf("trident")?(d="trident",e=b(a,/trident\/(\d+[.]\d+)/),-1==e&&(e=b(a,/msie (\d+\.\d+);/),-1==e&&(e=b(a,/msie (\d+\.\d+)b;/)),e-=4),null!=document.documentMode&&(e=Math.min(e,document.documentMode-4))):-1!=a.indexOf("applewebkit")?(d="webkit",e=b(a,/applewebkit\/(\d+([.]\d+)*)/)):-1!=a.indexOf("gecko/")&&(d="gecko",
e=b(a,/rv:(\d+[.]\d+)/));return[d,e]};adf.shared.impl.animationUtils._parseFloatVersion=function(a,b){var d=a.match(b);return d&&(d=d[1])?parseFloat(d):-1};
adf.shared.impl.animationUtils._saveStyles=function(a){if(null!=a&&a.getAttribute&&a.setAttribute){var b=a.getAttribute("data-adf-original-style");null!=b&&(adf.shared.impl.animationUtils._fineLogger("AdfAnimationUtils: save while pending restore"),adf.shared.impl.animationUtils._restoreStyles(a));b=a.getAttribute("style");null==b&&(b="");a.setAttribute("data-adf-original-style",b)}};
adf.shared.impl.animationUtils._restoreStyles=function(a){if(null!=a&&a.getAttribute&&a.setAttribute){var b=a.getAttribute("data-adf-original-style");null!=b&&(a.setAttribute("style",b),a.removeAttribute&&a.removeAttribute("data-adf-original-style"))}};adf.shared.impl.animationUtils._setOpacity=function(a,b){a.style.opacity=b};adf.shared.impl.animationUtils._setTransition=function(a,b){var d=adf.shared.impl.animationUtils._getBrowserSpecificName("transition");a.style[d]=b};
adf.shared.impl.animationUtils._setTransformValue=function(a,b){var d=adf.shared.impl.animationUtils._getBrowserSpecificName("transform");a.style[d]=b};adf.shared.impl.animationUtils._setTransformTranslate=function(a,b){var d=adf.shared.impl.animationUtils._getBrowserSpecificName("transform");a.style[d]="translate("+b+")"};
adf.shared.impl.animationUtils._setTransformRotateX=function(a,b){if("trident"==adf.shared.impl.animationUtils._agentTypeAndVersion[0])a.style.transform="perspective(2000px) rotateX("+b+")";else{var d=adf.shared.impl.animationUtils._getBrowserSpecificName("transform");a.style[d]="rotateX("+b+")"}};
adf.shared.impl.animationUtils._setTransformRotateY=function(a,b){if("trident"==adf.shared.impl.animationUtils._agentTypeAndVersion[0])a.style.transform="perspective(2000px) rotateY("+b+")";else{var d=adf.shared.impl.animationUtils._getBrowserSpecificName("transform");a.style[d]="rotateY("+b+")"}};adf.shared.impl.animationUtils._setBackfaceVisibility=function(a,b){var d=adf.shared.impl.animationUtils._getBrowserSpecificName("backfaceVisibility");a.style[d]=b};
adf.shared.impl.animationUtils._setTransformStyle=function(a,b){var d=adf.shared.impl.animationUtils._getBrowserSpecificName("transformStyle");a.style[d]=b};adf.shared.impl.animationUtils._setTransformOrigin=function(a,b){var d=adf.shared.impl.animationUtils._getBrowserSpecificName("transformOrigin");a.style[d]=b};adf.shared.impl.animationUtils.AnimationContext=function(a,b){this.Init(a,b)};adf.shared.impl.animationUtils.AnimationContext.prototype={};
null!=window.AdfObject&&(adf.shared.impl.animationUtils.AnimationContext.prototype.constructor=window.AdfObject);adf.shared.impl.animationUtils.AnimationContext.prototype.Init=function(a,b){this._finishedFunction=a;this._callbackParams=b;this._handledB=this._handledA=!0};
adf.shared.impl.animationUtils.AnimationContext.prototype.cancelFunction=function(){this._finishedFunction=null;var a=this._callbackParams;this._callbackParams=null;var b=adf.shared.impl.animationUtils;b._restoreStyles(this._elementA);b._restoreStyles(this._elementB);var d;null!=this._elementA?(d=this._elementA.parentNode,b._restoreStyles(d),null!=d&&b._restoreStyles(d.parentNode)):null!=this._elementB&&(d=this._elementB.parentNode,b._restoreStyles(d),null!=d&&b._restoreStyles(d.parentNode));this._removeTransitionEndA();
this._removeTransitionEndB();if(this._extraCancelFunction){try{this._extraCancelFunction()}catch(e){b._fineLogger("AdfAnimationUtils: unable to complete extra cancel function due to problem:"),b._fineLogger(e)}this._extraCancelFunction=null}return a};adf.shared.impl.animationUtils.AnimationContext.prototype._performFinish=function(){var a=this._finishedFunction,b=this._callbackParams;this._callbackParams=this._extraCancelFunction=this._finishedFunction=null;null!=a&&a(b)};
adf.shared.impl.animationUtils.AnimationContext.prototype.addExtraCancelFunction=function(a){this._extraCancelFunction=a};
adf.shared.impl.animationUtils.AnimationContext.prototype.addTransitionEndA=function(a,b){this._elementA=a;this._handleProxyA=adf.shared.impl.animationUtils.getProxyFunction(this,this._handleTransitionEndA);this._handledA=!1;var d=adf.shared.impl.animationUtils._getTransitionEndEventName();null!=b&&(this._extraHandlerA=b,a.addEventListener(d,b,!0));a.addEventListener(d,this._handleProxyA,!0)};
adf.shared.impl.animationUtils.AnimationContext.prototype._removeTransitionEndA=function(){var a=this._elementA;if(null!=a){var b=adf.shared.impl.animationUtils._getTransitionEndEventName();null!=this._extraHandlerA&&(a.removeEventListener(b,this._extraHandlerA,!0),this._extraHandlerA=null);a.removeEventListener(b,this._handleProxyA,!0);this._elementA=null}this._handleProxyA=null};
adf.shared.impl.animationUtils.AnimationContext.prototype._handleTransitionEndA=function(){this._handledA||(this._handledA=!0,this._removeTransitionEndA(),this._handledB&&this._performFinish())};
adf.shared.impl.animationUtils.AnimationContext.prototype.addTransitionEndB=function(a,b){this._elementB=a;this._handleProxyB=adf.shared.impl.animationUtils.getProxyFunction(this,this._handleTransitionEndB);this._handledB=!1;var d=adf.shared.impl.animationUtils._getTransitionEndEventName();null!=b&&(this._extraHandlerB=b,a.addEventListener(d,b,!0));a.addEventListener(d,this._handleProxyB,!0)};
adf.shared.impl.animationUtils.AnimationContext.prototype._removeTransitionEndB=function(){var a=this._elementB;if(null!=a){var b=adf.shared.impl.animationUtils._getTransitionEndEventName();null!=this._extraHandlerB&&(a.removeEventListener(b,this._extraHandlerB,!0),this._extraHandlerB=null);a.removeEventListener(b,this._handleProxyB,!0);this._elementB=null}this._handleProxyB=null};
adf.shared.impl.animationUtils.AnimationContext.prototype._handleTransitionEndB=function(){this._handledB||(this._handledB=!0,this._removeTransitionEndB(),this._handledA&&this._performFinish())};