/*
 * MyFonts Webfont Build ID 831009, 2011-06-06T13:10:21-0400
 * 
 * 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: TiredOfCourier Thin Italic
 * URL: http://new.myfonts.com/fonts/ingrimayne/tiredofcourier/tired-of-courier-thin-italic/
 * Foundry: Ingrimayne Type
 * Copyright: Copyright (c) 1992, 1994, 2010 by Robert Schenk. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 20,000/month
 * CSS font-family: TiredOfCourier-ThinItalic
 * CSS font-weight: normal
 * 
 * Webfont: TiredOfCourier Italic
 * URL: http://new.myfonts.com/fonts/ingrimayne/tiredofcourier/tired-of-courier-italic/
 * Foundry: Ingrimayne Type
 * Copyright: Copyright (c) 1992, 1994, 2010 by Robert Schenk. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 20,000/month
 * CSS font-family: TiredOfCourier-Italic
 * CSS font-weight: normal
 * 
 * Webfont: TiredOfCourier Bold Italic
 * URL: http://new.myfonts.com/fonts/ingrimayne/tiredofcourier/tired-of-courier-bold-italic/
 * Foundry: Ingrimayne Type
 * Copyright: Copyright (c) 1992, 1994, 2010 by Robert Schenk. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 20,000/month
 * CSS font-family: TiredOfCourier-BoldItalic
 * CSS font-weight: normal
 * 
 * Webfont: TiredOfCourier Thin
 * URL: http://new.myfonts.com/fonts/ingrimayne/tiredofcourier/tired-of-courier-thin/
 * Foundry: Ingrimayne Type
 * Copyright: Copyright (c) 1992, 1994, 2010 by Robert Schenk. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 20,000/month
 * CSS font-family: TiredOfCourier-Thin
 * CSS font-weight: normal
 * 
 * Webfont: TiredOfCourier Bold
 * URL: http://new.myfonts.com/fonts/ingrimayne/tiredofcourier/tired-of-courier-bold/
 * Foundry: Ingrimayne Type
 * Copyright: Copyright (c) 1992, 1994, 2010 by Robert Schenk. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 20,000/month
 * CSS font-family: TiredOfCourier-Bold
 * CSS font-weight: normal
 * 
 * Webfont: TiredOfCourier
 * URL: http://new.myfonts.com/fonts/ingrimayne/tiredofcourier/tired-of-courier/
 * Foundry: Ingrimayne Type
 * Copyright: Copyright (c) 1992, 1994, 2010 by Robert Schenk. All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 20,000/month
 * CSS font-family: TiredOfCourier-Regular
 * CSS font-weight: normal
 * 
 * (c) 2011 Bitstream Inc
*/



// 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/data-css
// android: data-css

var browserName, browserVersion, webfontType,  webfontTypeOverride;
 
if (typeof(customPath) == 'undefined')
	var customPath = false;


if (typeof(woffEnabled) == 'undefined')
	var woffEnabled = true;


if (/myfonts_test=on/.test(window.location.search))
	var myfonts_webfont_test = true;

else if (typeof(myfonts_webfont_test) == 'undefined')
	var myfonts_webfont_test = false;


if (customPath)
	var path = customPath;

else {
	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(/\/[^\/]*\/?$/, '');
}


if (myfonts_webfont_test)
	document.write('<script type="text/javascript" src="' +path+ '/TiredOfCourierWeb_test.js"></script>');


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).* OS (\d+)_(\d+).* AppleWebKit.*Safari/.test(navigator.userAgent))
{
		browserName = 'MobileSafari';
		browserVersion = new Number(RegExp.$2) + (new Number(RegExp.$3) / 10)

	if(browserVersion >= 4.2)
		webfontType = 'data-css';

	else
		webfontType = 'svg';
}
else if (/Mozilla.*(iPhone|iPad|BlackBerry).*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 >= 11.1 && woffEnabled)
			webfontType = 'woff';
		else if (browserVersion >= 10.1)
			webfontType = 'data-css';
	}
}


if (webfontTypeOverride)
	webfontType = webfontTypeOverride;

switch (webfontType)
{
		case 'eot':
		document.write("<style>\n");
				document.write("@font-face {font-family:\"TiredOfCourier-ThinItalic\";src:url(\"" + path + "/webfonts/eot/style_84603.eot\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Italic\";src:url(\"" + path + "/webfonts/eot/style_84602.eot\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-BoldItalic\";src:url(\"" + path + "/webfonts/eot/style_84600.eot\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Thin\";src:url(\"" + path + "/webfonts/eot/style_84604.eot\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Bold\";src:url(\"" + path + "/webfonts/eot/style_84601.eot\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Regular\";src:url(\"" + path + "/webfonts/eot/style_84605.eot\");}\n");
				document.write("</style>");
		break;
		
		case 'woff':
		document.write("<style>\n");
				document.write("@font-face {font-family:\"TiredOfCourier-ThinItalic\";src:url(\"" + path + "/webfonts/woff/style_84603.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Italic\";src:url(\"" + path + "/webfonts/woff/style_84602.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-BoldItalic\";src:url(\"" + path + "/webfonts/woff/style_84600.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Thin\";src:url(\"" + path + "/webfonts/woff/style_84604.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Bold\";src:url(\"" + path + "/webfonts/woff/style_84601.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Regular\";src:url(\"" + path + "/webfonts/woff/style_84605.woff\") format(\"woff\");}\n");
				document.write("</style>");
		break;
	
		case 'data-css':
		document.write("<style>\n");
				document.write("@font-face {font-family:\"TiredOfCourier-ThinItalic\";src:url(\"" + path + "/webfonts/ttf/style_84603.ttf\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Italic\";src:url(\"" + path + "/webfonts/ttf/style_84602.ttf\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-BoldItalic\";src:url(\"" + path + "/webfonts/ttf/style_84600.ttf\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Thin\";src:url(\"" + path + "/webfonts/ttf/style_84604.ttf\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Bold\";src:url(\"" + path + "/webfonts/ttf/style_84601.ttf\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Regular\";src:url(\"" + path + "/webfonts/ttf/style_84605.ttf\");}\n");
				document.write("</style>");
		break;
	
	

		case 'svg':
		document.write("<style>\n");
				document.write("@font-face {font-family:\"TiredOfCourier-ThinItalic\";src:url(\"" + path + "/webfonts/svg/style_84603.svg#TiredOfCourier-ThinItalic\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Italic\";src:url(\"" + path + "/webfonts/svg/style_84602.svg#TiredOfCourier-Italic\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-BoldItalic\";src:url(\"" + path + "/webfonts/svg/style_84600.svg#TiredOfCourier-BoldItalic\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Thin\";src:url(\"" + path + "/webfonts/svg/style_84604.svg#TiredOfCourier-Thin\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Bold\";src:url(\"" + path + "/webfonts/svg/style_84601.svg#TiredOfCourier-Bold\") format(\"svg\");}\n");
				document.write("@font-face {font-family:\"TiredOfCourier-Regular\";src:url(\"" + path + "/webfonts/svg/style_84605.svg#TiredOfCourier-Regular\") format(\"svg\");}\n");
				document.write("</style>");
		break;
		
	default:
		break;
}
