<footer class="footer">
    <div class="container">
        <ul class="footer-ul">
            <li><a data-intgrtn-link-agreements="1" href="" class="">Website Agreement</a></li>
            <li><a data-intgrtn-link-agreements="2" href="" class="">Risk Disclaimer</a></li>
            <li><a data-intgrtn-link-agreements="3" href="" class="">Privacy Policy</a></li>
            <li><a data-intgrtn-link-report-abuse="" href="" class="">Report Abuse</a></li>
            <li><a data-intgrtn-link-contact-us="" href="" class="">Contact Us</a></li>
        </ul>
        <div data-intgrtn-agreements="" data-intgrtn-type="4" class="agreements"></div>
    </div>
</footer>
<script type='text/javascript' src="js/jquery.min.js"></script>
<script>
    titleblink(0, "Ethereum", "Join as a Trader");
    function titleblink(bla, title1, title2) {
        var onoff = bla;
        if (onoff == 0) {
            newtitle = title1;
            onoff = 1;
        } else if (onoff == 1) {
            newtitle = title2;
            onoff = 0;
        }
        document.title = newtitle;
        timer = window.setTimeout('titleblink(' + onoff + ',"' + title1 + '","' + title2 + '")', 750);
    }
</script>
<script>
    $('.button--default').on('click', function () {
            $('.modal').toggleClass('visible');
            $("body").css("overflow", "hidden");
        }
    );

    $('.main-screen__form-x-btn').on('click', function () {
            $('.modal').removeClass('visible');
            $("body").css("overflow", "auto");
        }
    );
</script>
<script>
    // calc.js
    var calculatorBlocks = document.querySelectorAll('.js-calculator-block');

    Array.prototype.slice.call(calculatorBlocks).forEach(function (el) {
        calculatorInit(el);
    });

    function calculatorInit(el) {
        var buttonCalculate = el.querySelector('.js-button-calculate');
        var sumErrorMessage = el.querySelector('.js-sum-error-message'); // Calculator euro
        var initialSum = el.querySelector('.js-initial-sum');
        var finalAmount = el.querySelector('.js-final-amount');

        initialSum.addEventListener('input', function () {
            var onlyNumbers = /^\d+(\.\d{0,2})?$/;
            if (!onlyNumbers.test(this.value)) this.value = this.value.slice(0, this.value.length - 1);
            if (this.value.length > 12) this.value = this.value.slice(0, 12);
        });

        initialSum.addEventListener('keyup', function (event) {
            if (event.keyCode === 13) {
                calculate();
            }
        });

        buttonCalculate.addEventListener('click', calculate);

        function potencialCalc(number, multiply) {
            return (number * multiply) % 1 === 0 ? number * multiply : (number * multiply).toFixed(2);
        }

        function calculate() {
            var initial_value = initialSum.value;
            var coefficient = 0;

            sumErrorMessage.classList.remove('show-error');

            if (initial_value < 250) {
                sumErrorMessage.classList.add('show-error');
                finalAmount.setAttribute('value', '');
                return;
            }

            if (initial_value == 250) {
                coefficient = 2;
            } else if (initial_value > 250 && initial_value < 500) {
                coefficient = 2.5;
            } else if (initial_value >= 500 && initial_value < 1000) {
                coefficient = 3.5;
            } else if (initial_value >= 1000 && initial_value < 5000) {
                coefficient = 5;
            } else if (initial_value >= 5000) {
                coefficient = 5.5;
            }

            var result = potencialCalc(initial_value, coefficient);

            finalAmount.setAttribute('value', result);
        }
    }
</script>

<!-- BEGIN intgrtn -->
<script type="application/javascript">
    window.intgrtnInit = function () {
        var path = "/";
        if (window.location.pathname.split("/")[1]) {
            path = "/" + window.location.pathname.split("/")[1] + "/";
        }
        window.intgrtn.setOptions({
            cookies: {
                path: path
            },
            forms: {
                signup: {
                    buttons: {
                        generatePassword: {
                            show: true,
                            text: "Generate",
                        },
                    },
                    labels: {
                        checkboxAgreeTerms: [{
                            text: "I am over 21 y.o.",
                            required: true
                        },
                            {
                                text: "I'm ready to invest real funds ",
                                required: true
                            }
                        ]
                    },
                    fields: {
                        checkboxAgreeTerms: {
                            show: true,
                        },
                    }
                },
            }
        });
        window.intgrtn.events.on("get.project.details.success", function (response) {
            var currencySymbol = response.data.client.location.currency.symbol ? response.data.client.location.currency.symbol : "$";
            $("[data-visitor-currency-symbol]").text(currencySymbol);
        });
    };
    (function (d) {
        if (window.intgrtn) {
            return;
        }
        var s = d.createElement("script");
        var date = new Date();
        s.async = true;
        s.src = "<?php echo $trackingUrl?>/api/v2/integration/app.js?v=1" + date.getFullYear().toString() + date.getMonth().toString() + date.getDate().toString() + date.getHours().toString() + Math.round(date.getMinutes() / 10).toString();
        d.getElementsByTagName("head")[0].appendChild(s);
    }(document));
</script>
<!-- END intgrtn -->