   str.charAt(0).toUpperCase() + str.slice(1)
 camelToSnake = (str) -> str.replace(/\W+/g, '_').replace(/([a-z\d])([A-Z])/g, '$1-$2')
 
-@currentPage = new ReactiveVar()
-@currentMenuItem = new ReactiveVar()
+@currentSubCat = new ReactiveVar()
+@currentCat = new ReactiveVar()
 
 getCurrentSubCat = ->
   for group in bootstrap_magic_variables
-    if group.keyName is currentPage.get()
+    if group.keyName is currentSubCat.get()
       return group
 
 initColorPicker = (node) ->

    BootstrapMagic.setOverride $input.attr('name'), $input.val()

  'click .menu-secondary-list' : -> 
    currentMenuItem.set(@category)
    if (_.map _.where(bootstrap_magic_variables, { category: currentMenuItem.get() }), (obj) -> obj).length is 1
      currentPage.set(_.where(bootstrap_magic_variables, { category: currentMenuItem.get() })[0].keyName)
 
  'click .menu-tertiary-list' : -> currentPage.set(@keyName)

  # 'click #reset' :-> do something
  BootstrapMagic.start() if BootstrapMagic.start

Template._bootstrap_magic.rendered = ->
  currentCat.set bootstrap_magic_variables[0].category
  currentSubCat.set bootstrap_magic_variables[0].keyName
  @.autorun -> 
    currentSubCat.get()
    currentCat.get()
    Meteor.defer -> initColorPicker($('.color-picker-area'))

Template._bootstrap_magic.helpers
