$(function(){		
		
    // Apply class hoverButton to any image that needs to function as a rollover
    $('.hoverButton').hover(
        function(){
            $(this).attr("src",$(this).attr("src").replace('.png','_hover.png'));
        }, 
        function(){
            $(this).attr("src",$(this).attr("src").replace('_hover.png','.png'));
        });
		
    
    //Add 'active' class to current subnav element
    $('#subnav a').each(
        function(){
            var currentFileName = location.pathname.substr(location.pathname.lastIndexOf("/")+1,location.pathname.length);
            var currentFileLink = $(this).attr('href');
            if(currentFileName == currentFileLink){
                //alert(currentFileName);
                $(this).addClass('active');
            }
           
        }
        );	
            //Add class active to current subnav <li>
    $('#subnav a').live('click', function(){
        $('#subnav a').removeClass('active');
        $(this).addClass('active');
    }
    );
    //instantiate confirm box when a.externalLink is clicked            
    $('a.externalLink').live('click', function(event) {
        return confirm("You are about to leave the firstfreedombank.com website. First Freedom Bank is not responsible for any content beyond this point.");
    });

	
	
});


