!function($,version){Math.precision=function(value,precision){return void 0===precision&&(precision=0),Math.round(value*Math.pow(10,precision))/Math.pow(10,precision)};var Slider=function(bar,options){var offset,timeout,$this=this,arrow=bar.find("img:first"),minX=0,maxX=100,rangeX=100,minY=0,maxY=100,rangeY=100,x=0,y=0,changeEvents=[],mouseDown=function(e){var off=bar.offset();offset={l:0|off.left,t:0|off.top},clearTimeout(timeout),timeout=setTimeout(function(){setValuesFromMousePosition.call($this,e)},0),$(document).bind("mousemove",mouseMove).bind("mouseup",mouseUp),e.preventDefault()},mouseMove=function(e){return clearTimeout(timeout),timeout=setTimeout(function(){setValuesFromMousePosition.call($this,e)},0),e.stopPropagation(),e.preventDefault(),!1},mouseUp=function(e){return $(document).unbind("mouseup",mouseUp).unbind("mousemove",mouseMove),e.stopPropagation(),e.preventDefault(),!1},setValuesFromMousePosition=function(e){var locX=e.pageX-offset.l,locY=e.pageY-offset.t,barW=bar.w,barH=bar.h;locX<0?locX=0:locX>barW&&(locX=barW),locY<0?locY=0:locY>barH&&(locY=barH),val.call($this,"xy",{x:locX/barW*rangeX+minX,y:locY/barH*rangeY+minY})},val=function(name,value,context){if(!(void 0!==value))switch(void 0!==name&&null!=name||(name="xy"),name.toLowerCase()){case"x":return x;case"y":return y;case"xy":default:return{x:x,y:y}}if(null==context||context!==$this){var newX,newY,changed=!1;switch(null==name&&(name="xy"),name.toLowerCase()){case"x":newX=value&&(value.x&&0|value.x||0|value)||0;break;case"y":newY=value&&(value.y&&0|value.y||0|value)||0;break;case"xy":default:newX=value&&value.x&&0|value.x||0,newY=value&&value.y&&0|value.y||0}null!=newX&&(newXmaxX&&(newX=maxX),x!==newX&&(x=newX,changed=!0)),null!=newY&&(newYmaxY&&(newY=maxY),y!==newY&&(y=newY,changed=!0)),changed&&function(context){for(var i=0;i-1;)changeEvents.splice(i,1)},destroy:function(){$(document).unbind("mouseup",mouseUp).unbind("mousemove",mouseMove),bar.unbind("mousedown",mouseDown),bar=null,arrow=null,changeEvents=null}}),arrow.src=options.arrow&&options.arrow.image,arrow.w=options.arrow&&options.arrow.width||arrow.width(),arrow.h=options.arrow&&options.arrow.height||arrow.height(),bar.w=options.map&&options.map.width||bar.width(),bar.h=options.map&&options.map.height||bar.height(),bar.bind("mousedown",mouseDown),bind.call($this,function(){var arrowOffsetX=0,arrowOffsetY=0,barW=bar.w,barH=bar.h,arrowW=arrow.w,arrowH=arrow.h;setTimeout(function(){rangeX>0&&(arrowOffsetX=x===maxX?barW:x/rangeX*barW|0),rangeY>0&&(arrowOffsetY=y===maxY?barH:y/rangeY*barH|0),arrowW>=barW?arrowOffsetX=(barW>>1)-(arrowW>>1):arrowOffsetX-=arrowW>>1,arrowH>=barH?arrowOffsetY=(barH>>1)-(arrowH>>1):arrowOffsetY-=arrowH>>1,arrow.css({left:arrowOffsetX+"px",top:arrowOffsetY+"px"})},0)})};$.jPicker={List:[],Color:function(init){var r,g,b,a,h,s,v,$this=this,changeEvents=[],fireChangeEvents=function(context){for(var i=0;i255&&(newV.r=255),r!==newV.r&&(r=newV.r,changed=!0);break;case"g":if(hsv)continue;rgb=!0,newV.g=value&&value.g&&0|value.g||value&&0|value||0,newV.g<0?newV.g=0:newV.g>255&&(newV.g=255),g!==newV.g&&(g=newV.g,changed=!0);break;case"b":if(hsv)continue;rgb=!0,newV.b=value&&value.b&&0|value.b||value&&0|value||0,newV.b<0?newV.b=0:newV.b>255&&(newV.b=255),b!==newV.b&&(b=newV.b,changed=!0);break;case"a":newV.a=value&&null!=value.a?0|value.a:null!=value?0|value:255,newV.a<0?newV.a=0:newV.a>255&&(newV.a=255),a!==newV.a&&(a=newV.a,changed=!0);break;case"h":if(rgb)continue;hsv=!0,newV.h=value&&value.h&&0|value.h||value&&0|value||0,newV.h<0?newV.h=0:newV.h>360&&(newV.h=360),h!==newV.h&&(h=newV.h,changed=!0);break;case"s":if(rgb)continue;hsv=!0,newV.s=value&&null!=value.s?0|value.s:null!=value?0|value:100,newV.s<0?newV.s=0:newV.s>100&&(newV.s=100),s!==newV.s&&(s=newV.s,changed=!0);break;case"v":if(rgb)continue;hsv=!0,newV.v=value&&null!=value.v?0|value.v:null!=value?0|value:100,newV.v<0?newV.v=0:newV.v>100&&(newV.v=100),v!==newV.v&&(v=newV.v,changed=!0)}if(changed){if(rgb){r=r||0,g=g||0,b=b||0;ret=ColorMethods.rgbToHsv({r:r,g:g,b:b});h=ret.h,s=ret.s,v=ret.v}else if(hsv){h=h||0,s=null!=s?s:100,v=null!=v?v:100;ret=ColorMethods.hsvToRgb({h:h,s:s,v:v});r=ret.r,g=ret.g,b=ret.b}a=null!=a?a:255,fireChangeEvents.call($this,context||$this)}}}};$.extend(!0,$this,{val:val,bind:function(callback){$.isFunction(callback)&&changeEvents.push(callback)},unbind:function(callback){if($.isFunction(callback))for(var i;(i=$.inArray(callback,changeEvents))>-1;)changeEvents.splice(i,1)},destroy:function(){changeEvents=null}}),init&&(null!=init.ahex?val("ahex",init):null!=init.hex?val((null!=init.a?"a":"")+"hex",null!=init.a?{ahex:init.hex+ColorMethods.intToHex(init.a)}:init):null!=init.r&&null!=init.g&&null!=init.b?val("rgb"+(null!=init.a?"a":""),init):null!=init.h&&null!=init.s&&null!=init.v&&val("hsv"+(null!=init.a?"a":""),init))},ColorMethods:{hexToRgba:function(hex){if(""===hex||"none"===hex)return{r:null,g:null,b:null,a:null};var r="00",g="00",b="00",a="255";return 6===(hex=this.validateHex(hex)).length&&(hex+="ff"),hex.length>6?(r=hex.substring(0,2),g=hex.substring(2,4),b=hex.substring(4,6),a=hex.substring(6,hex.length)):(hex.length>4&&(r=hex.substring(4,hex.length),hex=hex.substring(0,4)),hex.length>2&&(g=hex.substring(2,hex.length),hex=hex.substring(0,2)),hex.length>0&&(b=hex.substring(0,hex.length))),{r:this.hexToInt(r),g:this.hexToInt(g),b:this.hexToInt(b),a:this.hexToInt(a)}},validateHex:function(hex){return(hex=hex.toLowerCase().replace(/[^a-f0-9]/g,"")).length>8&&(hex=hex.substring(0,8)),hex},rgbaToHex:function(rgba){return this.intToHex(rgba.r)+this.intToHex(rgba.g)+this.intToHex(rgba.b)+this.intToHex(rgba.a)},intToHex:function(dec){var result=(0|dec).toString(16);return 1===result.length&&(result="0"+result),result.toLowerCase()},hexToInt:function(hex){return parseInt(hex,16)},rgbToHsv:function(rgb){var delta,r=rgb.r/255,g=rgb.g/255,b=rgb.b/255,hsv={h:0,s:0,v:0},min=0,max=0;return r>=g&&r>=b?(max=r,min=g>b?b:g):g>=b&&g>=r?(max=g,min=r>b?b:r):(max=b,min=g>r?r:g),hsv.v=max,hsv.s=max?(max-min)/max:0,hsv.s?(delta=max-min,hsv.h=r===max?(g-b)/delta:g===max?2+(b-r)/delta:4+(r-g)/delta,hsv.h=parseInt(60*hsv.h),hsv.h<0&&(hsv.h+=360)):hsv.h=0,hsv.s=100*hsv.s|0,hsv.v=100*hsv.v|0,hsv},hsvToRgb:function(hsv){var rgb={r:0,g:0,b:0,a:100},h=hsv.h,s=hsv.s,v=hsv.v;if(0===s)rgb.r=rgb.g=rgb.b=0===v?0:255*v/100|0;else{360===h&&(h=0);var i=0|(h/=60),f=h-i,p=(v/=100)*(1-(s/=100)),q=v*(1-s*f),t=v*(1-s*(1-f));switch(i){case 0:rgb.r=v,rgb.g=t,rgb.b=p;break;case 1:rgb.r=q,rgb.g=v,rgb.b=p;break;case 2:rgb.r=p,rgb.g=v,rgb.b=t;break;case 3:rgb.r=p,rgb.g=q,rgb.b=v;break;case 4:rgb.r=t,rgb.g=p,rgb.b=v;break;case 5:rgb.r=v,rgb.g=p,rgb.b=q}rgb.r=255*rgb.r|0,rgb.g=255*rgb.g|0,rgb.b=255*rgb.b|0}return rgb}}};var Color=$.jPicker.Color,List=$.jPicker.List,ColorMethods=$.jPicker.ColorMethods;$.fn.jPicker=function(options){var $arguments=arguments;return this.each(function(){var $this=this,settings=$.extend(!0,{},$.fn.jPicker.defaults,options);"input"===$($this).get(0).nodeName.toLowerCase()&&($.extend(!0,settings,{window:{bindToInput:!0,expandable:!0,input:$($this)}}),""===$($this).val()?(settings.color.active=new Color({hex:null}),settings.color.current=new Color({hex:null})):ColorMethods.validateHex($($this).val())&&(settings.color.active=new Color({hex:$($this).val(),a:settings.color.active.val("a")}),settings.color.current=new Color({hex:$($this).val(),a:settings.color.active.val("a")}))),settings.window.expandable?$($this).after('    '):settings.window.liveUpdate=!1;var isLessThanIE7=parseFloat(navigator.appVersion.split("MSIE")[1])<7&&document.body.filters,container=null,colorMapDiv=null,colorBarDiv=null,colorMapL1=null,colorMapL2=null,colorMapL3=null,colorBarL1=null,colorBarL2=null,colorBarL3=null,colorBarL4=null,colorBarL5=null,colorBarL6=null,colorMap=null,colorBar=null,colorPicker=null,elementStartX=null,elementStartY=null,pageStartX=null,pageStartY=null,activePreview=null,currentPreview=null,okButton=null,cancelButton=null,grid=null,iconColor=null,iconAlpha=null,iconImage=null,moveBar=null,setColorMode=function(colorMode){var rgbMap,rgbBar,active=color.active,hex=active.val("hex");switch(settings.color.mode=colorMode,colorMode){case"h":if(setTimeout(function(){setBG.call($this,colorMapDiv,"transparent"),setImgLoc.call($this,colorMapL1,0),setAlpha.call($this,colorMapL1,100),setImgLoc.call($this,colorMapL2,260),setAlpha.call($this,colorMapL2,100),setBG.call($this,colorBarDiv,"transparent"),setImgLoc.call($this,colorBarL1,0),setAlpha.call($this,colorBarL1,100),setImgLoc.call($this,colorBarL2,260),setAlpha.call($this,colorBarL2,100),setImgLoc.call($this,colorBarL3,260),setAlpha.call($this,colorBarL3,100),setImgLoc.call($this,colorBarL4,260),setAlpha.call($this,colorBarL4,100),setImgLoc.call($this,colorBarL6,260),setAlpha.call($this,colorBarL6,100)},0),colorMap.range("all",{minX:0,maxX:100,minY:0,maxY:100}),colorBar.range("rangeY",{minY:0,maxY:360}),null==active.val("ahex"))break;colorMap.val("xy",{x:active.val("s"),y:100-active.val("v")},colorMap),colorBar.val("y",360-active.val("h"),colorBar);break;case"s":if(setTimeout(function(){setBG.call($this,colorMapDiv,"transparent"),setImgLoc.call($this,colorMapL1,-260),setImgLoc.call($this,colorMapL2,-520),setImgLoc.call($this,colorBarL1,-260),setImgLoc.call($this,colorBarL2,-520),setImgLoc.call($this,colorBarL6,260),setAlpha.call($this,colorBarL6,100)},0),colorMap.range("all",{minX:0,maxX:360,minY:0,maxY:100}),colorBar.range("rangeY",{minY:0,maxY:100}),null==active.val("ahex"))break;colorMap.val("xy",{x:active.val("h"),y:100-active.val("v")},colorMap),colorBar.val("y",100-active.val("s"),colorBar);break;case"v":if(setTimeout(function(){setBG.call($this,colorMapDiv,"000000"),setImgLoc.call($this,colorMapL1,-780),setImgLoc.call($this,colorMapL2,260),setBG.call($this,colorBarDiv,hex),setImgLoc.call($this,colorBarL1,-520),setImgLoc.call($this,colorBarL2,260),setAlpha.call($this,colorBarL2,100),setImgLoc.call($this,colorBarL6,260),setAlpha.call($this,colorBarL6,100)},0),colorMap.range("all",{minX:0,maxX:360,minY:0,maxY:100}),colorBar.range("rangeY",{minY:0,maxY:100}),null==active.val("ahex"))break;colorMap.val("xy",{x:active.val("h"),y:100-active.val("s")},colorMap),colorBar.val("y",100-active.val("v"),colorBar);break;case"r":if(rgbMap=-1040,rgbBar=-780,colorMap.range("all",{minX:0,maxX:255,minY:0,maxY:255}),colorBar.range("rangeY",{minY:0,maxY:255}),null==active.val("ahex"))break;colorMap.val("xy",{x:active.val("b"),y:255-active.val("g")},colorMap),colorBar.val("y",255-active.val("r"),colorBar);break;case"g":if(rgbMap=-1560,rgbBar=-1820,colorMap.range("all",{minX:0,maxX:255,minY:0,maxY:255}),colorBar.range("rangeY",{minY:0,maxY:255}),null==active.val("ahex"))break;colorMap.val("xy",{x:active.val("b"),y:255-active.val("r")},colorMap),colorBar.val("y",255-active.val("g"),colorBar);break;case"b":if(rgbMap=-2080,rgbBar=-2860,colorMap.range("all",{minX:0,maxX:255,minY:0,maxY:255}),colorBar.range("rangeY",{minY:0,maxY:255}),null==active.val("ahex"))break;colorMap.val("xy",{x:active.val("r"),y:255-active.val("g")},colorMap),colorBar.val("y",255-active.val("b"),colorBar);break;case"a":if(setTimeout(function(){setBG.call($this,colorMapDiv,"transparent"),setImgLoc.call($this,colorMapL1,-260),setImgLoc.call($this,colorMapL2,-520),setImgLoc.call($this,colorBarL1,260),setImgLoc.call($this,colorBarL2,260),setAlpha.call($this,colorBarL2,100),setImgLoc.call($this,colorBarL6,0),setAlpha.call($this,colorBarL6,100)},0),colorMap.range("all",{minX:0,maxX:360,minY:0,maxY:100}),colorBar.range("rangeY",{minY:0,maxY:255}),null==active.val("ahex"))break;colorMap.val("xy",{x:active.val("h"),y:100-active.val("v")},colorMap),colorBar.val("y",255-active.val("a"),colorBar);break;default:throw new Error("Invalid Mode")}switch(colorMode){case"h":break;case"s":case"v":case"a":setTimeout(function(){setAlpha.call($this,colorMapL1,100),setAlpha.call($this,colorBarL1,100),setImgLoc.call($this,colorBarL3,260),setAlpha.call($this,colorBarL3,100),setImgLoc.call($this,colorBarL4,260),setAlpha.call($this,colorBarL4,100)},0);break;case"r":case"g":case"b":setTimeout(function(){setBG.call($this,colorMapDiv,"transparent"),setBG.call($this,colorBarDiv,"transparent"),setAlpha.call($this,colorBarL1,100),setAlpha.call($this,colorMapL1,100),setImgLoc.call($this,colorMapL1,rgbMap),setImgLoc.call($this,colorMapL2,rgbMap-260),setImgLoc.call($this,colorBarL1,rgbBar-780),setImgLoc.call($this,colorBarL2,rgbBar-520),setImgLoc.call($this,colorBarL3,rgbBar),setImgLoc.call($this,colorBarL4,rgbBar-260),setImgLoc.call($this,colorBarL6,260),setAlpha.call($this,colorBarL6,100)},0)}null!=active.val("ahex")&&activeColorChanged.call($this,active)},activeColorChanged=function(ui,context){(null==context||context!==colorBar&&context!==colorMap)&&positionMapAndBarArrows.call($this,ui,context),setTimeout(function(){updatePreview.call($this,ui),updateMapVisuals.call($this,ui),updateBarVisuals.call($this,ui)},0)},mapValueChanged=function(ui,context){var active=color.active;if(context===colorMap||null!=active.val()){var xy=ui.val("all");switch(settings.color.mode){case"h":active.val("sv",{s:xy.x,v:100-xy.y},context);break;case"s":case"a":active.val("hv",{h:xy.x,v:100-xy.y},context);break;case"v":active.val("hs",{h:xy.x,s:100-xy.y},context);break;case"r":active.val("gb",{g:255-xy.y,b:xy.x},context);break;case"g":active.val("rb",{r:255-xy.y,b:xy.x},context);break;case"b":active.val("rg",{r:xy.x,g:255-xy.y},context)}}},colorBarValueChanged=function(ui,context){var active=color.active;if(context===colorBar||null!=active.val())switch(settings.color.mode){case"h":active.val("h",{h:360-ui.val("y")},context);break;case"s":active.val("s",{s:100-ui.val("y")},context);break;case"v":active.val("v",{v:100-ui.val("y")},context);break;case"r":active.val("r",{r:255-ui.val("y")},context);break;case"g":active.val("g",{g:255-ui.val("y")},context);break;case"b":active.val("b",{b:255-ui.val("y")},context);break;case"a":active.val("a",255-ui.val("y"),context)}},positionMapAndBarArrows=function(ui,context){if(context!==colorMap)switch(settings.color.mode){case"h":var sv=ui.val("sv");colorMap.val("xy",{x:null!=sv?sv.s:100,y:100-(null!=sv?sv.v:100)},context);break;case"s":case"a":var hv=ui.val("hv");colorMap.val("xy",{x:hv&&hv.h||0,y:100-(null!=hv?hv.v:100)},context);break;case"v":var hs=ui.val("hs");colorMap.val("xy",{x:hs&&hs.h||0,y:100-(null!=hs?hs.s:100)},context);break;case"r":var bg=ui.val("bg");colorMap.val("xy",{x:bg&&bg.b||0,y:255-(bg&&bg.g||0)},context);break;case"g":var br=ui.val("br");colorMap.val("xy",{x:br&&br.b||0,y:255-(br&&br.r||0)},context);break;case"b":var rg=ui.val("rg");colorMap.val("xy",{x:rg&&rg.r||0,y:255-(rg&&rg.g||0)},context)}if(context!==colorBar)switch(settings.color.mode){case"h":colorBar.val("y",360-(ui.val("h")||0),context);break;case"s":var s=ui.val("s");colorBar.val("y",100-(null!=s?s:100),context);break;case"v":var v=ui.val("v");colorBar.val("y",100-(null!=v?v:100),context);break;case"r":colorBar.val("y",255-(ui.val("r")||0),context);break;case"g":colorBar.val("y",255-(ui.val("g")||0),context);break;case"b":colorBar.val("y",255-(ui.val("b")||0),context);break;case"a":var a=ui.val("a");colorBar.val("y",255-(null!=a?a:255),context)}},updatePreview=function(ui){try{var all=ui.val("all");activePreview.css({backgroundColor:all&&"#"+all.hex||"transparent"}),setAlpha.call($this,activePreview,all&&Math.precision(100*all.a/255,4)||0)}catch(e){}},updateMapVisuals=function(ui){switch(settings.color.mode){case"h":setBG.call($this,colorMapDiv,new Color({h:ui.val("h")||0,s:100,v:100}).val("hex"));break;case"s":case"a":var s=ui.val("s");setAlpha.call($this,colorMapL2,100-(null!=s?s:100));break;case"v":var v=ui.val("v");setAlpha.call($this,colorMapL1,null!=v?v:100);break;case"r":setAlpha.call($this,colorMapL2,Math.precision((ui.val("r")||0)/255*100,4));break;case"g":setAlpha.call($this,colorMapL2,Math.precision((ui.val("g")||0)/255*100,4));break;case"b":setAlpha.call($this,colorMapL2,Math.precision((ui.val("b")||0)/255*100))}var a=ui.val("a");setAlpha.call($this,colorMapL3,Math.precision(100*(255-(a||0))/255,4))},updateBarVisuals=function(ui){switch(settings.color.mode){case"h":var a=ui.val("a");setAlpha.call($this,colorBarL5,Math.precision(100*(255-(a||0))/255,4));break;case"s":var hva=ui.val("hva"),saturatedColor=new Color({h:hva&&hva.h||0,s:100,v:null!=hva?hva.v:100});setBG.call($this,colorBarDiv,saturatedColor.val("hex")),setAlpha.call($this,colorBarL2,100-(null!=hva?hva.v:100)),setAlpha.call($this,colorBarL5,Math.precision(100*(255-(hva&&hva.a||0))/255,4));break;case"v":var hsa=ui.val("hsa"),valueColor=new Color({h:hsa&&hsa.h||0,s:null!=hsa?hsa.s:100,v:100});setBG.call($this,colorBarDiv,valueColor.val("hex")),setAlpha.call($this,colorBarL5,Math.precision(100*(255-(hsa&&hsa.a||0))/255,4));break;case"r":case"g":case"b":var hValue=0,vValue=0,rgba=ui.val("rgba");"r"===settings.color.mode?(hValue=rgba&&rgba.b||0,vValue=rgba&&rgba.g||0):"g"===settings.color.mode?(hValue=rgba&&rgba.b||0,vValue=rgba&&rgba.r||0):"b"===settings.color.mode&&(hValue=rgba&&rgba.r||0,vValue=rgba&&rgba.g||0);var middle=vValue>hValue?hValue:vValue;setAlpha.call($this,colorBarL2,hValue>vValue?Math.precision((hValue-vValue)/(255-vValue)*100,4):0),setAlpha.call($this,colorBarL3,vValue>hValue?Math.precision((vValue-hValue)/(255-hValue)*100,4):0),setAlpha.call($this,colorBarL4,Math.precision(middle/255*100,4)),setAlpha.call($this,colorBarL5,Math.precision(100*(255-(rgba&&rgba.a||0))/255,4));break;case"a":a=ui.val("a");setBG.call($this,colorBarDiv,ui.val("hex")||"000000"),setAlpha.call($this,colorBarL5,null!=a?0:100),setAlpha.call($this,colorBarL6,null!=a?100:0)}},setBG=function(el,c){el.css({backgroundColor:c&&6===c.length&&"#"+c||"transparent"})},setImg=function(img,src){isLessThanIE7&&(src.indexOf("AlphaBar.png")>-1||src.indexOf("Bars.png")>-1||src.indexOf("Maps.png")>-1)?(img.attr("pngSrc",src),img.css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')"})):img.css({backgroundImage:"url('"+src+"')"})},setImgLoc=function(img,y){img.css({top:y+"px"})},setAlpha=function(obj,alpha){if(obj.css({visibility:alpha>0?"visible":"hidden"}),alpha>0&&alpha<100)isLessThanIE7&&null!=(src=obj.attr("pngSrc"))&&(src.indexOf("AlphaBar.png")>-1||src.indexOf("Bars.png")>-1||src.indexOf("Maps.png")>-1)?obj.css({filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale') progid:DXImageTransform.Microsoft.Alpha(opacity="+alpha+")"}):obj.css({opacity:Math.precision(alpha/100,4)});else if(0===alpha||100===alpha){var src;if(isLessThanIE7)null!=(src=obj.attr("pngSrc"))&&(src.indexOf("AlphaBar.png")>-1||src.indexOf("Bars.png")>-1||src.indexOf("Maps.png")>-1)?obj.css({filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')"}):obj.css({opacity:""});else obj.css({opacity:""})}},revertColor=function(){color.active.val("ahex",color.current.val("ahex"))},radioClicked=function(e){$(this).parents("tbody:first").find('input:radio[value!="'+e.target.value+'"]').removeAttr("checked"),setColorMode.call($this,e.target.value)},currentClicked=function(){revertColor.call($this)},cancelClicked=function(){revertColor.call($this),settings.window.expandable&&hide.call($this),$.isFunction(cancelCallback)&&cancelCallback.call($this,color.active,cancelButton)},okClicked=function(){(function(){color.current.val("ahex",color.active.val("ahex"))}).call($this),settings.window.expandable&&hide.call($this),$.isFunction(commitCallback)&&commitCallback.call($this,color.active,okButton)},iconImageClicked=function(){show.call($this)},currentColorChanged=function(ui,context){var hex=ui.val("hex");currentPreview.css({backgroundColor:hex&&"#"+hex||"transparent"}),setAlpha.call($this,currentPreview,Math.precision(100*(ui.val("a")||0)/255,4))},expandableColorChanged=function(ui,context){var hex=ui.val("hex"),va=ui.val("va");iconColor.css({backgroundColor:hex&&"#"+hex||"transparent"}),setAlpha.call($this,iconAlpha,Math.precision(100*(255-(va&&va.a||0))/255,4)),settings.window.bindToInput&&settings.window.updateInputColor&&settings.window.input.css({backgroundColor:hex&&"#"+hex||"transparent",color:null==va||va.v>75?"#000000":"#ffffff"})},moveBarMouseDown=function(e){elementStartX=parseInt(container.css("left")),elementStartY=parseInt(container.css("top")),pageStartX=e.pageX,pageStartY=e.pageY,$(document).bind("mousemove",documentMouseMove).bind("mouseup",documentMouseUp),e.preventDefault()},documentMouseMove=function(e){return container.css({left:elementStartX-(pageStartX-e.pageX)+"px",top:elementStartY-(pageStartY-e.pageY)+"px"}),settings.window.expandable&&!$.support.boxModel&&container.prev().css({left:container.css("left"),top:container.css("top")}),e.stopPropagation(),e.preventDefault(),!1},documentMouseUp=function(e){return $(document).unbind("mousemove",documentMouseMove).unbind("mouseup",documentMouseUp),e.stopPropagation(),e.preventDefault(),!1},quickPickClicked=function(e){return e.preventDefault(),e.stopPropagation(),color.active.val("ahex",$(this).attr("title")||null,e.target),!1},commitCallback=$.isFunction($arguments[1])&&$arguments[1]||null,liveCallback=$.isFunction($arguments[2])&&$arguments[2]||null,cancelCallback=$.isFunction($arguments[3])&&$arguments[3]||null,show=function(){color.current.val("ahex",color.active.val("ahex"));var attachIFrame=function(){if(settings.window.expandable&&!$.support.boxModel){var table=container.find("table:first");container.before("