I found two mistakes in your code first one is
$('#img_container').backstretch(...)
instead of this using like this what you doing is $($('#img_container')).backstretch(..)
and second one is
for (var i = 0; i <len; i++) {
src[i] = $(#img_container).eq(i).attr('lst_img['+i+']');
}
apart from this i am not sure about your code... just try this