window.addEvent('domready',function() {
	//scroller
	new SmoothScroll({duration:1000, transition:Fx.Transitions.quadOut});
	
	//text resizer
	function resizeText(multiplier) {
		if ($("main-content_holder").style.fontSize == "") {
				$("main-content_holder").style.fontSize = "1em";
			}
		$("main-content_holder").style.fontSize = parseFloat($("main-content_holder").style.fontSize) + (multiplier * 0.2) + "em";
		
		//Cookie.set('fontSize','large',1);
		
		if ($("footer").style.fontSize == "") {
				$("footer").style.fontSize = "1em";
			}
		$("footer").style.fontSize = parseFloat($("footer").style.fontSize) + (multiplier * 0.2) + "em";
	}

	$("plustext").addEvent("click", function() {resizeText(1);});
	$("minustext").addEvent("click", function() {resizeText(-1);});
	
	//tips
	var Tips2 = new Tips($$('#sizing-opt span[title], #bottom-ctas li[title]'), {
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration:400, wait: false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
			this.fx.start(0);
		}
	});
	
});
