Index: src/java/org/jivesoftware/spark/ui/ChatContainer.java
===================================================================
--- src/java/org/jivesoftware/spark/ui/ChatContainer.java	(revision 10741)
+++ src/java/org/jivesoftware/spark/ui/ChatContainer.java	(working copy)
@@ -22,6 +22,7 @@
 import org.jivesoftware.smack.packet.Packet;
 import org.jivesoftware.smack.packet.Presence;
 import org.jivesoftware.smack.util.StringUtils;
+import org.jivesoftware.spark.PresenceManager;
 import org.jivesoftware.spark.SparkManager;
 import org.jivesoftware.spark.component.tabbedPane.SparkTab;
 import org.jivesoftware.spark.component.tabbedPane.SparkTabbedPane;
@@ -38,6 +39,7 @@
 import javax.swing.AbstractAction;
 import javax.swing.Action;
 import javax.swing.BorderFactory;
+import javax.swing.Icon;
 import javax.swing.JComponent;
 import javax.swing.JFrame;
 import javax.swing.JOptionPane;
@@ -709,7 +711,7 @@
             final ContainerComponent comp = (ContainerComponent)o;
             chatFrame.setTitle(comp.getFrameTitle());
             chatFrame.setIconImage(comp.getTabIcon().getImage());
-
+            System.out.println("StateChanged - ChatCont 714");
             SparkManager.getChatManager().notifySparkTabHandlers(comp.getGUI());
         }
     }
@@ -1003,20 +1005,22 @@
             toaster.setBorder(BorderFactory.createBevelBorder(0));
             
             String nickname = room.getRoomTitle();
+            ContactList list = SparkManager.getContactList();
+            Presence presence = list.getContactItemByDisplayName(nickname).getPresence();
+            final Icon presenceIcon = PresenceManager.getIconFromPresence(presence);
+            
             toaster.setToasterHeight(150);
             toaster.setToasterWidth(200);
-
-
+            
             int size = room.getTranscripts().size();
             if(customMsg) {
                 toaster.setTitle(customMsgTitle);
-                toaster.showToaster(room.getTabIcon(), customMsgText);
+                toaster.showToaster(presenceIcon, customMsgText);
             } else {
                 toaster.setTitle(nickname);
                 if (size > 0) {
                     Message message = room.getTranscripts().get(size - 1);
-
-                    toaster.showToaster(room.getTabIcon(), message.getBody());
+                    toaster.showToaster(presenceIcon, message.getBody());
                 }
             }
         }
@@ -1302,6 +1306,7 @@
             public void doRun() {
                 for (ChatRoom chatRoom : getStaleChatRooms()) {
                     // Notify decorators
+                	System.out.println("HandleStaleChats - ChatCont 1308");
                     SparkManager.getChatManager().notifySparkTabHandlers(chatRoom);
                 }
             }
Index: src/java/org/jivesoftware/sparkimpl/plugin/alerts/SparkToaster.java
===================================================================
--- src/java/org/jivesoftware/sparkimpl/plugin/alerts/SparkToaster.java	(revision 10741)
+++ src/java/org/jivesoftware/sparkimpl/plugin/alerts/SparkToaster.java	(working copy)
@@ -31,6 +31,8 @@
 import org.jivesoftware.resource.Default;
 import org.jivesoftware.resource.Res;
 import org.jivesoftware.resource.SparkRes;
+import org.jivesoftware.smack.packet.Presence;
+import org.jivesoftware.spark.PresenceManager;
 import org.jivesoftware.spark.component.RolloverButton;
 import org.jivesoftware.spark.util.log.Log;
 
