/*
Usage: add rel="external" to any link you want opened in a new window.
*/


function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") &&
		anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}
window.onload = externalLinks;

/*


use namespacing

body.class = targetblank-force <- enable by default
body.class = targetblank-force-http
body.class = targetblank-force-https
body.class = targetblank-

div.class = targetblank <- insert a checkbox into page with label open external links in new window

save setting in cookie

*/
