(function() {

/*
 * Combines POST parameters with the CONFIDENTCAPTCHA_CALLBACK_EXTRA object
 * For example, adding token for cross-site scripting request detection
 */
function callbackPostParams(params) {

    if (typeof CONFIDENTCAPTCHA_CALLBACK_EXTRA!="undefined") {
        for (prop in CONFIDENTCAPTCHA_CALLBACK_EXTRA) {
            params[prop] = CONFIDENTCAPTCHA_CALLBACK_EXTRA[prop]
        }
    }
    return params
}

function callMe() {
    $('#call_requested').show();
    $('#call-info').hide();

    $.post(
        CONFIDENTCAPTCHA_CALLBACK_URL, 
        callbackPostParams({
            block_id: $('#confidentcaptcha_id_block_id').val(),
            phone_number: $('#confidentcaptcha_id_phone_number').val(),
            endpoint: 'block_onekey_start'
        }), 
        function(xml) {
            status = $(xml).find("status").text();
            id = $(xml).find("onekey_id").text();
            $('#confidentcaptcha_call_requested').hide();
            if (status != "200") {
                $('#confidentcaptcha_formerror').show();
            } else {
                $('#confidentcaptcha_call_sent').show();
                $.post(
                    CONFIDENTCAPTCHA_CALLBACK_URL, 
                    callbackPostParams({
                        block_id: $('#confidentcaptcha_id_block_id').val(),
                        captcha_id: id,
                        endpoint: 'block_onekey_verify'
                    }),
                    function(xml) {
                        authenticated = $(xml).find('authenticated').text();
                        $('#confidentcaptcha_call_sent').hide();
                        if (authenticated == 'False') {
                            $('#confidentcaptcha_call_canceled').show();
                        }
                        else if (authenticated == 'True') {
                            $('#confidentcaptcha_call_success').show();
                            CONFIDENTCAPTCHA_AUDIO_AUTHENTICATED = true;
                        }
                        else {
                            $('#confidentcaptcha_formerror').show();
                        }
                    }
                );
            }
        }
    );
}

function verify_captcha(block_id, code) {
    $('#confidentcaptcha_status').html('Submitting code for verification...');
    $.post(
        CONFIDENTCAPTCHA_CALLBACK_URL,
        callbackPostParams({
            block_id: block_id,
            captcha_id: $('#confidentcaptcha_id_captcha_id').val(),
            code: code,
            endpoint: 'verify_block_captcha'
        }),
        function(resp) {
            if (resp == "true") {
                $('#confidentcaptcha_status').html('Security check passed!');
                $('.confidentcaptcha_show_test').html('Thank you.');
                $('#confidentcaptcha_toggle_audio').parent().hide();
                $('#confidentcaptcha_visual_container').undelegate('.confidentcaptcha_show_test', 'click');
            }
            else {
                $.ajax({
                    type: 'POST',
                    url: CONFIDENTCAPTCHA_CALLBACK_URL,
                    data: callbackPostParams({
                        block_id: block_id,
                        display_style: 'flyout',
                        include_audio: CONFIDENTCAPTCHA_INCLUDE_AUDIO,
                        endpoint: 'create_captcha_instance'
                    }),
                    success: function(xml) {
                        $('#confidentcaptcha_wrapper').html(xml);
                        $('#confidentcaptcha_status').html('Security check failed. Please try again.');
                    },
                    error: function(xhr, status, error) {
                        // Konqueror doesn't set xhr.status
                        if (xhr.status == 410 || typeof xhr.status == "undefined") {
                            $('#confidentcaptcha_visual_container').undelegate('.confidentcaptcha_show_test', 'click');
                            $('#confidentcaptcha_status').html('Security check failed. No more CAPTCHA attempts available.');
                            $('.confidentcaptcha_show_test').html('Failed.');
                            $('#confidentcaptcha_toggle_audio').parent().hide();
                        }
                    }
                });
            }
        }
    );
}

function toggleAudio() {
    $('#confidentcaptcha_visual_container').hide();
    $('#confidentcaptcha_audio_container').show();
    $('#confidentcaptcha_id_phone_number').focus();
    return false;
}

function toggleGraphical() {
    $('#confidentcaptcha_visual_container').show();
    $('#confidentcaptcha_audio_container').hide();
    return false;
}
function audioAgain() {
    $('#confidentcaptcha_call_canceled').hide();
    $('#confidentcaptcha_call-info').show();
}

var $ = jQuery;
var fxAttrs = [ "height", "width", "opacity" ];
var addedStyle = false;
var CONFIDENTCAPTCHA_AUDIO_AUTHENTICATED = false;
var CONFIDENTCAPTCHA_VISUAL_AUTHENTICATED = false;

/**
 * Returns a 2-digit hex number for integers between 0 and 255.
 */
function toHex(n) {
    return ("0" + Math.floor(n).toString(16)).slice(-2);
}

/**
 * Blends two colors
 * @param color1 Color RGB array (ex [255,255,255])
 * @param color2 Color RGB array (ex [0,0,0])
 * @param percent Scalar between 0 and 1 (ex .5)
 * @return Color RPG array (ex [127.5,127.5,127.5])
 */
function colorBlend(color1, color2, percent) {
    return [color1[0] + percent * (color2[0] - color1[0]),
        color1[1] + percent * (color2[1] - color1[1]),
        color1[2] + percent * (color2[2] - color1[2])];
}

/**
 * Maps a hex string to an RGB color array
 * @param str Hex representation (eg #ffffff)
 * @return RGB color array (ex [255,255,255])
 */
function toColorArray(str) {
    var match = str.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);
    for (var i = 1; i < match.length; i++) match[i] = parseInt(match[i], 16);
    return match.slice(1);
}

/**
 * Maps an RGB color array to its hex representation
 * @param RGB color array (ex [255,255,255])
 * @return str Hex representation (eg #ffffff)
 */
function toColorHex(color) {
    return '#' + toHex(color[0]) + toHex(color[1]) + toHex(color[2]);
}

/**
 * Helper function for building effects.
 * @ignore
 * @see http://jqueryjs.googlecode.com/svn/trunk/jquery/src/fx.js
 */
function genFx( type ){
    var obj = {};
    $.each( fxAttrs, function(){ obj[ this ] = type; });
    return obj;
}

/**
 * Adds CSS styling to the page for captchas.
 */
function addStyle() {
    if (addedStyle) return;
    addedStyle = true;

    $(['<style type="text/css">',
        // Bubble
        '.confidentcaptcha_visual .confidentcaptcha_bubble { padding: 3px 15px; position: absolute; z-index: 1002; display: none; background-color: #eee; border: solid 3px #444; margin-bottom: 4px; -moz-border-radius: 5px; -webkit-border-radius: 5px; font-weight: normal; }',
        '.confidentcaptcha_visual .confidentcaptcha_hide { position: absolute; right: 5px; top: 5px; font-size: 12px; }',
        '.confidentcaptcha_visual .confidentcaptcha_bubble a { color:#457DAE; font-weight: bold; }',

        // Instructions
        '.confidentcaptcha_visual .confidentcaptcha_form_instructions { margin-top: 0 }',
        '.confidentcaptcha_visual .confidentcaptcha_instructions { font-size: 14px; color: #222; text-align: left; background-color: white; line-height: 1; padding: 9px; border:4px solid #226622; -moz-border-radius: 1.5em; -webkit-border-radius: 1em; text-align: center; vertical-align: middle; margin: 30px auto 10px auto; }',
        '.confidentcaptcha_visual .confidentcaptcha_show_test { zoom: 1; border: #aaa solid 1px; display: block; background: #666 url(http://com.vidoop.demo-static.s3.amazonaws.com/images/gradient_grey.gif) no-repeat right top; color: #333; padding: 3px; padding-left: 7px; -moz-border-radius: 5px; width: 150px; }',
        '.confidentcaptcha_visual .confidentcaptcha_current_category { padding: 3px 1px 3px; color: #030; font-size: 120%; font-weight: bold; }',
        '.confidentcaptcha_visual .confidentcaptcha_instructions .confidentcaptcha_step { margin: 5px; font-size: 90%; color: #040; }',
        '.confidentcaptcha_visual .confidentcaptcha_start_over_text { font-size: 90%; margin: 5px; }',
        '.confidentcaptcha_visual .confidentcaptcha_error { color: #ff2828; }',

        // Close band
        '.confidentcaptcha_visual .confidentcaptcha_close_instructions { cursor:pointer; position: absolute; padding: 20px 0; top: 200px; left:0; font-size: 300%; text-align: center; color: #fff; width: 100%; background-color: #000;}',
        '.confidentcaptcha_visual .confidentcaptcha_close_instructions .confidentcaptcha_start_over_text { margin-top: 15px; font-size: 50% }',

        // Images
        '.confidentcaptcha_visual .confidentcaptcha_images { margin: auto; text-align: left; }',
        '.confidentcaptcha_visual .confidentcaptcha_image { float: left; border: 5px solid #333; position: relative; }',
        '.confidentcaptcha_visual .confidentcaptcha_image_highlight { cursor: pointer; display: none; position: absolute; width: 160px; height: 120px; opacity: .5; filter: alpha(opacity = 50); background-color: white; }',
        '.confidentcaptcha_visual .confidentcaptcha_choice { position: absolute; left: 0px; width: 160px; height: 120px; opacity: .7; filter: alpha(opacity = 70); background-color: black; color: white; }',
        '.confidentcaptcha_visual .confidentcaptcha_choice .confidentcaptcha_text { text-align: center; font-size: 18px; position: absolute; bottom: 10%; color: white; width: 100%; }',
        '.confidentcaptcha_visual .confidentcaptcha_choice .confidentcaptcha_text small { font-size: 12px; color: #ccc; }',
        '.confidentcaptcha_visual .confidentcaptcha_choice .confidentcaptcha_text p { margin: 5px; line-height: 1; }',

        // Footer
        '.confidentcaptcha_visual .confidentcaptcha_footer { font-size: 9px; clear: both; padding-top: 2px; position: relative; }',
        '.confidentcaptcha_visual .confidentcaptcha_note {  left: 0px; }',
        '.confidentcaptcha_visual .confidentcaptcha_links { position: absolute; right: 0px; }',
        '.confidentcaptcha_visual .confidentcaptcha_footer .confidentcaptcha_logo { margin: auto; padding-left: 78px; background: url(http://com.vidoop.demo-static.s3.amazonaws.com/images/confident_captcha_logo_medium.gif) left center no-repeat; }',
        '.confidentcaptcha_visual .confidentcaptcha_footer .confidentcaptcha_logo span { background-color: black; visibility: hidden; }',


        '#confidentcaptcha_visual_container ul { list-style-type: none; }',
        '#confidentcaptcha_visual_container ul li { clear: both; margin-left: 0px; }',
        '#confidentcaptcha_audio_container ul { list-style-type: none; }',
        '#confidentcaptcha_audio_container ul li { clear: both; margin-left: 0px; }',

        '#confidentcaptcha_lightbox { position: absolute; left: 0; top: 0; width: 100%; background-color: black; z-index:1001; -moz-opacity: 0.7; opacity:.70; filter: alpha(opacity=70); height: 100%; background-color: #1a1a1a; display: none; }',

    '</style>'].join("\n")).prependTo("head");
}


$.fn.extend({
    /**
     * Emphasize a text node by highlighting it
     * @param start Start background-color
     * @param end End background-color
     * @param interval How long the effect lasts
     */
    confidentHighlight: function(start, end, interval) {
        return this.each(function() {
            if ($.data(this, 'highlight_interval')) {
                clearInterval($.data(this, 'highlight_interval'));
            }

            var start_array = toColorArray(start);
            var end_array = toColorArray(end);
            var percent;

            var time_end;
            var self = this;

            var handle = setInterval(function() {
                var now = new Date().getTime();
                if (!time_end) time_end = now + interval;
                if (now <= time_end) {
                    var progress = (time_end - now) / interval;
                    $(self).css('background-color', toColorHex(colorBlend(
                        start_array, end_array, (1 - progress) * (1 - progress))));
                }
                else {
                    clearInterval(handle);
                    $(self).css('background-color', end);
                    $.data(self, 'highlight_interval', null);
                }
            }, 50);
            $.data(this, 'highlight_interval', handle);
        });
    },

    /**
     * With event delegation, you can listen for events on elements that have
     * not been created yet.
     * @param eventName Eg "click"
     * @param target A selector for when the callback should be triggered
     * @param fn Callback function, similar to jQuery's bind
     */
    delegatedBind: function(eventName, target, fn) {
        return this.bind(eventName, function(e) {
            var me = this, args = arguments;
            $(e.target).filter(target).each(function() {
                fn.apply(me, args);
            });
        });
    }
});


/**
 * Models the user's answer for the captcha.
 * @param categories Array of text with category names (eg ['birds','cats'])
 * @param letters A string containing all the letters in the captcha
 */
function Answer(categories, letters) {
    this.categories = categories;
    this.answer = [];
}

/**
 * Adds a letter to the answer. Will fail if answer is already complete.
 * @return True if letter was added to answer, false otherwise.
 */
Answer.prototype.addLetter = function(letter) {
    if (this.complete() || $.inArray(letter, this.answer) != -1) {
        return false;
    }
    else {
        this.answer.push(letter);
        return true;
    }
}

/**
 * Clear user's answer.
 */
Answer.prototype.clear = function() {
    this.answer = [];
}

/**
 * Get the current step the user is on.
 * @return Number between 1 and the total number of categories to choose from
 */
Answer.prototype.currentStep = function() {
    return this.answer.length + 1;
}

/**
 * Get the current category the user is looking for.
 * @return String
 */
Answer.prototype.currentCategory = function() {
    return this.categories[this.answer.length];
}

/**
 * Is the user's answer complete?
 * @return Boolean
 */
Answer.prototype.complete = function() {
    return this.categories.length == this.answer.length;
}

/**
 * The user's answer so far.
 * @return String (eg 'ABC')
 */
Answer.prototype.val = function() {
    return this.answer.join('');
}


/**
 *
 */
function Captcha(selector, anchor, options) {
    var captcha = this;

    this.options = options;

    /**
     * jQuery element that determines where instructions are injected and
     * where flyout comes from.
     */
    this.selector = $(selector)
        .bind("confidentcaptcha_category_change", function(e) {
            captcha.updateInstructions();
        });

    /**
     * jQuery element that anchors the flyout.
     */
    this.anchor = anchor;

    /**
     * jQuery element that contains the header, the images, and the footer
     * for the captcha.
     */
    this.frame = $('<div class="confidentcaptcha_bubble"/>')
        .appendTo(this.anchor)
        .delegatedBind('click', '.confidentcaptcha_start_over', function(e) {
            e.preventDefault();
            captcha.startOver();
        });
        
    /**
     * jQuery element that has the category names, the instructions, and
     * the hide link.
     */
    this.header = $('<p style="display: none;">' + options.instructions + '</p>' +
        '<div class="confidentcaptcha_instructions"/>')
        .appendTo(this.frame);

    /**
     * jQuery element that contains all of the images.
     */
    this.body = $('<div class="confidentcaptcha_images">' +
        this.generateImages(this.options.grid_width, this.options.grid_height) + '</div>')
        .appendTo(this.frame);
    $('.confidentcaptcha_bubble').css('width', (this.options.grid_width*170) + 'px');

    /**
     * jQuery element, the footer of the captcha.
     */
    this.footer = $('<div class="confidentcaptcha_footer"><span class="confidentcaptcha_note">You can also type the letter in the circle to select the corresponding image.</span><span class="confidentcaptcha_links"><a target="_blank" alt="powered by confident" href="http://confidenttechnologies.com/products/confident_CAPTCHA.php" class="confidentcaptcha_logo"><span>t</span></a><a target="_blank" href="https://login.confidenttechnologies.com/docs/creative-commons">' + options.image_credits_text + '</a></span></div>')
        .appendTo(this.frame);

    /**
    * Apple Mobile Safari eats click events if a mouseover or mouseout changes the DOM
    */
    var isClickEater = navigator.userAgent.match(/(iphone|ipod|ipad)/i) != null;

    /**
     * jQuery array of all the images.
     */
    this.images = this.frame.find('.confidentcaptcha_image')
        .mouseover(function() {
            if (!isClickEater) {
                if (!$(".confidentcaptcha_choice", this).length && !captcha.answer.complete()) {
                    $(".confidentcaptcha_image_highlight", this).show();
                }
            }
        }).mouseout(function() {
            if (!isClickEater) {
                $(".confidentcaptcha_image_highlight", this).hide();
            }
        }).click(function(e) {
            e.stopPropagation();
            var index = $.inArray(this, captcha.images);
            captcha.addLetter(options.letters.charAt(index));
        });
        
    /**
     * Boolean, true if captcha is being shown.
     */
    this.shown = false;

    $(document).keypress(function(e) {
        if (captcha.shown && $(e.target).is(":not(input)")) {
            var ch = String.fromCharCode(e.which).toUpperCase();
            captcha.addLetter(ch);
        }
    });

    var categories = this.header.find('.category_name')
        .map(function() {
            return this.innerHTML;
        });

    /**
     * Answer instance, contains user's answer.
     */
    this.answer = new Answer(categories, options.letters);

    this.updateInstructions();
}

Captcha.prototype = {
    // add a letter to the answer
    addLetter: function(letter) {
        var category = this.answer.currentCategory();
        var index = this.options.letters.search(letter);
        if (index != -1 && letter && this.answer.addLetter(letter)) {
            $("<div class='confidentcaptcha_choice'><div class='confidentcaptcha_text'></div><div>")
                .appendTo(this.images[index]);

            if (this.answer.complete()) {
                this.selector.trigger("confidentcaptcha_complete");
                $(this.options.answer_output).val(this.answer.val());
                if (!!$(this.options.answer_output_20100610)) {
                    $(this.options.answer_output_20100610).val(this.answer.val());
                }
            } else {
                this.selector.trigger("confidentcaptcha_category_change");
            }
        }
    },

    // start over
    startOver: function(){
       $(".confidentcaptcha_image .confidentcaptcha_choice").remove();
        this.answer.clear();
        this.selector.trigger("confidentcaptcha_category_change");
    },

    // toggle whether captcha is shown or hidden
    toggle: function(e) {
        if (this.shown) {
            this.hide(e);
        }
        else {
            this.show(e);
        }
    },

    // return the current and total steps
    stepText: function(){
        return [this.answer.currentStep(),
        this.options.step_preposition_text,
        this.answer.categories.length].join(" ");
    },

    // return the start over link text, if appropriate
    startOverText: function(){
        if(this.answer.currentStep() != 1){
            return "<div class='confidentcaptcha_start_over_text'>" + this.options.start_over_text + "</div>";
        }
        return "";
    },

    // update captcha instructions
    updateInstructions: function(){
        // Update current category text in instructions.
        $(".confidentcaptcha_instructions", this.frame)
            .html(this.options.step1_text)
            .append(this.startOverText())
            .append("<div class='confidentcaptcha_step'>" + this.stepText() + "</div>")

        $(".confidentcaptcha_current_category", this.frame)
            .html(this.answer.currentCategory())
            .confidentHighlight('#ffff55', '#ffffff', 1000);
    },

    // Generates image grid for captcha.
    generateImages: function(w, h) {
        var result = [];
        for (var y = 0; y < h; y++) {
            for (x = 0; x < w; x++) {
                result.push("<div class='confidentcaptcha_image' style='width: 160px; height: 120px; background: url(",
                    this.options.image_url, ") no-repeat -", x * 160, "px -", y * 120, "px;'><div class='confidentcaptcha_image_highlight'></div></div>");
            }
        }
        return result.join("");
    }
};


/**
 * Flies the captcha out of the selector div.
 */
function FlyoutController(selector, Captcha, options) {
    var me = this;

    var anchor = $('<div style="position: relative; clear: both;"/>')
        .appendTo(selector);

    this.style = options.display_style;
    this.ajax_verify = options.ajax_verify;

    /**
     * Captcha object that can be shown and hidden.
     */
    this.captcha = new Captcha(selector, anchor, options);

    this.captcha.frame.append($('<div class="confidentcaptcha_hide"><a class="confidentcaptcha_close" href="#">' + options.hide_text + ' &times;</a></div>'));

    /**
     * jQuery element containing the instructions to open captcha on the form.
     */
    this.formInstructions = $('<p class="confidentcaptcha_form_instructions"/>')
        .appendTo(selector);

    // Close captcha if close links are clicked.
    $(selector).delegatedBind('click', '.confidentcaptcha_close', function(e) {
        e.preventDefault();
        me.hide();
    });

    // Update form instructions based on if captcha is complete.
    $(selector).bind("confidentcaptcha_complete", function() {
        if (me.ajax_verify){
            verify_captcha($('#confidentcaptcha_id_block_id').val(), me.captcha.answer.val());
        }
        else {
            $('.confidentcaptcha_show_test').html('Thank you.');
        }
        me.hide();
    }).bind("confidentcaptcha_category_change", function() {
        me.updateFormInstructions();
    });

    function clickity(e) {
        e.preventDefault();
        me.show();
    }
    
    $('#confidentcaptcha_visual_container').delegate('.confidentcaptcha_show_test', 'click', function(e) {
        e.preventDefault();
        me.show();
    });

    this.updateFormInstructions();
}

FlyoutController.prototype = {
    // Catch the submit if not complete.
    catchSubmit: function() {
//        var me = this;
//        $(this.captcha.options.answer_output.form).submit(function(e) {
//            if (AUDIO_AUTHENTICATED == true) {
//                return true;
//            }
//            if (!me.captcha.answer.complete()) {
//                me.formInstructions
//                    .addClass('confidentcaptcha_error')
//                    .confidentHighlight('#ffff55', '#ffffff', 1000);
//                e.preventDefault();
//            }
//        });
    },

    // Captcha is not complete, make sure the instructions reflect that.
    updateFormInstructions: function() {
        $(".confidentcaptcha_close_instructions").remove();
        this.formInstructions.html('<a class="confidentcaptcha_show_test" href="#">Click here.</a>');
    },

    // show captcha close instructions
    closeInstructions: function(){
        $(this.captcha.frame)
            .append("<div class='confidentcaptcha_close_instructions confidentcaptcha_close'>" + this.captcha.options.close_text + this.captcha.startOverText() + "</div>");
    },

    // Show the captcha box
    show: function() {
        this.captcha.startOver();

        w = $(document).width();
        h = $(document).height();
        $bbl = $('.confidentcaptcha_bubble');
        ch = $bbl.height();
        cw = $bbl.width();
        $btn = $('.confidentcaptcha_show_test');
        cl = $btn.position().left;
        ct = $btn.position().top;

        dy = ch + ct - h + 12;
        if (dy > 0) {
            if (dy > ct) {
                dy = ct;
            }
            $bbl.css("top", "-"+dy+"px");
        }

        dx = cw + cl - w;
        if (dx > 0) {
            if (dx > cl) {
                dx = cl;
            }
            $bbl.css("left", "-"+dx+"px");
        }

        // show and scroll
        if (this.style == 'flyout') {
            this.captcha.frame.animate(genFx('show'), 500);
        } else if (this.style == 'lightbox') {
            this.captcha.frame.fadeIn(500);
            $('#confidentcaptcha_lightbox').fadeIn(500);
        }
        $('html, body').animate({
            scrollTop: this.captcha.frame.offset().top,
            scrollLeft: this.captcha.frame.offset().left
        }, 500);
        this.captcha.shown = true;
    },

    // Hide the captcha box
    hide: function() {
        if (this.style == 'flyout') {
            this.captcha.frame.animate(genFx('hide'), 500);
        } else if (this.style == 'lightbox') {
            this.captcha.frame.fadeOut(500);
            $('#confidentcaptcha_lightbox').fadeOut(500);
        }
        this.captcha.shown = false;
    }
};


// Inject captcha showing instructions into the selected element.
$.fn.confidentCaptcha = function(options) {
    addStyle();

    var controller;
    this.each(function() {
        var full_options = $.extend({}, $.fn.confidentCaptcha.defaults, options);
        controller = new full_options.Controller(this, Captcha, full_options);
    });
    
    $('#confidentcaptcha_audio_container').hide();
    $('#confidentcaptcha_toggle_audio').click(toggleAudio);
    $('#confidentcaptcha_toggle_graphical').click(toggleGraphical);
    $('#confidentcaptcha_audio_again').click(audioAgain);
    $('#confidentcaptcha_call_me').click(callMe);

    return controller;
}

// Default options  for $.fn.confidentCaptcha
$.fn.confidentCaptcha.defaults = {
    // Hidden node where the final answer is outputted.
    answer_output: null,
    // Default captcha implementation
    Controller: FlyoutController,

    // Localization
    start_hover_text: 'An image will appear when you click here. This field is required.',
    hide_text: 'close',
    think_text: 'You think this is',
    close_text: 'Thanks! Click <a href="#" class="confidentcaptcha_close">here</a> to continue.',
    image_credits_text: 'image credits',
    step_preposition_text: 'of',
    step1_text: 'Click the <span class="confidentcaptcha_current_category confidentcaptcha_highlight"></span>',
    stepn_text: 'Great! Click the <span class="confidentcaptcha_current_category confidentcaptcha_highlight"></span>',
    start_over_text: 'If you feel you\'ve made a mistake, you can <a href="#" class="confidentcaptcha_start_over">start over</a>.'
};

})();
