

jQuery(function($){
	$('dl.schedule > dt:odd, dl.schedule > dt:odd + dd, dl.schedule > dd + dd:odd').addClass('stripe');
	// sponsor rotators
	
	if (typeof $.fn.rotatorthing !== undefined) {
		$(window).load(function() {
			$('#xobrosnops').rotatorthing({
				visible: 3,
				scroll: 3,
				start: 1,
				speed: 1500,
				auto: 3000
			});

		}); 
	}
	equalHeight();

	
	
	var mainHeight = jQuery('#main_column').height();
	if (mainHeight < 1200) { 
		$('#more_reasons').hide(); // green button in left column
	}
	
	
	$('#footer').after('<div id="extraPadding"></div>');
	
	
	// Links and GA
	$('a[href$=pdf]').attr('target', '_blank').click(function(){
		var filename = 	$(this).attr('href');
		pageTracker._trackEvent("Downloads", "PDF", filename);
	});
	

	$('a[rel=external]').attr('target', '_blank').click(function() {
		var linkname = $(this).text(),
			linkhref = $(this).attr("href");
		pageTracker._trackPageview('/external/'+linkhref+'('+linkname+')');
	});
	
	$('#row_two_1 > a, #ticketLink').click(function() {
		pageTracker._trackPageview('TICKETS');
	});
		
		$('a', $('#snlinks')).click(function() {
		var social = $(this).attr('id');
		if (social == 'gmarks') {
			social = 'Google Bookmarks';
		}
		pageTracker.trackPageview('/socialmedia: '+social);
	});
	
jQuery.easing['jswing'] = jQuery.easing['swing'];
jQuery.extend( jQuery.easing,
{
	def: 'easeInOutQuad',
	swing: function (x, t, b, c, d) {
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	}
}); 

function equalHeight() {
	var mainHeight = jQuery('#main_column').height(),
		secondaryHeight = jQuery('#secondary_column').height(),
		newHeight = 0;
	if (mainHeight > secondaryHeight) {
		newHeight = jQuery('#secondary_column').css('height', mainHeight-26+'px');
		return newHeight;
	} else {
		newHeight = jQuery('#main_column').css('height', secondaryHeight+30+'px');
		return newHeight;
	}
}
});