(function(d,$) {
	d.addOnLoad(function() {
		var topLink = $('gototop');
		d.style(topLink,{
			opacity: 0,
			visibility: 'visible'
		});
		d.connect(window,'onscroll',function(e) {
			var scrollY = -dojo.position(dojo.body()).y, thresh = 100;
			/*  d['fade' + (scrollY > thresh ? 'In' : 'Out')]({ node: topLink }).play(); */
			dojo.anim(topLink, { opacity: (scrollY > thresh ? 1 : 0 ) }); /* more concise, @phiggins */
		});
	});
})(dojo,dojo.byId);

// JavaScript Document