jQuery.fn.braindeadColorSelector=function(C){var H=jQuery(this);if(!H){throw new Error("BPIApp.braindeadColorSelector(,...): $(this) is not a valid argument to jQuery(...).")}if(!C){C=[]}var G=jQuery.fn.braindeadColorSelector.defaultProps;for(var E in G){if(undefined==C[E]){C[E]=G[E]}}var D=C.colors.length;for(var A=0;A<D;++A){var F=C.colors[A];var B=document.createElement(C.blotchElemType);if(!B){throw new Error("jQuery.braindeadColorSelector(): documentCreateElement("+C.blotchElemType+") failed.")}B=jQuery(B);B.addClass(C.blotchClass);B.css("background-color",F);if(F){B.html("&nbsp;");if(C.clickCallback){B.click(function(){C.clickCallback($(this).css("background-color"))})}}else{B.text("?");if(C.clickCallback){B.click(function(){C.clickCallback(null)})}}H.append(B);if(C.iterationCallback){C.iterationCallback(H,B,F,A)}}return H};jQuery.fn.braindeadColorSelector.defaultProps={blotchElemType:"span",blotchClass:"ColorBlotch",clickCallback:function(A){},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"]}
