!function(){function e(){return"bb"}function a(){return"0.3.4"}function n(){return parseFloat(a()).toString()}function t(e,a,n){e.addEventListener?e.addEventListener(a,n):e.attachEvent("on"+a,n)}function s(e,a,n){for(var s=0;s<e.length;s++)t(e[s],a,n)}function o(e,a){if(e.classList)e.classList.toggle(a);else{for(var n=e.className.split(" "),t=-1,s=n.length;s--;)n[s]===a&&(t=s);t>=0?n.splice(t,1):n.push(a),e.className=n.join(" ")}}function i(e,a){e.classList?e.classList.add(a):e.className+=" "+a}function l(e,a){e.classList?e.classList.remove(a):e.className=e.className.replace(new RegExp("(^|\\b)"+a.split(" ").join("|")+"(\\b|$)","gi")," ")}function r(e,a,n,t){var s=new XMLHttpRequest;s.open(e,a,!0),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===e&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),s.onreadystatechange=function(){4===this.readyState&&(this.status>=200&&this.status<400?t(null,this.responseText):t(this.statusText))},n?s.send(d(n)):s.send(),s=null}function c(e,a,n){r("POST",e,a,n)}function p(e,a,n){"function"==typeof a&&(n=a,a=null),a||(a={}),a.callbackParam||(a.callbackParam="callback");var t=document.createElement("script"),s="jsonp_"+(new Date).getTime();t.src=e+(e.match(/\?/)?"&":"?")+a.callbackParam+"="+s,t.async=!0,t.onload=function(){setTimeout(function(){delete window[s]},0)},window[s]=n,document.querySelector("head").appendChild(t)}function u(){return"withCredentials"in new XMLHttpRequest}function d(e){var a=[];for(var n in e)e.hasOwnProperty(n)&&a.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return a.join("&")}function m(e,a,n){var t=!1;if("object"==typeof n&&"[object Array]"===Object.prototype.toString.call(n)?(selectors=n.map("script"==e?function(a){return e+'[src$="'+a+'"]'}:function(a){return e+'[href$="'+a+'"]'}),n=selectors.join(", "),t=document.querySelectorAll(n).length):"string"==typeof n&&(t=document.querySelectorAll(e+("script"==e)?'[src$="'+n+'"]':'[href$="'+n+'"]').length),t)return!1;var s=document.createElement(e);return"script"==e?s.src=a:(s.href=a,s.rel="stylesheet"),document.querySelector("head").appendChild(s),!0}function f(t,s){return s||(s={}),s.namespace=e(),s.version=a(),s.s3Version=n(),t.replace(/\{\{ ?([\w\d_]+) ?\}\}/gi,function(e,a){return s[a]||""})}function g(a,n,t){var s={response:"json",email:n,zipcode:t};c("http://sunlightfoundation.com/join/",s,function(a,n){if(a){var t=document.querySelector("."+e()+"_email-form-fail");b(t,{add:"is-true"})}else{var s=JSON.parse(n),o="http://sunlightfoundation.com"+s.redirect,i=document.querySelector("."+e()+"_email-form");b(i,{add:"is-hidden"});var t=document.querySelector("."+e()+"_email-form-fail");b(t,{remove:"is-true"});var l=document.querySelector("."+e()+"_email-form-success");b(l,{add:"is-true"});var r=document.querySelector(".bb_email-sucess-url");r.href=o}})}function h(){var a=document.querySelector("[data-"+e()+"-brandingbar]");if(a){var o=document.querySelector("#"+e()+"_panel"),i="https://sunlightfoundation.com/brandingbar/",l=a.getAttribute("data-"+e()+"-property-id"),r=m("link","https://s3.amazonaws.com/sunlight-cdn/brandingbar/"+n()+"/css/brandingbar.min.css.gz",["brandingbar.css","brandingbar.min.css","brandingbar.min.css.gz"]),c=!1;a.innerHTML||(a.innerHTML=f(barTemplate),c=m("link","https://s3.amazonaws.com/sunlight-cdn/brandingbar/"+n()+"/css/brandingbar-default.min.css.gz",["brandingbar-default.css","brandingbar-default.min.css","brandingbar-default.min.css.gz"])),o||(o=document.createElement("div"),r&&(o.style.display="none",setTimeout(function(){o.style.display=""},750)),o.id=e()+"_panel",a.parentElement.insertBefore(o,a)),o.innerHTML||(o.innerHTML=f(panelTemplate));var d=document.querySelector("."+e()+"_wrapper"),h=document.querySelectorAll("[data-"+e()+'-toggle=".'+e()+'_wrapper"]'),_=o.querySelectorAll("."+e()+"_tools-heading"),v=o.querySelectorAll("."+e()+"_tools-details");if(s(h,"click",function(e){e.preventDefault(),b(d,{toggle:"is-active"})}),s(_,"click",function(a){var n=document.querySelector(this.getAttribute("data-"+e()+"-toggle"));a.preventDefault(),"undefined"!=typeof n&&(b(_,{toggle:"is-inactive"}),b(v,{add:"is-hidden",remove:e()+"_fade-animation"}),b(n,{add:e()+"_fade-animation",remove:"is-hidden"}))}),l&&(i+="?pid="+l,p(i,function(e){var a=featuredTools.querySelector("ul");a.innerHTML="";for(var n=0;n<e.length;n++)a.innerHTML+=f(toolTemplate,e[n])})),u()){var y=document.querySelector("."+e()+"_email-form");t(y,"submit",function(e){e.preventDefault();var a=y.querySelector("input[name=email]").value,n=y.querySelector("input[name=zipcode]").value;window.console&&console.log(a+" "+n),g("http://sunlightfoundation.com/subscribe/",a,n)})}}}Array.prototype.map||(Array.prototype.map=function(e){"use strict";if(void 0===this||null===this)throw new TypeError;var a=Object(this),n=a.length>>>0;if("function"!=typeof e)throw new TypeError;for(var t=new Array(n),s=arguments.length>=2?arguments[1]:void 0,o=0;n>o;o++)o in a&&(t[o]=e.call(s,a[o],o,a));return t});var b=function(e,a){"string"==typeof a.toggle&&(a.toggle=[a.toggle]),"string"==typeof a.add&&(a.add=[a.add]),"string"==typeof a.remove&&(a.remove=[a.remove]),"undefined"==typeof e.length&&(e=[e]);var n,t;for(n=0;n<e.length;n++){if(a.toggle)for(t=0;t<a.toggle.length;t++)o(e[n],a.toggle[t]);if(a.add&&i(e[n],a.add.join(" ")),a.remove)for(t=0;t<a.remove.length;t++)l(e[n],a.remove[t])}};panelTemplate='  <button id="{{ namespace }}_close-panel" type="button" data-{{ namespace }}-toggle=".{{ namespace }}_wrapper">&times;</button>  <div class="{{ namespace }}_panel-container">    <div class="{{ namespace }}_about">      <span class="{{ namespace }}_heading">About Sunlight Foundation</span>      <p class="{{ namespace }}_description">The <a class="{{ namespace }}_link" href="http://sunlightfoundation.com">Sunlight Foundation</a> is a nonpartisan nonprofit that advocates for open government globally and uses technology to make government more accountable to all.</p>      <div class="{{ namespace }}_email">        <span class="{{ namespace }}_heading">Stay informed about our work</span>        <form class="{{ namespace }}_email-form" action="http://sunlightfoundation.com/join/" method="post">          <input class="{{ namespace }}_input" type="email" placeholder="email address" name="email">          <input class="{{ namespace }}_input {{ namespace }}_input-zip" type="text" placeholder="zip code" name="zipcode">          <button class="{{ namespace }}_submit" type="submit">Submit</button>          <span class="{{ namespace }}_email-form-fail">Oops, there was an error :(</span>        </form>        <div class="bb_email-form-success"> Thanks for subscribing to our updates! <a class="bb_link bb_email-sucess-url" href="">Tell us more about you &raquo;</a></div>      </div>    </div>    <div class="{{ namespace }}_tools">      <span class="{{ namespace }}_heading">        <span class="{{ namespace }}_tools-heading" id="{{ namespace }}_featured-tools-heading" data-{{ namespace }}-toggle="#{{ namespace }}_featured-tools">Related Tools</span>        <span class="{{ namespace }}_tools-heading is-inactive" id="{{ namespace }}_more-tools-heading" data-{{ namespace }}-toggle="#{{ namespace }}_more-tools">All Tools</span>      </span>      <div id="{{ namespace }}_featured-tools" class="{{ namespace }}_tools-details">        <ul class="{{ namespace }}_tools-featured">          <li>            <a class="{{ namespace }}_tools-logo" href="http://opencongress.com">            <img src="https://sunlight-cdn.s3.amazonaws.com/brandingbar/{{ s3Version }}/img/logo_opencongress.png" alt="Open Congress"/>            </a>            <p class="{{ namespace }}_description">              <a class="{{ namespace }}_link" href="http://opencongress.com">OpenCongress</a> allows anyone to follow legislation in Congress, from bill introduction to floor votes. Learn more about the issues you care about.            </p>          </li>          <li>            <a class="{{ namespace }}_tools-logo" href="http://scout.sunlightfoundation.com">              <img src="https://sunlight-cdn.s3.amazonaws.com/brandingbar/{{ s3Version }}/img/logo_scout.png" alt="Scout"/>            </a>            <p class="{{ namespace }}_description">              <a class="{{ namespace }}_link" href="https://scout.sunlightfoundation.com">Scout</a> is a rapid notification service that allows anyone to create customized email or text alerts on actions Congress takes on an issue or a specific bill.            </p>          </li>        </ul>      </div>      <div id="{{ namespace }}_more-tools" class="{{ namespace }}_tools-details is-hidden">        <ul class="{{ namespace }}_tools-list">          <li><a class="{{ namespace }}_link" href="http://www.opencongress.org">OpenCongress</a></li>          <li><a class="{{ namespace }}_link" href="http://influenceexplorer.com">Influence Explorer</a></li>          <li><a class="{{ namespace }}_link" href="http://openstates.org">Open States</a></li>          <li><a class="{{ namespace }}_link" href="https://scout.sunlightfoundation.com">Scout</a></li>        </ul>        <ul class="{{ namespace }}_tools-list">          <li><a class="{{ namespace }}_link" href="http://churnalism.sunlightfoundation.com">Churnalism</a></li>          <li><a class="{{ namespace }}_link" href="http://capitolwords.org">Capitol Words</a></li>          <li><a class="{{ namespace }}_link" href="http://politwoops.sunlightfoundation.com">Politwoops</a></li>          <li><a class="{{ namespace }}_link" href="http://adhawk.sunlightfoundation.com">Ad Hawk</a></li>        </ul>        <ul class="{{ namespace }}_tools-list">          <li><a class="{{ namespace }}_link" href="http://politicalpartytime.org">Party Time</a></li>          <li><a class="{{ namespace }}_link" href="https://scout.sunlightfoundation.com">Scout</a></li>          <li><a class="{{ namespace }}_link" href="http://docketwrench.sunlightfoundation.com">Docket Wrench</a></li>          <li><a class="{{ namespace }}_link" href="http://politicaladsleuth.com">Political Ad Sleuth</a></li>        </ul>      </div>    </div>  </div>',toolTemplate='  <li>    <a class="{{ namespace }}_tools_logo" href="{{ href }}">      <img src="{{ img }}" alt="{{ name }}"/>    </a>    <p class="{{ namespace }}_description">      {{ description }}    </p>  </li>',barTemplate='  <div class="branding-bar_container">    <div class="branding-bar_links">      <a class="social" href="https://www.facebook.com/sunlightfoundation"><span class="sficon-facebook"></span></a>      <a class="social" href="https://twitter.com/sunfoundation"><span class="sficon-twitter"></span></a>      <a class="social" href="https://plus.google.com/+sunlightfoundation"><span class="sficon-google-plus"></span></a>      <a class="branding-bar_trigger" data-bb-toggle=".bb_wrapper" href="http://sunlightfoundation.com/about/">About Sunlight Foundation</a>    </div>    <div class="branding-bar_logo">      <span class="branding-bar_productof">a product of </span>      <a class="branding-bar_sunlight-logo" href="http://www.sunlightfoundation.com">Sunlight Foundation</a>    </div>  </div>',h()}();