(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(){
	jQuery.preLoadImages("http://www.starkcenter.org/blog/images/attila/after.jpg", "http://www.starkcenter.org/blog/images/attila/before.jpg");
	
	$(".after").hover(function(){
		$("img", this).stop().fadeTo(500, 0.0);
	},function(){
		$("img", this).stop().fadeTo(500, 1.0);
	});
	
});
