parseSelector.pseudoClasses = {
	"not": function(nodes, selector) {
		var result = [];
		each: for(var i = 0, node; i < nodes.length; i++) {
			node = nodes[i];
			var ignore = parseSelector(selector, node.parentNode);
			for(var j = 0; j < ignore.length; j++) {
				if(ignore[j] == node) continue each;
			}
			result.push(node);
		}
		return result;
	}
}

var bellGothic = {
	src: "/swf/bell-gothic-light.swf"
	,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
}

var sabon = {
	src: "/swf/sabon-italic.swf"
	,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
}

sIFR.useDomLoaded = false;
sIFR.activate();

sIFR.replace(bellGothic, {
	selector: "div#breadcrumb p"
	,css: [
		".sIFR-root { color: #666666; text-transform: uppercase; }"
		,"a { color: #666666; text-decoration: none; }"
		,"a:hover { color: #666666; text-decoration: underline; }"
	]
	,tuneHeight: -3
	,offsetTop: 2
	,wmode: "transparent"
});

/* Teman */

sIFR.replace(sabon, {
	selector: "body#tidningen div#content h1, div#intro h3"
	,css: [
		".sIFR-root { color: #df2000; }"
	]
	,tuneHeight: -4
	,wmode: "transparent"
});

sIFR.replace(sabon, {
	selector: "body#litteratur div#content h1, div#litteratur-utbildning h3"
	,css: [
		".sIFR-root { color: #ffe534; }"
	]
	,tuneHeight: -4
	,wmode: "transparent"
});

sIFR.replace(sabon, {
	selector: "body#teknik div#content h1, div#teknik-miljo h3"
	,css: [
		".sIFR-root { color: #a9e855; }"
	]
	,tuneHeight: -4
	,wmode: "transparent"
});

sIFR.replace(sabon, {
	selector: "body#lankar div#content h1, div#lankar h3"
	,css: [
		".sIFR-root { color: #7292ff; }"
	]
	,tuneHeight: -4
	,wmode: "transparent"
});

sIFR.replace(sabon, {
	selector: "body#kontakt div#content h1, div#kontakt h3"
	,css: [
		".sIFR-root { color: #af0368; }"
	]
	,tuneHeight: -4
	,wmode: "transparent"
});

/* Allmänt */

sIFR.replace(sabon, {
	selector: "div#content h1, div.cols-a div.col-2 h3, div.cols-a div.col-1 h3, div.article-list h3"
	,css: [
		".sIFR-root { color: #ffffff; }"
		,"a { color: #909090; text-decoration: none }"
		,"a:hover { color: #909090; text-decoration: underline }"
	]
	,tuneHeight: -4
	,wmode: "transparent"
});