// ManjoGraphics

// set counter
var forward = 1;

// count that shit!
function countup() {  forward++; }
function countdown() { forward--;}

// slide forward
function goforward() {

if (forward == 7) {
new Effect.Morph('next', {
  style: 'top: 355px', 
  duration: 0.2 
});
}
else { }
new Effect.Move('slider', { x: -515, y: 0, duration: 0.6,  transition:Effect.Transitions.sinoidal, afterFinish: countup }); 
new Effect.Morph('back', {style: 'top: 375px', duration: 0.2 });
}


// slide backward
function goback() {
if (forward != 2) {
new Effect.Move('slider', { x: 515, y: 0, duration: 0.4, afterFinish: countdown });
new Effect.Morph('next', {style: 'top: 375px', duration: 0.2 });
}
else {
new Effect.Move('slider', { x: 515, y: 0, duration: 0.4, afterFinish: hideback });
}

// wooosh!
function hideback() {
new Effect.Morph('back', {style: 'top: 355px', duration: 0.2, afterFinish: countdown });
	}
}// JavaScript Document




<!--navigation:-->
function killbuttons() {
	new Effect.Morph('next', {style: 'top: 355px;', duration: 0.8 });
	new Effect.Morph('back', {style: 'top: 355px;', duration: 0.8 });
}

function killother() {
	new Effect.Morph('contact', {style: 'top: -215px;', duration: 0.8 });
	new Effect.Morph('info', {style: 'top: 0px;', duration: 0.8 });
	new Effect.Morph('impressum', {style: 'top: -430px', duration: 0.8 });
}


function getinfo() {
	new Effect.Morph('info', {style: 'top: -215px; z-index: 10;', duration: 0.8 });
	new Effect.Morph('contact', {style: 'top: -215px;', duration: 0.8 });
	new Effect.Morph('impressum', {style: 'top: -430px', duration: 0.8 });
	killbuttons();
}

function getworks() {
	new Effect.Morph('info', {style: 'top: 0px', duration: 0.8 });
	if (forward != 8) { 	new Effect.Morph('next', {style: 'top: 375px;', duration: 0.8 }); } else {}
	if (forward != 1) { 	new Effect.Morph('back', {style: 'top: 375px;', duration: 0.8 }); } else {}
	killother();
}

function getcontact() {
	new Effect.Morph('contact', {style: 'top: -430px', duration: 0.8 });
	new Effect.Morph('impressum', {style: 'top: -430px', duration: 0.8 });
	killbuttons();
}

function getimprint() {
	new Effect.Morph('impressum', {style: 'top: -645px', duration: 0.8 });
	killbuttons();
}

<!--additional content-->
var ID = 0;
var currentID = 0;

function scroll(boxID) {
	if (ID == 0) { 
	Effect.Appear('ac' + boxID, { duration: 0.5, afterFinish: show});
	ID = boxID;	
	currentID = boxID;
	}
	else {	 
	Effect.Fade('ac' + ID, { duration: 0.5 });
	Effect.Appear('ac' + boxID, { duration: 0.5, afterFinish: show}); }
	ID = boxID;
}

function show() {
	Effect.ScrollTo('ac' + currentID, { duration: 0.5});
}

function scrollup() {
	Effect.ScrollTo('anchor', { duration: 0.5});
	Effect.Fade('ac' + ID, { duration: 0.5 });
	ID = 0;
}