Template.activities.created = function () {
  var showLatestActivities = new ReactiveVar();
};

Template.activities.rendered = function () {
  var elem = document.querySelector("[name='all-or-latest']");
  var init = new Switchery(elem);
};

Template.activities.created = function () {
  // Get reference to template instance
  var instance = this;

  instance.showLatestActivities = new ReactiveVar();
};

Template.activities.rendered = function () {
  // Get reference to template instance
  var instance = this;

  // Set options for toggle switch
  var options = {secondaryColor: 'silver'};
  instance.allOrLatestToggle = document.querySelector("[name='all-or-latest']");
  instance.switch = new Switchery(instance.allOrLatestToggle, options);
};

Add reactive variable and instance variables
Add reactive variable and instance variables
