Cufon.replace('#heading-text');
Cufon.replace('#left-nav h2');
Cufon.replace('#left-nav a', {hover: true});
Cufon.replace('div.content-box-heading h2');
Cufon.replace('div.right-box-heading h2');
Cufon.replace('div.left-box-heading h2');
Cufon.replace('div#right-author-perspective-heading h2');
Shadowbox.init({
   skipSetup: true
});
$(function() {
//	$('a.fancyboxPage').each(function() {
//		$(this).fancybox({
//			'href': this.href + '?tid=2',
//			'type': 'iframe',
//			'height': 499,
//			'width': 750
//		});
//	});
	$('a.fancyboxPage').click(function() {
		Shadowbox.open({
			content: this.href + '?tid=2',
			player: 'iframe',
			title: this.title || '',
			width: 600
		});
		return false;
	});
	if ($.browser.msie && $.browser.version < 8) {
		$('#left-nav li ul').show();
	} else {
		$('#left-nav li.current ul').hide().slideDown(600, 'easeInQuart');
		$('#left-nav li.currentParent ul').show();
	}
	
	$('#center a, #right a').filter(function() {
        return (this.href && this.href.substr(0, 7) != 'mailto:' && this.hostname != undefined && this.hostname.split(':')[0] != location.hostname) || (this.rel == 'external') || (this.rel == 'externalSkip') || ($(this).hasClass('external'));
    }).attr('target', '_blank');
	$('div#content-wrapper.twocolumn p:first').css('margin-top', 0);
});

function initiateViewDownload() {
//	$('#view-download-content li:last').addClass('last');
//	if ($.browser.msie && $.browser.version <= 6) {
//		return;
//	}
//	$('#view-download').click(function() {
//		$('#view-download-content').slideToggle();
//		$(this).blur();
//		return false;
//	});
//	
//	$('#view-download-content a').each(function() {
//		var parts = this.href.split('.');
//		if (parts.length > 1) {
//			var ext = parts.pop();
//			ext = ext.toLowrCase();
//			switch (ext) {
//				case 'pdf':
//					break;
//			};
//		}
//	});
}
