Changed Code for JQuery plugin by CouchDB