function buildGallery(){
	
	$('#slides').cycle({
	    speed:  'fast', 
	    timeout: 0, 
	    pager:  '#thumbs',
		pagerAnchorBuilder: function(idx, slide) { 
		        // return selector string for existing anchor 
		        return '#thumbs .thumb:eq(' + idx + ')'; }
	});
	
}

$( function(){
	
	if( $( '#thumbs' ).length ) buildGallery();
	
});
