Adds javascript and and carpets to gallery