/*
 * MyFonts Webfont Build ID 859997, 2011-07-16T12:13:11-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: Zurich Bold Italic
 * URL: http://new.myfonts.com/fonts/bitstream/zurich/bold-italic/
 * Foundry: Bitstream
 * Copyright: Copyright 1990-2005 Bitstream Inc.  All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 1,000,000/month
 * CSS font-family: ZurichBTWGL4-BoldItalic
 * CSS font-weight: normal
 * 
 * Webfont: Zurich
 * URL: http://new.myfonts.com/fonts/bitstream/zurich/zurich/
 * Foundry: Bitstream
 * Copyright: Copyright 1990-2005 Bitstream Inc.  All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 1,000,000/month
 * CSS font-family: ZurichBTWGL4-Roman
 * CSS font-weight: normal
 * 
 * Webfont: Zurich Bold
 * URL: http://new.myfonts.com/fonts/bitstream/zurich/bold/
 * Foundry: Bitstream
 * Copyright: Copyright 1990-2005 Bitstream Inc.  All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 1,000,000/month
 * CSS font-family: ZurichBTWGL4-Bold
 * CSS font-weight: normal
 * 
 * Webfont: Zurich Italic
 * URL: http://new.myfonts.com/fonts/bitstream/zurich/italic/
 * Foundry: Bitstream
 * Copyright: Copyright 1990-2005 Bitstream Inc.  All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 1,000,000/month
 * CSS font-family: ZurichBTWGL4-Italic
 * CSS font-weight: normal
 * 
 * Webfont: Zurich Black
 * URL: http://new.myfonts.com/fonts/bitstream/zurich/black/
 * Foundry: Bitstream
 * Copyright: Copyright 1990-2005 Bitstream Inc.  All rights reserved.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 1,000,000/month
 * CSS font-family: ZurichBTWGL4-Black
 * CSS font-weight: normal
 * 
 * (c) 2011 Bitstream Inc
*/



// safari 3.1: data-css
// safari 5.1: woff
// 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+ '/Zurich_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 >= 5.1)
			webfontType = 'woff';
		else 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:\"Zurich\";src:url(\"" + path + "/webfonts/eot/style_85.eot\");font-weight:bold;font-style:italic;}\n");
				document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/eot/style_82.eot\");font-weight:normal;font-style:normal;}\n");
				document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/eot/style_84.eot\");font-weight:bold;font-style:normal;}\n");
				//document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/eot/style_83.eot\");font-weight:normal;font-style:italic;}\n");
				//document.write("@font-face {font-family:\"Zurich Black\";src:url(\"" + path + "/webfonts/eot/style_86.eot\");}\n");
				document.write("</style>");
		break;
		
		case 'woff':
		document.write("<style>\n");
				//document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/woff/style_85.woff\") format(\"woff\");font-weight:bold;font-style:italic;}\n");
				document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/woff/style_82.woff\") format(\"woff\");font-weight:normal;font-style:normal;}\n");
				document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/woff/style_84.woff\") format(\"woff\");font-weight:bold;font-style:normal;}\n");
				//document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/woff/style_83.woff\") format(\"woff\");font-weight:normal;font-style:italic;}\n");
				//document.write("@font-face {font-family:\"Zurich Black\";src:url(\"" + path + "/webfonts/woff/style_86.woff\") format(\"woff\");}\n");
				document.write("</style>");
		break;
	
		case 'data-css':
		document.write("<style>\n");
				//document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/ttf/style_85.ttf\");font-weight:bold;font-style:italic;}\n");
				document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/ttf/style_82.ttf\");font-weight:normal;font-style:normal;}\n");
				document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/ttf/style_84.ttf\");font-weight:bold;font-style:normal;}\n");
				//document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/ttf/style_83.ttf\");font-weight:normal;font-style:italic;}\n");
				//document.write("@font-face {font-family:\"Zurich Black\";src:url(\"" + path + "/webfonts/ttf/style_86.ttf\");}\n");
				document.write("</style>");
		break;
			

		case 'svg':
		document.write("<style>\n");
				//document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/svg/style_85.svg#ZurichBTWGL4-BoldItalic\") format(\"svg\");font-weight:bold;font-style:italic;}\n");
				document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/svg/style_82.svg#ZurichBTWGL4-Roman\") format(\"svg\");font-weight:normal;font-style:normal;}\n");
				document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/svg/style_84.svg#ZurichBTWGL4-Bold\") format(\"svg\");font-weight:bold;font-style:normal;}\n");
				//document.write("@font-face {font-family:\"Zurich\";src:url(\"" + path + "/webfonts/svg/style_83.svg#ZurichBTWGL4-Italic\") format(\"svg\");font-weight:normal;font-style:italic;}\n");
				//document.write("@font-face {font-family:\"Zurich Black\";src:url(\"" + path + "/webfonts/svg/style_86.svg#ZurichBTWGL4-Black\") format(\"svg\");}\n");
				document.write("</style>");
		break;
		
	default:
		break;
}
