var GL = {
	
	url: document.location.href.split('#')[0],
	
	questionnaire: {
		el: null,
		init: function(el) {
			this.el = jQuery(el);
			
			var doLateSubmit = function() {
				setTimeout(function() {
					GL.questionnaire.el.submit();
				},100);
			}
			
			/* if radiobuttons are not disabled, add events */
			if (!this.el.find('input[type=radio]').attr('disabled')) {
				this.el.find('label').each(function(i, labelEl) {
					$(labelEl).mouseup(doLateSubmit);
					$(labelEl).find('input[type=radio]').each(function(i, radioEl) {
						$(radioEl).change(doLateSubmit);
					});
				});
			}
		}
		
	}
	
};
