Added document ready code as seen http://stackoverflow.com/questions/2194992/jquery-is-not-defined