MediaWiki:Centralnotice-template-nbNO ipd lg base

<style> /* Clearfix */

  1. frbanner .cf:before,
  2. frbanner .cf:after {
  content: "";
  display: table;

}

  1. frbanner .cf:after { clear: both; }

/* Box-sizing */

  1. frbanner *,
  2. frbanner *:before,
  3. frbanner *:after {
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;

}

/* Transitions */

  1. frbanner-form label,
  2. frbanner-form button,
  3. frbanner-email-reminder1 input,
  4. frbanner-email-reminder1 button,
  5. frbanner-email-reminder2 input,
  6. frbanner-email-reminder2 button {
   -webkit-transition: all .2s ease-in-out;
   -moz-transition:    all .2s ease-in-out;
   transition:         all .2s ease-in-out;

}

/* Main banner


*/

  1. frbanner {
   position: absolute;
   top: 0 !important;
   left: 0;
   width: 100%;
   height: 100%;

}

  1. frbanner-mask {
   position: absolute;
   z-index: 1000;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: black;
   opacity: 0.8;

}

  1. frbanner-window {
   position: relative;
   top: 0;
   left: 0;
   right: auto;
   width: 100%;
   margin-top: 0;
   font-family: "Helvetica Neue", "Helvetica", "Nimbus Sans L", "Arial", "Liberation Sans", sans-serif;
   text-align: center;

}

@media (min-width: 768px) {

   #frbanner-window {
       margin-top: 20px;
       left: 5%;
       right: 5%;
       width: 90%;
   }

}



/* --- Message --- */

.frbanner-message {

   font-size: 1.25em;
   line-height: 1.3;
   color: black;
   background: white;
   border: 5px solid #990000;
   border-bottom: 0;
   text-align: left;

}

.frbanner-message-text {

   max-width: 100%;
   padding: 1em;
   font-weight: bold;

}

@media (min-width: 768px) {

   .frbanner-message {
       font-size: 1.4em;
       line-height: 1.4;
   }
   .frbanner-message-text {
       padding: 1.5em 3em;
   }

}

@media (min-height: 1000px) {

   .frbanner-message {
       font-size: 1.5em;
   }
   .frbanner-message-text {
       padding: 2em 3em;
   }

}

.frbanner-message-text p { margin-bottom: .5em; } .frbanner-message-text p:last-child { margin-bottom: 0; }

.frbanner-highlight {

   background: #fff000;
   color: black;
   padding: 0 0.2em;

}

.frbanner-highlight span { position: relative; } /* prevent background from overlapping text */

.frbanner-call-to-action {

   text-align: center;
   background: #990000;
   color: #fff;
   padding: .4em;
   font-weight: 400;
   font-size: 1.2em;
   display: block;
   margin: auto;
   width: 100%;
   position: relative;

}

.frbanner-call-to-action:after {

   position: absolute;
   left: 50%;
   top: 100%;
   height: 0;
   width: 0;
   margin-left: -10px;
   content: " ";
   border: solid transparent;
   border-top-color: #990000;
   border-width: 10px;
   pointer-events: none;

}

@media (min-width: 360px) { .frbanner-call-to-action { font-size: 1.15em; } } @media (min-height: 1000px) { .frbanner-call-to-action { padding: 1em; } } @media (min-width : 1100px) { .frbanner-call-to-action { font-size: 1.4em; } }


/* --- Padding for Form area --- */

.frbanner-bottom {

   background: #fff;
   padding: 1.5em 1.5em .5em;

}

@media (min-width: 768px) {

  .frbanner-bottom {
       padding: 2em 2em .5em;
   }

}

@media (min-height: 1000px) {

   .frbanner-bottom {
       padding: 3em 3em .5em;
   }

}


/* --- Form --- */

  1. frbanner-form {
   position: relative;
   background: white;
   padding-bottom: 0em;
   clear: both;

}

@media (min-width: 768px) {

  #frbanner-form {
       padding-bottom: 1em;
   }

}

@media (min-height: 1000px) {

   #frbanner-form {
       padding-bottom: 1em;
   }

}


/* --- Form legends --- */

  1. frbanner-form legend {
   display: block;
   width: 100%;
   margin: 0;
   padding: 0 0 .5em 0;
   text-align: center;
   font-size: 1em;

}

@media (min-width : 768px) { #frbanner-form legend { font-size: 1.1em; } }


/* --- Common Button Styles --- */

.frbanner-btn {

   display: block;
   background-color: #f8f9fa;
   color: #222;
   border: 1px solid #9aa0a7;
   border-radius: 2px;
   padding: 1em .5em;
   outline: 0;
   text-align: center;
   line-height: 1;
   cursor: pointer;
   font-family: inherit;
   font-weight: 500;
   transition: background 100ms, color 100ms, border-color 100ms, box-shadow 100ms;

} .frbanner-btn:hover {

   background-color: #fff;
   color: #444;
   border-color: #a2a9b1;

} .frbanner-btn:active {

   background-color: #d9d9d9;
   color: #000;
   border-color: #7d8389;

} .frbanner-btn:focus {

   border-color: #3366cc;
   box-shadow: inset 0 0 0 1px #3366cc;

} .frbanner-btn.checked {

   background-color: #2a4b8d;
   color: #fff;
   border-color: #7d8389;

}

.frbanner-amounts li label:active, .frbanner-amounts li input[type="radio"]:checked + label, .frbanner-amounts li input.checked[type="radio"] + label {

   background-color: #2a4b8d;
   color: #fff;
   border-color: #7d8389;

}


/* --- Amount buttons layout --- */

.frbanner-frequency, .frbanner-amounts { margin-bottom: 1em; }

.frbanner-amounts li {

   display: block;
   width: 49%;
   clear: none;
   float: left;
   margin-bottom: 6px;
   margin-right: 2%;

}

body.rtl .frbanner-amounts li {

   float: right;
   margin-right: 0;
   margin-left: 2%;

}

@media (min-width : 570px) { .frbanner-amounts li { margin-bottom: 10px; } }

/* "Phone" layout, 2 amount buttons per row */ @media (max-width: 374px) {

   body.ltr .frbanner-amounts #amount_total_2,
   body.ltr .frbanner-amounts #amount_total_4,
   body.ltr .frbanner-amounts #amount_total_6 {
       margin-right: 0;
   }
   body.rtl .frbanner-amounts #amount_total_2,
   body.rtl .frbanner-amounts #amount_total_4,
   body.rtl .frbanner-amounts #amount_total_6 {
       margin-left: 0;
   }

}

/* "Tablet" layout, 3 amount buttons per row */ @media (min-width: 375px) {

   .frbanner-frequency, .frbanner-amounts {
       padding: 0 .25em;
   }
   .frbanner-amounts li {
       width: 32%;
   }
   body.ltr .frbanner-amounts #amount_total_3,
   body.ltr .frbanner-amounts #amount_total_6 {
       margin-right: 0;
   }
   body.rtl .frbanner-amounts #amount_total_3,
   body.rtl .frbanner-amounts #amount_total_6 {
       margin-left: 0;
   }

}

  1. amount_label_5 {
   white-space: nowrap;

}

@media (max-width : 375px) { #amount_label_5 { padding-left: 5%; padding-right: 5% } }

/* --- Frequency Slider --- */

fieldset.frbanner-frequency {

  padding-bottom: 0.35em;
  text-align: center;

}

.frbanner-frequency ul {

  margin: auto;
  width: 180px;

}

.frbanner-frequency li {

  display: table-cell;

}

body.rtl .frbanner-frequency li {

  padding: 0 0 0 0.75em;

}

fieldset.frbanner-frequency span {

   color: #000;
   font-size: 14px;
   font-weight; bold;
   margin-top: 9.5px;
   padding: 0 .5em;
   position: absolute;
   z-index: 999;
   pointer-events: none;

}

fieldset.frbanner-frequency span.frq-once {

   left: .5em;

}

fieldset.frbanner-frequency span.frq-monthly {

   right: .5em;

}

.frq-active {

   color: #20529c !important;
   font-weight: bold;

}

.frequency_monthly {

 position: relative;
 display: inline-block;
 vertical-align: middle;
 width: 180px;
 height: 36px;

}

.frequency_monthly input {display:none;}

.frequency-slider {

 position: absolute;
 cursor: pointer;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 border-radius: 30px;
 border: 1px solid #dadada;
 background-color: #f8fdff;
 -webkit-transition: .4s;
 transition: .4s;

}

.frequency-slider:before {

 position: absolute;
 content: "";
 height: 28px;
 width: 88px;
 left: 3px;
 top: 3px;
 bottom: 4px;
 border-radius: 30px;
 background-color: #b3d0fc;
 -webkit-transition: .4s;
 transition: .4s;

}

input:focus + .frequency-slider {

 box-shadow: 0 0 1px #2196F3;

}

input:checked + .frequency-slider:before {

 -webkit-transform: translateX(88px);
 -ms-transform: translateX(88px);
 transform: translateX(88px);
 width: 84px;

}

.frequency-slider span {

   display: inline-block;
   width: 100%;
   vertical-align: middle;
   color: white;
   font-size: .9em;
   text-align: center;
   text-transform: uppercase;

}

.form-monthly .no-monthly {

   display: none !important;

}


/* --- Amount buttons appearance --- */

.frbanner-amounts li input[type="radio"] {

   /* Based on http://jqueryui.com/button/#radio */
   border: 0;
   clip: rect(0 0 0 0);
   height: 1px;
   margin: -1px;
   overflow: hidden;
   padding: 0;
   position: absolute;
   width: 1px;

}

.frbanner-amounts li label {

   width: 100%;
   min-height: 76px;
   font-size: 1.5em;
   font-style: normal;
   font-weight: bold;

}

@media (min-width: 768px) {

   .frbanner-amounts li label {
       min-height: 88px;
       font-size: 1.75em;
   }

}


.frbanner-amounts li label:active , .frbanner-amounts li input[type="radio"]:checked + label, .frbanner-amounts li input[type="radio"].checked + label {

   background: #0f4b76;

}

/* --- Other amount --- */

  1. input_amount_other_box {
   padding: 0;
   margin: 0;
   background: #fff;
   border: none;
   width: 90%;
   font-size: 0.8em;
   text-align: center;
   direction: ltr;

} .frbanner-amounts li input[type="radio"]:checked + label #input_amount_other_box {

   background: #fff;

}

  1. amount_total_6 {
   white-space: nowrap;

}

  1. amount_label_6 {
   background: #fff;
   border: 1px solid #aaa;
   color: #aaa;
   padding-left: 0.2em;

}


