MediaWiki:Centralnotice-template-dsk p1 lg template video

From Meta, a Wikimedia project coordination wiki
<!-- Large desktop banner. Must be used with "Large banner limit and switch" mixin -->
<style>
/* For IE9 */
@media screen {
    #centralNotice {
       display: block !important;
    }
}

/* Clearfix */

#frbanner .cf:before,
#frbanner .cf:after {
    content: "";
    display: table;
}

#frbanner .cf:after { clear: both; }
.ie7 #frbanner .cf { zoom: 1; }


/* Border-Box */

#frbanner *,
#frbanner *:before,
#frbanner *:after {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Transitions */

.frbanner-form label,
.frbanner-form button,
.frbanner-form #amount_other {
    -webkit-transition: all .25s ease-in-out;
    -moz-transition:    all .25s ease-in-out;
    transition:         all .25s ease-in-out;
}

/* --- Main banner wrapper --- */

div#{{{banner}}} {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 110;
    background: transparent;
}

/* --- Window Styles --- */

#frbanner-window {
    position: relative;
    width: 100%;
    font: 1em/1.2 "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Nimbus Sans L", "Arial", "Liberation Sans", sans-serif;
    color: black;
    background: black;
}

#frbanner-window::after {
  content: "";
  background: black;
  opacity: 0.5;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  position: absolute; 
}

/* --- Close button --- */

#frbanner-close {
    display: inline-block;
    cursor: pointer;
    opacity: .7;
    z-index: 999;
    background: url('//upload.wikimedia.org/wikipedia/donate/8/84/Close-thin-white.png') no-repeat center center;
    width: 25px;
    height: 25px;
    display: block;
    position: absolute;
    right: 1em;
    top: 1em;
}

#frbanner-close:hover { opacity: 1; }


/* -------------- Message -------------- */

.frbanner-message {
    display: table-cell;
    width: 65%;width: auto;vertical-align: top;
    color: #fff;
    position: relative;
    padding: 1.5em 2em;
    font-family: "Linux Libertine",Georgia,Times,serif;
    font-size: 1.05em;
    line-height: 1.3;
    z-index: 1;
}

@media (min-width : 960px) {
    .frbanner-message {
        padding: 1em;
        font-size: 1.3em;
    }
}

@media (min-width : 1200px) {
    .frbanner-message { padding: .75em 2em; }
}

@media (min-width : 1300px) {
    .frbanner-message { font-size: 1.3em; }
    html[lang="en"] .frbanner-message { font-size: 1.4em; }
}

@media (min-width : 1500px) {
    .frbanner-message { font-size: 1.4em; padding: 1.15em 2em; }
    html[lang="en"] .frbanner-message { font-size: 1.5em; }
}

@media (min-width : 1800px) {
    .frbanner-message { height: 18em; }
}

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




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

.frbanner-form {
    display: table-cell;
    position: relative;
    width: 25%;
    height: 100%;
    vertical-align: top;
    padding: 1.5em .5em 1.5em 0;
    z-index: 1;
}

@media (min-width : 960px)  {
    .frbanner-form {
        padding: 1.5em .5em 1.5em 0;
    }
}

@media (min-width : 1200px)  {
    .frbanner-form {
        padding: 2em 2em 2em 0;
        width: 35%;
    }
}

@media (min-width : 1400px)  {
    .frbanner-form {
        width: 30%;
    }
}

.frbanner-form h2 {
    font-size: 1.3em;
    border-bottom: 0;
    text-align: center;
    color: white;
    font-family: "Helvetica Black","Arial Black",sans-serif;
}

.frbanner-form fieldset {
    width: 100%;
    border: 0;
    margin: 0 auto;
    padding: 0 0 1em 0;
}

.frbanner-form ul {
    display: table;
    width: 100%;
    height: 100%;
    margin: 0 0 .3em;
    padding: 0;
    list-style: none;
}

.frbanner-form legend {
    display: none;
    width: 100%;
    margin: 0;
    padding: 0 0 0.3em 0;
    text-align: center;
    font-size: .9em;
    text-transform: uppercase;
    color: white;
}

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

.frbanner-btn, #frbanner-rml {
    display: block;
    padding: .5em .1em;
    border: none;
    border-radius: 0.3em;
    background: rgba(0,0,0,.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
}

.frbanner-btn:hover, #frbanner-rml:hover {
    border: 1px solid white;
}

