var csInterface=new CSInterface;function onLoaded(){var a=new CSInterface;b=a.hostEnvironment.appName;"FLPR"!=b&&loadJSX();for(var c=["PHXS"],e=0;e<c.length;e++){var d=c[e];if(0<=b.indexOf(d)&&(d=document.getElementById("btn_"+d)))d.disabled=!1}updateThemeWithAppSkinInfo(a.hostEnvironment.appSkinInfo);a.addEventListener(CSInterface.THEME_COLOR_CHANGED_EVENT,onAppThemeColorChanged)}var extensionRoot=csInterface.getSystemPath(SystemPath.EXTENSION)+"/jsx/scripts/";
function loadJSX(){var a=new CSInterface,c=a.getSystemPath(SystemPath.EXTENSION)+"/jsx/";a.evalScript('$._ext.evalFiles("'+c+'")')}function evalScript(a,c){(new CSInterface).evalScript(a,c)}
function onAppThemeColorChanged(a){switch(csInterface.getHostEnvironment().appSkinInfo.panelBackgroundColor.color.red){case 52:$("#skin_panel_css").replaceWith('<link id="skin_panel_css" rel="stylesheet" type="text/css" href="./css/dark_theme/jquery-ui-1.9.2.custom.css" />');$("body").attr("bgcolor","#343434");setIcons(1);break;case 83:$("#skin_panel_css").replaceWith('<link id="skin_panel_css" rel="stylesheet" type="text/css" href="./css/dark_theme/jquery-ui-1.9.2.custom.css" />');$("body").attr("bgcolor",
"#535353");setIcons(1);break;case 184:$("#skin_panel_css").replaceWith('<link id="skin_panel_css" rel="stylesheet" type="text/css" href="./css/light_theme/jquery-ui-1.9.2.custom.css" />');$("body").attr("bgcolor","#b8b8b8");setIcons(0);break;case 214:$("#skin_panel_css").replaceWith('<link id="skin_panel_css" rel="stylesheet" type="text/css" href="./css/light_theme/jquery-ui-1.9.2.custom.css" />'),$("body").attr("bgcolor","#d6d6d6"),setIcons(0)}}
function openUrl(a){csInterface.openURLInDefaultBrowser(a)}
function setIcons(a){a?($("#i_dodge").attr("src","res/icons/dodge_tool_dark.png"),$("#i_burn").attr("src","res/icons/burn_tool_dark.png"),$("#i_brush").attr("src","res/icons/brush_tool_dark.png"),$("#i_heal").attr("src","res/icons/heal_tool_dark.png"),$("#i_heal2").attr("src","res/icons/heal_tool_dark_2.png"),$("#i_mixer").attr("src","res/icons/mixBrush_tool_dark.png"),$("#logo_dark").attr("src","res/icons/logo.png"),$("#sign").attr("src","res/logo.png"),$("#i_patch").attr("src","res/icons/patch_tool_dark.png"),
$("#i_clone").attr("src","res/icons/clone_tool_dark.png"),$("#i_select").attr("src","res/icons/select_dark.png")):($("#i_dodge").attr("src","res/icons/dodge_tool_light.png"),$("#i_burn").attr("src","res/icons/burn_tool_light.png"),$("#i_brush").attr("src","res/icons/brush_tool_light.png"),$("#i_heal").attr("src","res/icons/heal_tool_light.png"),$("#i_heal2").attr("src","res/icons/heal_tool_light_2.png"),$("#i_mixer").attr("src","res/icons/mixBrush_tool_light.png"),$("#logo_dark").attr("src","res/icons/dark_logo.png"),
$("#sign").attr("src","res/dark_logo.png"),$("#i_patch").attr("src","res/icons/patch_tool_light.png"),$("#i_clone").attr("src","res/icons/clone_tool_light.png"),$("#i_select").attr("src","res/icons/select_light.png"))}
$(document).ready(function(){loadJSX();csInterface.addEventListener(CSInterface.THEME_COLOR_CHANGED_EVENT,onAppThemeColorChanged);csInterface.getHostEnvironment();$("head").prepend('<link rel="stylesheet" type="text/css" href="./css/dark_theme/jquery-ui-1.9.2.custom.css" />');$("body").attr("bgcolor","#535353");setIcons(1);$("#accordion").accordion({heightStyle:"content"});$("#i_dodge").button().click(function(a){evalScript("$.UltimateRetouch.select_dodge_tool()")});$("#i_burn").button().click(function(a){evalScript("$.UltimateRetouch.select_burn_tool()")});
$("#i_brush").button().click(function(a){evalScript("$.UltimateRetouch.select_brush_tool()")});$("#i_heal").button().click(function(a){evalScript("$.UltimateRetouch.select_heal_tool()")});$("#i_mixer").button().click(function(a){evalScript("$.UltimateRetouch.select_mixBrush_tool()")});$("#i_heal").button().click(function(a){evalScript("$.UltimateRetouch.select_heal_tool()")});$("#i_heal2").button().click(function(a){evalScript("$.UltimateRetouch.select_heal_tool2()")});$("#i_clone").button().click(function(a){evalScript("$.UltimateRetouch.select_clone_tool()")});
$("#i_patch").button().click(function(a){evalScript("$.UltimateRetouch.select_patch_tool()")});$("#i_select").button().click(function(a){evalScript("$.UltimateRetouch.select_select_tool()")})});
