jQuery.fn.FieldsetToggle=function(a,b){return this.each(function(){var c=this;jQuery.FieldsetToggle(c,a,b)}),this},jQuery.FieldsetToggle=function(a,b,c){function e(){this.checked?d.slideDown().parent().addClass("showing"):d.fadeOut().parent().removeClass("showing")}var d=jQuery(a);d.wrap("<fieldset></fieldset>").parent().prepend(jQuery(document.createElement("legend")).append(jQuery(document.createElement("label")).append(jQuery(document.createElement("input")).attr("type","checkbox").attr("checked",c?!0:!1).click(e)," "+b))),c?d.show():d.hide()},jQuery(function(){jQuery(".democode").FieldsetToggle("Code for this demo")});