@Override
	public MouseAdapter thumbnailSelection() {
		return new MouseAdapter () {			
			@Override
			public void mouseClicked(MouseEvent event) {
				if (selectedEMediumLabel != null)
					selectedEMediumLabel.setBorder(null);
				selectedEMediumLabel = (EMediumLabel) event.getSource();
				selectedEMediumLabel.setBorder(new MatteBorder(3, 3, 3, 3, (Color) Color.YELLOW));
				if (event.getButton() == MouseEvent.BUTTON1) {
					if (event.getClickCount() >= 2) {
						// on double click, view the document
						if (canBeViewed(selectedEMediumLabel.getEMedium()))
							if (selectedEMediumLabel.getEMediumViewer() != null) {
								eMediumShow(selectedEMediumLabel);
							} else
								JOptionPane.showMessageDialog(bookshelfUI, "Cannot obtain a viewer for this type of document", 
									"Error obtaining viewer for document", JOptionPane.ERROR_MESSAGE);
						else
							JOptionPane.showMessageDialog(bookshelfUI, "You do not have a valid rental for the e-medium", 
									"Error viewing the e-medium", JOptionPane.ERROR_MESSAGE);							
					}
				}
				else if (event.getButton() == MouseEvent.BUTTON3) {
					selectedEMediumLabel = (EMediumLabel) event.getSource();
					JPopupMenu contextMenu = selectedEMediumLabel.getContextMenu(); 
					contextMenu.show (selectedEMediumLabel, event.getX(), event.getY());
				}
		      }
		};
	}