Example gist by Paul Irish:
https://gist.github.com/paulirish/3098860