/* --- Payment method buttons layout --- */

.frbanner-submit legend { display: none; }


/* "Phone" layout, full width stacked */ @media (max-width: 374px) {

   .frbanner-submit li {
       width: 100%;
       margin-bottom: 6px;
   }
   #frbanner-window li.frbanner-submit {
       display: block;
       margin: 0;
   }

}

/* "Tablet" layout, next to each other */ @media (min-width: 375px) {

   .frbanner-submit ul {
       display: table;
       table-layout: fixed;
       width: 100%;
   }
   .frbanner-submit ul li {
       display: table-cell;
       padding: 0 .25em;
       vertical-align: top;
   }

}


@media (min-width : 570px) {

   .frbanner-submit li {
       margin-bottom: 10px;
   }

}

.frbanner-submit .frbanner-btn, .frbanner-email-reminder1-link.frbanner-btn, .frbanner-email-reminder2-link.frbanner-btn {

   color: #3366cc;

}

.frbanner-submit .frbanner-btn:hover, .frbanner-email-reminder1-link.frbanner-btn:hover, .frbanner-email-reminder2-link.frbanner-btn:hover {

   background-color: #fff;
   border-color: #859dcc;

}

.frbanner-submit .frbanner-btn:active, .frbanner-email-reminder1-link.frbanner-btn:active, .frbanner-email-reminder2-link.frbanner-btn:active {

   background-color: #eff3fa;
   color: #2a4b8d;
   border-color: #2a4b8d;
   box-shadow: none

}

  1. frbanner-window button, #frbanner-rml {
   width: 100%;
   height: 100%;
   font-size: .85em;
   float: none;
   font-family: inherit;

}

/* --- Payment method buttons appearance --- */

  1. frbanner-window button {
   width: 100%;
   height: 50px;
   background-size: auto 50%;
   background-repeat: no-repeat;
   background-position: center center;

}

.frbanner-email-reminder2-form button {

   min-height: 50px;

}

@media (min-width: 375px) {

   #frbanner-window button {
       height: 90px;
       font-size: 1.3em;
       background-size: 70% auto;
   }
   .frbanner-email-reminder2-form button {
       min-height: 60px;
   }

}

@media (min-width: 1000px) {

   #frbanner-window button {
       background-size: auto 50%;
   }

}

/* Payment logos */

  1. frbanner-window .paymentmethod-pp button {
   text-indent: -99999px;
   background-image: url('//upload.wikimedia.org/wikipedia/donate/8/8d/Paypal-color.svg');

}

  1. frbanner-window .paymentmethod-amazon button {
   text-indent: -99999px;
   background-image: url('//upload.wikimedia.org/wikipedia/donate/e/e4/Amazon-color.svg');

}

  1. frbanner-window .paymentmethod-bpay button {
   text-indent: -99999px;
   background-image: url('//upload.wikimedia.org/wikipedia/donate/e/e3/BPAY_Landscape_MONO.gif');

}


/* --- Smallprint --- */

.frbanner-footer {

   width: 100%;
   font-size: 75%;
   padding: 1em 20px;
   background: white;
   text-align: center;
   color: #3c3c3c;

}

  1. frbanner-window .recurring-details {
   display: none;

}


/* --- Close Options --- */

  1. frbanner-close-options {
   background: #000;
   display: block;
   z-index: 999;
   color: #fff;
   font-size: .8em;
   padding: .5em;
   text-transform: uppercase;
   text-align: center;
   width: 100%;

}

@media (min-width: 360px) { #frbanner-close-options { font-size: 1em; } } @media (min-width: 740px) { #frbanner-close-options { font-size: 1.1em; } }

.frbanner-close, .frbanner-email-reminder1-link {

   display: inline-block;
   cursor: pointer;
   z-index: 999;
   vertical-align: middle;
   color: #ccc;

}

.frbanner-close:hover, .frbanner-email-reminder1-link:hover {

   color: #fff;

}

.frbanner-email-reminder1-link {

   width: 60%;
   border-right: 1px solid #666;

} body.rtl .frbanner-email-reminder1-link {

   border-right: 0;
   border-left: 1px solid #666;

}

.frbanner-close {

   width: 38%;

}

.frbanner-close-x {

   background: url('//upload.wikimedia.org/wikipedia/donate/8/84/Close-thin-white.png') no-repeat center center;
   width: 9px;
   height: 9px;
   float: right;
   display: block;
   margin: .25em 0 0 .25em;

} body.rtl .frbanner-close-x {

   float: left;
   margin: .25em .25em 0 0;

}

.frbanner-close.bottom {

   text-align: center;
   color: white;
   display: inline-block;
   width: auto;
   margin: auto;
   z-index: 999;
   color: #fff;
   font-size: .8em;
   padding: 1em;
   text-transform: uppercase;
   cursor: pointer;

}

.frbanner-close.bottom:hover {

   color: #fff;

}

@media (min-width: 768px) {

   .frbanner-close.bottom {
       display: none;
   }

}

/* --- Remind me by email CLOSE OPTION --- */

  1. frbanner-email-reminder1 form {
   display: block;
   margin: 1em;

}

.frbanner-email-reminder-caption {

   text-align: left;
   margin: .5em 1em;

}

  1. frbanner-email-reminder1 input {
   direction: ltr;
   background: #ffffff;
   width: 100%;
   display: block;
   border: 1px solid #aaa;
   margin: 0 auto;
   padding: .5em .5em;
   cursor: pointer;
   font-size: 16px;
   color: #000;
   border-radius: 4px;

}

  1. frbanner-email-reminder1 input.error {
   background-color: #FFC7C7;

}

  1. frbanner-email-reminder1 button {
   background: #367fb4;
   color: #fff;
   text-transform: uppercase;
   width: 100%;
   display: block;
   border: 0;
   margin: 0.45em 0 0 0;
   padding: .5em;
   font-size: 1.1em;
   border-radius: 4px;
   -webkit-appearance: none;
   height: auto;
   line-height: normal;
   box-shadow: none;

}

  1. frbanner-email-reminder1 button:hover,
  2. frbanner-email-reminder1 button:active {
  background: #0f4b76;
  box-shadow: none;

}

  1. frbanner-email-reminder1 #errorMessageContainerId {
   text-align: center;
   text-transform: none;
   color: #ff0000;

}

.frbanner-email-reminder1-done {

   text-align: center;
   text-transform: none;
   padding: 1em;

}

/* --- Remind me by email BUTTON --- */

  1. frbanner-rml {
   position: relative;
   width: auto;
   padding: .5em 0;

}

@media (min-width: 768px) {

   #frbanner-rml {
       padding: .5em .25em;
   }

}

.frbanner-email-reminder2-link {

  display: block;
  cursor: pointer;
  line-height: 1;
  padding: 1em;
  text-align: center;

}

@media (min-width: 375px) {

   #frbanner-rml {
      margin: .3em .3em 0;
   }

}

.frbanner-email-reminder2-form {

   display: none;
   position: absolute;
   width: 100%;
   padding: 1em;
   background: #fff;
   border: 1px solid #aaa;
   border-radius: 2px;
   box-shadow: 0 0.15em 0 0 rgba(0, 0, 0, 0.15);
   margin-top: 9px;
   z-index: 10;

}

.frbanner-email-reminder2-form-anchor {

   display: block;
   position: absolute;
   top: -10px;
   left: 50%;
   background-repeat: no-repeat;

}

.frbanner-email-reminder2-form-anchor:before, .frbanner-email-reminder2-form-anchor:after {

   content: "";
   position: absolute;
   width: 0;
   height: 0;
   border-style: solid;
   border-color: transparent;
   border-top: 0;

}

.frbanner-email-reminder2-form-anchor:before {

   bottom: -10px;
   left: -9px;
   border-bottom-color: #888888;
   border-width: 10px

}

.frbanner-email-reminder2-form-anchor:after {

   bottom: -10px;
   left: -8px;
   border-bottom-color: #ffffff;
   border-width: 9px;

}

.frbanner-email-reminder2-form form {

   margin-top: .5em;

}

.frbanner-email-reminder2-form input {

   direction: ltr;
   background: #fff;
   width: 100%;
   display: block;
   padding: 0.5em;
   margin: 0;
   font-size: inherit;
   font-family: inherit;
   color: #000;
   border: 1px solid #9aa0a7;
   border-radius: 2px;

} .frbanner-email-reminder2-form input:focus {

   outline: 0;
   border-color: #3366cc;
   box-shadow: inset 0 0 0 1px #3366cc;

} .frbanner-email-reminder2-form input.error {

   border-color: #ff0000;
   box-shadow: inset 0 0 0 0.1em #ff0000;

}

.frbanner-email-reminder2-form .frbanner-btn {

   margin-top: .5em;
   padding: .5em;
   color: #fff;
   background-color: #3366cc;
   border-color: #3366cc;
   height: auto !important;

} .frbanner-email-reminder2-form .frbanner-btn:hover {

   background-color: #447ff5;
   border-color: #447ff5;

} .frbanner-email-reminder2-form .frbanner-btn:active {

   background-color: #2a4b8d;
   border-color: #2a4b8d;
   box-shadow: none;

} .frbanner-email-reminder2-form .frbanner-btn:focus {

   border-color: #3366cc;
   box-shadow: inset 0 0 0 1px #3366cc, inset 0 0 0 2px #ffffff;

}

.frbanner-email-reminder2-form #errorMessageContainerId {

   color: #ff0000;
   padding-top: .25em;

} .frbanner-email-reminder2-done {

   padding: 1em;
   text-align: center;
   cursor: default;

} </style>

