/**
 * site.js
 *
 * main site javascript functions
 */


// main jquery doc.ready wrapper
$(document).ready(function() {
	// open external links in a new window
	$('a[@rel=external]').click( function() {
		window.open($(this).attr('href'));
		return false;
	});

	// add .jsok to body for styling via js & show js_only elements
	$('body').addClass('jsok');
	$('.js_only').removeClass('js_only');

	//$('ul.event_list.small a').cluetip({hoverClass: 'tooltipon', sticky: true, closePosition: 'title', arrows: true, attribute: 'rel', local: true, cursor: 'pointer'});

});


/**
 * getIEVersion()
 *
 * returns the version number of IE, or -1 if non-ie browser
 */
function getIEVersion() {
	var rv = -1; // Return value assumes non-ie
	if (navigator.appName == 'Microsoft Internet Explorer')
	{
		var ua = navigator.userAgent;
		var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");

		if (re.exec(ua) != null)
		rv = parseFloat( RegExp.$1 );
	}

	return rv;
}