var msie = $.browser.msie;
var msie6 = $.browser.msie && parseInt($.browser.version) < 7;

var calibri = { src: '/swf/calibri3.swf' };
var kozuka = { src: '/swf/kozuka5.swf' };

applySifr = function() {
	sIFR.activate(calibri, kozuka);

	if (msie6)
	{
		sIFR.replace(calibri, {
			  selector: '#top-menu li',
			  wmode: 'transparent',
			  sLinkColor: '#474a4d',
			  sHoverColor: '#133450',
			  forceSingleLine: false,
			  antiAliasType: 'normal',
			  css: [
		    	'.sIFR-root {  font-size: 14px; marginLeft: 3; }',
		   		'a { color: #474a4d; font-weight: bold; text-decoration: none; }',
		   		'a:hover { color: #dd0870; }'
			  ]
			});
	}

	sIFR.replace(calibri, {
	  selector: 'div.section h2',
	  wmode: 'transparent',
	  sLinkColor: '#ffffff',
	  sHoverColor: '#133450',
	  forceSingleLine: false,
	  forcedWidth: 210,
	  antiAliasType: 'normal',
	  css: [
    	'.sIFR-root {  font-size: 16px; marginLeft: 3; }',
   		'a { color: #ffffff; font-weight: bold; text-decoration: none; }',
   		'a:hover { color: #fbfc95; }'
	  ],
	  filters: {
		GlowFilter: {
			color: '#133450',
			strength: 1,distance: 1
		}
	  }
	});


	sIFR.replace(calibri, {
		  selector: 'div.section p',
		  wmode: 'transparent',
		  fixHover: true,
		  forceSingleLine: false,
		  knockout: false,
		  antiAliasType: 'normal',
		  css: [
		       '.sIFR-root { font-size: 12px; color: #ffffff; font-weight: bold; margin-left: 3px; }'
		  ],
		 filters: {
			GlowFilter: {
				color: '#133450',
				strength: 1,distance: 1
			}
		  }
	});

	sIFR.replace(kozuka, {
		  selector: '#subpage #header-intro h2',
		  wmode: 'transparent',
		  fixHover: true,
		  forceSingleLine: false,
		  knockout: false,
		  antiAliasType: 'normal',
		  css: [
		       '.sIFR-root {  display: block; margin-left: 3px; font-size: 20px; color: #474a4d; font-weight: normal; }'
		  ],
		 filters: {
			GlowFilter: {
				color: '#f3f2f2',
				strength: 1,distance: 1
			}
		 }
	});

	sIFR.replace(calibri, {
		  selector: '#subpage #header-intro p',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forceWidth: true,
		  repaintOnResize: true,
		  forcedWidth: 370,
		  css: [
		     '.sIFR-root { margin-left: 3px; display: block; font-size: 13px; color: #474a4d; font-weight: normal; leading: 5; kerning: true; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#news-list h3',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  css: [
		     '.sIFR-root { margin-left: 3; display: block; font-size: 20px; color: #0d385c; font-weight: normal; leading: 5; kerning: true; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#news-content h2',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  fitExactly: true,
		  forcedWidth: 450,
		  css: [
		     '.sIFR-root { font-size: 17px; color: #474a4d; font-weight: normal; leading: -2; }',
		     'em { font-style: normal; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#news-clients h3',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  css: [
		     '.sIFR-root { font-size: 17px; color: #01324f; font-weight: normal; leading: -2; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#offer-left p.first',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forcedWidth: 350,
		  css: [
		     '.sIFR-root { font-size: 17px; color: #01324f; font-weight: normal; leading: -2; }',
		     'strong { font-weight: bold; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#offer-right h3 a',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  css: [
		     '.sIFR-root { font-size: 15px; color: #01324f; font-weight: bold; text-decoration: none; cursor: pointer;  }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#offer-right h4',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  css: [
		     '.sIFR-root { font-size: 14px; color: #01324f; font-weight: normal; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#document-intro p.first',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forcedWidth: 300,
		  css: [
		     '.sIFR-root { font-size: 17px; color: #01324f; font-weight: normal; leading: -2; }',
		     'strong { font-weight: bold; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#document-main-content h2',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forcedWidth: 500,
		  css: [
		     '.sIFR-root { font-size: 20px; color: #474a4d; font-weight: normal; leading: -2; }',
		     'strong { font-weight: bold; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: 'div.folio-description h2',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forcedWidth: 180,
		  forceSingleLine: true,
		  css: [
		     '.sIFR-root { font-size: 15px; color: #193a55; font-weight: normal; leading: -2; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#folio-intro p.first',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forcedWidth: 190,
		  css: [
		     '.sIFR-root { font-size: 16px; color: #193a55; font-weight: normal; leading: -2; margin: 0; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#folio-intro h3, #folio-intro h4, #folio-intro h5, #folio-intro h6',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forcedWidth: 190,
		  css: [
		     '.sIFR-root { font-size: 14px; color: #193a55; font-weight: normal; leading: -2; margin: 0; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#folio h2.title',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  css: [
		     '.sIFR-root { font-size: 20px; color: #288bc6; font-weight: normal; leading: -2; margin: 0; }',
		     'strong { color: #193a55; font-weight: normal; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#document-content h2',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forcedWidth: 500,
		  css: [
		     '.sIFR-root { font-size: 20px; color: #193a55; font-weight: normal; leading: -2; }',
		     'strong { font-weight: bold; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#document-content address strong',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forcedWidth: 150,
		  css: [
		     '.sIFR-root { font-size: 16px; color: #474a4d; font-weight: normal; leading: -2; }'
		  ]
	});
	sIFR.replace(calibri, {
		  selector: 'ul.map a.main',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forcedWidth: 150,
		  css: [
		     '.sIFR-root { margin-left: 4; font-size: 14px; color: #193a55; font-weight: normal;; }',
		     'strong { font-weight: bold; }'
		  ]
	});

	sIFR.replace(calibri, {
		  selector: '#contact-header',
		  wmode: 'transparent',
		  antiAliasType: 'normal',
		  forcedWidth: 150,
		  css: [
		     '.sIFR-root { margin-left: 30px; leading: 0; font-size: 17px; color: #474a4d; font-weight: normal; }',
		  ]
	});
}

applySifr();