Added gallery html5 support