@@ -62,6 +64,7 @@
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.awt.geom.AffineTransform;
+import java.awt.image.TileObserver;
 
 /**
  * Class to show tosters in multiplatform
@@ -133,7 +136,7 @@
 
     private TitleLabel titleLabel;
 
-    private boolean hideable = true;
+	private boolean hideable = true;
 
     /**
      * Constructor to initialized toaster component...
@@ -630,12 +633,13 @@
             setLayout(new GridBagLayout());
             label = new JLabel(text);
             label.setFont(new Font("Dialog", Font.BOLD, 11));
-            label.setHorizontalTextPosition(JLabel.LEFT);
+            label.setHorizontalTextPosition(JLabel.RIGHT);
             label.setHorizontalAlignment(JLabel.LEFT);
 
             add(label, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
 
             closeButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.CLOSE_IMAGE));
+            
             if (showCloseIcon) {
                 add(closeButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
             }
@@ -644,7 +648,7 @@
         }
 
         public void setIcon(Icon icon) {
-            label.setIcon(icon);
+        	label.setIcon(icon);
         }
 
         public RolloverButton getCloseButton() {
@@ -654,6 +658,11 @@
         public void setTitle(String title) {
             label.setText(title);
         }
+        
+        public JLabel getLabel()
+        {
+        	return label;
+        }
 
         public void paintComponent(Graphics g) {
             final Image backgroundImage = Default.getImageIcon(Default.TOP_BOTTOM_BACKGROUND_IMAGE).getImage();
@@ -684,6 +693,12 @@
         toaster.showToaster("HELLO", button);
 
     }
+    
+    public void setTitleAlert(Font font, Presence presence) {
+		final Icon presenceIcon = PresenceManager.getIconFromPresence(presence);
+		titleLabel.setIcon(presenceIcon);
+		titleLabel.getLabel().setFont(font);
+	}
 
 }
 
Index: src/java/org/jivesoftware/sparkimpl/preference/notifications/NotificationAlertUI.java
===================================================================
--- src/java/org/jivesoftware/sparkimpl/preference/notifications/NotificationAlertUI.java	(revision 10741)
+++ src/java/org/jivesoftware/sparkimpl/preference/notifications/NotificationAlertUI.java	(working copy)
@@ -32,6 +32,7 @@
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.Insets;
+import java.awt.RenderingHints;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.awt.image.BufferedImage;
@@ -65,7 +66,7 @@
         topLabel.setForeground(Color.DARK_GRAY);
 
         // Add Top Label
-        add(topLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
+        //add(topLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
 
         // Add Calller Block
         buildInnerBlock();
@@ -176,7 +177,6 @@
             });
         }
 
-
         byte[] avatarBytes = null;
         try {
             avatarBytes = vcard.getAvatar();
@@ -188,7 +188,33 @@
         if (avatarBytes != null) {
             try {
                 ImageIcon avatarIcon = new ImageIcon(avatarBytes);
+                
+                int w = avatarIcon.getIconWidth();
+                int h = avatarIcon.getIconHeight();
+                Double ratio = (double)w / (double)h;
+                if ( w > 120 || h > 120)
+                {
+                	if ( w > h)
+		            {
+                		w = 120;
+		             	h = (int)(w/ratio);
+		            }else
+		            {
+		             	h = 120;
+		             	w = (int)(h*ratio);
+		            }
+                }
+                
+                BufferedImage resizedImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
+                Graphics2D g2 = resizedImg.createGraphics();
+                g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+                g2.drawImage(avatarIcon.getImage(), 0, 0, w, h, null);
+                g2.dispose();
+                
+                avatarIcon = new ImageIcon(resizedImg);
+                
                 avatarLabel.setIcon(avatarIcon);
+                
             }
             catch (Exception e) {
                 // no issue
@@ -201,6 +227,7 @@
         avatarLabel.invalidate();
         avatarLabel.validate();
         avatarLabel.repaint();
+        
 
         invalidate();
         validate();
Index: src/java/org/jivesoftware/sparkimpl/preference/notifications/NotificationPlugin.java
===================================================================
--- src/java/org/jivesoftware/sparkimpl/preference/notifications/NotificationPlugin.java	(revision 10741)
+++ src/java/org/jivesoftware/sparkimpl/preference/notifications/NotificationPlugin.java	(working copy)
@@ -29,6 +29,7 @@
 import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
 
+import java.awt.Font;
 import java.awt.event.ActionEvent;
 import java.util.HashSet;
 import java.util.Set;
@@ -132,7 +133,7 @@
      */
     private void notifyUserOnline(String jid, Presence presence) {
         SparkToaster toaster = new SparkToaster();
-        toaster.setDisplayTime(5000);
+        toaster.setDisplayTime(2500);
         toaster.setBorder(BorderFactory.createBevelBorder(0));
         toaster.setCustomAction(new ChatAction(jid));
         NotificationAlertUI alertUI = new NotificationAlertUI(jid, true, presence);
@@ -146,8 +147,9 @@
 
         toaster.setToasterWidth(width);
 
-        toaster.showToaster("", alertUI);
-        toaster.hideTitle();
+        toaster.showToaster(alertUI.topLabel.getText(), alertUI);
+        toaster.setTitleAlert(new Font("Dialog", Font.BOLD, 13), presence);
+        //toaster.hideTitle();
     }
 
     /**
@@ -159,23 +161,22 @@
     private void notifyUserOffline(String jid, Presence presence) {
         SparkToaster toaster = new SparkToaster();
         toaster.setCustomAction(new ChatAction(jid));
-        toaster.setDisplayTime(5000);
+        toaster.setDisplayTime(2500);
         toaster.setBorder(BorderFactory.createBevelBorder(0));
-
+        
         NotificationAlertUI alertUI = new NotificationAlertUI(jid, false, presence);
-
-
+        
         toaster.setToasterHeight((int)alertUI.getPreferredSize().getHeight() + 40);
 
         int width = (int)alertUI.getPreferredSize().getWidth() + 40;
         if (width < 300) {
             width = 300;
         }
-
         toaster.setToasterWidth(width);
-
-        toaster.showToaster("", alertUI);
-        toaster.hideTitle();
+        
+        toaster.showToaster(alertUI.topLabel.getText(), alertUI);
+        toaster.setTitleAlert(new Font("Dialog", Font.BOLD, 13), presence);
+        //toaster.hideTitle();
     }
 
     private class ChatAction extends AbstractAction {
Index: src/java/org/jivesoftware/sparkimpl/preference/notifications/NotificationsUI.java
===================================================================
--- src/java/org/jivesoftware/sparkimpl/preference/notifications/NotificationsUI.java	(revision 10741)
+++ src/java/org/jivesoftware/sparkimpl/preference/notifications/NotificationsUI.java	(working copy)
@@ -10,13 +10,24 @@
 
 package org.jivesoftware.sparkimpl.preference.notifications;
 
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+
 import org.jivesoftware.resource.Res;
 import org.jivesoftware.spark.component.VerticalFlowLayout;
 import org.jivesoftware.spark.util.ResourceUtils;
 
 import javax.swing.BorderFactory;
 import javax.swing.JCheckBox;
+import javax.swing.JLabel;
 import javax.swing.JPanel;
+import javax.swing.JSpinner;
+import javax.swing.SpinnerListModel;
 
 /**
  * Represents the UI for handling notification preferences within Spark.
@@ -30,28 +41,55 @@
     private JCheckBox offlineNotificationBox;
     private JCheckBox onlineNotificationBox;
     private JCheckBox betaCheckBox;
+    
+    private JSpinner notificationDelay;
 
     public NotificationsUI() {
-        setLayout(new VerticalFlowLayout());
+        setLayout(new FlowLayout(FlowLayout.LEFT));
+        
+        JPanel pn = new JPanel();
+        pn.setLayout(new GridBagLayout());
 
-        setBorder(BorderFactory.createTitledBorder(Res.getString("group.notification.options")));
+        //setBorder(BorderFactory.createTitledBorder(Res.getString("group.notification.options")));
 
         toasterBox = new JCheckBox();
         ResourceUtils.resButton(toasterBox, Res.getString("checkbox.show.toaster"));
-        add(toasterBox);
+        pn.add(toasterBox, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
 
         windowFocusBox = new JCheckBox();
         ResourceUtils.resButton(windowFocusBox, Res.getString("checkbox.window.to.front"));
-        add(windowFocusBox);
-
+        pn.add(windowFocusBox, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
+        
+        JPanel pn_seperator1 = new JPanel();
+        pn_seperator1.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.lightGray));
+        pn.add(pn_seperator1, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
+        
+        
         offlineNotificationBox = new JCheckBox(Res.getString("checkbox.notify.user.goes.offline"));
-        add(offlineNotificationBox);
-
+        pn.add(offlineNotificationBox, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
+        
         onlineNotificationBox = new JCheckBox(Res.getString("checkbox.notify.user.comes.online"));
-        add(onlineNotificationBox);
-
+        pn.add(onlineNotificationBox, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
+        
+        Integer[] spinnerDelay = {1,2,3,4,5,6,7,8,9,10};
+        SpinnerListModel delayModel = new SpinnerListModel(spinnerDelay);
+        JSpinner notificationDelay = new JSpinner(delayModel);
+        //notificationDelay.setSize(50, 25);
+        notificationDelay.setPreferredSize(new Dimension(40,20));
+        
+        JPanel pn_spinner = new JPanel();
+        pn_spinner.setLayout(new FlowLayout(FlowLayout.RIGHT));
+        pn_spinner.add(new JLabel("Display Time: "));
+        pn_spinner.add(notificationDelay);
+        pn_spinner.add(new JLabel("sec"));
+        pn_spinner.setPreferredSize(new Dimension(170,25));
+        
+        pn.add(pn_spinner, new GridBagConstraints(1, 4, 1, 2, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
+        
         betaCheckBox = new JCheckBox( Res.getString("menuitem.check.for.updates"));
-        add(betaCheckBox);
+        pn.add(betaCheckBox, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
+        
+        add(pn);
     }
 
     public void setShowToaster(boolean show) {
