$.widget("ui.properties",{_create:function(){var e=this,t=this.element;t.append("<div class = 'ui-layout-north tab-title' style = 'padding: 0px; overflow: hidden;'><button class = 'open-property'>"+i18n("property")+"</button><button class = 'open-layers'>"+i18n("layers")+"</button></div><div class = 'ui-layout-center tab-content' style = 'padding: 0px;overflow: hidden;'><div class = 'property' style = 'height: 100%;'></div><div class = 'layers' style = 'height: 100%;'></div></div>").layout({closable:!1,resizable:!1,north__size:30,north__spacing_open:0});t.find(".open-property").button().click(function(){$(this).addClass("selected");t.find(".open-layers").removeClass("selected");e.$property.show();t.find(".layers").hide()});t.find(".open-layers").button().click(function(){$(this).addClass("selected");t.find(".open-property").removeClass("selected");e.$property.hide();t.find(".layers").show()});this.$property=t.find(".property");t.find(".layers").Layers();t.find(".open-property").click()},switchScene:function(e,t){var r=this.element.find(".layers").Layers(e||{});t&&r.Layers("refresh")},updateLayerProperty:function(e,t){this.element.find(".layers").Layers("update",e,t)},switchProperty:function(e,t){if(e&&!($.utils.resourceWithProperty.indexOf(e)<0)){this.currentCategory=e;this.currentType=t.data&&t.data.name||t.data.type;this.currentOpt=t;var r=this.element;r.find(".open-property").button("option","label",i18n(e+"_properties"));this.currentPane&&this.currentPane.hide();var i=this.$property,n=i.find("."+e+"-properties-pane").show();!n.length&&(n=$("<div class = '"+e+"-properties-pane'></div>").appendTo(i))[e+"-property"]();n[e+"-property"]("refresh",t);this.currentPane=n;return n}}});