// Andi Priambodo, ENMEDS 2008
// Execute this after the site is loaded.

$(document).ready(function() {

	// em top navigation
	$("div.navigation a").hover(function() {
		$(this).next("em").animate({opacity: "show", top: "130"}, "slow");
	}, function() {
		$(this).next("em").animate({opacity: "hide", top: "110"}, "fast");
	});
	
	// side menu sub menu	
	$("div.side-menu li ul").hide();	
	$("div.side-menu li").click(	
        function () {
			if ((this.childNodes.length) > 1 ){
				$(this).children("ul").slideToggle(500);
				$(this).children("a").toggleClass("down");
			}
			return false;
		}
	);
	
	/* to show active sidebar block 
	
	*/
	$("div.side-menu li ul.show").show();
	
	/*$(".table-view td").click(function(){
		if ($("this > a")){
			window.location=$(this).find("a").attr("href");
		}
		return false;
	});*/
});



