YUI().use("node","node-event-simulate","cookie",function(e){function f(){var g=e.one("#faq_topics ul");g.get("children").each(function(j){var h=j.get("firstChild"),l=e.Node.getDOMNode(h),m=h.get("id"),i=e.Node.create('<input type="checkbox" name="topic" class="topic_checkbox" value="'+m+'" checked="checked" id="'+m+'" />'),k=e.Node.create('<label for="'+m+'">'+l.innerHTML+"</label>");j.replaceChild(i,h);j.appendChild(k)})}function b(j,h){var g=e.one("#"+j);if(g!=null){var i=g.ancestor(".question_answer");if(i!=null){if(h){g.simulate("click")}else{if(i.hasClass("closed")){g.simulate("click")}}}}}function d(){var h=e.Cookie.get("open_faqs");if(h){var j=new Array();j=e.Cookie.get("open_faqs").split(",");for(var g=0;g<j.length;g++){b(j[g],true)}}else{e.Cookie.set("open_faqs",new Array())}}var a=function(j){var h=j.currentTarget.get("checked"),i=j.currentTarget.get("value").replace("topic_","").replace("_filter",""),g=e.one(".group_"+i);if(h){g.removeClass("hidden")}else{g.addClass("hidden")}};var c=function(i){f();e.all(".topic_checkbox").on("click",a);d();var h=window.location.hash;if(h!=""){var g=h.indexOf("#question_"),i=h.substr(g+1);e.one("#"+i).scrollIntoView(true);b(i,false)}};e.on("available",c,"#faq_topics",this);e.on("click",function(g){g.preventDefault();e.all(".eu_toggle_box .hd").each(function(h){if(g.currentTarget.get("id")=="expand_all"&&h.ancestor("dl").hasClass("closed")){h.simulate("click")}else{if(g.currentTarget.get("id")=="collapse_all"&&!h.ancestor("dl").hasClass("closed")){h.simulate("click")}}})},"#expand_all, #collapse_all")});
