var toggleContent = function(e)
{
	var targetContent = $(this).next('div.itemContent');
	if (targetContent.css('display') == 'none')
	{
		targetContent.show();
		$(this).css("background-image","url(img/expanded.gif)");
	} 
	else 
	{
		targetContent.hide();
		$(this).css("background-image","url(img/collapsed.gif)");
	}
	return false;
};


$(document).ready(function(){
	$('div.itemHeader > h2').hover(
      function () {
        $(this).css('text-decoration','underline');
      }, 
      function () {
        $(this).css('text-decoration','none');
      }
    );
	$('div.itemHeader').click(toggleContent);
	
	var myFile = document.location.toString();
	if (myFile.match('#')) {
		var myAnchor = myFile.split('#')[1];
		destination = $('#anchor'+myAnchor).offset().top;
		$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, 1100 );
		$('#hd'+myAnchor).click();
	}
});