ndow.localStorage.setItem("userNotificationCount",0);
		} 


		var on_connect = function() {
			console.log("Connected");
			if (uid>0) {
									
					var totalperks = 0;
					id = client.subscribe(notificationUrl + uid, function(userAndNotificationObject) {

						var parsedNotificationBody = JSON.parse(userAndNotificationObject.body);
						logNotificationReceiptToServer(uid, JSON.stringify(parsedNotificationBody), baseUrl+'/logger/lognotificationreceipt');
						var notificationId;
						if(parsedNotif