StarterKit.SolutionFinders=StarterKit.SolutionFinders||[];StarterKit.SolutionFinder=function(n,t){return{Id:n,getElementId:function(t,i){var r="";return i&&(r+="#"),r+("sf-"+n+"-"+t)},Init:function(){var t,i,r,n;if($(this.getElementId("errors",!0)).hide(),t=document.getElementById(this.getElementId("items")),t&&(i=this.Results.Items,t)){n=document.createElement("option");n.value="";n.text="";t.add(n);for(r in i)i.hasOwnProperty(r)&&(n=document.createElement("option"),n.value=r,n.text=i[r].Name,t.add(n));$(t).selectpicker("refresh");this.Bind()}},ItemSelected:function(n){var e=n.data,t=document.getElementById(e.getElementId("locations")),i,r,u,f;if(t){while(t.firstChild)t.removeChild(t.firstChild);i=document.createElement("option");i.value="";i.text="";t.add(i);var o=!0,h=n.target.value,s=e.Results.Items[h];if(s!=undefined&&(r=s.Locations,r!=undefined)){for(u=0;u<r.length;u++)f=r[u],i=document.createElement("option"),i.value=f,i.text=f,t.add(i);o=!1}$(t).prop("disabled",o);$(t).selectpicker("refresh")}},Submit:function(n){var i=n.data,r=$(i.getElementId("items",!0)).val(),h=$(i.getElementId("items",!0)+" option:selected").text(),u="",f="",e,o,s;return(t||(u=$(i.getElementId("locations",!0)).val(),f=$(i.getElementId("locations",!0)+" option:selected").text()),e=t?r!="":r!=""&&u!="",!e)?($(i.getElementId("errors",!0)).fadeIn(300),!1):(o=(r+u).replace(/\s/g,""),s=i.Results[o],i.Redirect(s,h,f),!1)},HasCookies:function(){var n=navigator.cookieEnabled?!0:!1;return typeof navigator.cookieEnabled!="undefined"||n||(document.cookie="testcookie",n=document.cookie.indexOf("testcookie")!=-1?!0:!1),n},SetCookie:function(n,t,i){document.cookie=encodeURI("SolutionDetail=url="+n+"&item="+t+"&location="+i+";path=/")},Redirect:function(n,t,i){this.HasCookies()?(this.SetCookie(n.Url,t,i),window.location.href=n.Url):window.location.href=n.Url+"?i="+t+"&l="+i},Bind:function(){$(this.getElementId("items",!0)).on("change",this,this.ItemSelected);$(this.getElementId("submit",!0)).on("click",this,this.Submit)},Results:{}}};$(document).ready(function(){for(var t,n=0;n<StarterKit.SolutionFinders.length;n++)t=StarterKit.SolutionFinders[n],t.Init()})