<script> /**

* NOTE: The following currency mapping is WMF-specific based on payment
* provider availability, NOT necessarily the official currency of the country
*/

function getCurrency() {

   switch(Geo.country) {
       // Big 5 at the top for speed
       case "US": return "USD";
       case "CA": return "CAD";
       case "GB": return "GBP";
       case "AU": return "AUD";
       case "NZ": return "NZD";
       // Euro countries
       case "AD":
       case "AL":
       case "AM":
       case "AT":
       case "AW":
       case "AZ":
       case "BE":
       case "BY":
       case "CI":
       case "CY":
       case "DE":
       case "EE":
       case "ES":
       case "FI":
       case "FR":
       case "GF":
       case "GR":
       case "IE":
       case "IT":
       case "LT":
       case "LU":
       case "LV":
       case "LY":
       case "MC":
       case "ME":
       case "MG":
       case "MT":
       case "NL":
       case "PT":
       case "RE":
       case "RS":
       case "SI":
       case "SK":
       case "SM":
       case "SR":
       case "VA":
           return "EUR";
       // The rest
       case "AE": return "AED";
       case "AR": return "ARS";
       case "BA": return "BAM";
       case "BB": return "BBD";
       case "BD": return "BDT";
       case "BG": return "BGN";
       case "BH": return "BHD";
       case "BM": return "BMD";
       case "BO": return "BOB";
       case "BR": return "BRL";
       case "BZ": return "BZD";
       case "CH": return "CHF";
       case "CK": return "NZD";
       case "CL": return "CLP";
       case "CN": return "CNY";
       case "CO": return "COP";
       case "CR": return "CRC";
       case "CZ": return "CZK";
       case "DK": return "DKK";
       case "DO": return "DOP";
       case "DZ": return "DZD";
       case "EG": return "EGP";
       case "FJ": return "FJD";
       case "FO": return "DKK";
       case "GL": return "DKK";
       case "GT": return "GTQ";
       case "HK": return "HKD";
       case "HN": return "HNL";
       case "HR": return "HRK";
       case "HU": return "HUF";
       case "ID": return "IDR";
       case "IL": return "ILS";
       case "IN": return "INR";
       case "IS": return "ISK";
       case "JM": return "JMD";
       case "JO": return "JOD";
       case "JP": return "JPY";
       case "KE": return "KES";
       case "KI": return "AUD";
       case "KR": return "KRW";
       case "KZ": return "KZT";
       case "LB": return "LBP";
       case "LI": return "CHF";
       case "LK": return "LKR";
       case "MA": return "MAD";
       case "MK": return "MKD";
       case "MV": return "MVR";
       case "MW": return "GBP";
       case "MX": return "MXN";
       case "MY": return "MYR";
       case "NI": return "NIO";
       case "NO": return "NOK";
       case "NP": return "INR";
       case "NR": return "AUD";
       case "OM": return "OMR";
       case "PA": return "PAB";
       case "PE": return "PEN";
       case "PG": return "AUD";
       case "PH": return "PHP";
       case "PK": return "PKR";
       case "PL": return "PLN";
       case "PY": return "PYG";
       case "QA": return "QAR";
       case "RO": return "RON";
       case "RU": return "RUB";
       case "SA": return "SAR";
       case "SD": return "GBP";
       case "SE": return "SEK";
       case "SG": return "SGD";
       case "TH": return "THB";
       case "TM": return "RUB";
       case "TN": return "TND";
       case "TR": return "TRY";
       case "TT": return "TTD";
       case "TW": return "TWD";
       case "UA": return "UAH";
       case "UY": return "UYU";
       case "UZ": return "RUB";
       case "VE": return "VEF";
       case "VN": return "VND";
       case "VU": return "AUD";
       case "ZA": return "ZAR";
       // small multi-country currencies
       case "CW":
       case "SX":
           return "ANG";
       case "AG":
       case "DM":
       case "GD":
       case "KN":
       case "LC":
           return "XCD";
       case "BJ":
       case "BF":
       case "CI":
       case "GW":
       case "ML":
       case "NE":
       case "SN":
       case "TG":
           return "XOF";
       case "PF":
       case "NC":
       case "WF":
           return "XPF";
       // fall back to USD
       default:
           return "USD";
   }

} </script> <script> function currencyLocalize(currency, amount, language){

   // Do some basic number formatting - digit separators etc
   if (window.Intl && typeof window.Intl === "object") {
       if (Geo.country) {
           var locale = language + '-' + Geo.country;
       } else {
           var locale = language;
       }
       var formatter = new Intl.NumberFormat(locale);
   } else {
       // boo, bad browser! let's just have a thing that throws it back unformatted for now
       var formatter = {};
       formatter.format = function(number) {
           return number.toString();
       };
   }
   if (isNaN(amount) || amount == "") {
       // it's probably the "other" string or box
       var fmAmount = amount;
   } else {
       var fmAmount = formatter.format(amount);
   }
   // End number formatting
   var currencies = {
       "USD" : "$\t",
       "EUR" : {
           "en" : "€\t",
           "cy" : "€\t",
           "ga" : "€\t",
           "mt" : "€\t",
           "nl" : "€ \t",
           "lv" : "€ \t",
           "tr" : "€ \t",
           "default" : "\t €"
       },
       "AED" : " د.إ \t",
       "ANG" : "ƒ\t",
       "ARS" : "$\t",
       "AUD" : "$\t",
       "BAM" : "\t KM",
       "BBD" : "Bcs$\t",
       "BDT" : "৳\t",
       "BGN" : "лв\t",
       "BHD" : "د.ب\t",
       "BMD" : "BD$\t",
       "BOB" : "$b\t",
       "BRL" : "R$\t",
       "BZD" : "BZ$\t",
       "CAD" : {
           "fr" : "$\t",
           "default" : "$\t"
       },
       "CHF" : "Fr. \t",
       "CLP" : "$\t",
       "CNY" : "\t ¥",
       "COP" : "$\t",
       "CRC" : "\t ₡",
       "CZK" : "\t Kč",
       "DKK" : "\t kr.",
       "DOP" : "RD$\t",
       "DZD" : "د.ج\t",
       "EEK" : "\t kr",
       "EGP" : {
           "en" : "E£\t",
           "default" : "\t جنيه"
       },
       "FJD" : "FJ$\t",
       "GBP" : "£\t",
       "GTQ" : "Q\t",
       "HKD" : "HK$\t",
       "HNL" : "L\t",
       "HRK" : "\t kn",
       "HUF" : "\t Ft",
       "IDR" : "Rp \t",
       "ILS" : {
           "he" : "\t ₪",
           "yi" : "\t ₪",
           "ar" : "\t ₪",
           "default" : "₪ \t"
       },
       "INR" : "₹ \t",
       "ISK" : "\t kr",
       "JMD" : "J$ \t",
       "JOD" : "دينار\t",
       "JPY" : "¥\t",
       "KES" : "\t KSh",
       "KRW" : "₩\t",
       "KWD" : "د.ك \t",
       "KZT" : "〒 \t", // TODO: don't use the JP postal code symbol once KZT works in unicode
       "LBP" : "LBP \t",
       "LKR" : "\t Rs.",
       "LTL" : "\t Lt",
       "LVL" : "\t Ls",
       "MAD" : "د.م.\t",
       "MKD" : "\t ден",
       "MOP" : "MOP$\t",
       "MUR" : "\t Rs",
       "MXN" : "$\t",
       "MVR" : "Rf. \t",
       "MYR" : "RM\t",
       "NIO" : "C$\t",
       "NOK" : "\t kr",
       "NZD" : "$\t",
       "OMR" : "ر.ع\t",
       "PAB" : "\t B/.",
       "PEN" : "S/. \t",
       "PHP" : "₱\t",
       "PKR" : "Rs \t",
       "PLN" : "\t zł",
       "PYG" : "\t ₲",
       "QAR" : "ر.ق\t",
       "RON" : "\t lei",
       "RUB" : "\t руб",
       "SAR" : "﷼\t",
       "SCR" : "SR \t",
       "SEK" : "\t kr",
       "SGD" : "S$ \t",
       "SVC" : "\t ₡",
       "THB" : {
           "th" : "\t บาท",
           "default" : "\t ฿"
       },
       "TND" : "\t د.ت",
       "TRY" : "₺\t",
       "TTD" : "TT$\t",
       "TWD" : "NT$\t",
       "TZS" : "\t/=",
       "UAH" : "₴\t",
       "UYU" : "$U \t",
       "UZS" : "\t сўм",
       "VEF" : "Bs.F. \t",
       "VND" : "\t₫",
       "VUV" : "VT\t",
       "XAF" : "FCFA\t",
       "XCD" : "EC$\t",
       "XOF" : "CFA \t",
       "XPF" : "\t F",
       "ZAR" : "R \t"
   };
   if(currencies[currency] == null){
       return currency + " " + fmAmount;
   }
   if( currencies[currency] instanceof Object ){ // not a string
       if(currencies[currency][language] != null){
           return currencies[currency][language].replace("\t", fmAmount);
       }
       return currencies[currency]["default"].replace("\t", fmAmount);
   }
   return currencies[currency].replace("\t", fmAmount);

} </script> <script> function getMinimum(currency){

   var minimums = {
       'ADF' : 5.95,
       'ADP' : 150.87,
       'AED' : 3.67,
       'AFA' : 60.47,
       'AFN' : 60.47,
       'ALL' : 124.74,
       'AMD' : 473.47,
       'ANG' : 1.82,
       'AOA' : 122.35,
       'AON' : 122.35,
       'ARS' : 14, // Astropay
       'ATS' : 12.48,
       'AUD' : 1.35,
       'AWG' : 1.79,
       'AZM' : 3926.19,
       'AZN' : 1.05,
       'BAM' : 1.77,
       'BBD' : 2,
       'BDT' : 76.04,
       'BEF' : 36.58,
       'BGL' : 1.77,
       'BGN' : 1.77,
       'BHD' : 0.37,
       'BIF' : 1599.65,
       'BMD' : 1,
       'BND' : 1.33,
       'BOB' : 6.71,
       'BRL' : 3.2,
       'BSD' : 0.99,
       'BTN' : 63.52,
       'BWP' : 9.89,
       'BYR' : 15378.7,
       'BZD' : 1.96,
       'CAD' : 1.27,
       'CDF' : 912.52,
       'CHF' : 0.95,
       'CLP' : 980, // Astropay
       'CNY' : 6.09,
       'COP' : 4000, // Astropay
       'CRC' : 523.08,
       'CUC' : 1,
       'CUP' : 23.15,
       'CVE' : 99.81,
       'CYP' : 0.53,
       'CZK' : 24.59,
       'DEM' : 1.77,
       'DJF' : 177.72,
       'DKK' : 6.77,
       'DOP' : 44.46,
       'DZD' : 99.04,
       'ECS' : 25588.54,
       'EEK' : 14.19,
       'EGP' : 7.81,
       'ESP' : 150.87,
       'ETB' : 20.5,
       'EUR' : 0.91,
       'FIM' : 5.39,
       'FJD' : 2.11,
       'FKP' : 0.65,
       'FRF' : 5.95,
       'GBP' : 0.65,
       'GEL' : 2.25,
       'GHC' : 37964.2,
       'GHS' : 3.8,
       'GIP' : 0.65,
       'GMD' : 38.45,
       'GNF' : 7251.79,
       'GRD' : 308.97,
       'GTQ' : 7.43,
       'GYD' : 197.27,
       'HKD' : 7.75,
       'HNL' : 21.27,
       'HRK' : 6.87,
       'HTG' : 52.41,
       'HUF' : 287.8,
       'IDR' : 13333.3,
       'IEP' : 0.71,
       'ILS' : 3.79,
       'INR' : 63.39,
       'IQD' : 1141.95,
       'IRR' : 29360,
       'ISK' : 133.46,
       'ITL' : 1755.66,
       'JMD' : 113.71,
       'JOD' : 0.71,
       'JPY' : 121.58,
       'KES' : 98.48,
       'KGS' : 62.13,
       'KHR' : 3995.54,
       'KMF' : 445,
       'KPW' : 135.01,
       'KRW' : 1134.04,
       'KWD' : 0.3,
       'KYD' : 0.82,
       'KZT' : 183.31,
       'LAK' : 7923.05,
       'LBP' : 1480.9,
       'LKR' : 130.3,
       'LRD' : 85,
       'LSL' : 12.5,
       'LTL' : 3.13,
       'LUF' : 36.58,
       'LVL' : 0.64,
       'LYD' : 1.34,
       'MAD' : 9.77,
       'MDL' : 18.71,
       'MGA' : 3252.88,
       'MGF' : 9149.13,
       'MKD' : 55.45,
       'MMK' : 1111.03,
       'MNT' : 1958,
       'MOP' : 7.79,
       'MRO' : 320.47,
       'MTL' : 0.39,
       'MUR' : 34.3,
       'MVR' : 14.97,
       'MWK' : 441.83,
       'MXN' : 24, // Astropay
       'MYR' : 3.8,
       'MZM' : 38000,
       'MZN' : 38,
       'NAD' : 12.5,
       'NGN' : 196.44,
       'NIO' : 26.24,
       'NLG' : 2,
       'NOK' : 8.2,
       'NPR' : 99.74,
       'NZD' : 1.5,
       'OMR' : 0.38,
       'PAB' : 1,
       'PEN' : 3.12,
       'PGK' : 2.68,
       'PHP' : 45.15,
       'PKR' : 100.4,
       'PLN' : 3.83,
       'PTE' : 181.78,
       'PYG' : 5065.03,
       'QAR' : 3.64,
       'ROL' : 40637.3,
       'RON' : 4.06,
       'RSD' : 108.68,
       'RUB' : 57.16,
       'RWF' : 721.7,
       'SAR' : 3.75,
       'SBD' : 7.83,
       'SCR' : 12.33,
       'SDD' : 592.4,
       'SDG' : 5.92,
       'SDP' : 2272.21,
       'SEK' : 8.5,
       'SGD' : 1.35,
       'SHP' : 0.62,
       'SIT' : 217.29,
       'SKK' : 27.32,
       'SLL' : 4158,
       'SOS' : 673,
       'SRD' : 3.24,
       'SRG' : 3240,
       'STD' : 22115.7,
       'SVC' : 8.54,
       'SYP' : 217.65,
       'SZL' : 12.5,
       'THB' : 33.94,
       'TJS' : 6.26,
       'TMM' : 14285.71,
       'TMT' : 2.85,
       'TND' : 1.97,
       'TOP' : 2.16,
       'TRL' : 2687990,
       'TRY' : 2.69,
       'TTD' : 6.25,
       'TWD' : 31.04,
       'TZS' : 2185.91,
       'UAH' : 21.25,
       'UGX' : 3454.24,
       'USD' : 1,
       'UYU' : 40, // Astropay
       'UZS' : 2541,
       'VEB' : 6290.36,
       'VEF' : 6.29,
       'VND' : 21482.8,
       'VUV' : 104.5,
       'WST' : 2.36,
       'XAF' : 595.84,
       'XAG' : 0.07,
       'XAU' : 0,
       'XCD' : 2.69,
       'XEU' : 0.91,
       'XOF' : 595.83,
       'XPD' : 0,
       'XPF' : 108.27,
       'XPT' : 0,
       'YER' : 214.8,
       'YUN' : 108.68,
       'ZAR' : 12.5,
       'ZMK' : 5327.65,
       'ZWD' : 376.36
   };
   if($.inArray(currency, minimums)){
       return minimums[currency];
   }
   return 1;

} </script> <script> var fundraisingAmounts = fundraisingAmounts || {};

