$(function (){
	
	// if this script is included on the "home" page, abort --  the window is opened at the size we want
	if( $('body#home').length ) { 
		return false;		
	}
	
	// resize the popup to fit the contents or the screen, whichever is greater
	var content = $(document).height(), 
	    scr = window.screen.availHeight,
		 h = (content + 50 > scr) ? scr : content; // +50 == add a little breathing room
	self.resizeTo(960,h);

	// when links that target "_top" are clicked, redirect to the opener
	$('a[target=_top]').bind('click', function(){
		window.opener.location.href = $(this).attr('href');
		window.opener.focus();
		return false;
	});

});
