$(document).ready(function(){
	$(".lftnav li .showmore").click(function(){
		var text = String($(this).text());
		var parentUl = $(this).parent().parent();
		if(text.substr(0,3) == 'Mor'){
			$(this).text("Less....");
			$(parentUl).children(".tohide").removeClass("hidden");
		} else {
			$(this).text("More....");
			$(parentUl).children(".tohide").addClass("hidden");
		}
		return false;
		
	});
	

	
	$("ul.lftnav").each(function(index) {
		var base = Number($(this).attr("rel"));
		var total = Number($(this).children().length);
		
		$(this).children().each(function(index) {
			if(index >= base && (index < (total-1))){
				$(this).addClass("hidden tohide");
			}
		});
    	
	});

});
