   subCatId = BootstrapMagic.dictionary.currentSubCategory.get()
   return _.find bootstrap_magic_variables, (group) -> group._id is subCatId
 
-Template._bootstrap_magic.created = ->
+Template._bootstrap_magic.onCreated ->
   BootstrapMagic.start() if BootstrapMagic.start
 
-Template._bootstrap_magic.rendered = ->
+Template._bootstrap_magic.onRendered ->
   BootstrapMagic.dictionary.currentCategory.set bootstrap_magic_variables[0].category
   BootstrapMagic.dictionary.currentSubCategory.set bootstrap_magic_variables[0]._id
-
 
 # default starting script: load hard-coded defaults
 # this function can be overriden by other packages for integrations

# EZ-Modal
###

Template.bootstrap_magic_preview_popovers.rendered = ->
  $('[data-toggle="popover"]').popover()

Template.bootstrap_magic_preview_tooltips.rendered = ->
  this.$('[data-toggle="tooltip"]').tooltip()

# Colorpicker Create/Destroy
###

Template.bootstrap_magic_input_color.onRendered ->
  thisColorPicker = $(@firstNode)
  .colorpicker horizontal: true
  .on 'showPicker', ->
