jQuery.fn.EasySiteColorSelect=function(){var i,j,k,l,a="_I_AM_SCP",b=9,c=21,e=2,f=2,g=1,h=["ff8080","ffff80","80ff80","00ff80","80ffff","0080ff","ff80c0","ff80ff","ff0000","ffff00","80ff00","00ff40","00ffff","0080c0","8080c0","ff00ff","804040","ff8040","00ff00","008080","004080","8080ff","800040","ff0080","800000","ff8000","008000","008040","0000ff","0000a0","800080","8000ff","400000","804000","004000","004040","000080","000040","400040","408080","000000","171717","303030","454545","707070","c0c0c0","DBDBDB","ffffff"];if(!jQuery.SCP_Selecter){i="<div><ul>",j=jQuery('<div id="_seven_color_selecter" />');for(k in h)i+="<li><a href=\"javascript:void('#"+h[k]+'\');" ref="#'+h[k]+'" style="background-color:#'+h[k]+';"></a></li>';i+='</ul><form style="margin:0;padding:3px;clear:both;text-align:center;"></form></div>',j.html(i),$(document).mouseup(function(){j.hide()}).find("body").append(j),l=function(a){/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.test(a)&&(a="#"==a.charAt(0)?a:"#"+a,jQuery.SCP_Active.css("background-color",a),jQuery.SCP_Target.val(a))},j.hide().css({position:"absolute",font:"10px verdana",margin:0,padding:0}).find("div").css({"background-color":"#f2f2f2",border:g+"px solid #999",margin:0,padding:f}).width(b*(c+2*e+2*g)).find("form").submit(function(){return l($(this).children("#_seven_color_code").val()),jQuery.SCP_Selecter.hide(),!1}).end().find("ul").css({margin:0,padding:0,"list-style":"none"}).find("li").css({margin:0,padding:0,"float":"left"}).find("a").css({margin:e,padding:0,display:"block",border:g+"px solid #ccc"}).width(c).height(c).mouseover(function(){$("#_seven_color_code").val($(this).attr("ref")).focus().select()}).mousedown(function(){l($(this).attr("ref"))}).mouseover(function(){$(this).css({border:g+"px solid #333"})}).mouseout(function(){$(this).css({border:g+"px solid #ccc"})}),jQuery.SCP_Selecter=j}return this.each(function(){var b=$(this).next(":text");b.attr("ref")!=a&&$(this).hide().after($('<input ref="'+a+'" class="espcms_color_picker"/>').click(function(){var a=$(this).offset(),b=a.left,c=a.top+$(this).height()+g+12;jQuery.SCP_Target=$(this).prev(),jQuery.SCP_Active=$(this),jQuery.SCP_Selecter.show().css({left:b,"z-index":3e3,top:c}).find("#_seven_color_code").val(jQuery.SCP_Target.val()).focus().select()}).attr("readonly","true").css({border:g+"px solid #5E5E5E",cursor:"pointer","background-color":$(this).val()}))})};