new OSX tricks, js loop and a calendar PHP class