How to use the window object?

How to use the window object?

How can I use window objects? 

Let's say for example I do something like this:

  1. var window_tool = window.open('bla bla bla ');
  2. var images_one = window_tool.$("img").attr("src");
  3. alert(images_one);
In the example code above. How could I  alert the source of the image loaded in the 2nd window object?

I am talking about opening a window. Then trying to access the dom of that window to grab information from it.

The code above should just grab the images source url and then show it in the alert box.
I tried it just like that above...but  it's not working. I want to know what's the proper way after opening a window how to access it's dom and work with it from the parent window?