Added a check for document.getElementsByClassName for less capable browsers
Updated minified version.