fix to submit temp view src as json

git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@657930 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/jquery.couch.js b/jquery.couch.js
index 0009061..695b0f1 100644
--- a/jquery.couch.js
+++ b/jquery.couch.js
@@ -179,7 +179,9 @@
             fun = fun.toSource ? fun.toSource() : "(" + fun.toString() + ")";
           $.ajax({
             type: "POST", url: this.uri + "_temp_view" + encodeOptions(options),
-            contentType: "javascript", data: fun, dataType: "json",
+            contentType: "application/json",
+            data: toJSON({language:"javascript", map:fun}),
+            dataType: "json",
             complete: function(req) {
               var resp = $.httpData(req, "json");
               if (req.status == 200 && options.success) {