fundraisingAmounts.asks = {

   "USD" : {
       "default" : [3, 5, 10, 20, 30, 50, 100]
   },
   "EUR" : {
       "default" : [2, 5, 10, 20, 30, 50, 100]
   },
   "GBP" : [2, 5, 10, 20, 30, 50, 100],
   "CAD" : [3, 5, 10, 20, 30, 50, 100],
   "AUD" : [3, 5, 10, 20, 30, 50, 100],
   "NZD" : [3, 5, 10, 20, 30, 50, 100],
   "AED" : [25, 50, 100, 200, 300, 500, 1000],
   "ANG" : [5, 10, 20, 35, 50, 100, 200],
   "ARS" : [30, 50, 100, 200, 500, 750, 1000],
   "BAM" : [3, 5, 10, 25, 40, 70, 140],
   "BBD" : [5, 10, 20, 40, 60, 100, 200],
   "BDT" : [200, 400, 800, 1500, 2000, 4000, 7500],
   "BGN" : [10, 25, 50, 75, 100, 150, 200],
   "BHD" : [1, 2, 4, 8, 10, 20, 40],
   "BMD" : [3, 5, 10, 20, 30, 50, 100],
   "BOB" : [20, 30, 60, 140, 200, 300, 600],
   "BRL" : [10, 20, 30, 50, 100, 250, 500],
   "BZD" : [5, 10, 20, 40, 60, 100, 200],
   "CLP" : [1500, 2500, 5000, 10000, 15000, 25000, 50000],
   "CNY" : [50, 75, 100, 300, 500, 1000, 1500],
   "COP" : [7000, 10000, 20000, 50000, 100000, 150000, 200000],
   "CRC" : [2500, 5000, 10000, 20000, 50000, 75000, 100000],
   "CZK" : [50, 100, 200, 400, 600, 1000, 2000],
   "DKK" : [20, 100, 150, 200, 300, 500, 1000],
   "DOP" : [200, 500, 1000, 2000, 5000, 7500, 10000],
   "DZD" : [200, 400, 750, 1500, 2000, 4000, 7500],
   "FJD" : [5, 10, 20, 40, 50, 100, 200],
   "GTQ" : [20, 40, 80, 150, 200, 350, 750],
   "HKD" : [20, 50, 100, 150, 200, 500, 1000],
   "HNL" : [50, 100, 200, 400, 600, 1000, 1800],
   "HRK" : [35, 50, 100, 250, 500, 1000, 1500],
   "HUF" : [500, 1000, 2000, 4000, 5000, 7000, 10000],
   "IDR" : [35000, 50000, 75000, 100000, 150000, 250000, 500000],
   "ISK" : [300, 500, 1000, 2000, 3000, 5000, 10000],
   "ILS" : [15, 50, 100, 200, 300, 500, 1000],
   "INR" : [100, 200, 300, 500, 1000, 2000, 3000],
   "JMD" : [300, 500, 1000, 2000, 3000, 5000, 10000],
   "JPY" : [300, 1000, 1500, 2000, 3000, 5000, 10000],
   "KRW" : [5000, 10000, 20000, 30000, 50000, 75000, 100000],
   "KWD" : [2, 5, 10,15, 25, 30, 75],
   "KZT" : [750, 1500, 3000, 7500, 12000, 15000, 35000],
   "LBP" : [7500, 15000, 30000, 75000, 120000, 175000, 350000],
   "LTL" : [15, 25, 50, 100, 200, 250, 600],
   "MKD" : [100, 200, 400, 800, 1200, 2000, 4000],
   "MVR" : [40, 75, 150, 300, 450, 750, 1500],
   "MXN" : [35, 50, 100, 200, 500, 750, 1000],
   "MYR" : [10, 30, 50, 100, 200, 300, 500],
   "NIO" : [100, 250, 500, 1000, 1500, 2500, 5500],
   "NOK" : [20, 100, 150, 200, 500, 750, 1000],
   "OMR" : [1, 2, 4, 8, 10, 20, 40],
   "PAB" : [3, 5, 10, 20, 30, 50, 100],
   "PEN" : [10, 30, 50, 150, 200, 275, 700],
   "PHP" : [200, 500, 750, 1000, 2000, 3000, 5000],
   "PLN" : [10, 20, 50, 100, 200, 300, 500],
   "PYG" : [10000, 20000, 40000, 80000, 120000, 200000, 400000],
   "QAR" : [20, 50, 75, 185, 250, 350, 1000],
   "RON" : [10, 50, 75, 100, 200, 300, 500],
   "RUB" : [100, 150, 200, 500, 1000, 2000, 3000],
   "SAR" : [20, 50, 100, 200, 500, 1000, 1500],
   "SEK" : [30, 50, 100, 200, 300, 500, 1000],
   "SGD" : [3, 5, 10, 20, 30, 50, 100],
   "THB" : [50, 100, 250, 500, 750, 1000, 2000],
   "TND" : [5, 10, 15, 30, 50, 75, 150],
   "TRY" : [5, 10, 20, 40, 50, 100, 200],
   "TTD" : [20, 30, 60, 120, 200, 300, 600],
   "TWD" : [150, 300, 500, 1000, 1500, 2000, 5000],
   "UAH" : [50, 75, 150, 300, 500, 750, 1000],
   "UYU" : [70, 100, 200, 400, 1000, 1500, 2000],
   "VEF" : [20, 30, 50, 100, 200, 300, 600],
   "VND" : [60000, 100000, 200000, 400000, 600000, 1000000, 2000000],
   "XCD" : [5, 10, 20, 50, 80, 120, 250],
   "XOF" : [1000, 2000, 5000, 10000, 150000, 200000, 400000],
   "XPF" : [250, 400, 800, 1600, 2500, 4000, 8000],
   "ZAR" : [30, 50, 100, 200, 300, 500, 1000],
   "CHF" : [3, 5, 10, 20, 30, 50, 100]

};

