First peice of code based on wintersmith and a JavaScript from SO. Closes #3