jQuery plugin, optimized some stuff