       ]
       sound   : ["aac","au","gsm","mid","midi","snd","wav","3g2","mp3","asx","asf"]
       app     : ["kdapp"]
-      
+
 
     for own type,set of _extension_sets
       for ext in set


  getYearOptions  : (min = 1900,max = Date::getFullYear())->
    ({ title : "#{i}", value : i} for i in [min..max])
  
  getFileExtension: (path) ->
    fileName = path or ''
    [name, extension...]  = fileName.split '.'
    extension = if extension.length is 0 then '' else extension[extension.length-1]
    
  getFileType: (extension)->

    fileType = "unknown"

      # prefer to end the teaser at the end of a sentence (a period).
      # failing that prefer to end the teaser at the end of a word (a space).
      candidate = tryToShorten(longText, '.') or tryToShorten longText, ' ', '...'

      if candidate?.length > minLength
        candidate
      else
