$(function() {
        	$('.thumbs a:first').addClass('selected');
        	var options = {
        		slideChange : function(currentIndex) {
        			$('.thumbs a').removeClass('selected');
        			$('.thumbs a:eq('+ currentIndex +')').addClass('selected');
        		},
        		slideType : 'fade'
        	};
            $('#slideshow .slide').dumbCrossFade(options);
            var i = 0;
           	$('.thumbs a').each(function() {
            	$(this).attr('href',i+'');
            	i++;
            });
            $('.thumbs a').click(function(){
				$('#slideshow .slide')
					.dumbCrossFade('jump',parseInt($(this).attr('href')));
            	return false;
            });
        });
