For those of you who don't know how rain-x works let me explain, no that is to long, let me some up. Rain-x works by being hydrophobic (repelling
water) with a similar ion charge. (Found @ chem1.com)
When a liquid is in contact with a solid surface, its behavior depends on the relative magnitudes of the surface tension forces and the attractive forces between the molecules of the liquid and of those comprising the surface. If an H2O molecule is more strongly attracted to its own kind, then surface tension will dominate, increasing the curvature of the interface. [size=10pt][font=Verdana]This is what happens at the interface between water and a hydrophobic surface such as a plastic mixing bowl or a windshield coated with oily material.[/font][/size] A clean glass surface, by contrast, has -OH groups sticking out of it which readily attach to water molecules through hydrogen bonding; this causes the water to spread out evenly over the surface, or to wet it. A liquid will wet a surface if the angle at which it makes contact with the surface is more than 90°. The value of this contact angle can be predicted from the properties of the liquid and solid separately. So by coating the glass with a substance that has the same ion charge as the hydrogen bond found in water you will repel the water making it "bead up"