(function(e,t,n){"use strict";e.translate={};var r={collect:function(t){var n=t.children(),i=[];if(n.size()>0){n.each(function(){var t=e(this);i.push(t.text().trim());r.showProgress(t)})}else{i.push(t.text().trim());r.showProgress(t)}return i},done:function(t,n){var r=t.children();if(r.size()>0){r.each(function(t){e(this).text(n[t])})}else{t.text(n[0])}},parseResonse:function(e){var t=[],n=e.data.translations;for(var r=0;r<n.length;r++){t.push(n[r].translatedText)}return t},showProgress:function(e){e.text("Translating...")}};e.fn.translate=function(t){if(!this.length){e.error("Element not found: '"+this.selector+"'")}e.translate=e.extend(t,e.translate);var n=this,i=r.collect(this);return e.get("https://www.googleapis.com/language/translate/v2?q="+i.join("&q="),e.translate).done(function(e){r.done(n,r.parseResonse(e))}).fail(function(t){r.done(n,i);e.error(t.responseText)})}})(jQuery,window)
(function(e,t,n){"use strict";e.translate={};var r=e('<div class="translating">Translating</div>'),i={collect:function(t){var n=t.children(),r=[];if(n.size()>0){n.each(function(){var t=e(this);r.push(encodeURIComponent(t.text().trim()))})}else{r.push(encodeURIComponent(t.text().trim()))}return r},done:function(t,n){var r=t.children();if(r.size()>0){r.each(function(t){e(this).text(n[t])})}else{t.text(n[0])}},parseResonse:function(e){var t=[],n=e.data.translations;for(var r=0;r<n.length;r++){t.push(n[r].translatedText)}return t},showProgress:function(e){r.insertBefore(e)},removeProgress:function(e){r.remove()}};e.fn.translate=function(t){if(!this.length){e.error("Element not found: '"+this.selector+"'")}e.translate=e.extend(t,e.translate);if(typeof e.translate.progressIndicator!=="undefined"){if(typeof e.translate.progressIndicator==="object"){r=e.translate.progressIndicator}else{r=e(e.translate.progressIndicator)}delete e.translate.progressIndicator}var n=this,s=i.collect(this);i.showProgress(n);return e.get("https://www.googleapis.com/language/translate/v2?q="+s.join("&q="),e.translate).done(function(e){i.done(n,i.parseResonse(e))}).fail(function(t){e.error(t.responseText)}).always(function(){i.removeProgress(n)})}})(jQuery,window)
Update min