fixed blueimp gallery and javascript stuff