jQuery(document).ready(function(a){a("div.ws-menu-page-group").each(function(c){var b="<ins>+</ins>",d=a(this),e=d.attr("title");var f=a('<div class="ws-menu-page-group-header">'+b+e+"</div>");f.css({"z-index":100-c});f.insertBefore(d),d.hide(),f.click(function(){var g=a("ins",this),h=a(this).next();if(h.css("display")==="none"){a(this).addClass("open"),g.html("-"),h.show()}else{a(this).removeClass("open"),g.html("+"),h.hide()}return false});if(c===0){a('<div class="ws-menu-page-groups-show">+</div>').insertBefore(f).click(function(){a("div.ws-menu-page-group-header").each(function(){var g=a("ins",this),h=a(this).next();a(this).addClass("open"),g.html("-"),h.show();return});return false});a('<div class="ws-menu-page-groups-hide">-</div>').insertBefore(f).click(function(){a("div.ws-menu-page-group-header").each(function(){var g=a("ins",this),h=a(this).next();a(this).removeClass("open"),g.html("+"),h.hide();return});return false})}if(d.attr("default-state")==="open"){f.trigger("click")}return});a("div.ws-menu-page-hr:first").css({"margin-top":"10px","margin-bottom":"20px"});a("div.ws-menu-page-section:first > h3").css({"margin-top":"0"});a("div.ws-menu-page-group > div.ws-menu-page-section:first-child > h3").css({"margin-top":"0"});a("div.ws-menu-page-group-header:first").css({"margin-top":"0","margin-right":"140px"});a("div.ws-menu-page-group:first").css({"margin-right":"145px"});a("div.ws-menu-page-readme > div.readme > div.section:last-child").css({"border-bottom-width":"0"});a("input.ws-menu-page-media-btn").filter(function(){return(a(this).attr("rel"))?true:false}).click(function(){$this=a(this),window.send_to_editor=function(d){var e,c;if((e=a("input#"+$this.attr("rel"))).length>0){var b=e.css("background-color"),f=a.trim(a(d).attr("src"));f=(!f)?a.trim(a("img",d).attr("src")):f;e.val(f),e.css({"background-color":"#FFFFCC"}),setTimeout(function(){e.css({"background-color":b})},2000);tb_remove();return}else{if((c=a("textarea#"+$this.attr("rel"))).length>0){var b=c.css("background-color"),f=a.trim(a(d).attr("src"));f=(!f)?a.trim(a("img",d).attr("src")):f;c.val(a.trim(c.val())+"\n"+f),c.css({"background-color":"#FFFFCC"}),setTimeout(function(){c.css({"background-color":b})},2000);tb_remove();return}}};tb_show("","./media-upload.php?type=image&TB_iframe=true");return false})});