changed .on() to .bind() to support older versions of jquery