$(document).ready(function(){
	// Remove focus outlines
	$("a").keypress(function() {
		this.blur();
     	this.hideFocus = false;
     	this.style.outline = null;
	});
	$("a").mousedown(function() {
		this.blur();
     	this.hideFocus = true;
     	this.style.outline = 'none';
     });
     
     // smooth scroll to top
     $('a[href=#top]').click(function(){
        $('html, body').animate({scrollTop:0}, 'slow');
        return false;
    });
     
});

function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "external" || anchor.getAttribute("rel") == "external nofollow")) anchor.target = "_blank";
		} 
} 

function init() {
	externalLinks();
}

function initMaps() { /* V3 api */
    externalLinks();
    loadMap();
}

function initMapsV2() { /* V2 api for older browsers */
    externalLinks();
	if (GBrowserIsCompatible()) loadMap();	
}


