// Bind events to DOM elements only once the DOM has finished loading
/* THE JQUERY WAY
$(document).ready(function() {
	
	$('#car .icons img').mouseenter(function() {
		$('#car .right img').attr('src', $(this).attr('src').replace('_small', '_med'));
	});
	
});
*/

document.observe('dom:loaded', function() {
	
	$$('.car_container .icons img').each(function(element) {
		element.observe('click', function(event){
			this.siblings().each(function(sibling) {
				sibling.removeClassName('selected');
			});
			this.addClassName('selected');
			$('car_big').writeAttribute('src', this.readAttribute('src'));
		});
	});
});

// Define any functions/classes that are not tied to the DOM....
