$(document).ready(function(){
	$(".ctg li").each(function(){
		$(this).mousemove(function(){
			$(this).addClass("ctgslt");
			if ($(this).parent().hasClass('ctg')){
				var p=$(this).position();
				$(this).find(".sub").css('top',p.top).css('left',p.left+$(this).parent().width()).stop().fadeTo('fast',1).show();
			}
		});
		$(this).mouseout(function(){
			$(this).removeClass("ctgslt");
			if ($(this).parent().hasClass('ctg'))
				$(this).find(".sub").stop().fadeTo('fast',0,function(){$(this).hide()});
		});
	});
});
