// requires "jquery.js"

$(function(){
	var de = document.documentElement;
	var cw = window.innerWidth || self.innerWidth || (de && de.clientWidth) || document.body.clientWidth;
	var ch = window.innerHeight || self.innerHeight || (de && de.clientHeight) || document.body.clientHeight;
	var th = 60;
	var dw = 520;
	var dh = 520;
	var w = (cw && (cw < dh ? cw : dh)) || dh;
	var h = (ch && (ch < dh ? ch : dh)) || dh;
	$("a.link_to_features").each(function(){
		$(this).attr("href", $(this).attr("href") + "?TB_iframe=true&height=" + (h - th) + "&width=" + w);
	});
})

