function changeLinkTargets( element, target ) {
	if ( element && element.getElementsByTagName ) {
		var localDomainUrlRegExp = new RegExp( "^[^:]+:\\/\\/([^\\/]+\\.)*?" + location.host, "i" );
		var elementsWithHrefs = new Array();
		elementsWithHrefs.push( element.getElementsByTagName( "A" ), element.getElementsByTagName( "AREA" ) );
		for ( var eachArray in elementsWithHrefs ) {
			for ( var i = 0, numOfElements = elementsWithHrefs[eachArray].length; i < numOfElements; i++ ) {
				var thisObject = elementsWithHrefs[eachArray][i];
				if ( thisObject ) {
					var thisHref = thisObject.getAttribute( "HREF" );
					if ( thisHref ) {
						if ( thisHref.indexOf( 'http' ) == 0 && ! thisHref.match( localDomainUrlRegExp ) ) {
							if ( ! thisHref.match( /^[^:]+:\/\/([^\/]+\.)*((cnn|turner|money|fortune(500|sb)?|fsb|business20?|ecompany(now)?|askannie|stanleybing)\.com|business20?\.co\.uk|mutualfundsmag\.biz)/i ) || thisHref.match( /^[^:]+:\/\/([^\/]+\.)*(digital\.(fortune|business2|fsb)\.com|secretsofgreatness\.fortune\.com)/i ) ) {
								thisObject.target = "new";
								thisObject.rel = "external nofollow";
							} else {
								thisObject.rel = "external";
							}
						}
					}
				}
			}
		}
	}
}

	//for feature-comments show/hide classes
	try{
	var moneyCommentFeat = document.getElementById('commentGroup');
	for (var i=0; i<moneyCommentFeat.children.length; i++)
	{
		var classStr = moneyCommentFeat.children[i].className;
		if (classStr.indexOf('featured')>-1 && classStr.indexOf('notfeatured')==-1) {
			document.getElementById('NaviTabs').style.display='inline-block';
			break;
		}
	}
	}catch(e){}

	//share this tools
try{
	var shared_object = SHARETHIS.addEntry({
		title: storyinfo.title,
		summary: storyinfo.summary,
		icon: storyinfo.icon
	});
}catch(e){}
	try{ shared_object.attachChicklet("email", document.getElementById("ck_email")); }catch(e){}
	try{ shared_object.attachChicklet("facebook", document.getElementById("ck_facebook")); }catch(e){}
	try{ shared_object.attachChicklet("digg", document.getElementById("ck_digg")); }catch(e){}
	try{ shared_object.attachChicklet("twitter", document.getElementById("ck_twitter")); }catch(e){}
	try{ shared_object.attachChicklet("yahoo_buzz", document.getElementById("ck_ybuzz")); }catch(e){}

try{
	var _sf_async_config = null;
	if( location.host.indexOf('tech.fortune.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"tech.fortune.cnn.com",path:window.location.pathname};
	}
	else if( location.host.indexOf('management.fortune.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"management.fortune.cnn.com",path:window.location.pathname};
	}
	else if( location.host.indexOf('finance.fortune.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"finance.fortune.cnn.com",path:window.location.pathname}; 
	}
	else if( location.host.indexOf('features.blogs.fortune.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"features.blogs.fortune.cnn.com",path:window.location.pathname}; 
	}
	else if( location.host.indexOf('thewheeldeal.blogs.fortune.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"thewheeldeal.blogs.fortune.cnn.com",path:window.location.pathname}; 
	}
	else if( location.host.indexOf('stanleybing.blogs.fortune.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"stanleybing.blogs.fortune.cnn.com",path:window.location.pathname}; 
	}
	else if( location.host.indexOf('postcards.blogs.fortune.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"postcards.blogs.fortune.cnn.com",path:window.location.pathname}; 
	}
	else if( location.host.indexOf('techland.blogs.fortune.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"techland.blogs.fortune.cnn.com",path:window.location.pathname}; 
	}
	else if( location.host.indexOf('moremoney.blogs.money.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"moremoney.blogs.money.cnn.com",path:window.location.pathname}; 
	}
	else if( location.host.indexOf('smallbusiness.blogs.cnnmoney.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"smallbusiness.blogs.cnnmoney.cnn.com",path:window.location.pathname}; 
	}
	else if( location.host.indexOf('cnnmoneytalkback.blogs.cnnmoney.cnn.com')!=-1 )
	{
		_sf_async_config = {uid:16819,domain:"cnnmoneytalkback.blogs.cnnmoney.cnn.com",path:window.location.pathname}; 
	}
	if (_sf_async_config != null){
		(function(){ 
			function loadChartbeat() { 
				window._sf_endpt=(new Date()).getTime(); 
				var e = document.createElement('script'); 
				e.setAttribute('language', 'javascript'); 
				e.setAttribute('type', 'text/javascript'); 
				e.setAttribute('src', (("https:" == document.location.protocol) ? "https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/" : "http://static.chartbeat.com/") + "js/chartbeat.js"); 
				document.body.appendChild(e); 
			} 
			var oldonload = window.onload; 
			window.onload = (typeof window.onload != 'function') ? 
			loadChartbeat : function() { oldonload(); loadChartbeat(); }; 
		})(); 
	}
}catch(e){}

