String.implement({stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},parseQuery:function(C,A){C=$pick(C,true);A=$pick(A,true);var D=this.split(/[&;]/);var B={};if(D.length){D.each(function(F){var E=F.split("=");if(E.length&&E.length==2){B[(C)?encodeURIComponent(E[0]):E[0]]=(A)?encodeURIComponent(E[1]):E[1]}})}return B},tidy:function(){var A=this.toString();$each({"[\xa0\u2002\u2003\u2009]":" ","\xb7":"*","[\u2018\u2019]":"'","[\u201c\u201d]":'"',"\u2026":"...","\u2013":"-","\u2014":"--","\uFFFD":"&raquo;"},function(C,B){A=A.replace(new RegExp(B,"g"),C)});return A},cleanQueryString:function(A){return this.split("&").filter(A||function(B){return $chk(B.split("=")[1])}).join("&")}});String.implement({toQueryObject:function(){var A={};$A(this.replace(/(^.*\?)|(#.*$)/g,"").split("&")).each(function(B){B=B.split("=");A[decodeURIComponent(B[0])]=decodeURIComponent(B[1])});return A}});