bugfix: js prototype function last() for array does not exists in jquery, using now simple js-array-ops