// JavaScript Document
$(document).ready(function(){
						   
	$('#logoimg').hover(function(){
		$(this).attr('src','http://12thaveseattle.com/images/12th-avenue-over.gif');
	},
	function(){
		$(this).attr('src','http://12thaveseattle.com/images/12th-avenue.gif');
	});
	$('#pikepinebug').hover(function(){
		$(this).attr('src','http://12thaveseattle.com/images/pikepine-bug-over.png');
	},
	function(){
		$(this).attr('src','http://12thaveseattle.com/images/pikepine-bug.png');
	});
	var _css;
	$('div.location').hover(function(){
		_css = $(this).css('background-image');
		$(this).css({'background-image':'url(images/map/redPoint_over.png)', 'cursor':'pointer'});
	},
	function(){
		$(this).css('background-image',_css);
	});
	
	(function($) {
   	var cache = [];
	$.preLoadImages = function() {
	var args_len = arguments.length;
	for (var i = args_len; i--;) {
	  var cacheImage = document.createElement('img');
	  cacheImage.src = arguments[i];
	  cache.push(cacheImage);
	  }
	}
   })(jQuery);
})
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.target = "_blank";  
		}  
}
window.onload = externalLinks;
	
function show(id) {
		document.getElementById(id).style.visibility='visible';
	}
function hide(id) {
		document.getElementById(id).style.visibility='hidden';
	}
