var SupportForm = {
	handleOther: function(e) {
		var elId = $(this).attr('id');
		var elText = jQuery.trim($(this).find('option:selected').text());
		var elVal = jQuery.trim($(this).find('option:selected').val());
		if (elVal.toLowerCase() == 'other') {
			$('#form-' + elId + ' .formOther').css('display', 'inline');
			$('#form-' + elId + ' .formOther select').removeAttr('disabled');
		} else if ($('#form-' + elId + ' .formOther').css('display') != 'none') {
			$('#form-' + elId + ' .formOther select').attr('disabled', 'disabled');
			$('#form-' + elId + ' .formOther').css('display', 'none');
		}
	},
	init: function() {
		//handle 'other' form elements
		$('#country,#phone_manufacturer, #phone_os, #mobile_operator, #connection, #error_msg').change(SupportForm.handleOther);
	}
};
$(document).ready(function() {
	SupportForm.init();
});