fixed spacing from github
made compatiable with jQuery 1.8+