/*
 * MyFonts Webfont Build ID 226508, 2010-12-29T12:54:53-0500
 * 
 * The fonts listed in this notice are subject to the End User License
 * Agreement(s) entered into by the website owner. All other parties are 
 * explicitly restricted from using the Licensed Webfonts(s).
 * 
 * You may obtain a valid license at the urls below.
 * 
 * Webfont: Carnova
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/regular/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: Carnova
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Oblique
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/oblique/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaOblique
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Semi Bold
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/semi-bold/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaSemiBold
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Semi Bold Oblique
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/semi-bold-oblique/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaSemiBoldOblique
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Narrow
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/narrow/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaNarrow
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Narrow Oblique
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/narrow-oblique/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaNarrowOblique
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Semi Bold Narrow
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/semi-bold-narrow/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaSemiBoldNarrow
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Semi Bld Narrow Obl
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/semi-bld-narrow-obl/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaSemiBldNarrowObl
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Wide
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/wide/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaWide
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Wide Oblique
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/wide-oblique/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaWideOblique
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Semi Bold Wide
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/semi-bold-wide/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaSemiBoldWide
 * CSS font-weight: normal
 * 
 * Webfont: Carnova Semi Bold Wide Obl
 * Url: http://new.myfonts.com/fonts/typotheticals/carnova/semi-bold-wide-obl/
 * Foundry: Typotheticals
 * Copyright: Copyright (c) Typotheticals, 2005. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CarnovaSemiBoldWideObl
 * CSS font-weight: normal
 * 
 * (c) 2010 Bitstream, Inc
*/



// change this to false if you're having trouble with WOFFs
var woffEnabled = true;
// uncomment this and set it to the path of your webfont directory
//var customPath = "/themes/fonts"; 

var scripts = document.getElementsByTagName("SCRIPT");
var script = scripts[scripts.length-1].src;

if (!script.match("://") && script.charAt(0) != '/')
	script = "./"+script;

var path = script.replace(/\\/g,'/').replace(/\/[^\/]*\/?$/, '');

// safari 3.1: data-css
// firefox 3.6+: woff
// firefox 3.5+: data-css
// chrome 4+: data-css
// chrome 6+: woff
// IE 5+: eot
// IE 9: woff
// opera 10.1+: data-css
// mobile safari: svg



var browserName, browserVersion, webfontType;

var webfontTypeOverride;

if (/webfont=(woff|ttf|eot)/.test(window.location.search))
{
	webfontTypeOverride = RegExp.$1;

	if (webfontTypeOverride == 'ttf')
		webfontTypeOverride = 'data-css';
}

if (/MSIE (\d+\.\d+)/.test(navigator.userAgent))
{
	browserName = 'MSIE';
	browserVersion = new Number(RegExp.$1);
	if (browserVersion >= 9.0 && woffEnabled)
		webfontType = 'woff';
	else if (browserVersion >= 5.0)
		webfontType = 'eot';
}

else if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent))
{
	browserName = 'Firefox';
	browserVersion = new Number(RegExp.$1);
	if (browserVersion >= 3.6 && woffEnabled)
		webfontType = 'woff';
	else if (browserVersion >= 3.5)
		webfontType = 'data-css';
}

else if (/Chrome\/(\d+\.\d+)/.test(navigator.userAgent)) // must check before safari
{
	browserName = 'Chrome';
	browserVersion = new Number(RegExp.$1);

	if (browserVersion >= 6.0 && woffEnabled)
		webfontType = 'woff';

	else if (browserVersion >= 4.0)
		webfontType = 'data-css';
}

else if (/Mozilla.*(iPhone|iPad).*AppleWebKit.*Safari/.test(navigator.userAgent))
{
	browserName = 'MobileSafari';
	webfontType = 'svg';
}

else if (/Safari\/(\d+\.\d+)/.test(navigator.userAgent))
{
	browserName = 'Safari';
	if (/Version\/(\d+\.\d+)/.test(navigator.userAgent))
	{
		browserVersion = new Number(RegExp.$1);
		if (browserVersion >= 3.1)
			webfontType = 'data-css';
	}
}

else if (/Opera\/(\d+\.\d+)/.test(navigator.userAgent))
{
	browserName = 'Opera';
	if (/Version\/(\d+\.\d+)/.test(navigator.userAgent))
	{
		browserVersion = new Number(RegExp.$1);
		if (browserVersion >= 10.1)
			webfontType = 'data-css';
	}
}

