﻿$(document).ready(function() {
    $("a.fs").click(function() {
        alert('You are about to enter the First National Bank of Fort Smith Website.');
        window.open($(this).attr('href').toLowerCase());
        return false;
    });

    $("a.nw").click(function() {
        window.open($(this).attr('href').toLowerCase());
        return false;
    });

    $("a.external").click(function() {
        alert('You are about to access a website that is not part of the First National Bank of Rogers, A Division of FNBFS website.  First National Bank of Rogers, A Division of FNBFS does not in any way endorse or take responsibility for the content of any other web page.');
        window.open($(this).attr('href').toLowerCase());
        return false;
    });

    $("a.externalinside").click(function () {
        alert('You are about to leave the First National Bank of Rogers, A Division of FNBFS website.');
        window.open($(this).attr('href').toLowerCase());
        return false;
    });

    $("a.emailwarn").click(function() {
        alert('E-mail is not secure and may be intercepted by unauthorized individuals or entities.  Never transmit any confidential personal or financial information via e-mail.  For assistance regarding confidential information, we may be contacted at the addresses and telephone numbers listed above.');
    });
    sfHover();
});

sfHover = function() {
    var sfEls = document.getElementById("mainnav").getElementsByTagName("LI");
    for (var i = 0; i < sfEls.length; i++) {
        sfEls[i].onmouseover = function() {
            this.className += " sfhover";
        }
        sfEls[i].onmouseout = function() {
            this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
