// JavaScript Document for lionis.net

$(document).ready(function() {
	// IE6 Transparent PNG fix
	if($.browser.msie && $.browser.version == '6.0') {
		$('img, #headline').pngfix();
  }
	
	$('#MMenuBg').css('opacity', 0.3);
	$('#validation').css('opacity', 0.4);

  if ( $('body').attr('id') == 'home' || $('body').attr('id') == 'news' ) {
    $('#archives ul li span').click( function(){
      $(this).next('p').toggle();
    });
  } 
});

function adjustToc(sTop,id) {
	// alert("scrollPos: " + sTop + " tocPos: " + tocPos);
	tocPos = (sTop - 293) + 'px';
	
	if ( sTop > 293 ) {
//		$('#toc').css('top',tocPos);
		$('#toc').animate({
			top: tocPos
		}, 'normal');
	} else {
		$('#toc').animate({ top: 0 + 'px' }, 'normal');
//		$('#toc').css('top', 0);
	}
	window.clearTimeout(id);
}