/* Usual formula: take 1st, 3rd, 4th, 6th and 7th from desktop asks */ fundraisingAmounts.mobileAsks = {

   "USD" : [3, 15, 20, 50, 100],
   "CAD" : [3, 15, 20, 50, 100],
   "AUD" : [3, 15, 20, 50, 100],
   "NZD" : [3, 15, 20, 50, 100],
   "GBP" : [2, 10, 20, 50, 100],
   "EUR" : [2, 10, 20, 50, 100],
   "ARS" : [30, 100, 200, 750, 1000],
   "BRL" : [10, 30, 50, 100, 250],
   "CHF" : [3, 15, 20, 50, 100],
   "CLP" : [1500, 5000, 10000, 25000, 50000],
   "CNY" : [50, 100, 300, 500, 1000],
   "COP" : [7000, 20000, 50000, 150000, 200000],
   "DKK" : [20, 100, 200, 500, 1000],
   "HKD" : [20, 100, 150, 500, 1000],
   "HUF" : [500, 2500, 4000, 7000, 10000],
   "ILS" : [15, 50, 200, 600, 1000],
   "INR" : [100, 300, 500, 2000, 3000],
   "JPY" : [300, 1500, 2000, 5000, 10000],
   "MXN" : [35, 100, 200, 750, 1000],
   "MYR" : [10, 50, 100, 300, 500],
   "NOK" : [20, 100, 200, 500, 1000],
   "PEN" : [10, 50, 150, 300, 700],
   "PLN" : [10, 50, 100, 300, 500],
   "RON" : [10, 50, 100, 200, 1000],
   "SEK" : [30, 100, 200, 500, 1000],
   "UAH" : [50, 150, 300, 750, 1000],
   "UYU" : [70, 200, 400, 1500, 2000],
   "ZAR" : [30, 100, 200, 500, 1000]

};

fundraisingAmounts.averages = {

   "USD" : 15,
   "EUR" : 10,
   "GBP" : 10,
   "CAD" : 15,
   "AUD" : 15,
   "NZD" : 15,
   "AED" : 50,
   "ALL" : 1500,
   "AMD" : 5000,
   "ANG" : 25,
   "ARS" : 100,
   "AZN" : 10,
   "BAM" : 20,
   "BBD" : 30,
   "BDT" : 1000,
   "BGN" : 20,
   "BHD" : 6,
   "BMD" : 15,
   "BND" : 20,
   "BOB" : 100,
   "BRL" : 25,
   "BSD" : 15,
   "BZD" : 30,
   "CHF" : 15,
   "CLP" : 8000,
   "CNY" : 100,
   "COP" : 30000,
   "CRC" : 7500,
   "CZK" : 250,
   "DKK" : 100,
   "DOP" : 600,
   "DZD" : 1000,
   "EGP" : 100,
   "ETB" : 250,
   "FJD" : 25,
   "GEL" : 25,
   "GNF" : 100000,
   "GTQ" : 100,
   "HKD" : 100,
   "HNL" : 250,
   "HRK" : 80,
   "HUF" : 2500,
   "IDR" : 150000,
   "ILS" : 50,
   "INR" : 750,
   "IQD" : 15000,
   "ISK" : 1500,
   "JMD" : 1500,
   "JOD" : 10,
   "JPY" : 1500,
   "KES" : 1000,
   "KRW" : 15000,
   "KWD" : 5,
   "KZT" : 2000,
   "LBP" : 20000,
   "LKR" : 2000,
   "LTL" : 40,
   "LVL" : 10,
   "MAD" : 120,
   "MKD" : 600,
   "MOP" : 100,
   "MUR" : 500,
   "MVR" : 200,
   "MXN" : 150,
   "MYR" : 50,
   "MZN" : 50,
   "NGN" : 2500,
   "NIO" : 350,
   "NOK" : 100,
   "OMR" : 5,
   "PAB" : 15,
   "PEN" : 40,
   "PHP" : 600,
   "PKR" : 1500,
   "PLN" : 50,
   "PYG" : 60000,
   "QAR" : 50,
   "RON" : 50,
   "RSD" : 1200,
   "RUB" : 500,
   "SAR" : 50,
   "SBD" : 100,
   "SEK" : 100,
   "SGD" : 20,
   "THB" : 500,
   "TND" : 25,
   "TRY" : 25,
   "TTD" : 100,
   "TWD" : 500,
   "UAH" : 150,
   "UYU" : 300,
   "VEF" : 100,
   "VND" : 300000,
   "XCD" : 40,
   "XOF" : 7000,
   "XPF" : 1000,
   "ZAR" : 150,
   "CHF" : 15

};

// Mostly the same as first asks option. // For backwards compatibility, these need to be given as an array of one number fundraisingAmounts.ifEveryone = {

   "USD" : {
       "default" : [3]
   },
   "EUR" : {
       "default" : [2]
   },
   "GBP" : [2],
   "CAD" : [3],
   "AUD" : [3],
   "NZD" : [3],
   "AED" : [25],
   "ANG" : [5],
   "ARS" : [30],
   "BAM" : [3],
   "BBD" : [5],
   "BDT" : [200],
   "BGN" : [10],
   "BHD" : [1],
   "BMD" : [3],
   "BOB" : [20],
   "BRL" : [10],
   "BZD" : [5],
   "CLP" : [1500],
   "CNY" : [50],
   "COP" : [7000],
   "CRC" : [2500],
   "CZK" : [50],
   "DKK" : [20],
   "DOP" : [200],
   "DZD" : [200],
   "FJD" : [5],
   "GTQ" : [20],
   "HKD" : [20],
   "HNL" : [50],
   "HRK" : [35],
   "HUF" : [500],
   "IDR" : [35000],
   "ILS" : [15],
   "INR" : [100],
   "ISK" : [300],
   "JMD" : [300],
   "JPY" : [300],
   "KRW" : [5000],
   "KWD" : [2],
   "KZT" : [750],
   "LBP" : [7500],
   "LTL" : [15],
   "MKD" : [100],
   "MVR" : [40],
   "MXN" : [35],
   "MYR" : [10],
   "NIO" : [100],
   "NOK" : [20],
   "OMR" : [1],
   "PAB" : [3],
   "PEN" : [10],
   "PHP" : [200],
   "PLN" : [10],
   "PYG" : [10000],
   "QAR" : [20],
   "RON" : [10],
   "RUB" : [100],
   "SAR" : [20],
   "SEK" : [30],
   "SGD" : [3],
   "THB" : [50],
   "TND" : [5],
   "TRY" : [5],
   "TTD" : [20],
   "TWD" : [150],
   "UAH" : [50],
   "UYU" : [70],
   "VEF" : [20],
   "VND" : [60000],
   "XCD" : [5],
   "XOF" : [1000],
   "XPF" : [250],
   "ZAR" : [30],
   "CHF" : [3]

}; </script> <script> var fundraisingAmounts = fundraisingAmounts || {};

fundraisingAmounts.pick = function(source, currency, country) {

   /*
    * Select the correct amount or array of amounts from object in "source"
    * In future may extend to allow a language parameter too
    * 
    * @param {object} source   - the amounts object e.g. fundraisingAmounts.asks, fundraisingAmounts.averages
    * @param {string} currency - ISO code of currency
    * @param {string} country  - ISO code of country (optional)
    * @return {array/number}   - depending on source
    */
   if ( source[currency]["default"] ) { // we need to go deeper
       if ( source[currency][country] !== undefined ) {
           return source[currency][country];
       } else {
           return source[currency]["default"];
       }
   } else {
       return source[currency];
   }

};

function convertAsk(amount, currency, country) {

   /*
    * Given an amount in USD, find an "equivalent" local ask amount for the given currency and country
    * @TODO: namespace this
    * 
    * @param {number} amount   - USD amount
    * @param {string} currency - ISO code of currency
    * @param {string} country  - ISO code of country
    * @return {number}         - local amount
    */
   var usdbase = [3, 5, 10, 20, 30, 50, 100];
   var usdamount = parseInt(amount, 10);
   if(isNaN(usdamount)){
       return 0;
   }

   var index = $.inArray(usdamount, usdbase);
   if (index == -1) {
       // the amount is not in the USD ask array, find a near neighbor
       index = 0;
       while (usdbase[index+1] < usdamount && index < usdbase.length + 1) {
           index++;
       }
   }
   var array = fundraisingAmounts.pick(fundraisingAmounts.asks, currency, country);
   if (array === undefined) {
       // in case we don't have amounts for this currency
       return usdamount;
   } else {
       return array[index];
   }

}

