@SuppressWarnings("deprecation")
						public void run()
						{
							try
							{
								rl.lock();
							
								//if this was a remove operation, just remove the panel and return
								if(jt.getSelectedRow() == -1)
								{
									popIn.removeAll();
									popIn.setVisible(false);
									return;
								}
	
								//quit another paneling operation if one exists
								if(paneler != null)
									paneler.stop();
								paneler = this;
	
								//show the loading panel
								popIn.removeAll();
								popIn.add(new JLabel(new ImageIcon(this.getClass().getResource("loading spinner.gif")), SwingConstants.CENTER));
								popIn.setVisible(true);
								popIn.revalidate();
	
								//create the text section
								final Episode episode = episodes.get(jt.getSelectedRow());
								JTextArea jta = new JTextArea(episode.getText());
								jta.setEditable(false);
								jta.setLineWrap(true);
								jta.setWrapStyleWord(true);
	
								//create buttons
								JPanel buttonBox = new JPanel();
								buttonBox.setLayout(new GridBagLayout());
	
								//last watched button
								final JButton btnLastWatched = new JButton("Set as "+(episode.isWatched() ? "unwatched" : "watched"));
								btnLastWatched.addActionListener(new ActionListener()
								{
									public void actionPerformed(ActionEvent e)
									{
										new Thread()
										{
											public void run()
											{
												btnLastWatched.setEnabled(false);
												episodes.remove(jt.getSelectedRow());
												((DefaultTableModel)jt.getModel()).removeRow(jt.getSelectedRow());
												episode.setWatched(!episode.isWatched());
											}
										}.start();
									}
								});
								GridBagConstraints gbc_btnLastWatched = new GridBagConstraints();
								gbc_btnLastWatched.fill = GridBagConstraints.BOTH;
								gbc_btnLastWatched.gridy = 0;
								buttonBox.add(btnLastWatched, gbc_btnLastWatched);
	
								//download button
								final JButton btnDownload = new JButton("Download episode");
								btnDownload.addActionListener(new ActionListener()
								{
									public void actionPerformed(ActionEvent e)
									{
										new Thread()
										{
											public void run()
											{
												try
												{
													rl.lock();
													btnDownload.setEnabled(false);
													if(episode.download())
													{
														episodes.remove(jt.getSelectedRow());
														((DefaultTableModel)jt.getModel()).removeRow(jt.getSelectedRow());
														episode.setWatched(!episode.isWatched());
													}
													else
													{
														btnDownload.setText("Unavailable");
														if(!((String)jt.getValueAt(jt.getSelectedRow(), jt.getColumn("Date Aired").getModelIndex())).contains(" - unavailable"))
															jt.setValueAt(jt.getValueAt(jt.getSelectedRow(), jt.getColumn("Date Aired").getModelIndex())+" - unavailable", jt.getSelectedRow(), jt.getColumn("Date Aired").getModelIndex());
													}
												}
												finally
												{
													rl.unlock();
												}
											}
										}.start();
									}
								});
								if(((String)jt.getValueAt(jt.getSelectedRow(), jt.getColumn("Date Aired").getModelIndex())).contains(" - unavailable"))
								{
									btnDownload.setEnabled(false);
									btnDownload.setText("Unavailable");
								}
								GridBagConstraints gbc_btnDownload = new GridBagConstraints();
								gbc_btnDownload.fill = GridBagConstraints.BOTH;
								gbc_btnDownload.gridy = 1;
								buttonBox.add(btnDownload, gbc_btnDownload);
	
								//add the components
								popIn.removeAll();
								popIn.add(new JPanel()
								{
									private static final long serialVersionUID = 1L;
									private ImageIcon image = episode.getImage();
									protected void paintComponent(Graphics g) {
										super.paintComponent(g);
										if(image.getImage() != null)
										{
											int destinationWidth = getWidth(),
													destinationHeight = (int)(image.getIconHeight()/((double)image.getIconWidth()/(double)destinationWidth));
	
											setPreferredSize(new Dimension(destinationWidth, destinationHeight));
											g.drawImage(getScaledInstance(image, destinationWidth, destinationHeight), 0, 0, null);
											g.dispose();
											popIn.revalidate();
										}
										else
											setVisible(false);
									}
								}, BorderLayout.PAGE_START);
								popIn.add(new JScrollPane(jta), BorderLayout.CENTER);
								popIn.add(buttonBox, BorderLayout.PAGE_END);
	
								//revalidate to redraw/realign the panel
								popIn.revalidate();
							}
							finally
							{
								rl.unlock();
							}
						}