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();

// hide features on store pages until they are clicked
function hideFeatures() {
	if (!document.getElementsByTagName) return;
	var elms = document.getElementsByTagName("div");
	for (var i=0; i<elms.length; i++) {
		var elm = elms[i];
		if (elm.className == "product_features") {
			elm.className = 'product_features_hidden';
			elm.onclick = clickFeatures;
		}
	}
}
// this function must be called at the end of every store page

function clickFeatures() {
	this.className = 'product_features';
	this.onclick = hideMe;
}
function hideMe() {
	this.className = 'product_features_hidden';
	this.onclick = clickFeatures;
}

