I recently updated to wordpress 3.5 and the add media button as well as the visual/text buttons stopped working when editing a page. Here is how to fix it.
Download your wp-config.php file through ftp and add the line:
Just before the lines:
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
and that should fix the problem until its properly fixed in wordpress.