$j(document).ready(function() {

$j('#thumbmaster').hide();

    // For each big image:
    //   remove it's thumbnail from the front of the thumb master stack
    //   add it to the end of the stack for safe keeping
    //   clone the next four thumb nail images onto the big image
    $j('#showcase img').each(function(){
        var thumb = $j('#thumbmaster img:first');
        var id = $j(thumb).attr('id').split('-')[1]
        $j('#thumbmaster img:first').remove();
        $j('#thumbmaster').append(thumb);
        $j('#showcase-'+id+ ' .thumbs').html($j('#thumbmaster img:lt(4)').clone( ));
    });

    $j('#showcase').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		slideExpr : '.showcaseitem',
        fit: 1
	});

});

