fixing several theme problems and adding support to gallery
adding media gallery javascript (on page-media file)