minor: made the recently added container argument an attributes of the arg to loadData.
moved Array average to the bottom of the file (to keep globals at the top)
and removed the unused dir function.
variable names using camelCase
down to 8 jsLint warnings.

eval is evil warning - we could convert the ajax to a jquery call

7 instances of the "Don't make functions within a loop" warning. Those
will need to be considered case by case.