function getAverage(currency, country, language) {

   /*
    * Return a formatted string with the "average" donation amount in the given currency, country and language
    * @TODO: just move this into banner code
    * 
    * @param {string} currency - ISO code of currency
    * @param {string} country  - ISO code of country
    * @param {string} country  - ISO code of language     
    * @return {string}         - formatted amount 
    */
   var amount = fundraisingAmounts.pick(fundraisingAmounts.averages, currency, country);
   return currencyLocalize(currency, amount, language);

}

function getMinimumString(currency, country, language) {

   /*
    * Return a formatted string with the "if everyone" amount in the given currency, country and language
    * @TODO: just move this into banner code
    * 
    * @param {string} currency - ISO code of currency
    * @param {string} country  - ISO code of country
    * @param {string} country  - ISO code of language     
    * @return {string}         - formatted amount 
    */
   var amount = fundraisingAmounts.pick(fundraisingAmounts.ifEveryone, currency, country)[0];
   return currencyLocalize(currency, amount, language);

} </script> <script> function getMinimum(currency){

   var minimums = {
       'ADF' : 5.95,
       'ADP' : 150.87,
       'AED' : 3.67,
       'AFA' : 60.47,
       'AFN' : 60.47,
       'ALL' : 124.74,
       'AMD' : 473.47,
       'ANG' : 1.82,
       'AOA' : 122.35,
       'AON' : 122.35,
       'ARS' : 14, // Astropay
       'ATS' : 12.48,
       'AUD' : 1.35,
       'AWG' : 1.79,
       'AZM' : 3926.19,
       'AZN' : 1.05,
       'BAM' : 1.77,
       'BBD' : 2,
       'BDT' : 76.04,
       'BEF' : 36.58,
       'BGL' : 1.77,
       'BGN' : 1.77,
       'BHD' : 0.37,
       'BIF' : 1599.65,
       'BMD' : 1,
       'BND' : 1.33,
       'BOB' : 6.71,
       'BRL' : 3.2,
       'BSD' : 0.99,
       'BTN' : 63.52,
       'BWP' : 9.89,
       'BYR' : 15378.7,
       'BZD' : 1.96,
       'CAD' : 1.27,
       'CDF' : 912.52,
       'CHF' : 0.95,
       'CLP' : 980, // Astropay
       'CNY' : 6.09,
       'COP' : 4000, // Astropay
       'CRC' : 523.08,
       'CUC' : 1,
       'CUP' : 23.15,
       'CVE' : 99.81,
       'CYP' : 0.53,
       'CZK' : 24.59,
       'DEM' : 1.77,
       'DJF' : 177.72,
       'DKK' : 6.77,
       'DOP' : 44.46,
       'DZD' : 99.04,
       'ECS' : 25588.54,
       'EEK' : 14.19,
       'EGP' : 7.81,
       'ESP' : 150.87,
       'ETB' : 20.5,
       'EUR' : 0.91,
       'FIM' : 5.39,
       'FJD' : 2.11,
       'FKP' : 0.65,
       'FRF' : 5.95,
       'GBP' : 0.65,
       'GEL' : 2.25,
       'GHC' : 37964.2,
       'GHS' : 3.8,
       'GIP' : 0.65,
       'GMD' : 38.45,
       'GNF' : 7251.79,
       'GRD' : 308.97,
       'GTQ' : 7.43,
       'GYD' : 197.27,
       'HKD' : 7.75,
       'HNL' : 21.27,
       'HRK' : 6.87,
       'HTG' : 52.41,
       'HUF' : 287.8,
       'IDR' : 13333.3,
       'IEP' : 0.71,
       'ILS' : 3.79,
       'INR' : 63.39,
       'IQD' : 1141.95,
       'IRR' : 29360,
       'ISK' : 133.46,
       'ITL' : 1755.66,
       'JMD' : 113.71,
       'JOD' : 0.71,
       'JPY' : 121.58,
       'KES' : 98.48,
       'KGS' : 62.13,
       'KHR' : 3995.54,
       'KMF' : 445,
       'KPW' : 135.01,
       'KRW' : 1134.04,
       'KWD' : 0.3,
       'KYD' : 0.82,
       'KZT' : 183.31,
       'LAK' : 7923.05,
       'LBP' : 1480.9,
       'LKR' : 130.3,
       'LRD' : 85,
       'LSL' : 12.5,
       'LTL' : 3.13,
       'LUF' : 36.58,
       'LVL' : 0.64,
       'LYD' : 1.34,
       'MAD' : 9.77,
       'MDL' : 18.71,
       'MGA' : 3252.88,
       'MGF' : 9149.13,
       'MKD' : 55.45,
       'MMK' : 1111.03,
       'MNT' : 1958,
       'MOP' : 7.79,
       'MRO' : 320.47,
       'MTL' : 0.39,
       'MUR' : 34.3,
       'MVR' : 14.97,
       'MWK' : 441.83,
       'MXN' : 24, // Astropay
       'MYR' : 3.8,
       'MZM' : 38000,
       'MZN' : 38,
       'NAD' : 12.5,
       'NGN' : 196.44,
       'NIO' : 26.24,
       'NLG' : 2,
       'NOK' : 8.2,
       'NPR' : 99.74,
       'NZD' : 1.5,
       'OMR' : 0.38,
       'PAB' : 1,
       'PEN' : 3.12,
       'PGK' : 2.68,
       'PHP' : 45.15,
       'PKR' : 100.4,
       'PLN' : 3.83,
       'PTE' : 181.78,
       'PYG' : 5065.03,
       'QAR' : 3.64,
       'ROL' : 40637.3,
       'RON' : 4.06,
       'RSD' : 108.68,
       'RUB' : 57.16,
       'RWF' : 721.7,
       'SAR' : 3.75,
       'SBD' : 7.83,
       'SCR' : 12.33,
       'SDD' : 592.4,
       'SDG' : 5.92,
       'SDP' : 2272.21,
       'SEK' : 8.5,
       'SGD' : 1.35,
       'SHP' : 0.62,
       'SIT' : 217.29,
       'SKK' : 27.32,
       'SLL' : 4158,
       'SOS' : 673,
       'SRD' : 3.24,
       'SRG' : 3240,
       'STD' : 22115.7,
       'SVC' : 8.54,
       'SYP' : 217.65,
       'SZL' : 12.5,
       'THB' : 33.94,
       'TJS' : 6.26,
       'TMM' : 14285.71,
       'TMT' : 2.85,
       'TND' : 1.97,
       'TOP' : 2.16,
       'TRL' : 2687990,
       'TRY' : 2.69,
       'TTD' : 6.25,
       'TWD' : 31.04,
       'TZS' : 2185.91,
       'UAH' : 21.25,
       'UGX' : 3454.24,
       'USD' : 1,
       'UYU' : 40, // Astropay
       'UZS' : 2541,
       'VEB' : 6290.36,
       'VEF' : 6.29,
       'VND' : 21482.8,
       'VUV' : 104.5,
       'WST' : 2.36,
       'XAF' : 595.84,
       'XAG' : 0.07,
       'XAU' : 0,
       'XCD' : 2.69,
       'XEU' : 0.91,
       'XOF' : 595.83,
       'XPD' : 0,
       'XPF' : 108.27,
       'XPT' : 0,
       'YER' : 214.8,
       'YUN' : 108.68,
       'ZAR' : 12.5,
       'ZMK' : 5327.65,
       'ZWD' : 376.36
   };
   if($.inArray(currency, minimums)){
       return minimums[currency];
   }
   return 1;

} </script> <script> /**

* Javascript for mobile banners.
* This version assumes checkboxes for amount, buttons for payment method
*
* Dependencies: MediaWiki:FR2013/Resources/Country2Currency.js
*/

/* Allow overriding country */ mw.loader.using(['mediawiki.util']).then(function() {

   if( mw.util.getParamValue("country") ) {
       Geo.country = mw.util.getParamValue("country");
   }

});

var fundraisingBanner = fundraisingBanner || {};

fundraisingBanner.validateForm = function(form) {

   /* Check the form, especially the amount submitted
    * Return the amount if valid, otherwise return false
    */
   var error = true;
   var amount = null;
   // If there are some amount radio buttons, then look for the checked one
   if (form.amount) {
       for (var i = 0; i < form.amount.length; i++) {
           if (form.amount[i].checked) {
               amount = form.amount[i].value;
           }
       }
   }
   // Check the "other" amount box
   if (form.amountGiven.value !== ) {
       var otherAmount = form.amountGiven.value;
       otherAmount = otherAmount.replace(/[,.](\d)$/, ':$10');
       otherAmount = otherAmount.replace(/[,.](\d)(\d)$/, ':$1$2');
       otherAmount = otherAmount.replace(/[$£€¥,.]/g, );
       otherAmount = otherAmount.replace(/:/, '.');
       form.amountGiven.value = otherAmount;
       amount = otherAmount;
   }
   // Check amount is a real number
   error = ( amount == null || isNaN(amount) || amount.value <= 0 );
   // Check amount is at least the minimum
   var currency = form.currency_code.value;
   if (amount < getMinimum(currency) || error) {
       alert('You must contribute at least $1'.replace('$1', getMinimum(currency) + ' ' + currency));
       error = true;
   }
   if ( error ) {
       return false;
   } else {
       return amount;
   }

};

