var addthis_share = {
	templates: {
		twitter: '{{title}}: {{lurl}} (via @ze_phyr_us)'
	}
};


$(document).ready(function() {
	// Automatically fill in the year.
	if ($('body').is('.blog') && $('body').is('.post')) {
		$('#webUrl').val((new Date()).getFullYear()).parent().hide();
	}

	var sw = $('#languageSwitch');
	sw.tooltip({
		position: 'bottom left',
		offset: [ 0, sw.width() + 5 ],
		opacity: .9
	});

	sw.find('a').hover(function () {
		sw.data('tooltip').show();
	}, function () {});

	//if ($.browser.opera) {
	//	$('#tags li a').css('white-space', 'nowrap');
	//}

	$('a[class*="ext"]').click(function () {
		//var loc = '/ext/' + this.href;
		//(typeof _gaq !== 'undefined') && _gaq.push(['_trackPageview', loc]);

		var t = this.className.match(/ext-([-a-z]+)/);
		t = (t === null ? 'default' : t[1]);
		(typeof _gaq !== 'undefined') && _gaq.push(['_trackEvent', 'External Links', t, this.href]);
	});
});

