Add gallery init fn
by @AliMD
Try to fix some bugs by @AliMD
Merge commit '2823f92eace4b687736d96215de0fe5e159a62fe'

Conflicts:
	script/script.js