Removed view animal json request out of php

Moved the request for animal data on the View Animal page from the main PHP file into the Javascript file. This allowed me to remove the global variable "detail" from having to be echo'd in <script> tags in the header.