
jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}


$(document).ready(function(){

			// function opens new windows
			$('a.new-window').click(function(){
				window.open(this.href);
				return false;
			});
			
			$('input.submit').hover(function() {
				$(this).css("background-position","0 0");
			}, function() {
				$(this).css("background-position","0 -40px");
			});
			
			$('div.col > ul > li').hover(function() {
				$(this).addClass('hover');
			}, function() {
				$(this).removeClass('hover');
			});
		
});


function chart() {

	$('a.question').bind("click", function() {
		divArray=eval(this.rel)
		for (x in divArray) {
			$('#'+divArray[x]).fadeOut('fast');
		}
		
		$('#'+this.rel).fadeIn('slow');
		//return false;
		
	});


	$('a.continue').bind("click", function() {
			$(this).parents('.page').fadeOut(300);
			$('#'+this.rel).fadeIn(750);
			//return false;
	});
	
}

