(function(h){h(function(){a();f();m();j()});var d={columnClasses:["icon","name","date","size"],defaultSortOrder:"C=N;O=A",viewmodes:["details","icons"],store:{viewmode:"h5ai.viewmode"},icons:{crumb:"/h5ai/icons/crumb.png",ascending:"/h5ai/icons/ascending.png",descending:"/h5ai/icons/descending.png"},customHeader:"h5ai.header.html",customFooter:"h5ai.footer.html"};function g(){var o=localStorage.getItem(d.store.viewmode);if(h.inArray(o,d.viewmodes)){return o}return d.viewmodes[0]}function a(o){if(o!==undefined){localStorage.setItem(d.store.viewmode,o)}if(g()==="icons"){h("#details").hide();h("#icons").show()}else{h("#details").show();h("#icons").hide()}}function f(){h("#domain span").text(document.domain);var s=decodeURI(document.location.pathname);var r=s.split("/");var q="/";var p=h("nav ul");for(idx in r){var o=r[idx];if(o!==""){q+=o+"/";p.append(h("
  • >"+o+"
  • "))}}h("nav li a").closest("li").click(function(){document.location.href=h(this).find("a").attr("href")});document.title=document.domain+s}function c(){h("#details td").removeAttr("align").removeAttr("valign")}function i(o){if(o>=0&&oempty"))}}function e(){var o=document.location.search;if(o===""){o=d.defaultSortOrder}var p;if(o.indexOf("O=A")>=0){p=h("ascending")}else{p=h("descending")}if(o.indexOf("C=N")>=0){h("#details th.name a").append(p)}else{if(o.indexOf("C=M")>=0){h("#details th.date a").prepend(p)}else{if(o.indexOf("C=S")>=0){h("#details th.size a").prepend(p)}}}}function k(){c();b();l();e()}function n(){var o=h("
    ");h("#details td.name a").closest("tr").each(function(){var r=h(this);var q=r.find("td.icon img").attr("src").replace("icons","images");var p=r.find("td.name a");h("
    "+p.text()+"
    ").click(function(){document.location.href=p.attr("href")}).appendTo(o)});o.append(h("
    "));h("#icons").append(o)}function m(){k();n();h("#viewdetails").closest("li").click(function(){a("details")});h("#viewicons").closest("li").click(function(){a("icons")})}function j(){try{h.ajax({url:d.customHeader,dataType:"html",success:function(p){h("#content > header").append(h(p)).show()}})}catch(o){}try{h.ajax({url:d.customFooter,dataType:"html",success:function(p){h("#content > footer").prepend(h(p)).show()}})}catch(o){}}})(jQuery);