$(document).ready(function($){
	$('.dropdown select').bind('change', function (){
		var textNode = $(this).parent().contents().not('select')[0];
		$(textNode).replaceWith(this.value);
		if (this.hasClass('submitOnChange')) {
			this.form.submit();
		}
	});
});