// Rollover for Navigation
$(document).ready(function(){
	$(function() {
	  $("img.nav").hover(function() {
		$(this).attr("src", $(this).attr("src").split(".jpg").join("_over.jpg"));
	  }, function() {
		$(this).attr("src", $(this).attr("src").split("_over.jpg").join(".jpg"));
	  });
	});
	
	/*$(function() {
	  $("#nav li").hover(function() {
		$(this).css("background-image", $(this).css("background-image").split(".jpg").join("_over.jpg"));
	  }, function() {
		$(this).css("background-image", $(this).css("background-image").split("_over.jpg").join(".jpg"));
	  });
	});*/
});

// Cache Images for Rollover
$(document).ready(function(){
  //$.preloadCssImages();
  $.preloadCssImages({statusTextEl: '#textStatus', statusBarEl: '#status'});
});

// Get Date for Copyright
var now = new Date();
var year= now.getYear();
var mon = now.getMonth() + 1;
var day = now.getDate();



// Hack for Gecko and Web-Kit Y2K  Bug
if (year >= 100 && year <= 1999)
	{ 
		year = year + 1900
	}
	else {
		year = year
	}

function randomCharacter() {
	images = new Array(4);
	images[0] = '../images/numerator1.jpg';
	images[1] = '../images/numerator2.jpg';
	images[2] = '../images/numerator3.jpg';
	images[3] = '../images/numerator4.jpg';

	index = Math.floor(Math.random() * images.length);
	document.write("<img src='"+images[index]+"' height=\"103\" width=\"170\" alt=\"\"'>");
}

function makeInvisible() {
     $('img#typekit-badge-gtw7wnb').css('display','none');
} 

$(document).ready(function(){
	try{Typekit.load();}catch(e){}						   
});

function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";win=window.open(mypage,myname,settings);
win.focus();}