fundraisingBanner.redirectPayment = function(paymentMethod, paymentSubMethod, skipValidation) {

   if ( skipValidation || fundraisingBanner.validateForm(document.paypalcontribution) ) {
       if (typeof paymentSubMethod == 'undefined') {
           paymentSubMethod = ;
       }
       var form = document.paypalcontribution; // we should really change this some day
       var paymentsURL = 'https://payments.wikimedia.org/index.php/Special:GatewayFormChooser';
       form.action = paymentsURL;
       if ( form.language.value === 'pt' && Geo.country === 'BR' ) {
           form.language.value = 'pt-br';
       }


       // WorldPay override for cc
       if( paymentMethod === 'cc-wp' ) {
           paymentMethod = 'cc';
           form.payment_method.value = 'cc';
           form.gateway.value = 'worldpay';
           form.ffname.value = 'worldpay';
       }
       
       // Adyen override for cc
       if( paymentMethod === 'cc-adyen' ) {
           paymentMethod = 'cc';
           form.payment_method.value = 'cc';
           form.gateway.value = 'adyen';
           form.ffname.value = 'adyen';
       }
       
       // Express Checkout override for PayPal
       if( paymentMethod === 'paypal-ec' ) {
           paymentMethod = 'paypal';
           form.payment_method.value = 'paypal';
           form.gateway.value = 'paypal_ec';
       }
       var frequency = $("input[name='frequency']:checked").val();
       if( frequency !== 'monthly' ){
           frequency = 'onetime';
           form.recurring.value = 'false';
       } else {
           form.recurring.value = 'true';
       }
       var mixins = mw.centralNotice.getDataProperty( 'mixins' );
       if ( mixins && mixins.bannerHistoryLogger ) {
           form.bannerhistlog.value = mw.centralNotice.bannerHistoryLogger.id;
       }
       form.utm_key.value = mw.centralNotice.bannerData.cookieCount || 0;
       form.payment_method.value = paymentMethod;
       form.payment_submethod.value = paymentSubMethod;
       
       var full_dotted_payment_method = paymentMethod;
       if ( form.recurring.value == 'true' ) {
           full_dotted_payment_method = 'r' + full_dotted_payment_method;
       }
       if ( paymentSubMethod ) {
           full_dotted_payment_method = form.payment_method.value + '.' + paymentSubMethod;
       }
       form.utm_source.value += '.no-LP.' + full_dotted_payment_method;
       $('.frbanner-submit button, .frbanner-continue button, .frbanner3-continue button').attr('disabled', 'disabled'); // Disable to prevent double submission
       if ( mixins && mixins.bannerHistoryLogger ) {
           mw.centralNotice.bannerHistoryLogger.ensureLogSent().always(function() {
               form.submit();
           });
       } else {
           form.submit();
       }
       
   }

};

$(document).ready( function () {

   var currency = getCurrency();
   var language = mw.config.get('wgUserLanguage');
   // set the form fields
   $("input[name='country']").val(Geo.country);
   $("input[name='currency_code']").val(currency);
   $("input[name='language']").val(mw.config.get('wgUserLanguage'));
   $("input[name='return_to']").val("Thank_You/" + mw.config.get('wgUserLanguage'));
   // Add utm_key with banner counter
   mw.centralNotice.events.bannerLoaded.done(function(e){
       $('[name="paypalcontribution"]').append($('<input>', {
           'type': 'hidden', 'name': 'utm_key', 'value': (mw.centralNotice.bannerData.cookieCount || 0)
       }));
   });

}); </script>

<script> var fundraisingBanner = fundraisingBanner || {};

fundraisingBanner.showLargeBanner = function() {

   $('#content_wrapper').prepend($('#frbanner'));
   $('#frbanner-window').css('top', $(window).scrollTop() ); // position banner where they have scrolled to
   $('#frbanner').show();

};

function toggleMonthly( monthly ){

   if( monthly.type === 'checkbox' ){
       monthly = monthly.checked;
   }
   if (monthly) {
       $('#frbanner-form').addClass('form-monthly');
   } else {
       $('#frbanner-form').removeClass('form-monthly');
   }

}

fundraisingBanner.postReminder1Form = function() {

   // Create the iframe for the form and use it as the form's target
   var frameName = "remind1Frame";
   var $form = $(".frbanner-email-reminder1-form form");
   if ($("iframe[name=" + frameName + "]").length == 0) {
       var $iframe = $('<iframe style="display: none;" name="' + frameName + '"></iframe>');
       $form.attr("target", $iframe.attr("name"));
       $form.after($iframe);
   }
   $form[0].submit();

};

fundraisingBanner.postReminder2Form = function() {

   // Create the iframe for the form and use it as the form's target
   var frameName = "remind2Frame";
   var $form = $(".frbanner-email-reminder2-form form");
   if ($("iframe[name=" + frameName + "]").length == 0) {
       var $iframe = $('<iframe style="display: none;" name="' + frameName + '"></iframe>');
       $form.attr("target", $iframe.attr("name"));
       $form.after($iframe);
   }
   $form[0].submit();

};

fundraisingBanner.getCurrentDate = function() {

   var today = new Date();
   var dd = today.getDate();
   var mm = today.getMonth()+1; //January is 0!
   var yyyy = today.getFullYear();
   if(dd<10) {
       dd='0'+dd;
   }
   if(mm<10) {
       mm='0'+mm;
   }
   today = mm+'/'+dd+'/'+yyyy;
   return today;

};

fundraisingBanner.initReminder1Form = function() {

   $(".frbanner-email-reminder1-form input[name=rml_country]").val(Geo.country);
   $(".frbanner-email-reminder1-form input[name=rml_language]").val(mw.config.get('wgUserLanguage'));
   $(".frbanner-email-reminder1-form input[name=rml_submitDate]").val(fundraisingBanner.getCurrentDate());
   $(".frbanner-email-reminder1-form input[name=rml_segment]").val(Math.floor((Math.random() * 100) + 1));
   $(".frbanner-email-reminder1-link").click(function() {
       $(".frbanner-email-reminder1-form").slideToggle();
       $('#frbanner-email-reminder1').toggleClass('frbanner-email-reminder-active');
       $('#control_EMAIL1').focus();
   });
   $(".frbanner-email-reminder1-form button").bind("click", function() {
       if ( mw.util.validateEmail( $(".frbanner-email-reminder1-form form input[name='Email']").val() ) ) {
           fundraisingBanner.postReminder1Form();
           $(".frbanner-email-reminder1-form form").hide();
           $(".frbanner-email-reminder-caption").hide();
           $("#frbanner-rml").hide();
           $(".frbanner-email-reminder1-done").show();
           mw.centralNotice.internal.hide.setHideWithCloseButtonCookies(); // Hide future banners for 7 days
           return false;
       } else {
           $(".frbanner-email-reminder1-form form input[name='Email']").addClass("error");
           $(".frbanner-email-reminder1-form #errorMessageContainerId").show();
           $('#control_EMAIL1').focus();
           return false;
       }
   });

};

fundraisingBanner.initReminder2Form = function() {

   $(".frbanner-email-reminder2-form input[name=rml_country]").val(Geo.country);
   $(".frbanner-email-reminder2-form input[name=rml_language]").val(mw.config.get('wgUserLanguage'));
   $(".frbanner-email-reminder2-form input[name=rml_submitDate]").val(fundraisingBanner.getCurrentDate());
   $(".frbanner-email-reminder2-form input[name=rml_segment]").val(Math.floor((Math.random() * 100) + 1));
   $(".frbanner-email-reminder2-link").click(function() {
       $(".frbanner-email-reminder2-form").slideToggle();
       $('#frbanner-email-reminder2').toggleClass('frbanner-email-reminder2-active');
       $('#control_EMAIL2').focus();
   });
   $(".frbanner-email-reminder2-form button").bind("click", function() {
       if ( mw.util.validateEmail( $(".frbanner-email-reminder2-form form input[name='Email']").val() ) ) {
           fundraisingBanner.postReminder2Form();
           $(".frbanner-email-reminder2-form").hide();
           $(".frbanner-email-reminder2-link").hide();
           $(".frbanner-email-reminder1-link").css( "visibility", "hidden" );
           $(".frbanner-email-reminder1-form").hide();
           $(".frbanner-email-reminder2-done").show();
           mw.centralNotice.internal.hide.setHideWithCloseButtonCookies(); // Hide future banners for 7 days
           return false;
       } else {
           $(".frbanner-email-reminder2-form form input[name='Email']").addClass("error");
           $(".frbanner-email-reminder2-form #errorMessageContainerId").show();
           $('#control_EMAIL2').focus();
           return false;
       }
   });

};

fundraisingBanner.countryNames = {

   'US' : 'the U.S.',
   'CA' : 'Canada',
   'GB' : 'the UK',
   'IE' : 'Ireland',
   'AU' : 'Australia',
   'NZ' : 'New Zealand',
   'IT' : 'Italy',
   'FR' : 'France'

};

/** MediaWiki:FR2014/Resources/MobileLocalize.js

 * Do various things to localize mobile banners
 *
 * Dependencies:
 *     MediaWiki:FR2015/Resources/MethodLocalize.js
 */

