(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);

(function($) {
	$.fn.customFadeIn = function(speed, callback) {
		$(this).fadeIn(speed, function() {
			if(jQuery.browser.msie && jQuery.browser.version=="7.0")
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	$.fn.customFadeOut = function(speed, callback) {
		$(this).fadeOut(speed, function() {
			if(jQuery.browser.msie && jQuery.browser.version=="7.0")
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
})(jQuery);
	
(function($) {
  $.centerContent = function() {
    var winHeight = $(window).height();
	var bodyHeight = 667; //$("body").height();
	if (winHeight > bodyHeight) {
		var centerValue = (winHeight - bodyHeight) / 2;
		$("body").css("padding-top", centerValue + "px");
		$("body #start #container:first").css("margin-top", centerValue + "px");
	}
  }
})(jQuery);
