function component_PreJoinSelection(auto_id)
{
	this.DOMConstruct('PreJoinSelection', auto_id);
	
	var handler = this;
}

component_PreJoinSelection.prototype =
	new SK_ComponentHandler({
		
		construct : function(url) {
			var handler = this;
			handler.url = url;
			
			$cougar = $("#vip-cougar");
			$cub = $("#vip-cub");
			$q_url = $("#q-url");
			$btn = $("#join-btn");
			
			$cougar.click(function(){
				var $btn = $(this);
				if ($btn.attr('checked') )
				{
					$cub.attr('checked', '');
					$q_url.html(handler.url + '?i_am=cougar');
				}
				else
					$q_url.html(handler.url);
			});
			
			$cub.click(function(){
				var $btn = $(this);
				if ($btn.attr('checked') )
				{
					$cougar.attr('checked', '');
					$q_url.html(handler.url + '?i_am=cub');
				}
				else
					$q_url.html(handler.url);
			});
			
			$btn.click(function(){
				if ($q_url.html() != '')
					document.location = $q_url.html();
			});
		}
		
});