		$(window).load(function()
		{
			//this is intended to wait for all the images to load before running the slideshow
			init_slideshow()
		})
		
		init_slideshow = function()
		{
			$('.home_slides1').cycle({
				fx:'fade',
				timeout:5000,
				pager:'.slide_navigation',
        pagerAnchorBuilder: function(i) {
                return '<a href="#">'+(i+1)+'</a>';
            },
				after:update_slide_caption,
				before:fade_slide_caption
			})

			$('.home_slides2').cycle({
				fx:'fade',
				timeout:5000,
				pager:'.slide_navigation',
        pagerAnchorBuilder: function(i) {
                return $('.slide_navigation a:eq('+i+')');
            },
				after:update_slide_caption,
				before:fade_slide_caption
			})


		}
	
	
		
		fade_slide_caption = function(next, previous)
		{
			caption_container = $('.project_caption')
			caption_remover = $('.home_slides2 .home_slides3')
			caption_container.fadeOut('fast')
		}
		
		update_slide_caption = function(next, previous)
		{
			caption_container = $('.project_caption')

			caption = $('span.slide_caption', previous)
			caption_container.fadeIn('fast')
			caption_remover.remove()
			caption_container.html(caption.html())
			
		}



/* $(document).ready(function() {
   &('.home_slides2 .home_slides3').remove();
 });*/




