     
     document.getElementById('album-download').addEventListener('click', (e) ->
         e.preventDefault()
+        e.target.classList.add('hidden')
         downloadAlbum()
     , false)
 , false)
 
+zipComplete = false
 downloadAlbum = () ->
     API.zipAlbum(window.filename, (result) ->
         if result.error?

            downloadFinishedZip()
        else if result.status == 'success'
            showDownloadModal()
            window.setTimeout(pollZip, 1000)
        else
            alert('An error occured with your request.')

    iframe.src = "/download/#{window.filename}.zip"
    iframe.className = 'hidden'
    document.body.appendChild(iframe)
    zipComplete = true

pollZip = () ->
    API.zipAlbum(window.filename, (result) ->
