$(document).ready(function () {
	 
	 $("#couponLink").hide();
	 
	 $("#sublinks a").click(function() {
		  // Show the text link.
		  $("#couponLink").show();

		  // Change the "src" attribute of the image tag to be the same as the PDF file
		  // but with .pdf changed to .jpg.
		  $("#couponImage").attr('src', this.href.replace(".pdf", ".jpg"));

		  // Set the target of our link below the picture equal to the target of the link we just clicked.  
		  $("#couponLink").attr('href', this.href);
		  
		  // Returning false makes the link not actually go off.
		  return false;
	 });
});
