Added js file

JavaScript function with basic functionality added. Requires jQuery (not included)