jQuery(document).ready(function() {

	$('#slideshow').hide();

	$('#top-shadow,#footer').ifixpng();

	$('body:not(#about) .scroll-pane').jScrollPane({
		scrollbarWidth: 6,
		scrollbarMargin: 4,
		showArrows: true,
		arrowSize: 15,
		animateTo: true
	});
	
	var $scrolltopane = $('.scroll-pane');
	
	$('#menus .article-index a').bind(
		'click',
		function()
		{
			var targetElementSelectorString = $(this).attr('href');
			$scrolltopane[0].scrollTo(targetElementSelectorString);
			return false;
		}
	);
	
	$(window).load(function() {
		
		$('#slideshow').fadeIn(1000);
	
		$('#slideshow').cycle({ 
			fx: 'fade',
			speed: 2500,
			timeout: 4500,
			pause: 1
		 });

    });
	
	$('A[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });

});