moved and merged code from WOWSlider into gallery page