// JavaScript Document

function speedbump(e) {
	msg = 'The web site you have selected is an external one located on another server. JASPER BANKING COMPANY has no responsibility for any external web site. It neither endorses the information, content, presentation, or accuracy nor makes any warranty, express or implied, regarding any external site.';
	if(!confirm(msg))
		e.preventDefault();
}

$().ready(function(){

	$('.shadow_nav').clone().insertBefore('.shadow_nav').attr({id:'shadow_bg'}).css({opacity:0.8});	
	
	$('a').each(function() { 
		dest = this.href;
		if(!(dest.indexOf('http://localhost/') == 0 
											|| dest.indexOf('http://jp.blueridges.com/') == 0 
											|| dest.indexOf('http://www.jasperbanking.com') == 0 
											|| dest.indexOf('http://jasperbanking.com') == 0 
											|| dest.indexOf('https://web3.secureinternetbank.com') == 0)) {
			$(this).click(speedbump);
		}
	});
	
	$('a.popupvideo').click(function(e) {
		e.preventDefault();
		window.open(this.href, '_blank', 'width=400,height=350');
	});
	
	$('a.btnAd').css({opacity:.8}).hover(
		function(){
			$(this).stop().animate({opacity:1},100);
		}, function(){
			$(this).stop().animate({opacity:.8},300);
	});
	
	$('a.bars').css({position:'relative', overflow:'hidden'}).append('<img class="bars" src="../images/bars.gif" style="position:absolute; top:0px; left:175px;" />');
	$('a.bars').hover(function(){$(this).children().stop().animate({left:'71px'},400);},function(){$(this).children().stop().animate({left:'175px'},400);});
	
});