$.fn.extend({
    /** checking and unchecking funcitons **/
    check: function() {
        return this.each(function() { this.checked = true; });
    },
    uncheck: function() {
        return this.each(function() { this.checked = false; });
    },
    checkToggle: function() {
        return this.each(function() { this.checked != this.checked; });
    },
    /** extension to jquery to allow for the use of the checked property **/
    checked: function() {
        if (this.length > 1) {
            return this.get(0).attr('checked');
        } else if (this.length == 1) {
            return this.attr('checked');
        } else {
            return false;
        }
    },
    tagName: function() {
        return (this.length > 0 ? this.get(0).tagName : 'No Element Found');
    },
    rel: function() {
        return (this.length > 0 ? $(this[0]).attr('rel') : null);
    },
    /** adding and removing a message formated with the jquery ui classes **/
    addErrorMsg: function(msg) {
        $(this).html('<div class="ui-widget"><div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"><p><span class="ui-icon ui-icon-alert" style="float:left; margin-right: .3em;"></span>' + msg + '</p></div></div>').slideDown(300);
    },
    removeErrorMsg: function() {
        $(this).slideUp(300);
    }
});

var selectedMenus = new Array();
var RecaptchaOptions = {
    theme : 'white'
 };

$(function() {
    // set the menu items to the over src that are in the selected menus array
    $(selectedMenus).each(function(i, link) {
        $('#topMenu-' + link).css('background-image', "url('/images/menu-bkg-over.jpg')");
    });
    $('.jQueryButton').button();
    $('.country_id').change(function() {
        this.form.submit();
    });
});
