$(document).ready( function() {
    // External links - target=_blank 
    $('A[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });
    
    // IE button hovering
    $("button#confirm").hover(function() {
        $(this).addClass("hover");
        }, function() {
        $(this).removeClass("hover");
    });
    
    // Disable button after clicking
    var button = $("button#confirm");
    button.click(function() {
        button.addClass("disabled");
        button.attr("disabled", true);
        
         if(document.getElementById('join')){
                if(document.forms.length == 2){
                    document.forms[1].submit();
                }else{
                    document.forms[0].submit();
                }
            }else{
                document.forms[0].submit();
            }
        
    });

	Shadowbox.init();
});


function changeUserAction(pValue) {
    var hiddenComponent = document.getElementById('user_action');
    if(!hiddenComponent) {
        return true;
    }
    
    hiddenComponent.value = pValue;
}


