v2 api - browser javascript example

example by prem in https://groups.google.com/forum/#!topic/yelp-developer-support/5bDrWXWJsqY

just making it more findable.