added type="text/javascript" to the script tag.