	
	/*
	JS
	--------------------------------------------------------------------------------------------  
	@site				weareswimmingcities.org
	@file				Loader.js
	@author			dpaul
	@modified		11.05.09
	@desc				Preloader for oceanofblood page
	
	/* =:Loader
	-------------------------------------------------------------------------------------------- */  
	var wasc = wasc || {};
	
	wasc.Loader = function()
	{
		var _container;
		var _images;
		var IMG_BASE = '/wasc/images/theoceanofblood/';
		var IMG_OVER = '-over';
		
		/* =:Startup
		  --------------------------------------------------------------------------------------- */  
		function initialize()
		{
			if($('cloud'))
			{
				_container = $('cloud'); 
				_images = _container.select('li a').collect(function(a){
					var off = a.getStyle('backgroundImage').match(/wasc\/images\/theoceanofblood\/([^_]+)_(.+)\)/);
					var over = ([IMG_BASE,off[1],IMG_OVER,'_',off[2]]).join('');
					return over;
				});
				
				preload();
			}
		}
		
		function preload()
		{
			_images.each(function(src){
				var img = new Image();
				img.src = src;
			})
		}
		
		
		/* =:Reveal as Public
		  --------------------------------------------------------------------------------------- */  
		return {
			init:initialize
		}
	}()
	
	/* add to onload stack */
	document.observe('dom:loaded', wasc.Loader.init );
	
	/* No Surrender, No Delete! */
	