Changing to use end tags for gallery-row

fixed "displayed once" bug in chrome and firefox
Unselect all gallery-rows when selecting another image
Added footer top margin
Nested another call to timeout (fixes image load error)