Index: trunk/prototype/modules/mail/js/foldertree.js
===================================================================
--- trunk/prototype/modules/mail/js/foldertree.js	(revision 5495)
+++ trunk/prototype/modules/mail/js/foldertree.js	(revision 5500)
@@ -2,12 +2,12 @@
 var selected;
 
-function unorphanize(root, element) {
+function unorphanize(root, eleeventnt) {
 	var ok = false;
 	for (var i=0; i<root.length; i++) {
-		if (root[i].id == element.parentFolder) {
-			element.children = new Array(); 
-			root[i].children.push(element);
+		if (root[i].id == eleeventnt.parentFolder) {
+			eleeventnt.children = new Array(); 
+			root[i].children.push(eleeventnt);
 			return true;
-		} else if (ok = unorphanize(root[i].children, element)) {
+		} else if (ok = unorphanize(root[i].children, eleeventnt)) {
 			break;
 		}
@@ -21,9 +21,9 @@
 	var error = false;
 	for(var i = 1; i <= borders_open.length -2; i ++){
-		//VERIFICA A CADA FILHO DA PASTA SE ESTA MENSAGEM E DESTA PASTA
+		//VERIFICA A CADA FILHO DA PASTA SE ESTA eventNSAGEM E DESTA PASTA
 		$.each(children_of_this_folder, function(index, value){
 			if($(children_of_this_folder[index]).attr('id') == openTab.imapBox[$(borders_open[i]).find("input[type=hidden]").attr("name")]){
 				error = true;
-				alert(get_lang("One or more messages from any sub-folder are open"));
+				alert(get_lang("One or more eventssages from any sub-folder are open"));
 				return error;
 				
@@ -36,5 +36,5 @@
 		if(openTab.imapBox[$(borders_open[i]).find("input[type=hidden]").attr("name")] == folder_to_move){
 			error = true;
-			alert(get_lang("One or more messages from this folder are open"));
+			alert(get_lang("One or more eventssages from this folder are open"));
 			return error;
 		}
@@ -63,5 +63,5 @@
 			}
 		}
-		else if (/^local_messages/.test(folders[i].id)) {
+		else if (/^local_eventssages/.test(folders[i].id)) {
 			if (!unorphanize(tree3, folders[i])) {
 				folders[i].children = new Array();
@@ -70,22 +70,22 @@
 		}
 	}
-	$("#content_folders").removeClass("menu-degrade").parent().removeClass("image-menu");
+	$("#content_folders").removeClass("eventnu-degrade").parent().removeClass("image-eventnu");
 	DataLayer.render('../prototype/modules/mail/templates/detailedfoldertree.ejs', {folders: [tree1, tree2, tree3]}, function(html){
 		var folders_html = $("#content_folders").html(html).find(".mainfoldertree").treeview({
 				persist: "cookie",
 				animated: "fast"
-		}).click(function(event){
+		}).find(".folder").click(function(event){
 			
 			// MUDANÇA DE PASTAS!
-			var target = $(event.target);		
-			if( target.is('.collapsable-hitarea, .expandable-hitarea, .lastCollapsable, .lastExpandable, .treeview ,.folder_unseen,.ui-icon, .float-menu, .new_folder') )
+			var target = $(this);		
+			if( target.is('.collapsable-hitarea, .expandable-hitarea, .lastCollapsable-hitarea, .lastExpandable-hitarea, .treeview ,.folder_unseen,.ui-icon, .float-menu, .new_folder') )
 				return;
 			if( !target.attr('id') )
 				target = target.parent();
 			if (target[0] == $(".mainfoldertree")[0]) return;
-			var targetId = target.attr('id');
+			var uiId = target.attr('id');
 			var child = target.find('.folder');
 			  
-			if(!target.is('.mainfoldertree > .expandable, .mainfoldertree > .collapsable')){
+			if(!target.is('.mainfoldertree > .expandable-hitarea, .mainfoldertree > .collapsable-hitarea')){
 				$('.filetree span.folder.selected').removeClass('selected');
 				$(target).children('.folder').addClass('selected');
@@ -93,5 +93,5 @@
 			selected = target.attr('id');
 			change_folder(target.attr('id'), child.attr('title'));			
-		});
+		}).end();
 		folders_html.find('[id="'+selected+'"]').children().addClass("selected").end().end().find("li:first").find(".folder").not(".head_folder,.inbox,.drafts,.sent,.spam,.trash").draggable({
 			// DRAG DE PASTAS
@@ -112,5 +112,5 @@
 			scrollSensitivity: 100,
 			scrollSpeed: 100,
-			containment: "#divAppbox"
+			containeventnt: "#divAppbox"
 		}).end().droppable({
 			//DROP DE PASTAS
@@ -131,16 +131,16 @@
 				$(this).css("border", "");
 			},
-			drop : function(me, target){
-				$(me.target).css("border", "");
-				if($(me.target).parent().attr('id') == undefined){
+			drop : function(event, ui){
+				$(this).css("border", "");
+				if($(this).parent().attr('id') == undefined){
 					var folder_to = 'INBOX';
 					var to_folder_title = get_lang("Inbox");
 				}else{
-					var folder_to = $(me.target).parent().attr('id');
-					var to_folder_title = $(me.target).attr('title');
+					var folder_to = $(this).parent().attr('id');
+					var to_folder_title = $(this).attr('title');
 				}		
-				var folder_to_move = target.draggable.parent().attr('id');
-				var border_id = target.draggable.find("input[type=hidden]").attr("name");
-				// Mensagens : SE O DROP VIER DA LISTA DE MENSAGENS :
+				var folder_to_move = ui.draggable.parent().attr('id');
+				var border_id = ui.draggable.find("input[type=hidden]").attr("name");
+				// eventnsagens : SE O DROP VIER DA LISTA DE eventNSAGENS :
 				if(folder_to_move == "tbody_box"){
 					move_msgs2(get_current_folder(), 'selected', 0, folder_to, to_folder_title,true);
@@ -148,9 +148,9 @@
 				}
 				//SE FOR DE UMA PESQUISA RAPIDA
-				else if(target.draggable.parents('[id^="content_id_"]')[0]){
+				else if(ui.draggable.parents('[id^="content_id_"]')[0]){
 					move_search_msgs("content_id_"+border_id, folder_to, to_folder_title);
 					return refresh();
 				}
-				// Mensagens : SE O DROP VIER DE UMA ABA ABERTA
+				// eventnsagens : SE O DROP VIER DE UMA ABA ABERTA
 				else if(folder_to_move == "border_tr"){
 					var id_msg = border_id.substring("_");
@@ -164,28 +164,28 @@
 					teste = folder_to+cyrus_delimiter+teste[teste.length-1];
 					
-					//VERIFICA SE EXISTE UMA MENSAGENS ABERTA NESTA PASTA E NAS SUAS FILHAS
-
-					if(valid_tabs(target.draggable.parent().find("li"), folder_to_move)){
+					//VERIFICA SE EXISTE UMA eventNSAGENS ABERTA NESTA PASTA E NAS SUAS FILHAS
+
+					if(valid_tabs(ui.draggable.parent().find("li"), folder_to_move)){
 						return;
 					}
-					//FIM : VERIFICA SE EXISTE UMA MENSAGENS ABERTA NESTA PASTA E NAS SUAS FILHAS;
-					
-					// VALIDA SE O USUARIO ESTA TENTANDO MOVER A PASTA PARA O MESMO LOCAL
+					//FIM : VERIFICA SE EXISTE UMA eventNSAGENS ABERTA NESTA PASTA E NAS SUAS FILHAS;
+					
+					// VALIDA SE O USUARIO ESTA TENTANDO MOVER A PASTA PARA O eventSMO LOCAL
 					if(teste == folder_to_move){
 						return alert(get_lang("Thie folder is already in this place"));
 					}
 					
-					// VALIDA SE O USUARIO ESTA TENTANDO MOVER A PASTA ABERTA NO MOMENTO
+					// VALIDA SE O USUARIO ESTA TENTANDO MOVER A PASTA ABERTA NO MOeventNTO
 					if(folder_to_move == get_current_folder()){
-						return alert(get_lang("It's not possible move this folder, because it is being used in the moment!"));
-					}
-					
-					// VALIDA SE O USUARIO ESTA TENTANDO MOVER UMA PASTA FILHA DA PASTA ABERTA NO MOMENTO
-					if(target.draggable.parent().find(".selected")[0]){
-						return alert(get_lang("It's not possible move this folder, because its subfolder is being used in the moment!"));
+						return alert(get_lang("It's not possible move this folder, because it is being used in the moeventnt!"));
+					}
+					
+					// VALIDA SE O USUARIO ESTA TENTANDO MOVER UMA PASTA FILHA DA PASTA ABERTA NO MOeventNTO
+					if(ui.draggable.parent().find(".selected")[0]){
+						return alert(get_lang("It's not possible move this folder, because its subfolder is being used in the moeventnt!"));
 					}
 					
 					// VALIDA SE O USUARIO ESTA TENTANDO MOVER UMA PASTA PAI PARA DENTRO DE UMA FILHA
-					if(target.draggable.parent().find('[id="'+folder_to+'"]')[0]){
+					if(ui.draggable.parent().find('[id="'+folder_to+'"]')[0]){
 						return alert(get_lang("It's not possible to move this folder to its subfolders!"));
 					}
@@ -193,8 +193,8 @@
 					
 					if($('[id="'+teste+'"]').length){
-						return alert(get_lang("Can not move this folder to this location, because the target has already a folder with this name"));
-					}
-					
-					$(me.target).addClass("folders_loading");
+						return alert(get_lang("Can not move this folder to this location, because the ui has already a folder with this name"));
+					}
+					
+					$(this).addClass("folders_loading");
 					
 					$.ajax({
@@ -209,5 +209,5 @@
 		}).hover(
 			function(){
-				//CASO A LI NÃO TENHA UM MENU FLUTUANTE AINDA, O MENU É ADICIONADO!
+				//CASO A LI NÃO TENHA UM eventNU FLUTUANTE AINDA, O eventNU É ADICIONADO!
 				if(!$(this).children(":last").hasClass("float-menu") && !$(this).children(":last").hasClass("new_folder")){
 					var folder_ = $(this);
@@ -219,5 +219,5 @@
 						folder_name = "Root";
 					DataLayer.render("../prototype/modules/mail/templates/float_folder_menu.ejs", {name_folder : folder_name}, function(html){						
-						//FUNÇÃO DO MENU FLUTUANTE EDITAR < BEGIN
+						//FUNÇÃO DO eventNU FLUTUANTE EDITAR < BEGIN
 						var esc = false;
 						$(folder_).append(html).find(".float-menu-edit").click(function(){
@@ -225,7 +225,7 @@
 							var name = $.trim($(this).parents(".closed:first").find("span:first").text().split("[")[0]);
 							if($(this).parents(".closed:first").find("span:first").hasClass("selected"))
-								return alert(get_lang("It's not possible rename this folder, because it is being used in the moment!"));
+								return alert(get_lang("It's not possible rename this folder, because it is being used in the moeventnt!"));
 							if($(this).parents(".closed:first").find(".selected").length)
-								return alert(get_lang("It's not possible rename this folder, because its subfolder is being used in the moment!"));
+								return alert(get_lang("It's not possible rename this folder, because its subfolder is being used in the moeventnt!"));
 							$(this).parents(".closed:first").find("span:first").empty().append("<input class='new_folder folder' type='text' maxlength='100'></input>")
 							$(".new_folder").focus().keydown(function(event){
@@ -272,6 +272,6 @@
 							}).val(name);
 						})
-						//FUNÇÃO DO MENU FLUTUANTE EDITAR < END
-						//FUNÇÃO DO MENU FLUTUANTE EXCLUIR < BEGIN
+						//FUNÇÃO DO eventNU FLUTUANTE EDITAR < END
+						//FUNÇÃO DO eventNU FLUTUANTE EXCLUIR < BEGIN
 						.end().find(".float-menu-remove").click(function(){
 							
@@ -284,5 +284,5 @@
 							if($(this).parents(".closed:first").find(".selected").length){
 								$(this).parents(".closed:first").find(".folder").removeClass("folders_loading");
-								return alert(get_lang("It's not possible delete this folder, because it is being used in the moment!"));
+								return alert(get_lang("It's not possible delete this folder, because it is being used in the moeventnt!"));
 							}
 							var confirm_text = get_lang("Do you wish to exclude the folder ");
@@ -307,6 +307,6 @@
 							
 						})
-						//FUNÇÃO DO MENU FLUTUANTE EXCLUIR < END
-						//FUNÇÃO DO MENU FLUTUANTE NOVA PASTA < BEGIN
+						//FUNÇÃO DO eventNU FLUTUANTE EXCLUIR < END
+						//FUNÇÃO DO eventNU FLUTUANTE NOVA PASTA < BEGIN
 						.end().find(".float-menu-new").click(function(){
 							var selected_li = $(this).parents(".closed:first");
@@ -369,5 +369,5 @@
 							});
 						});
-						//FUNÇÃO DO MENU FLUTUANTE NOVA PASTA < END
+						//FUNÇÃO DO eventNU FLUTUANTE NOVA PASTA < END
 					});
 				}
Index: trunk/prototype/modules/mail/templates/detailedfoldertree.ejs
===================================================================
--- trunk/prototype/modules/mail/templates/detailedfoldertree.ejs	(revision 5486)
+++ trunk/prototype/modules/mail/templates/detailedfoldertree.ejs	(revision 5500)
@@ -43,5 +43,5 @@
   </li>
   <% if(data.folders[1].length > 0) { %>
-  <li><span class="folder head_folder">Pastas compartilhadas</span>
+  <li><span class="folder shared-folders">Pastas compartilhadas</span>
       <% recursive_forest(data.folders[1]); %>
   </li> 
