The following gets the extension of the file:
JS:
$('#group_documents_file').change(function(){
var value = this.value;
val = value.split("\\");
var file = (val[val.length - 1]).split('.');
var ext = file[file.length - 1];
alert(ext);
})
Fiddle: http://jsfiddle.net/maniator/gveqX/