Add patch for CiviCRM 4.5 forms

Direct child selector was failing because of the way forms are written in 4.5. Removing the direct child selector fixed the issue. Also added condition to check for jQuery dialog forms as well.