optimize thumbnail navigation