if (!webfontType)
{
	// use flash?
}

if (webfontTypeOverride)
	webfontType = webfontTypeOverride;

switch (webfontType)
{
		case 'eot':
		document.write("<style>\n");
				document.write("@font-face {font-family:\"Carnova\";src:url(\"" + path + "/webfonts/eot/style_126170.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaOblique\";src:url(\"" + path + "/webfonts/eot/style_126166.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBold\";src:url(\"" + path + "/webfonts/eot/style_126171.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldOblique\";src:url(\"" + path + "/webfonts/eot/style_126165.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaNarrow\";src:url(\"" + path + "/webfonts/eot/style_126167.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaNarrowOblique\";src:url(\"" + path + "/webfonts/eot/style_126174.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldNarrow\";src:url(\"" + path + "/webfonts/eot/style_126169.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBldNarrowObl\";src:url(\"" + path + "/webfonts/eot/style_126168.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaWide\";src:url(\"" + path + "/webfonts/eot/style_126175.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaWideOblique\";src:url(\"" + path + "/webfonts/eot/style_126173.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldWide\";src:url(\"" + path + "/webfonts/eot/style_126176.eot\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldWideObl\";src:url(\"" + path + "/webfonts/eot/style_126172.eot\");}\n");
				document.write("</style>");
		break;
		
		case 'woff':
		document.write("<style>\n");
				document.write("@font-face {font-family:\"Carnova\";src:url(\"" + path + "/webfonts/woff/style_126170.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaOblique\";src:url(\"" + path + "/webfonts/woff/style_126166.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBold\";src:url(\"" + path + "/webfonts/woff/style_126171.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldOblique\";src:url(\"" + path + "/webfonts/woff/style_126165.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaNarrow\";src:url(\"" + path + "/webfonts/woff/style_126167.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaNarrowOblique\";src:url(\"" + path + "/webfonts/woff/style_126174.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldNarrow\";src:url(\"" + path + "/webfonts/woff/style_126169.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBldNarrowObl\";src:url(\"" + path + "/webfonts/woff/style_126168.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaWide\";src:url(\"" + path + "/webfonts/woff/style_126175.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaWideOblique\";src:url(\"" + path + "/webfonts/woff/style_126173.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldWide\";src:url(\"" + path + "/webfonts/woff/style_126176.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldWideObl\";src:url(\"" + path + "/webfonts/woff/style_126172.woff\") format(\"woff\");}\n");
				document.write("</style>");
		break;
	
		case 'data-css':
		document.write("<link rel='stylesheet' type='text/css' href='" + path + "/webfonts/datacss/MyFonts Webfonts Order M2626480.css'>");
		break;
	
		case 'svg':
		document.write("<style>\n");
				document.write("@font-face {font-family:\"Carnova\";src:url(\"" + path + "/webfonts/svg/style_126170.svg#Carnova\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaOblique\";src:url(\"" + path + "/webfonts/svg/style_126166.svg#CarnovaOblique\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBold\";src:url(\"" + path + "/webfonts/svg/style_126171.svg#CarnovaSemiBold\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldOblique\";src:url(\"" + path + "/webfonts/svg/style_126165.svg#CarnovaSemiBoldOblique\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaNarrow\";src:url(\"" + path + "/webfonts/svg/style_126167.svg#CarnovaNarrow\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaNarrowOblique\";src:url(\"" + path + "/webfonts/svg/style_126174.svg#CarnovaNarrowOblique\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldNarrow\";src:url(\"" + path + "/webfonts/svg/style_126169.svg#CarnovaSemiBoldNarrow\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBldNarrowObl\";src:url(\"" + path + "/webfonts/svg/style_126168.svg#CarnovaSemiBldNarrowObl\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaWide\";src:url(\"" + path + "/webfonts/svg/style_126175.svg#CarnovaWide\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaWideOblique\";src:url(\"" + path + "/webfonts/svg/style_126173.svg#CarnovaWideOblique\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldWide\";src:url(\"" + path + "/webfonts/svg/style_126176.svg#CarnovaSemiBoldWide\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"CarnovaSemiBoldWideObl\";src:url(\"" + path + "/webfonts/svg/style_126172.svg#CarnovaSemiBoldWideObl\") format(\"svg\");}\n");
				document.write("</style>");
		break;
		
	default:
		webfontType = 'default';
		break;
}

//document.write(browserName + ' ' + browserVersion + ': ' + webfontType + ' [' + navigator.userAgent + ']');
