/*
 * MyFonts Webfont Build ID 115925, 2010-10-16T15:32:33-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: Coolvetica
 * Url: http://new.myfonts.com/fonts/larabie/coolvetica/coolvetica/
 * Foundry: Larabie
 * Copyright: (c) 1999-2009 Ray Larabie. See attached license agreement for more information. If EULA is missing, visit www.larabiefonts.com for an updated version of this font. Languages by Chikako Larabie
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: CoolveticaRg-Regular
 * CSS font-weight: normal
 * 
 * Webfont: Junegull
 * Url: http://new.myfonts.com/fonts/larabie/junegull/junegull/
 * Foundry: Larabie
 * Copyright: (c) 2002 Ray Larabie. See attached license agreement for more information. If EULA is missing, visit www.larabiefonts.com for an updated version of this font.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: Junegull-Regular
 * CSS font-weight: normal
 * 
 * Webfont: Kenyan Coffee
 * Url: http://new.myfonts.com/fonts/larabie/kenyan-coffee/kenyan-coffee/
 * Foundry: Larabie
 * Copyright: (c) 1999 Ray Larabie. See attached license agreement for more information. If EULA is missing, visit www.larabiefonts.com for an updated version of this font.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: KenyanCoffee-Regular
 * CSS font-weight: normal
 * 
 * Webfont: Kenyan Coffee Bold
 * Url: http://new.myfonts.com/fonts/larabie/kenyan-coffee/bold/
 * Foundry: Larabie
 * Copyright: (c) 1999 Ray Larabie. See attached license agreement for more information. If EULA is missing, visit www.larabiefonts.com for an updated version of this font.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: KenyanCoffee-Bold
 * CSS font-weight: normal
 * 
 * Webfont: Kenyan Coffee Bold Italic
 * Url: http://new.myfonts.com/fonts/larabie/kenyan-coffee/bold-italic/
 * Foundry: Larabie
 * Copyright: (c) 1999 Ray Larabie. See attached license agreement for more information. If EULA is missing, visit www.larabiefonts.com for an updated version of this font.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: KenyanCoffee-BoldItalic
 * CSS font-weight: normal
 * 
 * Webfont: Kenyan Coffee Italic
 * Url: http://new.myfonts.com/fonts/larabie/kenyan-coffee/italic/
 * Foundry: Larabie
 * Copyright: (c) 1999 Ray Larabie. See attached license agreement for more information. If EULA is missing, visit www.larabiefonts.com for an updated version of this font.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: KenyanCoffee-Italic
 * CSS font-weight: normal
 * 
 * Webfont: Kimberley
 * Url: http://new.myfonts.com/fonts/larabie/kimberley/kimberley/
 * Foundry: Larabie
 * Copyright: (c) 2002 Ray Larabie. See attached license agreement for more information. If EULA is missing, visit www.larabiefonts.com for an updated version of this font.
 * License: http://www.myfonts.com/viewlicense?1056
 * Licensed pageviews: 10,000/month
 * CSS font-family: Kimberley-Regular
 * CSS font-weight: normal
 * 
 * (c) 2010 Bitstream, Inc
*/



var scripts = document.getElementsByTagName("SCRIPT");
var script = scripts[scripts.length-1].src;
var path = script.replace(/\\/g,'/').replace(/\/[^\/]*\/?$/, '');

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

//document.write(navigator.userAgent);
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)
		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.5 && browserVersion < 3.6)
		webfontType = 'data-css';
	else if (browserVersion >= 3.6)
		webfontType = 'woff';
}

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

	if (browserVersion >= 6.0)
		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:\"CoolveticaRg-Regular\";src:url(\"" + path + "/webfonts/eot/style_122838.eot\");}\n");
				document.write("@font-face {font-family:\"Junegull-Regular\";src:url(\"" + path + "/webfonts/eot/style_122442.eot\");}\n");
				document.write("@font-face {font-family:\"KenyanCoffee-Regular\";src:url(\"" + path + "/webfonts/eot/style_8397.eot\");}\n");
				document.write("@font-face {font-family:\"KenyanCoffee-Bold\";src:url(\"" + path + "/webfonts/eot/style_8398.eot\");}\n");
				document.write("@font-face {font-family:\"KenyanCoffee-BoldItalic\";src:url(\"" + path + "/webfonts/eot/style_8399.eot\");}\n");
				document.write("@font-face {font-family:\"KenyanCoffee-Italic\";src:url(\"" + path + "/webfonts/eot/style_8400.eot\");}\n");
				document.write("@font-face {font-family:\"Kimberley-Regular\";src:url(\"" + path + "/webfonts/eot/style_122443.eot\");}\n");
				document.write("</style>");
		break;
		
		case 'woff':
		document.write("<style>\n");
				document.write("@font-face {font-family:\"CoolveticaRg-Regular\";src:url(\"" + path + "/webfonts/woff/style_122838.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"Junegull-Regular\";src:url(\"" + path + "/webfonts/woff/style_122442.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"KenyanCoffee-Regular\";src:url(\"" + path + "/webfonts/woff/style_8397.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"KenyanCoffee-Bold\";src:url(\"" + path + "/webfonts/woff/style_8398.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"KenyanCoffee-BoldItalic\";src:url(\"" + path + "/webfonts/woff/style_8399.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"KenyanCoffee-Italic\";src:url(\"" + path + "/webfonts/woff/style_8400.woff\") format(\"woff\");}\n");
				document.write("@font-face {font-family:\"Kimberley-Regular\";src:url(\"" + path + "/webfonts/woff/style_122443.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 M2464674.css'>");
		break;
	
		
	default:
		webfontType = 'default';
		break;
}

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