// JavaScript Document
// CopyRight under GPL ShanGroup Foundation Erasai Corporation

$(function(){	   
	var flag = new Boolean(false);
	$('.shan li' , $(this)).hover(
	function(){			  													 
	if($(this).children().length > 1){		
	$(rElem(this) + ':first' , $(this)).css({visibility: "visible",display: "none"}).slideDown(400);
	var a = $(this).children()[0];
	if($(a).hasClass('selected')){
	flag = true;
	}
	else{
	$(a).addClass('selected');
	flag = false;
	}}},
	function()
	{
	if($(this).children().length > 1){							
	$(rElem(this)  + ':first' , $(this)).css({visibility: "hidden"});
	var a = $(this).children()[0];
	if(!flag)
	{
	$(a).removeClass('selected');							
	}}});
	function rElem(_ele){
	return $(_ele).children()[1].tagName;
	}  
});


