var QuickFinder={attachBehavior:function(){$$("input").each(function(C){var B=C.readAttribute("for")||C.getAttribute("for");if(!B){return}if(B.indexOf(",")!=-1){C.filterTargets=[];var A=B.split(",");for(var F=0;F<A.length;++F){var E=$(A[F]);if(E){C.filterTargets.push(E)}}if(!C.filterTargets.length){return}}else{C.filterTargets=[$(B)];if(!C.filterTargets[0]){return}}filterEmpty=C.readAttribute("empty")||C.getAttribute("empty");if(filterEmpty){C.filterEmpty=$(filterEmpty)}C.observe("keyup",QuickFinder.onKeyUp);for(var F=0,D=C.filterTargets.length;F<D;F++){C.filterTargets[F].childElements().each(function(G){var H=G.filterText||G.readAttribute("filterText")||G.getAttribute("filterText");if(!H){G.filterText=G.innerHTML.stripTags()}G.filterText=G.filterText.toLowerCase()})}QuickFinder.filter(C)})},onKeyUp:function(A){input=A.element();if(input.filterTargets){QuickFinder.filter(input)}},filter:function(B){var F=B.value.toLowerCase();var A=0;for(var D=0,C=B.filterTargets.length;D<C;D++){B.filterTargets[D].childElements().each(function(G){var H=G.filterText;if(H.indexOf(F)==-1){G.addClassName("QuickFinderNoMatch")}else{++A;G.removeClassName("QuickFinderNoMatch")}})}try{if(B.filterEmpty){(A==0)?B.filterEmpty.show():B.filterEmpty.hide()}}catch(E){}}};document.observe("dom:loaded",QuickFinder.attachBehavior);