/*****************************************************************************
It is adviced to place the sIFR JavaScript calls in this file, keeping it
separate from the `sifr.js` file. That way, you can easily swap the `sifr.js`
file for a new version, while keeping the configuration.

You must load this file *after* loading `sifr.js`.

That said, you're of course free to merge the JavaScript files. Just make sure
the copyright statement in `sifr.js` is kept intact.
*****************************************************************************/




// Make an object pointing to the location of the Flash movie on your web server.
// Try using the font name as the variable name, makes it easy to remember which
// object you're using. As an example in this file, we'll use Futura.
// var futura = { src: '/path/to/futura.swf' };

var floris_bold = { src: '../../flash/sifr_fasett_floris_bold.swf' 
	,ratios: 	[12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
	,tuneHeight: -1
	 ,css: [
	'.sIFR-root { color: #333333; }'
	,'a { text-decoration: none; }'
	,'a:link { color: #333333; }'
	,'a:hover { color: #EE180D; }'	
	]
  ,wmode:'transparent'
};

//Husk å sjekke ratios!
var floris_regular = { src: '../../flash/sifr_fasett_floris_regular.swf' 
	,ratios: [12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
	,tuneHeight: -2
	 ,css: [
	'.sIFR-root { color: #333333; letter-spacing: 1; }'
	,'a { text-decoration: none; }'
	,'a:link { color: #333333; }'
	,'a:hover { color: #EE180D; }'	
	]
 // ,wmode:'transparent'
};

//Husk å sjekke ratios!
var floris_semibold = { src: '../../flash/sifr_fasett_floris_semibold.swf' 
	,ratios: [12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
	,tuneHeight: -2
	 ,css: [
	'.sIFR-root { color: #333333; letter-spacing: 1; }'
	,'a { text-decoration: none; }'
	,'a:link { color: #333333; }'
	,'a:hover { color: #EE180D; }'	
	]
  ,wmode:'transparent'
};

//Husk å sjekke ratios!
var floris_light = { src: '../../flash/sifr_fasett_floris_light.swf' 
	,ratios: [12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
	,tuneHeight: -2
	 ,css: [
	'.sIFR-root { color: #333333; letter-spacing: 1; }'
	,'a { text-decoration: none; }'
	,'a:link { color: #333333; }'
	,'a:hover { color: #EE180D; }'	
	]
  ,wmode:'transparent'
};

var floris_extrabold = { src: '../../flash/sifr_fasett_floris_extrabold.swf' 
	,ratios: [12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
	,tuneHeight: -2
	 ,css: [
	'.sIFR-root { color: #333333; letter-spacing: 1; }'
	,'a { text-decoration: none; }'
	,'a:link { color: #333333; }'
	,'a:hover { color: #EE180D; }'	
	]
  ,wmode:'transparent'
};

// Now you can set some configuration settings.
// See also <http://wiki.novemberborn.net/sifr3/JavaScript+Configuration>.
// One setting you probably want to use is `sIFR.useStyleCheck`. Before you do that,
// read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad>.

// sIFR.useStyleCheck = true;

// Next, activate sIFR:
var doSifr = true;
if (!doSifr) {
	// alert("no sifr here");
} else {
	sIFR.activate(floris_extrabold, floris_bold, floris_semibold, floris_regular, floris_light);

// If you want, you can use multiple movies, like so:
//
//    var futura = { src: '/path/to/futura.swf' };
//    var garamond = { src '/path/to/garamond.swf' };
//    var rockwell = { src: '/path/to/rockwell.swf' };
//    
//    sIFR.activate(futura, garamond, rockwell);
//
// Remember, there must be *only one* `sIFR.activate()`!

// Now we can do the replacements. You can do as many as you like, but just
// as an example, we'll replace all `<h1>` elements with the Futura movie.
// 
// The first argument to `sIFR.replace` is the `futura` object we created earlier.
// The second argument is another object, on which you can specify a number of
// parameters or "keyword arguemnts". For the full list, see "Keyword arguments"
// under `replace(kwargs, mergeKwargs)` at 
// <http://wiki.novemberborn.net/sifr3/JavaScript+Methods>.
// 
// The first argument you see here is `selector`, which is a normal CSS selector.
// That means you can also do things like '#content h1' or 'h1.title'.
//
// The second argument determines what the Flash text looks like. The main text
// is styled via the `.sIFR-root` class. Here we've specified `background-color`
// of the entire Flash movie to be a light grey, and the `color` of the text to
// be red. Read more about styling at <http://wiki.novemberborn.net/sifr3/Styling>.

// debug.ratios 
// replace

// ----------------------------

/*
//TOP MENU
sIFR.replace(floris_bold, {
  selector: 'body.blog #placeholder-top .horizontal-menu ul li.not-active'
  ,css: [
		'.sIFR-root { text-align: right; text-transform: uppercase; color: #333333; letter-spacing:2;}'
		,'a { text-decoration: none; }'
		,'a:link { color: #333333; }'
		,'a:hover { color: #FFFFFF; }'
		],
  ratios: [12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
  ,fitExactly:true
  ,tuneWidth: 6
});

sIFR.replace(floris_bold, {
  selector: 'body.blog #placeholder-top .horizontal-menu ul li.active'
  ,css: [
		'.sIFR-root { text-align: right; text-transform: uppercase; color: #FFFFFF;  background-color: #ee180D; letter-spacing:2;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #FFFFFF; }'
		,'a:hover { color: #FFFFFF; }'
		],
  ratios: [12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
    ,fitExactly:true
  ,tuneWidth: 6
});

sIFR.replace(floris_bold, {
  selector: 'body.blog #placeholder-top .horizontal-menu ul li.main-active'
  ,css: [
		'.sIFR-root { text-align: center; text-transform: uppercase; color: #FFFFFF;  background-color: #ee180D; letter-spacing:2;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #FFFFFF; }'
		,'a:hover { color: #FFFFFF; }'
		],
  ratios: [12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
    ,fitExactly:true
  ,tuneWidth: 6
});

*/

// top menu blog
sIFR.replace(floris_bold, {
  selector: '#placeholder-top .horizontal-blog-menu ul li.not-active'
  ,css: [
		'.sIFR-root { text-align: right; color: #333333; letter-spacing:2;}'
		,'a { text-decoration: none; }'
		,'a:link { color: #333333; }'
		,'a:hover { color: #ee180D; }'
		],
  ratios: [12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
  ,fitExactly:true
  ,tuneWidth: 6
});

sIFR.replace(floris_bold, {
  selector: '#placeholder-top .horizontal-blog-menu ul li.active'
  ,css: [
		'.sIFR-root { text-align: right; color: #FFFFFF;  background-color: #ee180D; letter-spacing:2;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #FFFFFF; }'
		,'a:hover { color: #ee180D; }'
		],
  ratios: [12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
    ,fitExactly:true
  ,tuneWidth: 6
});

sIFR.replace(floris_bold, {
  selector: '#placeholder-top .horizontal-blog-menu ul li.main-active'
  ,css: [
		'.sIFR-root { text-align: center; color: #FFFFFF;  background-color: #ee180D; letter-spacing:2;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #FFFFFF; }'
		,'a:hover { color: #ee180D; }'
		],
  ratios: [12, 0.96, 18, 1.04, 25, 1.08, 31, 1.1, 37, 1.11, 43, 1.12, 44, 1.13, 50, 1.12, 62, 1.13, 63, 1.14, 68, 1.13, 71, 1.14, 72, 1.13, 106, 1.14, 107, 1.15, 112, 1.14, 116, 1.15, 118, 1.14, 1.15]
    ,fitExactly:true
  ,tuneWidth: 6
});





// SPLIT ARTICLELIST
sIFR.replace(floris_bold, {
  selector: '.split-articlelist-twocolumn ul.large h3'
});

sIFR.replace(floris_bold, {
  selector: '.split-articlelist-twocolumn ul.medium h3'
});
 

sIFR.replace(floris_bold, {
  selector: '.split-articlelist-threecolumn ul h3'
});



// FULL-VIDEOARTCLEDISPLAY
sIFR.replace(floris_bold, {
  selector: '.full-videoarticledisplay h3'
    ,css: [
		'.sIFR-root { background-color: #ECEDED;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #333333; }'
		,'a:hover { color: #EE180D; }'
		]
});



//FULL ARTICLELIST
sIFR.replace(floris_bold, {
  selector: '.full-articlelist h2, .full-articlelist h3'
});

//Articlelist-search-result
/*
sIFR.replace(floris_bold, {
  selector: 'full-articlelist-search-result em.hit'
      ,css: [
		'.sIFR-root { color: #FF0000;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #FF0000; }'
		,'a:hover { color: #EE180D; }'
		]
});*/



// --------------------

// FULL ARTICLEDISPLAY 

// Blog
sIFR.replace(floris_bold, {
  selector: 'body.blog .full-articledisplay h1'
}); 
// Portfolio_2/news_2/about/contact)
sIFR.replace(floris_semibold, {
  selector: '.full-articledisplay h1'
    ,css: [
		'.sIFR-root {color:#333333;}'
		]
}); 
// lightbox
sIFR.replace(floris_semibold, {
  selector: '#lightbox .full-articledisplay h1'
}); 
// Left digest of articles and portfolio
sIFR.replace(floris_regular, {
  	selector: '.full-articledisplay .left .digest p'
      ,css: [
		'.sIFR-root { leading: 0;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #EE180D; }'
		,'a:hover { color: #B4B4B4; }'
		]

});


// SMALL ARTICLEDISPLAY

// Left digest of portfolio front <-- not in use?
sIFR.replace(floris_regular, {
  	selector: '#placeholder-left-narrow .small-articledisplay-nolayout .digest, #placeholder-left-narrow .small-articledisplay-nolayout .digest p'
	,css: {
		'.sIFR-root': { 'leading':0 }
	}
}); 

// placeholder-left-narrow
sIFR.replace(floris_semibold, {
  selector: '#placeholder-left-narrow .small-articledisplay-nolayout h3'
	,css: {
		'.sIFR-root': {'leading':-4,'color':'#333333'}
	}
});

sIFR.replace(floris_bold, {
  	selector: '#placeholder-right .small-articledisplay .tile-content h1'
  ,css: [
		'.sIFR-root { background-color: #ECEDED; color:#333333;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #333333; }'
		,'a:hover { color: #EE180D; }'
		]
}); 

// placeholder-righ (contact: above email form)
sIFR.replace(floris_extrabold, {
  	selector: '#placeholder-right .small-articledisplay.font .tile-heading h2, #placeholder-middle .small-articledisplay.font .tile-heading h2'
  ,css: [
		'.sIFR-root { background-color: #ECEDED; leading:2; color:#333333; }'
		,'a { text-decoration: none;}'
		,'a:link { color: #333333; }'
		,'a:hover { color: #EE180D; }'
		]
}); 

sIFR.replace(floris_regular, {
  	selector: '#placeholder-right .small-articledisplay.font .tile-content p'
  ,css: [
		'.sIFR-root { background-color: #ECEDED; leading:2;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #333333; }'
		,'a:hover { color: #EE180D; }'
		]
});


sIFR.replace(floris_bold, {
  	selector: '.small-articledisplay .tile-heading h2'
}); 
sIFR.replace(floris_bold, {
  	selector: '.small-articledisplay-nolayout .tile-heading h2'
}); 


// placeholder-middle (news: above email form)
sIFR.replace(floris_light, {
  selector: '#placeholder-middle .small-articledisplay.font .tile-content p'
	,css: {
		'.sIFR-root': { 'leading':2 }
	}
});


// placeholder-middle (news: above email form)
sIFR.replace(floris_extrabold, {
  selector: '.small-articledisplay.font .tile-heading h2'
	,css: {
		'.sIFR-root': { 'leading':2 }
	}
});


// BLOG ARTICLE LIST

sIFR.replace(floris_bold, {
  selector: '#placeholder-right-wide-frontpage .blog-articlelist.small h3'
  ,css: [
                'a { text-decoration: none;}'
		,'a:link { color: #333333; }'
		,'a:hover { color: #EE180D; }'
		]
});


sIFR.replace(floris_bold, {
  selector: 'body.blog .blog-articlelist h2'
  ,css: [
		'.sIFR-root { background-color: #FFFFFF;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #333333; }'
		,'a:hover { color: #EE180D; }'
		]
});



/* set grey bgr ! */
sIFR.replace(floris_bold, {
  selector: '#placeholder-middle .blog-articlelist.small h3'
  ,css: [
		'.sIFR-root { background-color: #ECEDED;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #333333; }'
		,'a:hover { color: #EE180D; }'
		]
});

// BANNER

sIFR.replace(floris_bold, {
  selector: '.narrow-banner h2'
});


// BLOG

sIFR.replace(floris_bold, {
  selector: 'body.blog .entitycomment h2'
});

sIFR.replace(floris_extrabold, {
  selector: 'body.blog ul.entitycommentlist h3'
    ,css: [
		'.sIFR-root { color:#333333; background-color: #FFFFFF;}'
		,'a { text-decoration: none;}'
		,'a:link { color: green; }'
		,'a:hover { color: #EE180D; }'
		]
});




sIFR.replace(floris_bold, {
  selector: 'body.blog #placeholder-right .vertical-menu h3, body.blog #placeholder-right .small-articledisplay h3'
    ,css: [
		'.sIFR-root { background-color: #ECEDED; color:#333333;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #333333; }'
		,'a:hover { color: #EE180D; }'
		]
});

sIFR.replace(floris_bold, {
  selector: 'body.blog .blogarchive-searchinput h3'
  ,css: [
		'.sIFR-root { color: #333333;}'
                ,'.sIFR-root { background-color: #ECEDED;}'
		,'a { text-decoration: none;}'
		,'a:link { color: #333333; }'
		,'a:hover { color: #EE180D; }'
		]
});


// NEWS ARCHIVE
sIFR.replace(floris_semibold, {
  selector: '.full-articlelist.news-archive h1'
}); 

// FasettSisteUtvalgte
sIFR.replace(floris_semibold, {
  selector: '.fasettSisteUtvalgte .article-container h2'
}); 

// FasettPortfolioCategoryMenu
sIFR.replace(floris_bold, {
  selector: '.fasettPortfolioCategoryMenu .category .header h2'
	    ,css: ['.sIFR-root { text-transform: uppercase; }'
		,'a { text-decoration: none; }'
		,'a:link { color: #333333; }'
		,'a:hover { color: #EE180D; }'
              ]
}); 

// Banner articles in small placeholders portfolio front page
sIFR.replace(floris_extrabold, {
  selector: '.placeholder-small .small-articledisplay h2, .placeholder-small .small-articledisplay-nolayout h2'
}); 

//Follow Fasett front page
sIFR.replace(floris_bold, {
  selector: '.fasettFollow span'
	  ,css: ['a { text-decoration: none;}'
	 		,'a:link { color: #333333; }'
	 		,'a:hover { color: #EE180D; }'
	 		]
	  ,fitExactly:true
	  ,tuneWidth: 5
}); 

//Follow Fasett newsletter front page
sIFR.replace(floris_bold, {
  selector: '#placeholder-right-narrow-frontpage .small-articledisplay .tile-heading'	  
});



} // end if (foo)
