Changed gallery html tags to figure and figcaption. Updated gallery design to support WP 3.9.