
/*----- Navigation ------*/
$(document).ready(function(){
	
	// Preload all rollovers
	$(".rollover").each(function() {
		// Set the original src
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace(/.jpg$/ig,"_on.jpg");
		$("<img>").attr("src", rollON);
	});
	
	// Navigation rollovers
	$(".rollover").mouseover(function(){
		imgsrc = $(this).attr("src");
		matches = imgsrc.match(/_on/);
		// don't do the rollover if state is already ON
		if (!matches) {
			imgsrcON = imgsrc.replace(/.jpg$/ig,"_on.jpg"); // strip off extension
			$(this).attr("src", imgsrcON);
		}
	}).mouseout(function(){
		$(this).attr("src", imgsrc);
	});
	
	
	// gets rid of focus box on click
	$("a").focus(function(){
		this.blur();
	});
});



