$(function()
{
	// allows the "no thanks" button to close the colorbox
	$('.close.button').click(function(e){
		e.preventDefault();
		$.colorbox.close();
		pageTracker._trackEvent('Survey', 'Click', 'No Thanks');
	});

	// close it as well if continue selected, but don't kill the default actions.
	$('.continue.button').click(function(e){
		$.colorbox.close();
		pageTracker._trackEvent('Survey', 'Click', 'Continue');	
	});
	
	// setup a GA event for the close button on the overlay
	$('#cboxClose').click(function(e){
		pageTracker._trackEvent('Survey', 'Click', 'Close');
	});
});

function startJSTimer()
{
	// have the feedback popup show after a small moment
	setTimeout(showFeedback, 12000);
}

// let's display the colorbox overlay
function showFeedback()
{
	$.colorbox({
		top: 200,
		opacity:0,
		overlayClose: false,
		scrolling: false,
		inline:true,
		href:"#feedbackContainer"
	});
/*
	window.open(
		'http://www.surveymonkey.com/jsPopInvite.aspx?sm=6PDa8cTZ9ZylQ0Xm%2f6f54A%3d%3d', 
		'invitationwindow', 
		'height=350,width=500,scrollbars=yes,resizable=yes,status=yes'
	);
*/
}
