/**
 * jq_summary Jun 2010 Version 2.0
 * Maritta Sturt
 * Copyright (c) M. Sturt 
 */

$(function() {
		
		// Reset the screen to (0,0), many browsers don't reset scroll on refreshes
		$.scrollTo(0); 
		
		$('.summary').click(function(){ 
			url = $(this).attr('href');
			var targetPos = $(url).position().top;
			if (targetPos > 0) targetPos = targetPos + 10;
			$.scrollTo(url,800);
			$('#summary').animate({top: targetPos+"px" },600);
			return false;	
		}); 
		
		$(window).scroll(function () { 
			var scrollTop = $(window).scrollTop();
			if (scrollTop == 0) $('#summary').animate({top: "0px" },600);
		});
		
});//function
