// preloading images plugin					   
(function($) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.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)

$(document).ready(function($) {
  // preload rollover images
  imgSrcs = [];
  $("img.preload").each(function(){
	imgSrcs.push(this.src.replace("_off","_on"));
  });
  jQuery.preLoadImages(imgSrcs);
  // set images to rollover
  $("img.rollover").hover(
	function(){this.src = this.src.replace("_off","_on");},
	function(){this.src = this.src.replace("_on","_off");}
  );
});
