LMI.PrettyUrlEncoder=(function(){function A(B){B=encodeURIComponent(B);B=B.replace(/%20/g,"+");B=B.replace(/%2F/g,"|");B=B.replace(/%5C/g,"|");B=B.replace(/%7B/g,"");B=B.replace(/%7D/g,"");return B}return{encode:A}})();(function(){var E=LMI.Element.getOne,H=YAHOO.util,A=H.Event,C=document.getElementById("searchForm");function F(M,J,P){var I,O,L,N,K;M=M.length>0?LMI.PrettyUrlEncoder.encode(M):"-";J=J.length>0?LMI.PrettyUrlEncoder.encode(J):"-";if(document.body.id==="findOnMap"){I="js.url."+LMI.Data.guideType+".map.search.results";if(J==="-"){L=LMI.MapSearch.getMap().getLLPoint();N=LMI.MapSearch.getMap().getURPoint();K=LMI.MapSearch.getMap().tileManager.getScaledZoomLevel();window.location=LMI.Urls.get(LMI.Strings.getString(I,M,J))+"?bottomLeftLatitude="+L.lat+"&bottomLeftLongitude="+L.lng+"&topRightLatitude="+N.lat+"&topRightLongitude="+N.lng+"&mapLevel="+K}else{O=LMI.MapSearchSize.getDimensions();window.location=LMI.Urls.get(LMI.Strings.getString(I,M,J))+"?mapWidth="+O.x+"&mapHeight="+O.y+"&mapLevel=0"}}else{if(document.body.id==="mapResults"){I="js.url."+LMI.Data.guideType+".map";window.location=LMI.Urls.get(LMI.Strings.getString(I,J,M))}else{if(P&&E(".searchForm").className.indexOf("radiusSearch")!==-1){I="js.url."+LMI.Data.guideType+".search.radius";window.location=LMI.Urls.get(LMI.Strings.getString(I,J,M,P))}else{if(document.getElementById("allCategorySearch").value==="true"){I="js.url."+LMI.Data.guideType+".category.search";window.location=LMI.Urls.get(LMI.Strings.getString(I,J,M))}else{I="js.url."+LMI.Data.guideType+".search";window.location=LMI.Urls.get(LMI.Strings.getString(I,J,M))}}}}}function D(J){var I=this;window.setTimeout(function(){F(I.what.value,I.where.value,I.distance.options[I.distance.selectedIndex].value)},0);A.stopEvent(J)}function G(){A.on(C,"submit",D)}LMI.Init.addFunction(G,70);function B(L){A.stopEvent(L);var I=new LMI.Url(this.href),K=LMI.MapSearch.getMap(),J=K.getLLPoint(),M=K.getURPoint();I.addQueryValue("bottomLeftLatitude",J.lat);I.addQueryValue("bottomLeftLongitude",J.lng);I.addQueryValue("topRightLatitude",M.lat);I.addQueryValue("topRightLongitude",M.lng);I.addQueryValue("mapLevel",K.tileManager.getScaledZoomLevel());window.location=I.getUrl()}LMI.LinkBehavior.add("quickSearch",B)})();(function(){var B=YAHOO.util,K=B.Dom,J=B.Event,P=LMI.Element,G=P.getOne,O=P.getAll,N=LMI.Strings.getString,H,D;var M=0.5,I=0,F=false;function L(W){var X=K.getAncestorByTagName(this,"li"),b=G("div",X),S=G("img",X),Q=G("#refine"),Z=parseInt(Q.style.height,10);if(K.hasClass(b,"hidden")){K.removeClass(b,"hidden");P.setImageSrc(S,LMI.Urls.getImg("icon_minus.png"))}else{K.addClass(b,"hidden");P.setImageSrc(S,LMI.Urls.getImg("icon_plus.png"))}var U=P.getAll("#refineWrap div.multi ul.linkList li div");var V=false;var R=[];for(H=0;H<U.length;H++){if(!K.hasClass(U[H],"hidden")){V=true;R.push(U[H].parentNode.parentNode)}}if(V){var a=0;for(H=0;H<R.length;H++){if(R[H].offsetHeight>a){a=R[H].offsetHeight}}var T=a+70;if(T>Z){K.setStyle("refineWrap","height",T+"px");K.setStyle(Q,"height",T+"px")}}else{K.setStyle("refineWrap","height",Z+I+"px");K.setStyle(Q,"height",Z+"px");var Y=P.getAll("#refineWrap div.multi ul.linkList");for(D=0;D<Y.length;D++){K.setStyle(Y[D],"height","90px")}}J.stopEvent(W)}var C=G("#hoopRefineTrue"),E=G("#hoopRefineFalse"),A=O("#dateInputs select");J.on(C,"click",function(){LMI.Lang.forEach(A,function(Q){Q.disabled=false})});J.on(E,"click",function(){LMI.Lang.forEach(A,function(Q){Q.disabled=true})});LMI.LinkBehavior.add("expandRefineable",L)})();