Update jQuery.fileinput.js

Separated not valid code into it's own function reduce duplication of code.
JS Linted