// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function set_color_picker(method, element_name,color){
    items = document.getElementsByClassName('coloritem_' + method);
    for(x=0;x<items.length;x++){
        Element.removeClassName(items[x],'cpselected');
    }
    Element.addClassName(element_name,'cpselected')
    $('hidden_color_picker_' + method).value = color
    $('cpchooser_' + method).style.backgroundColor = color
    $('colorpicker_' + method).fade({duration: 0.3})
}