$(document).ready(function() {

   mw.loader.using(['mediawiki.util']).then(function() {
       /* --- Allow overriding country --- */
       if( mw.util.getParamValue("country") ) {
           Geo.country = mw.util.getParamValue("country");
       }
       var currency = getCurrency(Geo.country);
       var language = mw.config.get('wgUserLanguage');
       /* --- Links (in smallprint) --- */
       $('a.localize, .frbanner-footer a').each(function() {
           // Add parameters for LandingCheck
           var uri = new mw.Uri( $(this).attr("href") );
           uri.extend({
               country:      Geo.country,
               language:     language,
               uselang:      language,
               utm_medium:   'sitenotice',
               utm_campaign: mw.centralNotice.getDataProperty('campaign'),
               utm_source:   mw.centralNotice.getDataProperty('banner')
           });
           $(this).attr( "href", uri.toString() );
           // Make links open in new tab
           $(this).attr("target", "_blank");
       });
       /* --- Legal text variant --- */
       if (Geo.country === 'US') {
           $('.informationsharing-US').show();
           $('.informationsharing-NL').hide();
           $('.informationsharing-nonUS').hide();
       }
       if (Geo.country === 'NL') {
           $('.informationsharing-US').hide();
           $('.informationsharing-NL').show();
           $('.informationsharing-nonUS').hide();
       }
       /* --- Amounts --- */
       /* Main amount buttons */
       var asks = fundraisingAmounts.pick(fundraisingAmounts.mobileAsks, currency, Geo.country);
       $('.frbanner-amounts .amount-btn input').each(function(index) {
           var $input = $(this);
           var $label = $('label[for="' + $input.attr('id') + '"]');
           var amount = asks[index];
           $input.val( amount );
           $label.html( currencyLocalize( currency, amount, language) );
       });
       /* "Other" box. Doesn't yet work for symbol after number */
       $('#amount_total_6 label .currencySymbol').html(
           currencyLocalize( currency, , language )
       );
       // Find instances of %AVERAGE% in banner text, and replace with correct average for currency & country
       $(".frbanner-message, .frbanner2-message, .frbanner3-message").each(function(index){
           var avgString = getAverage(currency, Geo.country, language).replace(/\.$/, ); // strip any period from end for use in running text
           var newHtml = $(this).html().replace(/%AVERAGE%/g, avgString );
           $(this).html(newHtml);
       });
       // Find instances of %MINIMUM% in banner text, and replace with correct minimum for currency & country
       $(".frbanner-message, .frbanner2-message, .frbanner3-message").each(function(index){
           var ifString = getMinimumString(currency, Geo.country, language).replace(/\.$/, ); // strip any period from end for use in running text
           var newHtml = $(this).html().replace(/%MINIMUM%/g, ifString );
           $(this).html(newHtml);
       });
       
       /* Replace class "frbanner-currencycode" with currency ISO code */
       $('.frbanner-currencycode').html(currency);
       /* Payment methods */
       /** MediaWiki:FR2015/Resources/MethodLocalize.js
 * Display the correct payment methods for current country. Used by both desktop and mobile banners.
 */

// Countries with no credit card option (currently none) var noCC = []; if ($.inArray(Geo.country, noCC) !== -1) {

   $(".paymentmethod-cc").remove();

}

// Can't do monthly credit card in Brazil if (Geo.country === 'BR') {

   $(".paymentmethod-cc").addClass("no-monthly");

}

// Remove any leftover WorldPay $(".paymentmethod-cc-wp").remove();

// Countries using Adyen for credit card if (Geo.country === 'FR' || Geo.country === 'IL') {

   $(".paymentmethod-cc").remove();
   $(".paymentmethod-cc-adyen").show();

} else {

   $(".paymentmethod-cc-adyen").remove();

}

// Countries with no PayPal option var noPP = ['IN', 'RU', 'SG', 'AE', 'QA', 'JP', 'OM', 'BD', 'BO', 'PA',

           'PE', 'PY', 'GT', 'JM', 'TT', 'DZ'];

if ($.inArray(Geo.country, noPP) !== -1) {

   $(".paymentmethod-pp").remove();
   $(".paymentmethod-pp-usd").remove();

}

// Countries where PayPal must be in USD var ppUSD = ['BG', 'HR', 'LT', 'MK', 'RO', 'UA', 'SA', 'CN', 'ID', 'KR',

            'KZ', 'MY', 'VN', 'AR', 'CL', 'DO', 'CO', 'NI', 'UY', 'ZA',
            'BH', 'LB', 'VE', 'TR', 'IS', 'BA', 'MV', 'BB', 'BM', 'BZ',
            'CR', 'CW', 'SX', 'HN', 'KN', 'DM', 'AG', 'LC', 'GD', 'FJ',
            'TN', 'BJ', 'BF', 'CI', 'GW', 'ML', 'NE', 'SN', 'TG', 'BR'];

if ($.inArray(Geo.country, ppUSD) !== -1) {

   $(".paymentmethod-pp").remove();
   $(".paymentmethod-pp-usd").show();

} else {

   $(".paymentmethod-pp").show();
   $(".paymentmethod-pp-usd").remove();

}

// Show any extra local payment methods, or remove them if not needed var extrapaymentmethods = {

   'amazon'     : ['US'],
   'bpay'       : ['AU'],
   'ideal'      : ['NL'],
   'yandex'     : ['RU'],
   'webmoney'   : ['RU'],
   'dd'         : ['AT', 'DE', 'ES', 'NL'],
   'enets'      : ['SG'],
   'sofort'     : [],
   'bt'         : ['AR', 'BR', 'CL', 'CO'],      // Bank Transfer (Astropay)
   'cash'       : ['AR', 'BR', 'CO', 'MX', 'UY'] // "Cash" methods (Astropay)

};

// Methods with different labels per country if (Geo.country === 'AR') {

   $('.paymentmethod-bt button, button.paymentmethod-bt').html('Santander');

} if (Geo.country === 'CO') {

   $('.paymentmethod-bt button, button.paymentmethod-bt').html('PSE Pagos');

} if (Geo.country === 'UY') {

   $('.paymentmethod-cash button, button.paymentmethod-cash').html('RedPagos');

} if (Geo.country === 'CL' && mw.config.get('wgUserLanguage') == 'es') {

   $('.paymentmethod-bt button, button.paymentmethod-bt').html('Trans. bancaria');

}

for (var method in extrapaymentmethods) {

   var $methodbutton = $('.paymentmethod-' + method);
   if ( $.inArray(Geo.country, extrapaymentmethods[method]) !== -1 ) { // country is in the list
       $methodbutton.show();
   } else {
       $methodbutton.remove();
   }

}


       /*  Check against the scheduled payment method outages below
        *  and hide the relevant button for any which are ongoing.
        */
       /* This file can be used to schedule hiding of individual payment methods from banners
* e.g. if they have scheduled downtime.
*
* Valid methods are:
*	ideal, cc, pp, amazon, bpay, webmoney, cash, pp-usd
* (most of the time it's 'ideal'...)
* Can also limit outage to a specific country with country: "XX" (where XX is an ISO code)
*
* Note that in JavaScript dates the months (and only the months) start at 0.
* Jan=0, Feb=1, Mar=2, Apr=3 etc. How hateful.
*
* Be sure to also update donatewiki if needed e.g. by commenting the method templates
* found at https://donate.wikimedia.org/wiki/Template:2012FR/Form-section/Paymentmethods
* 
*/

var outages = [

   {
       start:      new Date(Date.UTC(2016, 8, 18, 1)),
       end:        new Date(Date.UTC(2016, 8, 18, 7)),
       method:     "ideal"
   }

];

       var now = new Date();
    
       for (var i = outages.length - 1; i >= 0; i--) {
           if ( now > outages[i]['start'] && now < outages[i]['end'] ) {
               if (outages[i]['country'] === undefined || outages[i]['country'] == Geo.country) {
                   $('.paymentmethod-' + outages[i]['method']).remove();
               }
           }
       }
   });

}); /* end of MediaWiki:FR2014/Resources/MobileLocalize.js */ /** Provides alterImpressionData hook for CentralNotice

*  This info will be sent back with Special:RecordImpression
*/

mediaWiki.centralNotice.bannerData.alterImpressionData = function( impressionData ) {

   // Returning true from this function indicates the banner was shown
   if (mediaWiki.centralNotice.bannerData.hideReason) {
       impressionData.reason = mediaWiki.centralNotice.bannerData.hideReason;
   }
   if (mediaWiki.centralNotice.bannerData.cookieCount) {
       impressionData.banner_count = mediaWiki.centralNotice.bannerData.cookieCount;
   }
   
   return !mediaWiki.centralNotice.bannerData.hideResult;

};

$(document).ready(function() {

   $('.frbanner-replace-country').text( fundraisingBanner.countryNames[Geo.country] );
   $('.recurring-details').show();
   fundraisingBanner.initReminder1Form();


   $(".frq-once").on('click', function() {
       toggleMonthly(false);
       $("#frequency_monthly").prop("checked", false);
       $(this).addClass('frq-active');
       $('fieldset.frbanner-frequency span.frq-monthly').removeClass('frq-active');
   });
   $("fieldset.frbanner-frequency span.frq-monthly").on('click', function() {
       toggleMonthly(true);
       $("#frequency_monthly").prop("checked", true);
       $(this).addClass('frq-active');
       $('fieldset.frbanner-frequency span.frq-once').removeClass('frq-active');
   });
   $('input[name="frequency"]').click(function() {
       if($(this).is(":checked")) {
          $('.frq-monthly').addClass('frq-active');
          $('.frq-once').removeClass('frq-active');
       }
       else if($(this).is(":not(:checked)")) {
          $('.frq-once').addClass('frq-active');
          $('.frq-monthly').removeClass('frq-active');
       }
   });
   fundraisingBanner.initReminder2Form();
   // Reset "other box" if they click a different amount
   $('#amount1, #amount2, #amount3, #amount4, #amount5').click(function() {
       $('#input_amount_other_box').val();
   });
   // Block typing symbols in input field, otherwise Safari allows them and then chokes
   // https://phabricator.wikimedia.org/T118741
   document.getElementById('input_amount_other_box').onkeypress = function(e) {
       var chr = String.fromCharCode(e.which);
       if ("$£€¥".indexOf(chr) !== -1) {
           return false;
       }
   };
   $(".frbanner-close").click(function() {
       // Don't set a hide cookie here, as we expect them to always close this
       $("#frbanner").hide();
   });
   /* Close large banner when clicked outside */
   $('#frbanner-mask').on('click.bannerHide', function(e) {
       if ($(e.target).closest("#frbanner-window").length === 0) {
           $("#frbanner").hide();
           $(document).unbind('click.bannerHide');
       }
   });
   /* Hide banner outside of main namespace (and Main Page, for sites where that isn't in main namespace) */
   if ( mw.config.get('wgNamespaceNumber') > 0 && !mw.config.get('wgIsMainPage') ) {
       mw.centralNotice.bannerData.hideResult = true;
       mw.centralNotice.bannerData.hideReason = 'namespace';
   }
   if ( navigator.userAgent.indexOf( 'googleweblight' ) !== -1 ) {
      mw.centralNotice.bannerData.hideResult = true;
   }
   if (!mw.centralNotice.bannerData.hideResult) {
       fundraisingBanner.showLargeBanner();
   }

}); </script>