jQuery plugin for switching input type