var HideSignupFlag = false;
var SignupSecondFormOpened = false;
function termsofuse() {
    document.getElementById('whitener').style.display = 'block';
    document.getElementById('termofusediv').style.display = 'block';
    document.getElementById('termofusedivbottom').style.display = 'block';
}
function untermsofuse() {
    document.getElementById('whitener').style.display = 'none';
    document.getElementById('termofusediv').style.display = 'none';
    document.getElementById('termofusedivbottom').style.display = 'none';
}
function CreateBookmarkLink() {
    try {
        title = typeof (title) != 'undefined' ? title : "UWC - United World Capital";
        url = typeof (url) != 'undefined' ? url : "../uwcfx.com/default.htm";

        if (window.sidebar) { // Mozilla Firefox Bookmark
            window.sidebar.addPanel(title, url, "");
        } else if (window.external) { // IE Favorite
            window.external.AddFavorite(url, title);
        }
        else if (window.opera && window.print) { // Opera Hotlist
            return true;
        }
    }
    catch (e) { }
}
var StopClick = false;
$(document).ready(function() {
    var Transparency = 1;
    //if ($('div.accordion').length) {
    //    $('div.accordion').accordion({ header: 'h4', autoHeight: false});
    //}
    $('#Icons img').hover(
        function () {
            var re = /_hover/;
            if (!re.exec($(this).attr('src'))) {
                $(this).attr('src', $(this).attr('src').replace('.png', '_hover.png'));
            }
        },
        function () {
            var re = /_hover/;
            if (re.exec($(this).attr('src'))) {
                $(this).attr('src', $(this).attr('src').replace('_hover.png', '.png'));
            }
        }
    );
    $('#SignupScrolldown').hover (
        function() {
            HideSignupFlag = false;
            $(this).animate({top: 0}, function() {
                SignupSecondFormOpened = true;
            });
            
        },
        function() {
            HideSignupFlag = true;
            hideSignup();
        }
    );
    $('#SignupSecondCloseButton').click (function () {
        hideSignupProcess();
    });
    $('#SignupSecondButton').click (function () {
        if (SignupSecondFormOpened) {
            $('#SignupSecondForm').submit();
        } else {
            $('#SignupScrolldown').animate({top: 0}, function() {
                SignupSecondFormOpened = true;
            });
        }
    });

/*
    $('#Icons').fadeTo ('fast', Transparency).hover(
        function() {
            $(this).fadeTo('fast', 1);
        },
        function() {
            $(this).fadeTo('fast', Transparency);
        }
    );
    $('#Environment').fadeTo ('fast', Transparency).hover(
        function() {
            $(this).fadeTo('fast', 1);
        },
        function() {
            $(this).fadeTo('fast', Transparency);
        }
    );
    $('#Callmeback').fadeTo ('fast', Transparency).hover(
        function() {
            $(this).fadeTo('fast', 1);
        },
        function() {
            $(this).fadeTo('fast', Transparency);
        }
    );
    $('#Feedback').fadeTo ('fast', Transparency).hover(
        function() {
            $(this).fadeTo('fast', 1);
        },
        function() {
            $(this).fadeTo('fast', Transparency);
        }
    );
    $('#SecondMenu').fadeTo ('fast', Transparency).hover(
        function() {
            $(this).fadeTo('fast', 1);
        },
        function() {
            $(this).fadeTo('fast', Transparency);
        }
    );
    $('#DynRates').fadeTo ('fast', Transparency).hover(
        function() {
            $(this).fadeTo('fast', 1);
        },
        function() {
            $(this).fadeTo('fast', Transparency);
        }
    );
    $('#Calculator').fadeTo ('fast', Transparency).hover(
        function() {
            $(this).fadeTo('fast', 1);
        },
        function() {
            $(this).fadeTo('fast', Transparency);
        }
    );
*/
});
function hideSignup() {
    if (!HideSignupFlag) return false;
    HideSignupFlag = true;
    //setTimeout('hideSignupProcess()', 500);
}
function hideSignupProcess() {
    //if (!HideSignupFlag) return false;
    $('#SignupScrolldown').animate({top: '-214px'});
    SignupSecondFormOpened = false;
}

