 
   @picker = thisColorPicker.data('colorpicker').picker
 
-Template.bootstrap_magic_input_color.destroyed = ->
+Template.bootstrap_magic_input_color.onDestroyed ->
   @picker.remove()
   $(@firstNode).colorpicker('destroy')
 

# Colorpicker Create/Destroy
###

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

# EZ-Modal
###

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

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