(function (window, document, $, undefined) { var possibleCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; var defaults = { selector: "#captcha", text: null, randomText: true, randomColours: true, width: 300, height: 200, colour1: null, colour2: null, font: 'bold 48px "Comic Sans MS", cursive, sans-serif', onError: function() { alert('Captcha inválido.'); } }; var CAPTCHA = function (config) { var that = this; this._settings = $.extend({}, defaults, config || {}); this._container = $(this._settings.selector); var canvasWrapper = $('