
jQuery.fn.braindeadColorSelector=function(props){var tgt=jQuery(this);if(!tgt){throw new Error("BPIApp.braindeadColorSelector(,...): $(this) is "+"not a valid argument to jQuery(...).");}
if(!props){props=[];}
var dp=jQuery.fn.braindeadColorSelector.defaultProps;for(var p in dp){if(undefined==props[p])props[p]=dp[p];}
var count=props.colors.length;for(var i=0;i<count;++i){var c=props.colors[i];var s=document.createElement(props.blotchElemType);if(!s){throw new Error('jQuery.braindeadColorSelector(): '+'documentCreateElement('+props.blotchElemType+') failed.');}
s=jQuery(s);s.addClass(props.blotchClass);s.css('background-color',c);if(c){s.html('&nbsp;');if(props.clickCallback){s.click(function(){props.clickCallback($(this).css('background-color'));});}}else{s.text('?');if(props.clickCallback){s.click(function(){props.clickCallback(null);});}}
tgt.append(s);if(props.iterationCallback)props.iterationCallback(tgt,s,c,i);}
return tgt;};jQuery.fn.braindeadColorSelector.defaultProps={blotchElemType:'span',blotchClass:'ColorBlotch',clickCallback:function(ignoredColor){},iterationCallback:null,colors:[null,'#ffffff','#d0d0d0','#777777','#000000','#ffaaaa','#ff00ff','#ff0000','#aa0000','#9000ff','#ff6c00','#ffff00','#ffbb00','#f0e68c','#d2b229','#aaffaa','#00ff00','#00aa00','#6b8e23','#007700','#bbddff','#00ffdd','#aaaaff','#0000ff','#0000aa']};