$(document).ready(function() {
	// MENU
	$("#menu li").each(function() {
		$(this).before("<li class=\"dv\"></li>");
	});
	
	$("#menu li[class=current]").each(function() {
		$(this).prev().addClass("left");
		$(this).next().addClass("right");
	});
	$("#menu").css("visibility","visible");
	/* ***************************************** */
	
	// LANGUAGE BAR
	$("#language").hover(function() {				
		$(this).find("a[class!=hidden]").animate({
			marginTop : "-30px"				
		},300);
		$(this).find("a[class=hidden]").fadeIn("fast");		
	}, function() {			
		$(this).find("a[class!=hidden]").animate({
			marginTop : "10px"				
		},300);
		$(this).find("a[class=hidden]").fadeOut("fast");				
	});
	/* ***************************************** */

	// BUTTONS
	$(".button").each(function() {
		t = "rel=\"sameWindow\"";
		if($(this).hasClass("newWindow")) t = "rel=\"newWindow\"";
		$(this).replaceWith("<table "+t+" cellspacing=\"0\" class=\"buttonTb\"><tr><td class=\"buttonL\">&nbsp;</td><td class=\"buttonLink\"><a rel=\""+$(this).attr("href")+"\">"+$(this).text()+"</a></td><td class=\"buttonR\">&nbsp;</td></tr></table>");					
	});
	$(".buttonTb").click(function() {
		if($(this).attr("rel")=="sameWindow") location.href = $(this).find("a").attr("rel");
		if($(this).attr("rel")=="newWindow") window.open($(this).find("a").attr("rel"));
	});

	/* **************************************** */	
			
});

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}
