function showHide(){
	$('#showHide a').click(function(evt){
		if($(this).hasClass('active')!=true){
			$('#showHide a').removeClass('active');
			$('article.showHide').fadeOut('slow');
			$("#"+$(this).attr('rel')).fadeIn('slow');
			$(this).addClass('active');
			$('.scroll-pane').jScrollPane();
		}
	});
}
function currentSlide( current ) {
	$(".current_slide").text(current + "/" + $('figure').length);
}

$(function(){
	/* SCROOLPANE */
	$('.scroll-pane').jScrollPane({
		autoReinitialise: true,
		verticalDragMinHeight: 260,
		verticalDragMaxHeight: 260
	});
	/* SHOWHIDE */
	showHide();
	/* SLIDES */
	currentSlide(1);
	$('.caption').animate({ bottom:-19 },100);
	$("#slides").slides({
		effect: 'fade',
		crossfade: true,
		bigTarget: true,
		container: 'container',
		preload: true,
		preloadImage: '_/img/img.loading.gif',
		animationStart: function(current){
			$('.caption').animate({ bottom:-50 },100);
		},
		animationComplete: function(current){
			currentSlide( current );
			$('.caption').animate({ bottom:-19 },100);
		}
	});
});
