Convert to basic jquery plugin