"use strict"; var admin = {}; (function() { admin.enableColorPicker = function(inputEl, callback) { (inputEl instanceof jQuery ? inputEl : $(inputEl)).each(function() { var $this = $(this); $this.ColorPicker({ color: $this.val() || '#000', onChange: function(hsb, hex) { $this.val('#' + hex); if (typeof callback === 'function') { callback(hsb, hex); } } }); }); }; }());