function osageAnimation() {
	new Effect.Morph('body',  {style:'background:url(/res/img/back.jpg);',  duration: 1.3});
}

snh = 0.2;

function closeContentContent(){
	new Effect.Morph('content_main',  {style:'height:0px;',  duration: snh});
}
function openContentContent(){
	new Effect.Morph('content_main',  {style:'',  duration: snh});
}



function sluitSub(element){
	$('a_sluitsub').hide();
    $('a_opensub').show();
 
    if( element == undefined ){
    	element = $('content_subcontent')
    }
	element.hide();
}


function openSub(element){
	$('a_sluitsub').show();
    $('a_opensub').hide();
    
    if( element == undefined ){
    	element = $('content_subcontent')
    }
    
 	element.show();

}

function MoveLeft(aantal, selectedItem) {
	//NieuwsBox = document.getElementById("NieuwsBox");
	var nieuwsBox = jQuery('#NieuwsBox')[0];
	
	if ((nieuwsBox.offsetLeft == 0) || (nieuwsBox.offsetLeft%200 != 0)) {
		
	} else {
		offset = nieuwsBox.offsetLeft/200 + selectedItem*1;	// Range 1 to 4 is on screen
		switch (offset) {
		case 1:	// fall through
		case 2:
			if (jQuery('#content_main_container').width() != 830){
				new Effect.MoveBy('content_main_container', 0, 200 , {duration: 0.4,  transition: Effect.Transitions.sinoidal});
			}
			break;
		case 4:
			jQuery('#content_main_container').slideUp();
			break;
		case 0:
			jQuery('#content_main_container').slideDown();
			break;
		}
		
		new Effect.Morph('rightmove',  {style:'width:180px;',  duration: 0.2});
		new Effect.MoveBy('NieuwsBox', 0, 200 , {duration: 0.4,  transition: Effect.Transitions.sinoidal, afterFinish:function(){	
			if (nieuwsBox.offsetLeft == 0) {
				 new Effect.Morph('leftmove',  {style:'width:0px; left:0px;',  duration: 0.2});
			}
		}});
	}
}
            
function MoveRight(aantal, selectedItem) {
	breed = 800 - (aantal * 200);
	//NieuwsBox = document.getElementById("NieuwsBox");
	var nieuwsBox = jQuery('#NieuwsBox')[0];
			
	if ((nieuwsBox.offsetLeft == breed) || (nieuwsBox.offsetLeft%200 != 0)) {
	   
	} else {

		offset = nieuwsBox.offsetLeft/200 + selectedItem*1;	// Range 1 to 4 is on screen
		switch (offset) {
		case 2: // fall through
		case 3:
			if (jQuery('#content_main_container').width() != 830){
				new Effect.MoveBy('content_main_container', 0, -200 , {duration: 0.4,  transition: Effect.Transitions.sinoidal});
			}
			break;
		case 1:
			jQuery('#content_main_container').slideUp();
			break;
		case 5:
			jQuery('#content_main_container').slideDown();
			break;
		}
		
		new Effect.Morph('leftmove',  {style:'width:180px; left:-180px;',  duration: 0.2});
		new Effect.MoveBy('NieuwsBox', 0, -200 , {duration: 0.4,  transition: Effect.Transitions.sinoidal, afterFinish:function(){
			if (nieuwsBox.offsetLeft == breed) {
				new Effect.Morph('rightmove',  {style:'width: 0px;',  duration: 0.2});
			}
		}});
	}
}

function testlink() {



}

/*
function openSubSub(){
		$('content_content').hide();
		//$('menu_midden').hide();
		//$('menu_sub_cont').hide();
		$('a_terugnaarsub').show();

		new Effect.Morph('menu_midden',  {style:'height:45px;',  duration: snh});
	
		new Effect.Morph('content_content',  {style:'height:0px;',  duration: snh});
		new Effect.Morph('a_subnaam',  {style:'left:0px;overflow:auto;height:25px;',  duration: snh});
		new Effect.Morph('a_terugnaarsub',  {style:'height:25px;visibility:visible;display:block;',  duration: snh});
}




function closeSubSub(){
		$('content_content').show();
		$('menu_midden').show();
		$('menu_sub_cont').show();

		new Effect.Morph('menu_midden',  {style:'height:45;',  duration: snh});
		
		new Effect.Morph('content_content',  {style:'',  duration: snh});
		new Effect.Morph('a_subnaam',  {style:'height:0px;',  duration: snh});
		new Effect.Morph('a_terugnaarsub',  {style:'height:0px;display:none;visibility:hidden;',  duration: snh});
}*/
