{"size": 3045, "ext": "js", "max_stars_repo_path": "app/assets/javascripts/application.js", "max_stars_repo_name": "murrlipp/apply-for-compensation-prototype-1", "max_stars_repo_stars_event_min_datetime": "2019-01-29T12:22:29.000Z", "max_stars_repo_stars_event_max_datetime": "2019-05-03T10:45:53.000Z", "max_issues_repo_path": "app/assets/javascripts/application.js", "max_issues_repo_name": "murrlipp/apply-for-compensation-prototype-1", "max_issues_repo_issues_event_min_datetime": "2018-10-25T14:10:35.000Z", "max_issues_repo_issues_event_max_datetime": "2019-10-02T09:39:09.000Z", "max_forks_repo_path": "app/assets/javascripts/application.js", "max_forks_repo_name": "murrlipp/apply-for-compensation-prototype-1", "max_forks_repo_forks_event_min_datetime": "2019-05-13T13:57:57.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-10T10:06:49.000Z"}
{"max_stars_count": 3, "max_issues_count": 98, "max_forks_count": 5, "avg_line_length": 32.7419354839, "max_line_length": 83, "alphanum_fraction": 0.5960591133}
/* global $ */

// Warn about using the kit in production
if (window.console && window.console.info) {
  window.console.info('GOV.UK Prototype Kit - do not use for production')
}

$(document).ready(function () {
  window.GOVUKFrontend.initAll()
})

$(document).ready(function(){
  $(".moj-cookie-settings--success").hide();

  /// Fake hiding the cookie banner
  $(".cookie-banner__button-accept button").click(function(){
    $(".app-cookie-banner").hide();
  });

  $("#save-cookie-prefs").click(function(){
    $(window).scrollTop(0);
    $(".app-cookie-banner").hide();
    $(".moj-cookie-settings--success").show();
  });

})

$(document).ready(function(){

  $('.miller-columns li a').on('click', function () {
      $(this).parent().toggleClass('expanded').siblings().removeClass('expanded');
      // alert ('testing');
      return false;
  });

  $(".miller-columns li:has(ul)").addClass("has-children");

})

$(document).ready(function(){
    $("a.govuk-button").click(function(){
        var radioValue = $("[type='radio']:checked").val();

        /// Is it the local force?

        if(radioValue == "local-force"){
          window.location.href = "/forces-mockups/v1/offender/";
        }
        if(radioValue == "other-england-force"){
          window.location.href = "/forces-mockups/v1/england/forces/index";
        }
        if(radioValue == "scotland-force"){
          window.location.href = "/forces-mockups/v1/scotland/forces/";
        }
        if(radioValue == "wales-force"){
          window.location.href = "/forces-mockups/v1/wales/forces/";
        }
        if(radioValue == "british-transport-police"){
          window.location.href = "/forces-mockups/v1/offender/";
        }

        /// Pick English area

        if(radioValue == "crime-police-north-west"){
          window.location.href = "/forces-mockups/v1/england/forces/north-west";
        }
        if(radioValue == "crime-police-north-east"){
          window.location.href = "/forces-mockups/v1/england/forces/north-east";
        }
        if(radioValue == "crime-police-east-midlands"){
          window.location.href = "/forces-mockups/v1/england/forces/east-midlands";
        }
        if(radioValue == "crime-police-eastern"){
          window.location.href = "/forces-mockups/v1/england/forces/eastern";
        }
        if(radioValue == "crime-police-london"){
          window.location.href = "/forces-mockups/v1/england/forces/london";
        }
        if(radioValue == "crime-police-south-east"){
          window.location.href = "/forces-mockups/v1/england/forces/south-east";
        }
        if(radioValue == "crime-police-south-west"){
          window.location.href = "/forces-mockups/v1/england/forces/south-west";
        }
        if(radioValue == "crime-police-west-midlands"){
          window.location.href = "/forces-mockups/v1/england/forces/west-midlands";
        }
        if(radioValue == "crime-police-dont-know"){
          window.location.href = "/forces-mockups/v1/england/forces/all";
        }
    });
});
