// Make sure that each of the parent elements // has a nested IMG tag. We don't want elements // that lack the image. Once we get those, then // loop over them to initialize functionality. return this.filter( ":has( img )" ).each( .. );