google.setOnLoadCallback(function() {
	$("li.categories ul li:has(ul)").prepend("<img src='http://www.kellyoshiroevents.com/images/expand.png'/>");
	$("li.categories ul li:not(:has(ul))").prepend("<img src='http://www.kellyoshiroevents.com/images/bullet.png'/>");
	//$("li.linkcat li, li.categories li").hide();
	
		
	$.get("r_index.php", function(data){
		$("#content").html(data);
	});
	
	$("li.categories ul li ul").siblings("img").click(function(){
		v = $(this).siblings("ul:visible");
		h = $(this).siblings("ul:hidden");		
		
		v.slideUp(150);
		v.siblings("img").attr({src : "http://www.kellyoshiroevents.com/images/expand.png"});
		
		h.slideDown(150);
		h.siblings("img").attr({src : "http://www.kellyoshiroevents.com/images/contract.png"});
	});
	
	$("li.categories ul li a").hover(
	function(){
		$(this).css("color", "black");
	},
	function(){
		$(this).css("color", "#007d1e");
	});
	
	$("li.categories ul li ul").hide();

/*	
	$("li.linkcat > h2, li.categories > h2").click(function(){
		$(this).parent().find("li").toggle(300);
	});
*/	
	$("li.linkcat > h2, li.categories > h2").each(function(){
		var txt = $(this).html();
		var img;
		if (txt == "Categories")
			img = "Categories.gif";
		else if(txt == "Estate Locations")
			img = "estates.png"
		else if(txt == "Inspiring Places")
			img = "Design-Blogs.gif";
		else if(txt == "Wedding Blogs")
			img = "WeddingBlogs.gif";
		else if(txt == "Wedding Resources")
			img = "Resources.gif";
			
		if(img != 0)
			$(this).html("<img src='http://kellyoshiroevents.com/graphics/"+ img + "'/>")
	});
});
