Douglas Crockford, of JSLint, would have you create it this way ("Use the array literal notation []"):
var photos = [];
Now remember that you want to create multi-dimensional arrays, which means an array inside an array. This means you need to create the inner-arrays:
$("#photos img").each(function(i) {
photos[a] = []
//continue