You are more likely to get help if you make a jsFiddle that others can try and modify.
It's unclear if you have any jQuery question - it seems like you are just asking others to debug or finish your program logic. The forum is more for help with jQuery in case you have some misunderstanding about how some jQuery function works, etc.
I see you have a list of URLs (currently, only two URLs). But you only ever use the first one.
You can use the Javascript Math.random() function to choose a random URL, and again to choose a random square. See especially "Getting a random integer between two values"
It will be useful to get a jQuery object with all of your squares:
var $containers = $('.container');
$containers.length will return the number of containers.
$containers.get(0) will return the first container's element. $containers.get(1) will return the second. Etc.