I'm trying to do a simple click event on a checkbox that shows/hides the password in a form. It works in FF and IE9, but IE7 and IE8 are not cooperating. I get the following error in the IE console:

SCRIPT5022: Exception thrown and not caught
jquery-1.6.2.js, line 548 character 3

This is using the non-minified version of jquery 1.6.2

Code is super simple:

	// Allow the password to be seen as plain text if desired
		$('.form_input').each( function(i, el){
			var new_input = $(el).clone();
			if( new_input.attr('type') == 'text' ){
				new_input.attr('type', 'password');
				new_input.attr('type', 'text');

I know some of you are javascript gurus and can probably tell me what's wrong instantly. I've been working on this for hours, so I'd really appreciate your help!