Fix closure bug. Replace "jQuery.inArray" with native javascript.
Use location.hostname (not location.host) instead of hardcode.