



$(document).ready(function(){
	
	var current = '';
	var animeSpeed = 200;
	
	$('#middle .ngg-galleryoverview').hide(0);
	
	$('#middle p').css({cursor:'pointer', borderBottom:'1px solid #c00'}).click(function(){
		
		if (current == this) {
			
			$(this).next().animate( { height: 'hide', opacity: 'hide' } , animeSpeed );
			$(this).css({borderBottom:'1px solid #c00',paddingBottom:'20px'});
			current = "";
			
		} else if (current=='') {
			
			$(this).css({borderBottom:'none',paddingBottom:'0'});
			$(this).next().animate( { height: 'show', opacity: 'show' } , animeSpeed );
			current = this;
			
		} else {
		
			$(this).css({borderBottom:'none',paddingBottom:'0'});
			$(current).css({borderBottom:'1px solid #c00',paddingBottom:'20px'});
			$(current).next().animate( { height: 'hide', opacity: 'hide' } , animeSpeed );
			$(this).next().animate( { height: 'show', opacity: 'show' } , animeSpeed );
			current = this;
			
		}

	});
	
});

