var object = new ArgumentURL(); 

jQuery(function ($) { 
		
		//$('.inner_content3').css('background-color', '#3296C0'); 
		$('.inner_content3').curvycorner();
		//$('.inner_content3').curvycorner({     tl: { radius: 1 },     tr: { radius: 6 },     bl: { radius: 6 },     br: { radius: 6 }});
		
		$("#async_html_1").tree({
			opened : [0],
			data : { 
				async : true, 				
				opts : {
					url : "links/async_html_data_1.txt"
				}
			},
			ui : {            
				theme_name : "apple",
				dots : false					
			}		
           
		});
		
		
		
		//var tree = $.tree.reference("#async_html_1");
		//tree.toggle_branch();
		//tree.toggle_dots();
		//tree.close_all();
		
    	$("#async_html_2").tree({
			opened : [0],
			data : { 
				async : true, 				
				opts : {
					url : "links/async_html_data_2.txt"
				}
			},
			ui : {            
				theme_name : "apple",
				dots : false
					
			}
		});
		
		$("#async_html_3").tree({
			opened : [0],
			data : { 
				async : true, 				
				opts : {
					url : "links/async_html_data_3.txt"
				}
			},
			ui : {            
				theme_name : "apple",
				dots : false					
			}
		});
		
		$("#async_html_4").tree({
			opened : [0],
			data : { 
				async : true, 				
				opts : {
					url : "links/async_html_data_4.txt"
				}
			},
			ui : {            
				theme_name : "apple",
				dots : false					
			}
		});
		
		$("#async_html_5").tree({
			opened : [0],
			data : { 
				async : true, 				
				opts : {
					url : "links/async_html_data_5.txt"
				}
			},
			ui : {            
				theme_name : "apple",
				dots : false					
			}
		});
		
		$("#async_html_6").tree({
			opened : [0],
			data : { 
				async : true, 				
				opts : {
					url : "links/async_html_data_6.txt"
				}
			},
			ui : {            
				theme_name : "apple",
				dots : false					
			}
		});
		
		$("#async_html_7").tree({
			opened : [0],
			data : { 
				async : true, 				
				opts : {
					url : "links/async_html_data_7.txt"
				}
			},
			ui : {            
				theme_name : "apple",
				dots : false					
			}
		});
		$("#async_html_8").tree({
			opened : [0],
			data : { 
				async : true, 				
				opts : {
					url : "links/async_html_data_8.txt"
				}
			},
			ui : {            
				theme_name : "apple",
				dots : false					
			},
			callback : { 
					onload  : function(t){

			 		if (object != null)
					{
						if (object.size()>0)
						{
							var lnk = object.getArgument('open');
							
							if (lnk != null)
							{
								var tree = $.tree.reference("#async_html_8");
								if (tree != null)
								{
									tree.toggle_branch("#" + lnk);
									
									$.scrollTo('+=250px', 1000, { axis:'y' }); 
								}
							}
						}
					}
					
					//$('.inner_content3').curvycorner();
					
			 	}
			}
		});
			
		//toggle through arguments
		
});
	
function toggleNode(lnk)
{
	var tree = $.tree.reference("#async_html_8");
	if (tree != null)
	{
		tree.toggle_branch("#" + lnk);
	}	
}



	
