added sorting in favs and other occurences of for-each iteration;
fixed a bug in gallery ajax request;
fixed the favorites bug;
Merge branch 'master' of github.com:gormed/scribbit