			
	// The path of all the images
	var pp = 'images/sailboat_preview/';
	var boats = {
		'cyclades_50_5' : {
			'file' : pp + 'cyclades_50_5.jpg',
			'name' : 'Cyclades 50.5',
			'description' : '12 beds,3 wc<br/>Benneteau monohull'
		},
		'jeanneau_49' : {
			'file' : pp + 'jeanneau_49.jpg',
			'name' : 'Jeanneau 49',
			'description' : '8+2 beds, 2 wc<br/>monohull'
		},
		'bavaria_47' : {
			'file' : pp + 'bavaria_47.jpg',
			'name' : 'Bavaria 47',
			'description' : '10 beds, 2 wc<br/>monohull'
		},
		'jeanneau_45' : {
			'file' : pp + 'jeanneau_45.jpg',
			'name' : 'Jeanneau 45',
			'description' : '8+2 beds, 2 wc<br/>monohull'
		},
		'bavaria_44' : {
			'file' : pp + 'bavaria_44.jpg',
			'name' : 'Bavaria 44',
			'description' : '10 beds, 2 wc<br/>monohull'
		},
		'bavaria_46' : {
			'file' : pp + 'bavaria_46.jpg',
			'name' : 'Bavaria 46',
			'description' : '8+2 beds, 2 wc<br/>monohull'
		},
		'oceanis_440' : {
			'file' : pp + 'oceanis_440.jpg',
			'name' : 'Oceanis 440',
			'description' : '8+2 beds, 2 wc<br/>Benneteau monohull'
		},
		'bavaria_41' : {
			'file' : pp + 'bavaria_41.jpg',
			'name' : 'Bavaria 41',
			'description' : '8 beds, 2 wc<br/>monohull'			
		},
		'oceanis_400' : {
			'file' : pp + 'oceanis_400.jpg',
			'name' : 'Oceanis 400',
			'description' : '6+2 beds, 2 wc<br/>Benneteau monohull'
		},
		'feeling_39' : {
			'file' : pp + 'feeling_39.jpg',
			'name' : 'Feeling 39',
			'description' : '6+2 beds, 2 wc<br/>monohull'
		},		
		'sun_odyssey_37' : {
			'file' : pp + 'sun_odyssey_37.jpg',
			'name' : 'Sun Odyssey 37',
			'description' : '6+2 beds, 2 wc<br/>Jeanneau monohull'
		},
		'sun_odyssey_36' : {
			'file' : pp + 'sun_odyssey_36.jpg',
			'name' : 'Sun Odyssey 36',
			'description' : '6+2 beds, 2 wc<br/>Jeanneau monohull'
		},
		'oceanis_351' : {
			'file' : pp + 'oceanis_351.jpg',
			'name' : 'Oceanis 351',
			'description' : '6+2 beds, 1 wc<br/>Benneteau monohull'
		},
		'cranchi_50' : {
			'file' : pp + 'cranchi_50.jpg',
			'name' : 'Cranchi 50',
			'description' : '3 cabins, 2 baths<br/>Motor yacht'
		}
		
		
	};
	
	window.addEvent("load",function(){ 
	
		if ($('sailboat_preview_canvas')) {
			
			var preview_paths = new Array();
		
			for(boat in boats) {
				//console.log(boats[boat]['file']);
				preview_paths.push(boats[boat]['file']);
			}
			//console.log(preview_paths);
			
			new Asset.images(preview_paths,{
			
				onComplete: function() {
				
					// Hide the ajax animation
					$('ajax_loader').setStyle('display','none');
					
					// Iterate through all the links, assign the mouseover events
					$$('#sailboat_preview_canvas a').each(function(a){
					
						a.addEvent('mouseover', function(){
							$('sailboat_pic').src = boats[this.id]['file'];
							$$('#sailboat_image_placeholder span')[0].innerHTML = boats[this.id]['name'];
							$$('#sailboat_image_placeholder p')[0].innerHTML = boats[this.id]['description'];
							$$('#sailboat_preview_canvas a').each(function(a){ a.removeClass("over"); });
							this.addClass("over");
						});
					
					});

					// Affect the mouseover event on the first link (to prepopulate the sailboat_stats
					$$('#sailboat_preview_canvas a')[0].fireEvent('mouseover');
					
					// Show the sailboat_stats
					$('sailboat_stats').setStyle('display','');								
				
				}
				
			});
		
		}
	
	});
			

