var items = [];
function show_element(value){
	items[value] = 'open';
	
	current = document.getElementById(value).style.display;
	
	if(current != "block"){
		$('#' + value).slideDown(200);
	}
}

function hide_element(value) {
	items[value] = 'close';
	
	setTimeout("closeItem(\""+ value +"\")",400);
}

function closeItem (value) {
	if(items[value] == 'close'){
		$('#' + value).slideUp(200);
	}
}

function profile_smooth_in(id){
	opacity = getopacity(id);
	if(opacity == 0.45){
		return;
	}
	$('#'+id).stop(true, true).animate({
    	opacity: 0.45
  	}, 200, function() {
		// Doe niets
 	});	
}

function profile_smooth_out(id){
	opacity = getopacity(id);
	$('#'+id).animate({
    	opacity: 0.30
  	}, 200, function() {
		// Doe niets
 	});
}

function getopacity(elem) {
  var ori = $('#' + elem).css('opacity');
  var ori2 = $('#' + elem).css('filter');
  if (ori2) {
    ori2 = parseInt( ori2.replace(')','').replace('alpha(opacity=','') ) / 100;
    if (!isNaN(ori2) && ori2 != '') {
      ori = ori2;
    }
  }
  return ori;
}
