little changes in jQuery/js code for better usage