Liferay.EnterpriseAdmin={};Liferay.EnterpriseAdmin.FormNavigator=new Liferay.Class({initialize:function(b){var a=this;a._container=jQuery(b.container);a._navigation=a._container.find(".form-navigation");a._sections=a._container.find(".form-section");a._navigation.find("li a").click(function(d){var c=jQuery(this.parentNode);if(!c.is(".selected")){a._revealSection(this.href,c);var e=this.href.split("#");if(e[1]){location.hash=e[1]}}return false});if(b.modifiedSections){a._modifiedSections=jQuery("[name="+b.modifiedSections+"]");if(!a._modifiedSections.length){a._modifiedSections=jQuery('<input name="'+b.modifiedSections+'" type="hidden" />');a._container.append(a._modifiedSections)}}else{a._modifiedSections=jQuery([])}if(b.defaultModifiedSections){a._modifiedSectionsArray=b.defaultModifiedSections}else{a._modifiedSectionsArray=[]}a._revealSection(location.hash);a._container.find("input, select, textarea, .modify-link").change(function(c){a._trackChanges(this)});Liferay.bind("submitForm",function(d,e){var c=jQuery(e.form);a._modifiedSections.val(a._modifiedSectionsArray.join(","))})},_revealSection:function(e,c){var b=this;var a=c||b._navigation.find("[href$="+e+"]").parent();e=e.split("#");if(!e[1]){return}e="#"+e[1];var d=jQuery(e);b._navigation.find(".selected").removeClass("selected");b._sections.removeClass("selected");d.addClass("selected");a.addClass("selected")},_trackChanges:function(b){var a=this;var d=jQuery(b).parents(".form-section:first").attr("id");var c=jQuery("#"+d+"Link");c.parent().addClass("section-modified");a._addModifiedSection(d)},_addModifiedSection:function(b){var a=this;if(jQuery.inArray(b,a._modifiedSectionsArray)==-1){a._modifiedSectionsArray.push(b)}}});