// JavaScript Document

	$(document).ready(function(){
		// add a collapse/expand button
		$('#sitemap ul ul:first').prepend('<p id="dirshow"><a href="#">contraer sitemap</a></p>');
		// get the button & add onclick behavior
		$('#dirshow a').click(function(){
			var that = $(this),
					level3 = $('#sitemap li li li');
			// if there isn't already a toggling class
			if (!that.hasClass('hidelevel')) {
				// hide the 3rd level lists
				level3.hide('normal');
				// change the button value & add toggling class
				that.html('expandir sitemap').addClass('hidelevel');
			} else {
				// reveal the 3rd level+ lists
				level3.show('slow');
				// change the button value & remove toggling class
				that.html('contraer sitemap').removeClass('hidelevel');
			}
			// deactivate link href value
			return false;
		});
	});
