function configLawGuideMenu(){
	$("a.level2,a.level4","#lawguide").bind("click",function(){
		$("#lawguide-"+this.id.split("-")[1]+"-children").toggle();
	})
}

$(document).ready(function(){
	configLawGuideMenu();
	
	/*if( $('#e_page').hasClass('ele-subsite') ){
	
		var servicesBox = {};
		servicesBox.parentNode = $(".e_services");
		servicesBox.buttonNode = $(servicesBox.parentNode).find(".e_head");
		servicesBox.listNode = $(servicesBox.parentNode).find(".childrenlevel2");

		$(servicesBox.listNode).hide();

		$(servicesBox.buttonNode).mouseup(function(){

			$(servicesBox.listNode).toggle();
			$(servicesBox.buttonNode).css("backgroundImage", "url(images/service_header_contract.gif)");

			$(servicesBox.parentNode).one("mouseleave",function(){          
				$(servicesBox.listNode).hide();
				$(servicesBox.buttonNode).css("backgroundImage", "url(images/service_header_expand.gif)");
			})
		})
	}*/
	
	$("#showmore1").click(function(){
		$("#showmore1").hide();
		$("#showless1").show();
		$("#more1").show();
	});
	
	$("#showless1").click(function(){
		$("#showmore1").show();
		$("#showless1").hide();
		$("#more1").hide();
	});
	
	$("#showmore2").click(function(){
		$("#showmore2").hide();
		$("#showless2").show();
		$("#more2").show();
	});
	
	$("#showless2").click(function(){
		$("#showmore2").show();
		$("#showless2").hide();
		$("#more2").hide();
	});
	
	$("#showmore3").click(function(){
		$("#showmore3").hide();
		$("#showless3").show();
		$("#more3").show();
	});
	
	$("#showless3").click(function(){
		$("#showmore3").show();
		$("#showless3").hide();
		$("#more3").hide();
	});
	
	$("#showmore4").click(function(){
		$("#showmore4").hide();
		$("#showless4").show();
		$("#more4").show();
	});
	
	$("#showless4").click(function(){
		$("#showmore4").show();
		$("#showless4").hide();
		$("#more4").hide();
	});
	
	$("#showmore5").click(function(){
		$("#showmore5").hide();
		$("#showless5").show();
		$("#more5").show();
	});
	
	$("#showless5").click(function(){
		$("#showmore5").show();
		$("#showless5").hide();
		$("#more5").hide();
	});
	
	$("#showmore6").click(function(){
		$("#showmore6").hide();
		$("#showless6").show();
		$("#more6").show();
	});
	
	$("#showless6").click(function(){
		$("#showmore6").show();
		$("#showless6").hide();
		$("#more6").hide();
	});
	
	

	// Rename the 'Delete' buttons in the basket to 'Remove'
	$(".ele-basket .e_basketItems td.e_delete a").html("Remove");
	
	// Add a 'Documets' heading to the 'Filters' section of My Documents
	$(".ele-MyServices-MyDocuments .e_nav .e_displayOptions").prepend("<h3 class=\"e_title\">Documents</h3>");
	
	// Rename 'Try' to 'Try before you buy'
	$(".ele-product .e_productObjects .e_object .e_tbyb a").html("Try before you buy");
	
	// Rename Rule 2 page title
	$(".ele-basketFirmRule2 h1.e_title").html("Checkout - Pannone Online terms and conditions");
})
