Meteor.startup(function() {
	var timer,
		time = 10000,
		status;

	var startTimer = function() {
		timer = setTimeout(function() {
			if (status !== 'away') {
				status = 'away';
				Meteor.call('UserPresence:away');
			}
		}, time);
	};

	Deps.autorun(function() {
		var user = Meteor.user();
		status = user && user.statusConnection;
		startTimer();
	});

	var onAction = function() {
		if (status !== 'online') {
			status = 'online';
			Meteor.call('UserPresence:online');
		}
		clearTimeout(timer);
		startTimer();
	};

	document.addEventListener('mousemove', onAction);
	document.addEventListener('mousedown', onAction);
	document.addEventListener('keydown', onAction);
});
@@ -1,76 +1,98 @@
-Meteor.
+var timer, 
 sta
-r
 tu
-p(function() %7B%0A%09var timer,%0A%09%09time = 10000,%0A%09%09status;%0A%0A%09var 
+s;%0A%0AUserPresence = %7B%0A%09awayTime: 60000, //1 minute%0A%09awayOnWindowBlur: false,%0A%0A%09
 star
@@ -97,18 +97,17 @@
 artTimer
- =
+:
  functio
@@ -133,16 +133,128 @@
 Timeout(
+UserPresence.setAway, UserPresence.awayTime);%0A%09%7D,%0A%09stopTimer: function() %7B%0A%09%09clearTimeout(timer);%0A%09%7D,%0A%09setAway: 
 function
@@ -258,17 +258,16 @@
 ion() %7B%0A
-%09
 %09%09if (st
@@ -288,17 +288,16 @@
 ') %7B%0A%09%09%09
-%09
 status =
@@ -305,17 +305,16 @@
 'away';%0A
-%09
 %09%09%09Meteo
@@ -348,162 +348,53 @@
 ;%0A%09%09
-%09
 %7D%0A%09%09
-%7D, time);%0A%09%7D;%0A%0A%09Deps.autorun(function() %7B%0A%09%09var user = Meteor.user();%0A%09%09status = user && user.statusConnection;%0A%09%09startTimer();%0A%09%7D);%0A%0A%09var onAction =
+UserPresence.stopTimer();%0A%09%7D,%0A%09setOnline:
  fun
@@ -503,31 +503,204 @@
 %7D%0A%09%09
-cle
+UserPresence.stopTimer();%0A%09%09UserPresence.st
 ar
+t
 Time
-out(timer
+r();%0A%09%7D,%0A%09start: function() %7B%0A%09%09Deps.autorun(function() %7B%0A%09%09%09var user = Meteor.user(
 );%0A
+%09
 %09%09
+status = user && user.statusConnection;%0A%09%09%09UserPresence.
 star
@@ -714,12 +714,15 @@
 );%0A%09
-%7D
+%09%7D)
 ;%0A%0A
+%09
 %09doc
@@ -757,27 +757,42 @@
 emove', 
-onAction
+UserPresence.setOnline
 );%0A
+%09
 %09documen
@@ -823,27 +823,42 @@
 edown', 
-onAction
+UserPresence.setOnline
 );%0A
+%09
 %09documen
@@ -891,18 +891,205 @@
 n', 
-onAction);%0A%7D);
+UserPresence.setOnline);%0A%09%09window.addEventListener('focus', UserPresence.setOnline);%0A%0A%09%09if (UserPresence.awayOnWindowBlur === true) %7B%0A%09%09%09window.addEventListener('blur', UserPresence.setAway);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Refactor client to allow configurations