(function($){$.fn.colorPickerAgain=function($$options){var $defaults={color:new Array("#CC3333","#DD4477","#994499","#6633CC","#336699","#3366CC","#22AA99","#329262","#109618","#66AA00","#AAAA11","#D6AE00","#EE8800","#DD5511","#A87070","#8C6D8C","#627487","#7083A8","#5C8D87","#898951","#B08B59"),defaultColor:0,columns:0,click:function($color){}};var $settings=$.extend({},$defaults,$$options);return this.each(function(){$this=$(this);var o=$.meta?$.extend({},$settings,$this.data()):$settings;var $$oldIndex=typeof(o.defaultColor)=="number"?o.defaultColor:-1;var _html="";for(i=0;i<o.color.length;i++){_html+='<div style="background-color:'+o.color[i]+';"></div>\n';if($$oldIndex==-1&&o.defaultColor==o.color[i]){$$oldIndex=i}}$this.html('<div class="jColorSelect" style="width:130px;">'+_html+"</div>");$color=$this.children(".jColorSelect").children("div");$color.each(function(i){$(this).click(function(){if($$oldIndex==i){return}if($$oldIndex>-1){if($color.eq($$oldIndex).hasClass("check")){$color.eq($$oldIndex).removeClass("check")}}$$oldIndex=i;$(this).addClass("check");o.click(o.color[i])})});_tmp=$$oldIndex;$$oldIndex=-1;$color.eq(_tmp).trigger("click")});return this}})(jQuery);