function flickrFeed(setID,maxItems) {
	maxItemsDefault=50;
	if (maxItems!="" && maxItems!=null && maxItems<maxItemsDefault){
		maxItemsDefault=maxItems;
	}
	$.getJSON('http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=7fd6f5d6f34cb9df66504be6c798c023&photoset_id='+setID+'&per_page='+maxItemsDefault+'&format=json&jsoncallback=?', displayImages);
	function displayImages(data) {
		picCounter=0;
		var html = '';
		var htmlFancy = '';
		var firstImage = '';
		$.each(data.photoset.photo, function(i,photo){

			var source = 'http://farm'+photo.farm+'.static.flickr.com/'+photo.server+'/'+photo.id+'_'+photo.secret+'_m.jpg';
			var sourceLarge = source.replace('_m', '_b');
			if (picCounter==0){
				firstImage='<a rel="galleryOverlayGroup" class="galleryOverlay" href="'+ sourceLarge +'" title="'+ photo.title +' ">View Gallery</a>';
			}
			else {
				htmlFancy += '<a rel="galleryOverlayGroup" class="galleryOverlay" href="'+ sourceLarge +'" title="'+ photo.title +' ">';
			}
			html+='<div>';
			html += '<img class="galleryImage" src="'+ source +'" alt="'+ photo.title +' " />'
			html += '</div>';

		picCounter++;
	});
	$('.columnTertiary .scrollable .items').html(html);
	$(".columnGalleryNav").prepend(firstImage);
	$(".columnGallery .fancyBox").html(htmlFancy);
	// initialize lightbox functionality for galleries.
	//$('a.lightbox').lightBox({imageLoading:"/flintridge/htmlsuite/images/display/lightbox/loading.gif"});
	$("a.galleryOverlay[rel=galleryOverlayGroup]").fancybox({
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'titlePosition' 	: 'over',
		'autoScale'			: true,
		'cyclic'			: true,
		'overlayColor'		: '#000000',
		'overlayOpacity'	: '0.5',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	// initialize scrollable items (wide banners and column galleries). No autoscroll.  Deprecated.
	$(".columnTertiary .scrollable").scrollable({circular: true});
	};
};
