$(document).ready(function() {
	var depth2 = $("script#layout").attr("depth2");

	var outImgPatten  = "_off";
	var overImgPatten = "_on";

	var current_title = "";

	$(".leftMenu ul li img").each(function(n){
		if(n == depth2-1)
		{
			src = $(this).attr("src");
			src = src.replace(outImgPatten,overImgPatten);
			$(this).attr("src",src);
			
			current_title = $(this).attr("alt");
		}
		else
		{			
			$(this).mouseover(function(){
				src = $(this).attr("src");
				src = src.replace(outImgPatten,overImgPatten);
				$(this).attr("src",src);			
			});

			$(this).mouseout(function(){
				src = $(this).attr("src");
				src = src.replace(overImgPatten,outImgPatten);
				$(this).attr("src",src);			
			});
		}
	});

	
	//var sub_href  = $("#sidebar li a").eq(0).attr("href");
	var sub_title = $(".leftMenu h2 img").attr("title");
		
	//$(".navi .subtitle a").attr("href",sub_href	);
	$(".navigation .subtitle").text(sub_title)
	$(".navigation .current").text(current_title);

	$(".content h3 img").attr("alt",current_title);	

	$(".navigation").show();

	if(current_title)
		document.title = document.title + ' - ' + sub_title + ' > ' +  current_title ;
	
});
