// JavaScript Document
addLoadEvent(anchorFolioPieces);


// get all links in the 'active' class section and assign scrolling actions to them
function anchorFolioPieces() {
	var links = $$('#folioMenu ul.active li a');	
	
	// first link is always the headline
	for(i=1;i<links.length;i++) {
		links[i].onclick = function() {
			
			// get id name ( everything after # in the href)
			var target = this.href;
			var pound = target.indexOf('#');
			
			
			var id = target.substring(pound + 1, target.length);
		
			// scroll to that byatch
			Effect.ScrollTo(id);
			
			return false;
		}
	}
}



function showFullStory(id) {
	
	var links = $$('.storyLinks');
	var stories = $$('.story');
	
	// turn of all stories
	for(i=0;i<stories.length;i++) {
		stories[i].style.display='none';
		links[i].style.display='block';
	}
	
	
	// turn on relevant items
	//$('fullStory'+id).style.display = 'block';
	var story = 'fullStory'+id
	$(story).appear({ duration: 3.0 });

	$('fullStoryLink'+id).style.display = 'none';
	
}


