Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/js/calendar.shared.js
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/js/calendar.shared.js	(revision 6560)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/js/calendar.shared.js	(revision 6820)
@@ -1,3 +1,6 @@
 function show_modal_shared(calendarId){
+
+    $('.qtip.qtip-blue').remove();
+
     var html = DataLayer.render('templates/shared_calendar.ejs', {
 	calendar: Calendar.calendars
@@ -335,4 +338,5 @@
 
 function show_modal_search_shared(){
+    $('.qtip.qtip-blue').remove();
 
     var html = DataLayer.render('templates/shared_calendar.ejs', {});	
Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/js/helpers.js
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/js/helpers.js	(revision 6815)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/js/helpers.js	(revision 6820)
@@ -122,4 +122,7 @@
 function eventDetails( objEvent, decoded, path, isMail, repeat)
 {
+
+    $('.qtip.qtip-blue').remove();
+
     attendees = {};
 	
@@ -1693,4 +1696,6 @@
 function add_tab_configure_calendar(calendar, type) 
 {
+    $('.qtip.qtip-blue').remove();
+
     var calendars = [];
     var signatures = [];
@@ -2117,4 +2122,6 @@
 	$('ul.list-calendars .cal-list-options-btn').on('click',function(){doMenu();});         
 	
+
+    /***************************************New Calendar***************************************/
 	meu_container.find(".button.new-calendar").button({
 	    icons: {
@@ -2123,130 +2130,147 @@
 	    text: false
 	}).click(function () {
-		
-	    if( $('.qtip.qtip-blue.qtip-active').val() !== ''){
-		$(this).qtip({
-		    show: {
-		    ready: true, 
-	    solo: true, 
-	    when: {
-		    event: 'click'
-		    }
-		},
-		hide: false,
-		content: {
-		text: $('<div></div>').html( DataLayer.render( 'templates/calendar_quick_add.ejs', {} ) ), 
-		title: {
-		text:'Nova Agenda', 
-		button: '<a class="button close" href="#">close</a>'
-		}
-		},
-		style: {
-		name: 'blue', 
-	    tip: {
-		corner: 'leftMiddle'
-		}, 
-	    border: {
-		width: 4, 
-	    radius: 8
-		}, 
-	    width: {
-		min: 230, 
-	    max:230
-		}
-	    },
-	    position: {
-	    corner: {
-	    target: 'rightMiddle',
-	    tooltip: 'leftMiddle'
-	    },
-	    adjust: {
-	    x:0, 
-	    y:-12
-	    }
-	    }
-	    })
-	.qtip("api").onShow = function(arg0) {
-	    $('.qtip-active .button.close').button({
-		icons: {
-		    primary: "ui-icon-close"
-		},
-		text: false
-	    })
-	    .click(function(){
-		meu_container.find(".button.new-calendar").qtip('destroy');
-	    });
-	    //TODO emplementar tratamento de duplicação de valores no location
-	    $('.qtip-active .button.save').button().click(function(){
-		for(var i = 0; i < Calendar.calendars.length; i++){
-		    if(Calendar.calendars[i].location == ( User.me.uid + '/' + $('.qtip-active input').val())){	
-			$.Zebra_Dialog('O nome desta agenda já está sendo utilizada em uma Url de outra agenda. Por favor, informe outro nome para agenda.',{
-			    'overlay_opacity': '0.5',
-			    'type': 'warning'
-			});
-			meu_container.find(".button.new").qtip('destroy');
-			return;
-		    }
-		}
-				
-		var selected;
-		var color = $('.cal-colors-options-btn').each(function(index){
-		    if ($(this).is('.color-selected'))
-			selected = index;
-		});
-		DataLayer.put( "calendarSignature", {
-		    user: User.me.id,
-		    calendar: {
-			name: Encoder.htmlEncode($('.qtip-active input').val()),
-			timezone: User.preferences.timezone				
-		    },
-		    isOwner: 1,
-		    fontColor: colorsSuggestions[selected]['font'].substring(1) ,
-		    backgroundColor: colorsSuggestions[selected]['background'].substring(1) ,
-		    borderColor: colorsSuggestions[selected]['border'].substring(1)
-		});
-		DataLayer.commit( false, false, function( received ){
-		    delete Calendar.currentViewKey;
-		    Calendar.load();
-		    refresh_calendars();
-		});
-		meu_container.find(".button.new").qtip('destroy');
-	    });
-			
-	    $('.qtip-active .button.cancel').button().click(function(){
-		meu_container.find(".button.new").qtip('destroy');
-	    });
-			
-	    $(".qtip-active input").Watermark("Nome da agenda");
-			
-	    $('.qtip-active').keydown(function(event) {
-					if (event.keyCode == '27') 
-		    meu_container.find(".button.new").qtip('destroy');
-	    });
-			
-	    $('.colors-options').prepend(buttons_colors);
-	    $('.colors-options .signed-cal-colors-options-btn-0').addClass('color-selected');
-					
-	    var buttons = $('.cal-colors-options-btn').button();
-			
-	    buttons.click(function(){
-		buttons.removeClass('color-selected');
-		$(this).addClass('color-selected');
-	    });
-	}				
-	}
+
+        var typeCalendar = !!parseInt($(this).attr('class').match(/[0-9]+/g)) ? 
+            {type: 'new-group', title: 'Novo Grupo', typeValue: 1, prompt: 'Nome do grupo'} : 
+            {type: 'new-calendar', title: 'Nova Agenda', typeValue: 0, prompt: 'Nome da agenda'}
+		
+	    if(!$('.qtip.qtip-blue.qtip-active.'+typeCalendar.type).length){
+
+            $('.qtip.qtip-blue').remove();
+
+    		$(this).qtip({
+                show: {
+    		       ready: true, 
+    	           solo: true, 
+    	           when: {
+    		          event: 'click'
+    		       }
+    		    },
+    		  hide: false,
+    		  content: {
+        		  text: $('<div></div>').html( DataLayer.render( 'templates/calendar_quick_add.ejs', {} ) ), 
+        		  title: {
+        		      text: typeCalendar.title, 
+        		      button: '<a class="button close" href="#">close</a>'
+        		  }
+        		},
+    		  style: {
+        		  name: 'blue', 
+        	      tip: {
+        		      corner: 'leftMiddle'
+        		  }, 
+            	   border: {
+                	   width: 4, 
+                	   radius: 8
+        		  }, 
+        	      width: {
+        		      min: 230, 
+        	          max:230
+        		  }
+        	    },
+    	       position: {
+        	       corner: {
+        	           target: 'rightMiddle',
+        	           tooltip: 'leftMiddle'
+        	       },
+        	       adjust: {
+                	    x:0, 
+                	    y:-12
+        	       }
+        	    }
+    	    })
+        	.qtip("api").onShow = function(arg0) {
+        	    $('.qtip-active .button.close').button({
+        		  icons: {
+        		      primary: "ui-icon-close"
+        		  },
+        		  text: false
+        	    })
+        	    .click(function(){
+        		  meu_container.find('.button.'+typeCalendar.type).qtip('destroy');
+        	    });
+        	    
+                 $('.qtip-active').addClass(typeCalendar.type);
+
+        	    $('.qtip-active .button.save').button().click(function(){
+                    if(!typeCalendar.typeValue)
+                		for(var i = 0; i < Calendar.calendars.length; i++){
+                		    if(Calendar.calendars[i].location == ( User.me.uid + '/' + $('.qtip-active input').val())){	
+                    			$.Zebra_Dialog('O nome desta agenda já está sendo utilizada em uma Url de outra agenda. Por favor, informe outro nome para agenda.',{
+                    			    'overlay_opacity': '0.5',
+                    			    'type': 'warning'
+                    			});
+                    			$('.qtip.qtip-blue').remove();
+                    			return;
+                		    }
+                		}
+        				
+            		var selected;
+            		var color = $('.cal-colors-options-btn').each(function(index){
+            		    if ($(this).is('.color-selected'))
+            			 selected = index;
+            		});
+            		DataLayer.put( "calendarSignature", {
+            		    user: User.me.id,
+            		    calendar: {
+            			name: Encoder.htmlEncode($('.qtip-active input').val()),
+            			timezone: User.preferences.timezone,
+                        type: typeCalendar.typeValue			
+            		    },
+            		    isOwner: 1,
+            		    fontColor: colorsSuggestions[selected]['font'].substring(1) ,
+            		    backgroundColor: colorsSuggestions[selected]['background'].substring(1) ,
+            		    borderColor: colorsSuggestions[selected]['border'].substring(1)
+            		});
+            		DataLayer.commit( false, false, function( received ){
+            		    delete Calendar.currentViewKey;
+            		    Calendar.load();
+            		    refresh_calendars();
+            		});
+            		$('.qtip.qtip-blue').remove();
+        	    });
+        			
+        	    $('.qtip-active .button.cancel').button().click(function(){
+        		meu_container.find(".button.new").qtip('destroy');
+        	    });
+        			
+        	    $(".qtip-active input").Watermark(typeCalendar.prompt);
+        			
+        	    $('.qtip-active').keydown(function(event) {
+        		    if (event.keyCode == '27') 
+        		      meu_container.find(".button.new").qtip('destroy');
+        	    });
+        			
+        	    $('.colors-options').prepend(buttons_colors);
+        	    $('.colors-options .signed-cal-colors-options-btn-0').addClass('color-selected');
+        					
+        	    var buttons = $('.cal-colors-options-btn').button();
+        			
+        	    buttons.click(function(){
+            		buttons.removeClass('color-selected');
+            		$(this).addClass('color-selected');
+        	    });
+        	}				
+	   }
     });
-	
+
     $("img.cal-list-img").click(function(evt) {
-	$(".cal-list-options_1").toggleClass( "hidden" );
+	   $(".cal-list-options_1").toggleClass( "hidden" );
     });
 
+    $(".my-groups-task a.title-my-calendars").click(function() {
+        $(".my-groups-task ul.my-list-calendars").toggleClass("hidden")
+        $('.my-groups-task .status-list').toggleClass("ui-icon-triangle-1-s");
+        $('.my-groups-task .status-list').toggleClass("ui-icon-triangle-1-e");
+    });
+
     $(".my-calendars a.title-my-calendars").click(function() {
-	$(".my-calendars ul.my-list-calendars").toggleClass("hidden")
-	$('.my-calendars .status-list').toggleClass("ui-icon-triangle-1-s");
-	$('.my-calendars .status-list').toggleClass("ui-icon-triangle-1-e");
+    	$(".my-calendars ul.my-list-calendars").toggleClass("hidden")
+    	$('.my-calendars .status-list').toggleClass("ui-icon-triangle-1-s");
+    	$('.my-calendars .status-list').toggleClass("ui-icon-triangle-1-e");
     });
 		
     $(".signed-calendars a.title-signed-calendars").click(function() {
-	$(".signed-calendars ul.signed-list-calendars").toggleClass( "hidden");
+	   $(".signed-calendars ul.signed-list-calendars").toggleClass( "hidden");
     });
 
@@ -2530,4 +2554,5 @@
 
 function pageselectCallback(keyword, page_index, jq, view){
+    $('.qtip.qtip-blue').remove();
 	
     var selecteds = getSelectedCalendars();
@@ -2609,4 +2634,5 @@
 
 function show_modal_import_export(tab, calendarId) {
+    $('.qtip.qtip-blue').remove();
     DataLayer.render( 'templates/import_export.ejs', {
 	calendars: Calendar.calendars, 
Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/js/init.js
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/js/init.js	(revision 6816)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/js/init.js	(revision 6820)
@@ -152,119 +152,124 @@
 			var componente = $(this);
 
-			$(componente).qtip({
-			    show: {
-			    	ready: true, 
-		    		solo: true, 
-		    		when: {
-			    		event: 'click'
-			    	}
-				},
-				hide: false,
-				content: {
-					text: $('<div></div>').html( DataLayer.render( 'templates/task_quick_add.ejs', {} ) ),
-					title: {
-						text:'Nova tarefa', 
-						button: '<a class="button close" href="#">close</a>'
-					}
-				},
-				style: {
-					name: 'blue', 
-			    	tip: {
-						corner: 'leftMiddle'
-					}, 
-		    		border: {
-						width: 4, 
-					    radius: 8
-					}, 
-			    	width: {
-						min: 225, 
-					    max:225
-					}
-		   		},
-		    	position: {
-		    		corner: {
-					    target: 'rightMiddle',
-					    tooltip: 'leftMiddle'
-		    		},
-		    		adjust: {
-					    x:0, 
-					    y:0
-		    		}
-		    	}
-		    })
-	    	.qtip("api").onShow = function(arg0) {
+            if(!$('div.qtip.qtip-blue.new-task').length){
+
+                $('div.qtip.qtip-blue').remove();
+
+    			$(componente).qtip({
+    			    show: {
+    			    	ready: true, 
+    		    		solo: true, 
+    		    		when: {
+    			    		event: 'click'
+    			    	}
+    				},
+    				hide: false,
+    				content: {
+    					text: $('<div></div>').html( DataLayer.render( 'templates/task_quick_add.ejs', {} ) ),
+    					title: {
+    						text:'Nova tarefa', 
+    						button: '<a class="button close" href="#">close</a>'
+    					}
+    				},
+    				style: {
+    					name: 'blue', 
+    			    	tip: {
+    						corner: 'leftMiddle'
+    					}, 
+    		    		border: {
+    					    width: 4, 
+    					    radius: 8
+    					}, 
+    			    	width: {
+    						min: 225, 
+    					    max:225
+    					}
+    		   		},
+    		    	position: {
+    		    		corner: {
+    					    target: 'rightMiddle',
+    					    tooltip: 'leftMiddle'
+    		    		},
+    		    		adjust: {
+    					    x:0, 
+    					    y:0
+    		    		}
+    		    	}
+    		    })
+    	    	.qtip("api").onShow = function(arg0) {
 
 	    		/*------------------------------------------------------------------------*/
 	    		/*               Seta os valores padrões nos inputs do qtip               */
-	    		$('div.qtip div.add-simple-task input.task').Watermark("Tarefa sem título");
-				$('div.qtip div.add-simple-task textarea').Watermark("Descrição");
-				/*------------------------------------------------------------------------*/
-
-			    $('.qtip-active .button.close').button({
-				icons: {
-				    primary: "ui-icon-close"
-				},
-				text: false
-			    })
-			    .click(function(){
-					$(componente).qtip('destroy');
-			    });
-							
-			    $('.qtip-active .button.save').button().click(function(){
-			    	
-			    	var title = $('div.qtip div.add-simple-task input.task').val();
-					var description = $('div.qtip div.add-simple-task textarea').val();
-
-					var calendar, timezone = '';
-
-					for (var i = 0; i < Calendar.signatures.length; i++){
-						if(Calendar.signatures[i].type == 1 && Calendar.signatures[i].calendar.type == 1){
-							calendar = Calendar.signatures[i].calendar.id;
-							timezone = Calendar.signatures[i].calendar.timezone;
-							break;
-						}
-					}
-
-
-			    	DataLayer.put('schedulable', 
-		    		{
-		    			summary: title, 
-		    			description: description, 
-		    			type: '2', 
-		    			calendar: calendar, 
-		    			timezone: timezone,
-		    			startTime: new Date().toString('yyyy-MM-dd 00:00:00'),
-		    			endTime: new Date().toString('yyyy-MM-dd 00:00:00'),
-		    			allDay: '1'
-		    		});
-			    	//DataLayer.commit();
-
-			    	$(componente).qtip('destroy');
-			    });
-
-			    $('.qtip-active .button.advanced').button().click(function(){
-			    	
-					$(componente).qtip('destroy');
-					
-			    	var startEvent = new Date();
-					var configData = (startEvent.toString('mm') < 30)  ? {minutes: (30 - parseInt(startEvent.toString('mm')))} : {hours: 1, minutes: '-'+startEvent.toString('mm')};
-					startEvent.add(configData);
-
-					taskDetails({ 
-						startTime: startEvent.getTime(),
-						endTime: dateCalendar.decodeRange(startEvent, (!!User.preferences.defaultCalendar ? (	!!Calendar.signatureOf[User.preferences.defaultCalendar].calendar.defaultDuration ?  
-							(Calendar.signatureOf[User.preferences.defaultCalendar].calendar.defaultDuration) : (User.preferences.defaultDuration)) : (User.preferences.defaultDuration)))
-					}, true );
-			
-			    });
-								
-				$('.qtip-active .button.cancel').button().click(function(){
-					$(componente).qtip('destroy');
-			    });					
-							
-			    $('.button').button();
-							
-			};
-			
+	    		 $('div.qtip div.add-simple-task input.task').Watermark("Tarefa sem título");
+			     $('div.qtip div.add-simple-task textarea').Watermark("Descrição");
+    			/*------------------------------------------------------------------------*/
+
+    			    $('.qtip-active .button.close').button({
+    				icons: {
+    				    primary: "ui-icon-close"
+    				},
+    				text: false
+    			    })
+    			    .click(function(){
+    					$(componente).qtip('destroy');
+    			    });
+    							
+    			    $('.qtip-active .button.save').button().click(function(){
+    			    	
+    			    	var title = $('div.qtip div.add-simple-task input.task').val();
+    					var description = $('div.qtip div.add-simple-task textarea').val();
+
+    					var calendar, timezone = '';
+
+    					for (var i = 0; i < Calendar.signatures.length; i++){
+    						if(Calendar.signatures[i].type == 1 && Calendar.signatures[i].calendar.type == 1){
+    							calendar = Calendar.signatures[i].calendar.id;
+    							timezone = Calendar.signatures[i].calendar.timezone;
+    							break;
+    						}
+    					}
+
+    			    	DataLayer.put('schedulable', 
+    		    		{
+    		    			summary: title, 
+    		    			description: description, 
+    		    			type: '2', 
+    		    			calendar: calendar, 
+    		    			timezone: timezone,
+    		    			startTime: new Date().toString('yyyy-MM-dd 00:00:00'),
+    		    			endTime: new Date().toString('yyyy-MM-dd 00:00:00'),
+    		    			allDay: '1'
+    		    		});
+    			    	//DataLayer.commit();
+
+                    });
+
+    			    $('.qtip-active .button.advanced').button().click(function(){
+    			    	
+    					$(componente).qtip('destroy');
+    					
+    			    	var startEvent = new Date();
+    					var configData = (startEvent.toString('mm') < 30)  ? {minutes: (30 - parseInt(startEvent.toString('mm')))} : {hours: 1, minutes: '-'+startEvent.toString('mm')};
+    					startEvent.add(configData); 
+    			
+						var componente = $(this);
+
+    					taskDetails({ 
+    						startTime: startEvent.getTime(),
+    						endTime: dateCalendar.decodeRange(startEvent, (!!User.preferences.defaultCalendar ? (	!!Calendar.signatureOf[User.preferences.defaultCalendar].calendar.defaultDuration ?  
+    							(Calendar.signatureOf[User.preferences.defaultCalendar].calendar.defaultDuration) : (User.preferences.defaultDuration)) : (User.preferences.defaultDuration)))
+    					}, true );
+    			
+    			    });
+    								
+    				$('.qtip-active .button.cancel').button().click(function(){
+    					$(componente).qtip('destroy');
+    			    });
+    							
+    			    $('.button').button();
+    			
+    			$('div.qtip.qtip-blue.qtip-active').addClass('new-task');
+            }
+	}
 		});
 
Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/calendar_list.ejs
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/calendar_list.ejs	(revision 6815)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/calendar_list.ejs	(revision 6820)
@@ -16,5 +16,5 @@
         <a title='Grupos de tarefas' class="title-my-calendars" aria-expanded='false' role='button' tabindex='0'>Grupos de tarefas</a>
         <span class="status-list ui-icon ui-icon-triangle-1-s"></span>
-        <a href="#" class="button new new-calendar">Novo Grupo</a>
+        <a href="#" class="button new new-calendar 1">Novo Grupo</a>
         <ul class="list-calendars my-list-calendars">
             <% for (var i=0; i < signatures['taskGroup'].length; i++) {%>
@@ -47,5 +47,5 @@
         <a title='Minhas agendas' class="title-my-calendars" aria-expanded='false' role='button' tabindex='0'>Minhas agendas</a>
         <span class="status-list ui-icon ui-icon-triangle-1-s"></span>
-        <a href="#" class="button new new-calendar">Nova Agenda</a>
+        <a href="#" class="button new new-calendar 0">Nova Agenda</a>
         <ul class="list-calendars my-list-calendars">
             <% for (var i=0; i < signatures.calendar.length; i++) {%>
@@ -94,5 +94,5 @@
                 <div class="cal-list-options my-cal-list-options-<%= signatures['sharedCalendar'][i].calendar.id  %> hidden">
                     <ul>
-                        <li><a href="#" onclick="add_tab_configure_calendar(<%= signatures['sharedCalendar'][i].calendar.id %>);">Configurações</a></li>
+                        <li><a href="#" onclick="add_tab_configure_calendar(<%= signatures['sharedCalendar'][i].calendar.id %>, 0);">Configurações</a></li>
                         <li><a href="#" onclick="show_modal_import_export(0, <%= signatures['sharedCalendar'][i].calendar.id %>);">Importar</a></li>
                         <li><a href="#" onclick="show_modal_import_export(1, <%= signatures['sharedCalendar'][i].calendar.id %>);">Exportar</a></li>
