$(document).ready(function(){
	$('#exitFCSB').html('<div id="exitFCSBtext"></div>');
	$("a").each(function(){
		var link = $(this);
		var name = this.name;
		var href = this.href;
		var title = this.title;
		var host = window.location.host.replace(/^(([^\/]+?\.)*)([^\.]{4,})((\.[a-z]{1,4})*)$/, '$3$4');
		if (this.href != null) {
			if ( (this.href.match(/^http/)) || (this.href.match(/^https/)) ) { 
				if ( (! this.href.match(host)) && (! this.href.match(/ufsdata/))  ) {
					link.addClass('thickbox');
					link.attr('href', '#TB_inline?height=300&width=400&inlineId=exitFCSB');
					link.click(function () {
						$('#exitFCSBtext').html('<br /><center>You are about to leave First Citizens State Bank\'s website.<br /><br />First Citizens State Bank uses links to other sites in an effort to help locate interesting topics and assist our customers.  First Citizens State Bank cannot attest to the accuracy of information provided by the sites.  Linking to another site does not mean a site or product is endorsed by First Citizens State Bank.<br /><br />Click below to continue to the external site:</center><center><br /><br /><a href="' + href + '" title="' + name  + '" target="blank">' + href + '</a><br /><br /></center>');
					});
				}}
			}
		});
	
		tb_init('a.thickbox');
	});