.frbanner-btn.checked {
    color: white;
    font-weight: bold;
    background: #807f7f !important;
}

.frbanner-frequency .frbanner-btn.checked {
    background: #807f7f url('//upload.wikimedia.org/wikipedia/donate/f/fc/Got-recurring-check.png') no-repeat .5em center !important;
    padding-left: 1em;
}

.frbanner-btn:active {
    border: 1px solid rgba(255,255,255,1);
}

.frbanner-btn input[type="radio"] {display:none;}


/* --- Frequency Buttons --- */

.frbanner-frequency li {
    display: table-cell;
    width: 50%;
    padding: 0 2% 0 0;
    vertical-align: top;
}
body.rtl .frbanner-frequency li { padding: 0 0 0 2%; }

.frbanner-frequency label {
    display: block;
    width: 100%;
    font-size: .9em;
}

.frbanner-frequency input {
    display: block;
    margin: 0 auto .4em auto;
}

@media (min-width: 1100px) {
    .frbanner-frequency input {
        display: inline-block;
        position: relative;
        top: -0.2em;
        margin: 0;
        vertical-align: middle;
    }
}

/* --- Amount Buttons --- */

.frbanner-amounts legend {
    display: block;
}

.frbanner-amounts li {
    display: table-cell;
    width: 25%;
    height: 100%;
    clear: none;
    padding: 0 2% 0 0;
    vertical-align: top;
}
body.rtl .frbanner-amounts li {
    padding: 0 0 0 2%;
}

/* Chrome specific - need to be floated for height 100% to work */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .frbanner-amounts li { float: left; }
    body.rtl .frbanner-amounts li { float: right; }
}

.frbanner-amounts li input[type="radio"] {
    position: absolute;
    overflow: hidden;
    height: 1px;
    width: 1px;
    clip: rect(0 0 0 0);
    border: 0;
    margin: -1px;
    padding: 0;
}

.frbanner-amounts label {
    height: 100%;
    font-size: .9em;
    text-transform: none;
}

@media (min-width : 800px)  { .frbanner-amounts .predefined_amount { font-size: 1.25em; } }
@media (min-width : 1100px) { .frbanner-amounts .predefined_amount { font-size: 1.5em; } }

/* --- Other Amount --- */

#amount_other .frbanner-btn {
    display: inline-block;
    width: 100%;
    height: 100%;
    padding: 0 !important;
}

#amount_other input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: 0;
    font-size: .9em;
    padding: .3em;
    border-radius: .3em;
    direction: ltr;
    text-align: center;
    color: white;
    text-transform: uppercase;
    /*font-size: .8em;*/
}

#amount_other .checked input {
    color: white;
}


#amount_other .checked input:focus::-webkit-input-placeholder,
#amount_other .checked input:focus::-moz-placeholder,
#amount_other .checked input:focus:-ms-input-placeholder,
#amount_other .checked input:focus:-moz-placeholder { font-size: .8em !important; }


/* --- Payment method Buttons --- */

/* hide methods which aren't monthly capable when monthly option is selected */
.form-monthly .no-monthly {
    display: none !important;
}

.frbanner-form .frbanner-submit {
    padding-bottom: 0;
}

.frbanner-submit ul {
    display: block;
}
.frbanner-submit ul li {
    width: 100%;
    display: block;
    margin-bottom: .4em;
}

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

/* If wide enough, put in a row. table-layout: fixed; makes them equal widths */
@media (min-width : 1100px) {

    .frbanner-submit ul {
        display: table;
        table-layout: fixed;
    }

    .frbanner-submit ul li {
        display: table-cell;
        padding: 0 2% 0 0;
        vertical-align: top;
    }
    body.rtl .frbanner-submit ul li {
        padding: 0 0 0 2%;
    }

    .frbanner-submit .frbanner-btn {
        min-height: 2.5em;
    }

}

