/* - - - - - smoothjumps smoothly to target-anchors - - - - -  */

function initSmoothJump() {
	
	// get elements
	var jumpLinks = $$('.smoothjump');
	
	// create smoothjumpFX object
	smoothjump = new Fx.Scroll(window,{
		wait: false,
		duration: 500,
		offset: {'x': -200, 'y': -50},
		transition: Fx.Transitions.Quad.easeInOut
	});
	
	// add onClick-event to jumplinks
	for (var i=0; i < jumpLinks.length; i++) {
		var jumpLink = jumpLinks[i];
		jumpLinks[i].addEvent('click', function(e) {
			var jumpTarget = (this.href).split('#')[1];
			e = new Event(e).stop();
			smoothjump.toElement(jumpTarget);
		});
	};
	
}