$(document).ready(function(){
	

	$("a.close").click(function() {
		
		$("div.content-section").hide();
		$("div#overlay").hide();
		
		return false;
		
	});
	
	$("ul#treeview").treeview({persist: "location",
		collapsed: true});
	
	$("ul#treeview :checkbox").click(function() {
		
		map.clearOverlays();
		
		var value = this.checked;
		var p_id = this.id;
		var selected = [];
		
		$(this).parent().find("ul li input:checkbox").each(function() {

			if(value == true) {
				this.checked = true;
			}
			else {
				this.checked = false;
			}
			
		});
		
		$("ul#treeview :checkbox").each(function() {
			if(this.checked) {
			
				AddIcons(this.id);
				
			}
		});

	
	});
	
});
