/*
* External link pop-up
*/

$(document).ready(function(){

String.prototype.startsWith = function(s)
{
   if( this.indexOf(s) == 0 ) return true;
   return false;
}

$('a').click(function(){



  if(this.hostname != location.hostname){

    if(this.href.startsWith("https://secure12")){
      alert('You are now leaving the Kanaly Trust website and being redirected to a secure website for your online account services.');
    }
    else {
      alert('You are now leaving the Kanaly Trust website.');
    }
  }
});
});


/*
* E-mail link pop-up
*/
function email_popup()
{
alert("The e-mail communication you are about to send is not encrypted. Please refrain from sending confidential or time-sensitive information to Kanaly Trust via e-mail.");
}
