Merge branch 'navupdate' of github.com:webnotes/erpnext into navupdate
diff --git a/css/all-app.css b/css/all-app.css
index dec09ee..b2fd2e5 100644
--- a/css/all-app.css
+++ b/css/all-app.css
@@ -2866,7 +2866,8 @@
 
 .navbar-icon-home:hover,
 .navbar-icon-home:focus,
-.navbar-icon-home:active {
+.navbar-icon-home:active,
+.navbar-icon-home-hover{
 	opacity:1;
 	Filter:alpha(opacity=100); /* For IE8 and earlier */
 }
diff --git a/css/all-web.css b/css/all-web.css
index ec9fff2..9359de8 100644
--- a/css/all-web.css
+++ b/css/all-web.css
@@ -1674,7 +1674,8 @@
 
 .navbar-icon-home:hover,
 .navbar-icon-home:focus,
-.navbar-icon-home:active {
+.navbar-icon-home:active,
+.navbar-icon-home-hover{
 	opacity:1;
 	Filter:alpha(opacity=100); /* For IE8 and earlier */
 }
diff --git a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py
index 4016288..ad57181 100644
--- a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py
+++ b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py
@@ -121,7 +121,7 @@
 # Territory
 if territory or based_on == 'Territory':
 	add_tab += ' ,`tabTerritory` t11 '
-	add_cond += ' AND t1.territory = t11.name AND t1.territory = t11.name and (t11.name = "%s" or t11.name IN (SELECT t12.name FROM `tabTerritory` t12,`tabTerritory` t13 WHERE t12.lft BETWEEN t13.lft and t13.rgt and t12.docstatus !=2 and ifnull(t12.is_group,"No") = "No" and t13.name = "%s"))' % (based_on != 'Territory' and territory or '%(value)s', based_on != 'Territory' and territory or '%(value)s')
+	add_cond += ' AND t1.territory = t11.name and (t11.name = "%s" or t11.name IN (SELECT t12.name FROM `tabTerritory` t12,`tabTerritory` t13 WHERE t12.lft BETWEEN t13.lft and t13.rgt and t12.docstatus !=2 and ifnull(t12.is_group,"No") = "No" and t13.name = "%s"))' % (based_on != 'Territory' and territory or '%(value)s', based_on != 'Territory' and territory or '%(value)s')
 
 # Supplier
 if supplier or based_on == 'Supplier':
diff --git a/erpnext/home/page/desktop/desktop.css b/erpnext/home/page/desktop/desktop.css
index 564a361..0aede60 100644
--- a/erpnext/home/page/desktop/desktop.css
+++ b/erpnext/home/page/desktop/desktop.css
@@ -65,36 +65,15 @@
 
 /* Hover and click effects */
 .case-border:hover, .circle:hover {
-	animation: hover-effect 0.1s;
-	-moz-animation: hover-effect 0.1s; /* Firefox */
-	-webkit-animation: hover-effect 0.05s; /* Safari and Chrome */
-	
-	animation-timing-function:linear;
-	-moz-animation-timing-function:linear; /* Firefox */
-	-webkit-animation-timing-function:linear; /* Safari and Chrome */
-	box-shadow: 0 0 2px 0 black, 0 0 10px 1px white;
+	box-shadow: 0 0 2px 0px black, 0 0 10px 1px white;
 }
 
 .case-border:active, .case-border:focus, .circle:active, .circle:focus {
-	box-shadow: 0 0 2px 0 black, 0 0 15px 2px white;
-}
-
-@keyframes hover-effect
-{
-	from {box-shadow: 0 0 10px 1px black}
-	to {box-shadow: 0 0 2px 0 black, 0 0 10px 1px white;}
-}
-
-@-moz-keyframes hover-effect /* Firefox */
-{
-	from {box-shadow: 0 0 10px 1px black}
-	to {box-shadow: 0 0 2px 0 black, 0 0 10px 1px white;}
-}
-
-@-webkit-keyframes hover-effect /* Safari and Chrome */
-{
-	from {box-shadow: 0 0 10px 1px black}
-	to {box-shadow: 0 0 2px 0 black, 0 0 10px 1px white;}
+	transform: scale(0.98, 0.98);
+	-ms-transform: scale(0.98, 0.98); /* IE 9 */
+	-webkit-transform: scale(0.98, 0.98); /* Safari and Chrome */
+	-o-transform: scale(0.98, 0.98); /* Opera */
+	-moz-transform: scale(0.98, 0.98); /* Firefox */
 }
 
 .circle {
diff --git a/erpnext/home/page/event_updates/event_updates.py b/erpnext/home/page/event_updates/event_updates.py
index a755da9..05f1cfc 100644
--- a/erpnext/home/page/event_updates/event_updates.py
+++ b/erpnext/home/page/event_updates/event_updates.py
@@ -32,7 +32,7 @@
 	return webnotes.conn.sql("""\
 		SELECT name, comment
 		FROM `tabComment Widget Record`
-		WHERE comment_doctype='My Company'
+		WHERE comment_doctype IN ('My Company', 'Message')
 		AND comment_docname = %s
 		AND ifnull(docstatus,0)=0
 		""", webnotes.user.name, as_list=1)
diff --git a/erpnext/startup/startup.css b/erpnext/startup/startup.css
index 27fda48..ae0ef60 100644
--- a/erpnext/startup/startup.css
+++ b/erpnext/startup/startup.css
@@ -70,7 +70,8 @@
 
 .navbar-icon-home:hover,
 .navbar-icon-home:focus,
-.navbar-icon-home:active {
+.navbar-icon-home:active,
+.navbar-icon-home-hover{
 	opacity:1;
 	Filter:alpha(opacity=100); /* For IE8 and earlier */
 }
diff --git a/js/all-app.js b/js/all-app.js
index 17a649d..92ea528 100644
--- a/js/all-app.js
+++ b/js/all-app.js
Binary files differ
diff --git a/js/all-web.js b/js/all-web.js
index 70a78b7..1bccc82 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -1035,7 +1035,8 @@
  *	js/app.js
  */
 wn.app={name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number}
-wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next&nbsp;<i class="icon-home icon-white navbar-icon-home" ></i>');})
+wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
+  <i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});})
 /*
  *	erpnext/startup/startup.js
  */
@@ -1054,7 +1055,7 @@
 if(callback)this.callback=function(){callback();}}
 var update_messages=function(){if(inList(['Guest'],user)){return;}
 $c_page('home','event_updates','get_unread_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message);var circle=$('#msg_count')
-if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}});}
+if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});}
 erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
 wn.updates.id=setInterval(update_messages,60000);}
 $(document).bind('startup',function(){erpnext.startup.start();});
diff --git a/js/app.js b/js/app.js
index 67f900f..f2e24bb 100644
--- a/js/app.js
+++ b/js/app.js
@@ -31,5 +31,11 @@
 });
 
 $(document).bind('toolbar_setup', function() {
-	$('.brand').html('<b>erp</b>next&nbsp;<i class="icon-home icon-white navbar-icon-home" ></i>');	
+	$('.brand').html('<b>erp</b>next\
+		<i class="icon-home icon-white navbar-icon-home" ></i>')
+	.hover(function() {
+		$(this).find('.icon-home').addClass('navbar-icon-home-hover');
+	}, function() {
+		$(this).find('.icon-home').removeClass('navbar-icon-home-hover');
+	});
 })
diff --git a/version.num b/version.num
index 5588794..8c28da6 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-741
+747
\ No newline at end of file