<script type="text/javascript">



    jQuery(function() {
        var url = '/_diamond/widgets/assets/jquery/bootstrap/bootstrap-colorpicker.js';
        jQuery.getScript(url, function (data, textStatus, jqxhr) {
            jQuery('#colorpicker_{{ id }}').colorpicker();
        });
    });

    //jQuery(document).ready(function () {

      //  jQuery('#colorpicker_{{ id }}').colorpicker();

    //});

{#    jQuery = !jQuery ? $ : jQuery;#}
{#var ob = jQuery('#colorpicker_{{id}}');#}
{#    ob.minicolors({#}
{#        control: ob.attr('data-control') || 'hue',#}
{#        defaultValue: ob.attr('data-defaultValue') || '',#}
{#        format: ob.attr('data-format') || 'hex',#}
{#        keywords: ob.attr('data-keywords') || '',#}
{#        inline: ob.attr('data-inline') === 'true',#}
{#        letterCase: ob.attr('data-letterCase') || 'lowercase',#}
{#        opacity: ob.attr('data-opacity'),#}
{#        position: ob.attr('data-position') || 'bottom left',#}
{#        swatches: ob.attr('data-swatches') ? ob(this).attr('data-swatches').split('|') : [],#}
{#        change: function(value, opacity) {#}
{#            if( !value ) return;#}
{#            if( opacity ) value += ', ' + opacity;#}
{#        },#}
{#        //theme: 'bootstrap'#}
{#    });#}

</script>                        
