
//Retrieves content based on url passed to it from the rules below

function getContent(img) {
	
	element.onclick = function(){
		
		if ($(this).hasClassName('current')) {
			
			return false;
			
			} 
			
			else {

				new Effect.Opacity('image', { duration: .3, to: 0, afterFinish: function() {

					new Ajax.Updater('image', img, { 
										  
						method:'get',
						
						onComplete:function(){ 
						
							new Effect.Opacity('image', { duration: .3, to: 1 });
							
						}
						
					});	
					
					
				}});

				
				removeClassCurrent();
				$(this).toggleClassName('current');
				return false;
				
		};
	}
}


// this removes the class 'current' from all other links when a link is clicked so we don't end up with 2 current links

function removeClassCurrent() {
	$$('#thumbs a.current').invoke('removeClassName','current');
}
	





