(function(B){B.expr[":"].taconiteTag="a.taconiteTag";if(typeof B.fn.replace=="undefined"){B.fn.replace=function(A){return this.after(A).remove()}}if(typeof B.fn.replaceContent=="undefined"){B.fn.replaceContent=function(A){return this.empty().append(A)}}B.taconite=B.xmlExec=function(G){var H=true,F;try{B.event.trigger("taconite.begin.notify",[G]);H=B.taconite.impl.process(G)}catch(A){H=F=A}B.event.trigger("taconite.complete.notify",[G,!!H,H===true?null:H]);if(F){throw F}};B.taconite.version=[2,1,7];B.taconite.debug=0;B.taconite.lastTime=0;B.taconite._httpData=B.httpData;B.httpData=B.taconite.detect=function(A,H){var I=A.getResponseHeader("content-type");if(B.taconite.debug){B.taconite.log("[AJAX response] content-type: ",I,";  status: ",A.status," ",A.statusText,";  has responseXML: ",A.responseXML!=null);B.taconite.log("type: "+H);B.taconite.log("responseXML: "+A.responseXML)}var G=B.taconite._httpData(A,H);if(G&&G.documentElement){var J=G.documentElement.tagName;B.taconite.log("XML document root: ",J);if(J=="taconite"){B.taconite.log("taconite command document detected");B.taconite(G)}}else{B.taconite.log("jQuery core httpData returned: "+G);B.taconite.log('httpData: response is not XML (or not "valid" XML)')}return G};B.taconite.enableAutoDetection=function(A){B.httpData=A?B.taconite.detect:B.taconite._httpData};B.taconite.log=function(){if(!B.taconite.debug||!window.console||!window.console.log){return }if(!B.taconite.log.count++){B.taconite.log("Plugin Version: "+B.taconite.version.join("."))}window.console.log("[taconite] "+[].join.call(arguments,""))};B.taconite.log.count=0;B.taconite.impl={trimHash:{wrap:1},convert:function(I){var G;B.taconite.log("attempting string to document conversion");try{if(window.ActiveXObject){G=new ActiveXObject("Microsoft.XMLDOM");G.async="false";G.loadXML(I)}else{var A=new DOMParser();G=A.parseFromString(I,"text/xml")}}catch(H){if(window.console&&window.console.error){window.console.error("[taconite] ERROR parsing XML string for conversion: "+H)}throw H}var J=G&&G.documentElement&&G.documentElement.tagName!="parsererror";B.taconite.log("conversion ",J?"successful!":"FAILED");return G},process:function(F){if(typeof F=="string"){F=this.convert(F)}if(!F||!F.documentElement){B.taconite.log("$.taconite invoked without valid document; nothing to process");return false}try{var E=new Date().getTime();B.taconite.impl.process1(F.documentElement.childNodes);B.taconite.lastTime=(new Date().getTime())-E;B.taconite.log("time to process response: "+B.taconite.lastTime+"ms")}catch(A){if(window.console&&window.console.error){window.console.error("[taconite] ERROR processing document: "+A)}throw A}return true},process1:function(b){var S=0;for(var V=0;V<b.length;V++){if(b[V].nodeType!=1){continue}var P=b[V],Y=P.tagName;if(Y=="eval"){var A=(P.firstChild?P.firstChild.nodeValue:null);B.taconite.log('invoking "eval" command: ',A);if(A){B.globalEval(A)}continue}var Q=P.getAttribute("select");var Z=B(Q);if(!Z[0]){B.taconite.log("No matching targets for selector: ",Q);continue}var U=[];if(P.childNodes.length>0){S=1;for(var W=0,X=[];W<P.childNodes.length;W++){X[W]=this.createNode(P.childNodes[W])}U.push(this.trimHash[Y]?this.cleanse(X):X)}else{var a=P.getAttribute("name");var T=P.getAttribute("value");if(a!==null){U.push(a)}if(T!==null){U.push(T)}for(var W=1;true;W++){T=P.getAttribute("arg"+W);if(T===null){break}U.push(T)}}if(B.taconite.debug){var R=X?"...":U.join(",");B.taconite.log("invoking command: $('",Q,"').",Y,"("+R+")")}Z[Y].apply(Z,U)}if(S){this.postProcess()}},postProcess:function(){if(!B.browser.opera&&!B.browser.msie){return }B("select:taconiteTag").each(function(){B("option:taconiteTag",this).each(function(){this.setAttribute("selected","selected");this.taconiteTag=null});this.taconiteTag=null})},cleanse:function(A){for(var E=0,F=[];E<A.length;E++){if(A[E].nodeType==1){F.push(A[E])}}return F},createNode:function(A){var D=A.nodeType;if(D==1){return this.createElement(A)}if(D==3){return this.fixTextNode(A.nodeValue)}if(D==4){return this.handleCDATA(A.nodeValue)}return null},handleCDATA:function(A){var D=B("<div>").html(A);return D[0]},fixTextNode:function(A){if(B.browser.msie){A=A.replace(/\n/g,"\r")}return document.createTextNode(A)},createElement:function(J){var I,M=J.tagName.toLowerCase();if(B.browser.msie){var K=J.getAttribute("type");if(M=="table"||K=="radio"||K=="checkbox"||M=="button"||(M=="select"&&J.getAttribute("multiple"))){I=document.createElement("<"+M+" "+this.copyAttrs(null,J,true)+">")}}if(!I){I=document.createElement(M);this.copyAttrs(I,J)}if(B.browser.msie&&!I.canHaveChildren){if(J.childNodes.length>0){I.text=J.text}}else{for(var L=0,N=J.childNodes.length;L<N;L++){var A=this.createNode(J.childNodes[L]);if(A){I.appendChild(A)}}}if(B.browser.msie||B.browser.opera){if(M=="select"||(M=="option"&&J.getAttribute("selected"))){I.taconiteTag=1}}return I},copyAttrs:function(M,J,K){for(var L=0,P="";L<J.attributes.length;L++){var O=J.attributes[L],A=B.trim(O.name),N=B.trim(O.value);if(K){P+=(A+'="'+N+'" ')}else{if(A=="style"){M.style.cssText=N;M.setAttribute(A,N)}else{B.attr(M,A,N)}}}return P}}})(jQuery);
