
	var Slider = {

		init : function() {

			//	Set initial switch opacity
			$('ul#switches li').css({opacity : 0.8});

			$('ul#switches li:last').css({ border : 0 });

			//	Set animation triggers
			jQuery.each($('ul#switches li'), function() {
				$(this).hover( 
					function() {
						//	wax on
						$(this).animate({ opacity : 1 }, 250);
						Slider.switch_image($(this).attr('class'));
					},
					function() {
						// wax off
						$(this).animate({ opacity: 0.8 }, 250 );
					}
				);
			});

			//	Position the default image
			$('ul#slides li:first-child').addClass('current');

		},


		switch_image : function(image) {

			slide = $('ul#slides li.' + image);

			if (!slide.hasClass('current')) slide.animate( { marginLeft: 0 }, 518, 'swing', function() { Slider.reset_z_indices(image); } );

		},


		reset_z_indices : function(image) {

			$('ul#slides li.current').css({ marginLeft: 559 }).removeClass('current');

			$('ul#slides li.'  +  image).addClass('current');

		}

	};
