$(document).ready(function() {
	// Hide all the content except the first
	$('.slidermenu li:odd').hide();
	
	// Add the dimension class to all the content
	$('.slidermenu li:odd').addClass('dimension');
	
	// Set the even links with an 'even' class
	$('.slidermenu li:even:even').addClass('even');
	
	// Set the odd links with a 'odd' class
	$('.slidermenu li:even:odd').addClass('odd');
	
	// Show the correct cursor for the links
	$('.slidermenu li:even').css('cursor', 'pointer');
	
	// Handle the click event
	$('.slidermenu li:even').click( function() {
		// Get the content that needs to be shown
		var cur = $(this).next();
		
		// Get the content that needs to be hidden
		var old = $('.slidermenu li:odd:visible');
		
		// Make sure the content that needs to be shown 
		// isn't already visible
		if ( cur.is(':visible') ) {
			cur.stop().slideToggle();
			cur.prev().stop().removeClass("activeSlide");
			return false;
		}
		
		// Hide the old content
		old.slideToggle();
		
		// Show the new content
		cur.stop().slideToggle();
		
		// Animate (add) the padding in the new link
		$(this).stop().addClass("activeSlide");
		
		// Animate (remove) the padding in the old link
		old.prev().stop().removeClass("activeSlide");
	} );
});