


        $(window).on('load', function() {
            if (feather) {
                feather.replace({
                    width: 14,
                    height: 14
                });
            }
        })
        document.addEventListener('DOMContentLoaded', function() {
          const skypeButton = document.getElementById('skypeButton');
        
          if (skypeButton) {
          const skypeAdd = document.getElementById('skypeButton').innerHTML;
            skypeButton.addEventListener('click', function() {
              const skypeURI = `skype:${skypeAdd}?chat`;
              window.location.href = skypeURI;
            });
          }
        });
        
        var timerID = setInterval(function() {
        now = new Date();
        timezone = now.getTimezoneOffset();
        day = now.getDay();
        hour = now.getUTCHours();
        min = now.getUTCMinutes();
        sec = now.getUTCSeconds();
        ms = now.getUTCMilliseconds();

        displayTime(hour, min, sec, day, "AM", -5, "time-atx", "day-atx");
        }, 1000);

        function displayTime(hour, min, sec, day, meridiem, offset, timeId, dayId) {

        hour = hour + offset;
        if (hour < 0) {
            hour = 24 + hour;
            day--;
        } else if (hour >= 24) {
            hour = hour - 24;
            day++;
        }


        if (hour > 12) {
            hour = hour - 12;
            meridiem = "PM";
        }
        if (hour === 0)
            hour = 12;

        if (hour < 10)
            hour = "0" + hour;
        if (min < 10)
            min = "0" + min;
        if (sec < 10)
            sec = "0" + sec;

        $('#dashHours').html(hour);
        $('#dashMin').html(min);
        $('#dashSec').html(sec);
    }
    


        $(document).ready(function(){
            const testBtn = $('#test_submit_btn');
            testBtn.on('click',function(e){
                e.preventDefault();
                const testMail = $('input[name="test_mail"]').val();
                if(testMail == ''){
                    alert('Please enter email address');
                }else{
                    testBtn.html('<i class="fa fa-spinner fa-spin"></i> Sending...');
                    testBtn.attr('disabled',true);
                    $.ajax({
                        url: "https://trackergenius.runterminal.com/admin/setting/smtp/test",
                        type: "POST",
                        data: {
                            _token: "xVg5vlGiMwfiDk04qzHQhHjes4QkM1yoxS7WeOHB",
                            test_mail: testMail
                        },
                        success: function(data){
                            if(data.status === 'success'){
                                alert(data.message);
                                testBtn.html('<i class="fa fa-mail-reply-all"></i> Test');
                                testBtn.attr('disabled',false);
                            }else{
                                testBtn.html('<i class="fa fa-mail-reply-all"></i> Test');
                                testBtn.attr('disabled',false);
                            }
                        },
                        error : function(data){
                            testBtn.html('<i class="fa fa-mail-reply-all"></i> Test');
                            testBtn.attr('disabled',false);
                             data = data.responseJSON;
                             alert(data.message);
                        }
                    });
                }
            });
        });
    