Effect.Transitions.customExponentialEaseOut=function(X){
	if(X==0){
		return 0;
	}if(X==1){
		return 1;
	}X+=X*3;
	return -Math.pow(2,-10*X)+1;
};

AC.AnchorPageScroller=Class.create();

Object.extend(AC.AnchorPageScroller.prototype,AC.ViewMaster.Viewer.prototype);
Object.extend(AC.AnchorPageScroller.prototype,{
	triggerClassName:"scrollToAnchor",_triggerClicked:function(X){
		var T=X.element();
			if(AC.Detector.isIEStrict()&&X.type==="mouseup"){
				if(T&&T.nodeName.toLowerCase()==="a"){
					T=T.down("."+this.triggerClassName);
				}
			}else{while(T&&T.nodeName.toLowerCase()!="a"&&T.nodeName.toLowerCase()!="body"){
				T=T.parentNode;
			}
		}if(T&&T.href&&Element.Methods.hasClassName(T,this.triggerClassName)){
			var D=T.href.split("#");if(D.length===2){
				Event.stop(X);
				this._currentDestination=D[1];
				var Z={
					duration:1.5,transition:Effect.Transitions.customExponentialEaseOut,afterFinish:this.afterScroll.bind(this)
				};new Effect.ScrollTo(this._currentDestination,Z);this.trackClick();
			}
		}
	},afterScroll:function(){
		var X=window.location.href.split("#");X[1]=this._currentDestination;window.location.href=(X[0]+"#"+X[1]);
		delete this._currentDestination;
	},sectionWithId:function(X){
		return null;
	},trackClick:function(){
		var Z=AC.Tracking.pageName()+" - "+this._currentDestination;var X={
			prop24:Z,pageName:AC.Tracking.pageName()+" (US)"
			};AC.Tracking.trackClick(X,this,"o",Z);
		}
	});
	Event.onDOMReady(function(){AC.AnchorPageScroller.defaultAnchorScroller=new AC.AnchorPageScroller();
});
