if(jQuery){(function(a){a.extend(a.fn,{fileTree:function(c,b){if(!c){var c={}}if(c.root==undefined){c.root="/"}if(c.datafunc==undefined){c.datafunc=null}if(c.script==undefined){c.script="jqueryFileTree.php"}if(c.folderEvent==undefined){c.folderEvent="click"}if(c.expandSpeed==undefined){c.expandSpeed=500}if(c.collapseSpeed==undefined){c.collapseSpeed=500}if(c.expandEasing==undefined){c.expandEasing=null}if(c.collapseEasing==undefined){c.collapseEasing=null}if(c.multiFolder==undefined){c.multiFolder=true}if(c.loadMessage==undefined){c.loadMessage="Loading..."}if(c.folderCallback==undefined){c.folderCallback=null}if(c.after==undefined){c.after=null}if(c.expandedFolder==undefined){c.expandedFolder=""}a(this).each(function(){function e(h,g){function f(i){a(h).find(".start").html("");a(h).removeClass("wait").append(i);if(c.root==g){a(h).find("UL:hidden").show()}else{a(h).find("UL:hidden").slideDown({duration:c.expandSpeed,easing:c.expandEasing})}d(h);if(c.expandedFolder!=null){a(h).find(".directory.collapsed").each(function(j,k){if((c.expandedFolder).match(a(k).children().attr("data-path"))){e(a(k),a(k).children().attr("data-path").match(/.*\//));a(k).removeClass("collapsed").addClass("expanded")}})}c.after(i)}a(h).addClass("wait");a(".jqueryFileTree.start").remove();if(c.datafunc){c.datafunc(g,f)}else{a.post(c.script,{dir:g},f)}}function d(f){a(f).find("LI A").bind(c.folderEvent,function(){if(a(this).parent().hasClass("directory")){if(a(this).parent().hasClass("collapsed")){if(!c.multiFolder){a(this).parent().parent().find("UL").slideUp({duration:c.collapseSpeed,easing:c.collapseEasing});a(this).parent().parent().find("LI.directory").removeClass("expanded").addClass("collapsed")}a(this).parent().find("UL").remove();e(a(this).parent(),a(this).attr("data-path").match(/.*\//));a(this).parent().removeClass("collapsed").addClass("expanded")}else{a(this).parent().find("UL").slideUp({duration:c.collapseSpeed,easing:c.collapseEasing});a(this).parent().removeClass("expanded").addClass("collapsed")}c.folderCallback(a(this).attr("data-path"))}else{b(a(this).attr("data-path"))}return false});if(c.folderEvent.toLowerCase!="click"){a(f).find("LI A").bind("click",function(){return false})}}a(this).html('<ul class="jqueryFileTree start"><li class="wait">'+c.loadMessage+"<li></ul>");e(a(this),c.root)})}})})(jQuery)};