$(function() {

    $("button").button();

    $(".viewButton").click(function() {
	$("#emailFrame").attr("src", "/email_attachments/view/"+$(this).attr("id"));
    });


    $(".downloadButton").click(function() {
	window.location.href = "/email_attachments/download/"+$(this).attr("id");
	//$("#emailFrame").attr("src", "/email_attachments/view/"+$(this).attr("id"));
    
    });

});