

function slideSwitch() 
{
    var active = $('#slideshow img.active');
	
	active.fadeOut(1000);

    if ( active.length == 0 ) active = $('#slideshow img:last');

    // use this to pull the images in the order they appear in the markup
    var next =  active.next().length ? active.next()
        : $('#slideshow img:first');

    active.addClass('last-active');

		
	next.addClass('active')
        .fadeIn( 1000, function() 
        {
            active.removeClass('active last-active');
        });
}

function startSlideShow()
{
	$( '#slideshow img.active' ).show();
	startInterval();
//	setTimeout("startInterval()", 5000);
}
	
function startInterval()
{
	setInterval( "slideSwitch()", 6000 );
}

$( document ).ready( function() {
	$(".get-latest-link").fancybox(
		{	'hideOnContentClick': false, 
			'frameWidth': 705, 
			'frameHeight': 604, 
			'centerOnScroll': false,
			'padding' : 0,
			'autoScale' : false
		} );	
});
