added cookies for sort and fixed the show option