@media (min-width:  960px) { #frbanner-window button, #frbanner-rml { font-size: .9em; } }
@media (min-width: 1200px) { #frbanner-window button, #frbanner-rml { font-size: .95em; } }

/* --- Footer / Small Print --- */
.frbanner-footer {
    padding: .8em 2em;
    background: #e2e2e2;
    font-size: .7em;
    color: #606060;
    text-align: center;
    display: none;
}

#frbanner:hover .frbanner-footer { display: block; }

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

#frbanner-rml {
    margin: auto;
    padding: 0;
    max-width: 250px;
    text-align: center;
    line-height: 1;
    cursor: pointer;
}

@media (min-width: 960px) { #frbanner-rml { margin: 1em auto auto auto; } }
@media (min-width: 1100px) { #frbanner-rml { width: 98%; } }

.frbanner-email-reminder-link {
   display: block;
   cursor: pointer;
   line-height: 1;
   padding: .5em 0.1em;
   text-transform: none;
}

.frbanner-email-reminder-active .frbanner-email-reminder-link {
   font-weight: bold;
}

.frbanner-email-reminder-form { display: none; }

.frbanner-email-reminder .frbanner-email-reminder-form {
    padding: .5em;
    right: 0;
    width: 100%;
    border-radius: 4px;
}

.frbanner-email-reminder-form form {
    display: table;
    width: 100%;
    text-align: center;
}

.frbanner-email-reminder-form input {
    display: block;
    padding: .5em;
    border: none;
    border-radius: 0.3em;
    background: rgba(0,0,0,.5);
    border: 1px solid white;
    border: 1px solid rgba(255,255,255,.5);
    color: white;
    text-transform: uppercase;
    line-height: 1;
    -webkit-transition: all .25s ease-in-out;
    -moz-transition:    all .25s ease-in-out;
    transition:         all .25s ease-in-out;
    width: 100%;
}
.frbanner-email-reminder-form input.error {
    border: 1px solid #cc0000;
}

.frbanner-email-reminder-form input:hover,
.frbanner-email-reminder-form input:focus {
    background: black;
    background: rgba(0,0,0,1);
    border: 1px solid rgba(255,255,255,1);
}

.frbanner-email-reminder-form button {
    background: rgba(0,0,0,.5);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    display: inline-block;
    margin: .3em 0 0 0;
    padding: .4em;
    font-size: 1em !important;
    cursor: pointer;
    border-radius: 4px;
    -webkit-transition: all .25s ease-in-out;
    -moz-transition:    all .25s ease-in-out;
    transition:         all .25s ease-in-out;
}

.frbanner-email-reminder-form button:hover {
    border: 1px solid white;
}

.frbanner-email-reminder-form button:active {
    border: 1px solid rgba(255,255,255,1);
}
.frbanner-email-reminder-form #errorMessageContainerId {
    color: #CC0000;
    text-transform: none;
    font-size: .8em;
    padding: .25em 0;
}
.frbanner-email-reminder-done {
    text-transform: none;
    font-size: 1.1em;
}

.video-holder {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    /*z-index: 1;*/
    overflow-y: hidden;}

.video-holder video {
    position: absolute;
    width: 100%;
    height: initial;
    top: -30%;
    left: 0; }

</style>

<div id="{{{banner}}}" style="display: none;"><!-- hidden by default until have checked the cookies -->

    <div id="frbanner">

        <div id="frbanner-window">

            <div class="video-holder video-wrapper">
               <video preload autoplay muted loop>
                  <source src="//upload.wikimedia.org/wikipedia/commons/transcoded/b/bb/House_of_Flavors_tables_placing.webm/House_of_Flavors_tables_placing.webm.240p.webm" type="video/webm" />
                  <source src="//upload.wikimedia.org/wikipedia/commons/b/b3/WorldSunshine.ogg" type="video/ogg" />
               </video>   
            </div>

            <span id="frbanner-close" onclick="fundraisingBanner.hide(); return false;"></span>
                
            <div class="frbanner-message">

                <p>
                    {{int:Centralnotice-FR2015_translations-greeting-readers}}
                </p>
                <p>
                    {{int:Centralnotice-FR2015_translations-right-to-it}}
                    {{int:Centralnotice-FR2015_translations-independence}}
                    {{int:Centralnotice-FR2015_translations-survive}}
                    {{int:Centralnotice-FR2015_translations-tiny}}
                    {{int:Centralnotice-FR2015_translations-now-is-the-time}}
                    {{int:Centralnotice-FR2015_translations-if-everyone}}
                    {{int:Centralnotice-FR2015_translations-useful}}
                    {{int:Centralnotice-FR2015_translations-non-profit}}
                    {{int:Centralnotice-FR2015_translations-fraction}}
                    {{int:Centralnotice-FR2015_translations-knowledge-is-a-foundation}}
                    {{int:Centralnotice-FR2015_translations-everyone-should-have-access}}
                    {{int:Centralnotice-FR2015_translations-end}}
                    <i>{{int:Centralnotice-FR2015_translations-thank-you}}</i>
                </p>

            </div><!--frbanner-message-->

            <div class="frbanner-form">

                <form id="{{{banner}}}-form" method="GET" name="paypalcontribution">

                    <h2>Keep Wikipedia strong</h2>
                    
                    <input type="hidden" name="utm_medium" value="sitenotice">
                    <input type="hidden" name="utm_campaign" value="{{{campaign}}}">
                    <input type="hidden" name="utm_source" value="{{{banner}}}">
                    <input type="hidden" name="utm_key" value="">

                    <input type="hidden" name="language" value="">
                    <input type="hidden" name="country" value="">
                    <input type="hidden" name="currency_code" id="input_currency_code" value="">
                    <input type="hidden" name="payment_method" value="">
                    <input type="hidden" name="payment_submethod" value="">
                    <input type="hidden" name="recurring" value="">
                    <input type="hidden" name="gateway" value="">
                    <input type="hidden" name="ffname" value="">
                    <input type="hidden" name="bannerhistlog" value="">

                    <fieldset class="frbanner-frequency cf">
                        <ul>
                            <li>
                                <label class="frbanner-btn frequency_onetime checked" onclick="toggleMonthly(false);">
                                    <input type="radio" name="frequency" id="frequency_onetime" value="onetime" checked="checked" >
                                    {{int:donate_interface-onetime-short}} DONATION
                                </label>
                            </li>
                            <li>
                                <label class="frbanner-btn frequency_monthly" onclick="toggleMonthly(true);">
                                    <input type="radio" name="frequency" id="frequency_monthly" value="monthly" >
                                    {{int:donate_interface-monthly-short}} DONATION*
                                </label>
                            </li>
                        </ul>
                    </fieldset>

                    <fieldset class="frbanner-amounts cf">
                        <legend>{{int:Centralnotice-FR2015_translations-select-amount}} (<span class="frbanner-currencysymbol"></span>)</legend>
                        <ul>
                            <li id="amount_total_1">
                                <input name="amount" type="radio" id="field-amount_total_1" value="3">
                                <label id="amount_label_1" class="frbanner-btn predefined_amount" for="field-amount_total_1">$3</label>
                            </li>

                            <li id="amount_total_2">
                                <input name="amount" type="radio" id="field-amount_total_2" value="5">
                                <label id="amount_label_2" class="frbanner-btn predefined_amount" for="field-amount_total_2">$5</label>
                            </li>

                            <li id="amount_total_3">
                                <input name="amount" type="radio" id="field-amount_total_3" value="10">
                                <label id="amount_label_3" class="frbanner-btn predefined_amount" for="field-amount_total_3">$10</label>
                            </li>

                            <li id="amount_total_4">
                                <input name="amount" type="radio" id="field-amount_total_4" value="20">
                                <label id="amount_label_4" class="frbanner-btn predefined_amount" for="field-amount_total_4">$20</label>
                            </li>
                        </ul>
                        <ul>
                            <li id="amount_total_5">
                                <input name="amount" type="radio" id="field-amount_total_5" value="30">
                                <label id="amount_label_5" class="frbanner-btn predefined_amount" for="field-amount_total_5">$30</label>
                            </li>

                            <li id="amount_total_6">
                                <input name="amount" type="radio" id="field-amount_total_6" value="50">
                                <label id="amount_label_6" class="frbanner-btn predefined_amount" for="field-amount_total_6">$50</label>
                            </li>

                            <li id="amount_total_7">
                                <input name="amount" type="radio" id="field-amount_total_7" value="100">
                                <label id="amount_label_7" class="frbanner-btn predefined_amount" for="field-amount_total_7">$100</label>
                            </li>

                            <li id="amount_other">
                                <div class="frbanner-btn">
                                    <input name="amount" type="radio" id="input_amount_other" value="Other"/>
                                    <input name="amountGiven" type="text" id="input_amount_other_box" size="3" autocomplete="off" value="" placeholder="{{int:Centralnotice-FR2015_translations-other}}"/>
                                </div>
                            </li>
                        </ul>
                    </fieldset>

                    <fieldset class="frbanner-submit cf">
                        <legend>{{int:Centralnotice-FR2015_translations-select-payment-method}}</legend>

                        <ul>
                            <li class="paymentmethod-ideal no-monthly" style="display: none;">
                                <button class="frbanner-btn" onclick="redirectPayment('rtbt', 'rtbt_ideal'); return false;">
                                iDEAL
                                </button>
                            </li>

                            <li class="paymentmethod-cc">
                                <button class="frbanner-btn" onclick="redirectPayment('cc'); return false;">
                                    {{int:Centralnotice-FR2015_translations-pm-creditcard}}
                                </button>
                            </li>

                            <li class="paymentmethod-cc-wp no-monthly" style="display: none;">
                                <button class="frbanner-btn" onclick="redirectPayment('cc-wp'); return false;">
                                    {{int:Centralnotice-FR2015_translations-pm-creditcard}}
                                </button>
                            </li>

                           <li class="paymentmethod-sofort no-monthly" style="display: none;">
                                <button class="frbanner-btn" onclick="redirectPayment('rtbt', 'rtbt_sofortuberweisung'); return false;">
                                    {{int:Centralnotice-FR2015_translations-pm-onlinebanktransfer}}
                                </button>
                            </li>

                            <li class="paymentmethod-pp">
                                <button class="frbanner-btn" onclick="redirectPayment('paypal'); return false;">
                                    {{int:Centralnotice-FR2015_translations-pm-paypal}}
                                </button>
                            </li>

                            <li class="paymentmethod-amazon no-monthly">
                                <button class="frbanner-btn" onclick="redirectPayment('amazon'); return false;">
                                    {{int:Centralnotice-FR2015_translations-pm-amazon}}
                                </button>
                            </li>

                            <li class="paymentmethod-bpay no-monthly" style="display: none;">
                                <button class="frbanner-btn" onclick="redirectPayment('obt', 'bpay'); return false;">
                                    BPay
                                </button>
                            </li>

                            <li class="paymentmethod-enets no-monthly" style="display: none;">
                                <button class="frbanner-btn" onclick="redirectPayment('rtbt', 'rtbt_enets'); return false;">
                                    eNETS
                                </button>
                            </li>

                            <li class="paymentmethod-pp-usd" style="display: none;">
                                <button class="frbanner-btn" onclick="redirectPayment('paypal', undefined, true); return false;">
                                    {{int:Centralnotice-FR2015_translations-pm-paypal}} (USD)
                                </button>
                            </li>

                        </ul>
                    </fieldset>

                </form>

                <div id="frbanner-rml">
                
                    <span class="frbanner-email-reminder-link">
                        {{int:Centralnotice-FR2015_translations-remind-me-email}}
                    </span>

                    <div class="frbanner-email-reminder">
                        <div class="frbanner-email-reminder-form" style="display: none;">
                            <form method="post" action="https://www.pages04.net/wikimedia/remind/Form?sp_source={{{banner}}}">
                                <input type="hidden" name="formSourceName" value="StandardForm" />
                                <!-- DO NOT REMOVE HIDDEN FIELD sp_exp -->
                                <input type="hidden" name="sp_exp" value="yes" />
                                <input type="hidden" name="rml_country" value="" />
                                <input type="hidden" name="rml_language" value="" />
                                <input type="hidden" name="rml_submitDate" value="" />
                                <input type="hidden" name="rml_segment" value="" />
                                <input type="email" name="Email" id="control_EMAIL" label="{{int:Donate_interface-donor-emailAdd}}" placeholder="{{int:Donate_interface-donor-emailAdd}}" class="required" />
                                <div id="errorMessageContainerId" class="formErrorMessages" style="display: none;">
                                    {{int:Donate_interface-error-msg-email}}
                                </div>
                                <button type="submit">{{int:Emailusernamesubmit}}</button>
                            </form>
                            <div class="frbanner-email-reminder-done" style="display: none;">
                                {{int:Centralnotice-FR2015_translations-remind-me-thankyou}}
                            </div>
                        </div>
                    </div>
                </div>

            </div><!--frbanner-form-->

        </div><!--frbanner-window-->

        <div class="frbanner-footer">
            {{MediaWiki:FR2015/Resources/BannerSmallPrint}}
        </div>

    </div>

</div>

<script>
    /* Allow overriding country */
    if( mw.util.getParamValue("country") ) {
        Geo.country = mw.util.getParamValue("country");
    }
</script>

{{MediaWiki:FR2013/Resources/Country2Currency.js}}
{{MediaWiki:FR2013/Resources/CurrencyLocalize.js}}
{{MediaWiki:FR2013/Resources/CurrencyMinimums.js}}
{{MediaWiki:FR2014/Resources/AmountData.js}}
<!-- Insert any amount overrides for testing here -->
{{MediaWiki:FR2014/Resources/AmountFunctions.js}}
{{MediaWiki:FR2013/Resources/BannerFormCore.js}}

<script>
{{MediaWiki:FR2015/Resources/FullScreenLocalize-SymbolVariant.js}}

{{MediaWiki:FR2014/Resources/alterImpressionData.js}}

var fundraisingBanner = {};

fundraisingBanner.addSpace = function() {
    if ( $('#{{{banner}}}').is(':visible') ) {
        /* Add space for the banner, and extra px if given below. called on load and window resize */
        var extra = 0;
        var bannerHeight = $('#frbanner-window').height();
        $('#mw-panel').css('top', bannerHeight+160+extra);
        $('#mw-head').css('top', bannerHeight+extra);
        $('#mw-page-base').css('margin-top', bannerHeight+extra);
    }
};

fundraisingBanner.show = function() {
    $('body').prepend($('#centralNotice'));
    $('#{{{banner}}}').css('display', 'block');
    fundraisingBanner.addSpace();
    /* Resize after delay so images have loaded. TODO: find better way to do this */
    setTimeout(function (){ fundraisingBanner.addSpace(); }, 100);
    setTimeout(function (){ fundraisingBanner.addSpace(); }, 500);
    setTimeout(function (){ fundraisingBanner.addSpace(); }, 1000);
    setTimeout(function (){ fundraisingBanner.addSpace(); }, 5000);

    $(window).resize(function() {
        fundraisingBanner.addSpace();
    });
};

fundraisingBanner.hide = function() {
    /* Hide the banner, and remove the extra space which was added for it */
    /* Don't set a cookie: this is a large banner and only shown on first view anyway */
    $('#{{{banner}}}').hide();
    $('#mw-panel').css('top', '160px');
    $('#mw-head').css('top', '0px');
    $('#mw-page-base').css('margin-top', '0');
    return false;
};

fundraisingBanner.postReminderForm = function() {
    // Create the iframe for the form and use it as the form's target
    var frameName = "remindFrame";
    var $form = $(".frbanner-email-reminder-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.initReminderForm = function() {
    $(".frbanner-email-reminder-form input[name=rml_country]").val(Geo.country);
    $(".frbanner-email-reminder-form input[name=rml_language]").val(mw.config.get('wgUserLanguage'));
    $(".frbanner-email-reminder-form input[name=rml_submitDate]").val(fundraisingBanner.getCurrentDate());
    $(".frbanner-email-reminder-form input[name=rml_segment]").val(Math.floor((Math.random() * 100) + 1));

    $(".frbanner-email-reminder-link").click(function() {
        $('.frbanner-email-reminder-form').slideToggle();
        $('.frbanner-email-reminder').toggleClass('frbanner-email-reminder-active');
    });

    $(".frbanner-email-reminder-form button").bind("click", function() {
        if ( mw.util.validateEmail( $(".frbanner-email-reminder-form form input[name='Email']").val() ) ) {
            fundraisingBanner.postReminderForm();
            $(".frbanner-email-reminder-form form").hide();
            $(".frbanner-email-reminder-done").show();
            mw.centralNotice.hideBanner(); // Hide future banners for 7 days
            return false;
        } else {
            $(".frbanner-email-reminder-form form input[name='Email']").addClass("error");
            $(".frbanner-email-reminder-form #errorMessageContainerId").show();
            return false;
        }
    });
};

$(document).ready(function() {

    fundraisingBanner.initReminderForm();

    $(".frbanner-frequency label").click(function() {
        $(".frbanner-frequency label").removeClass("checked");
        $(this).addClass("checked");
    });

    $(".frbanner-amounts .frbanner-btn").click(function() {
        $(".frbanner-amounts .frbanner-btn").removeClass("checked");
        $(this).addClass("checked");
        $('#input_amount_other_box').val(''); // Clear "other" box
    });

    $("#amount_other").click(function() {
        document.getElementById("input_amount_other").checked = true;
        $("#input_amount_other_box").focus();
    });

    /* 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 (!mw.centralNotice.bannerData.hideResult) {
        fundraisingBanner.show();
    }

});
</script>