Changed my mind, using CSS3 background instead.

Keep it simple. Avoid unnecessary JS at all costs.