var BLUE = function()
{
    function eventRegistrationSetup() 
    {

        $('#tag-event-registration div.required label').prepend('<span class="error">*</span>');
                
        //redirect of the cancel button is clicked
        $('#tag-event-registration #event-cancel-registration').bind('click', function(e) {
            var redirect = $(this).siblings('input[name=p-url]').val();
            window.location = redirect;
            return false;
        });
    }
    
    return {
        init: function()
        {
            $('.js').show();
            
            //only equalize columns if we are on a secondary page
            if ($("#secondary").length > 0) {
                BLUE.equalizeSecondaryPageColumns();
            }
            
            //ensure we are on the home page
            if ($("#home").length > 0) {
                $('#home #map #flash p').removeClass('hide').addClass('show');
            }
            
            eventRegistrationSetup();        
        },
        
        equalizeSecondaryPageColumns: function()
        {
            var sidebar_height = $("#secondary #sidebar").height(), content_height = $("#secondary #content").height();
            sidebar_height > content_height ? $("div#content").css("height", sidebar_height + 'px') : $("div#sidebar").css("height", content_height + 'px');
        }
        
    };
    
}();

$(document).ready(function()
{
    BLUE.init();
});

