$(document).ready(function() {
    if($.browser.mozilla) $("form").attr("autocomplete", "off");
    var B = $("#notifications").html();
    if (jQuery.trim(B).length > 0)
    {
        $("#notifications").hide()
        .css({opacity: 0.7})
        .slideDown(1000, function() {
            var A = window.setTimeout(function() {
                $("#notifications").slideUp(1000, function() {
                    $(".notification-bar-container").remove();
                    $("#notifications").removeAttr("style");
                });
                window.clearTimeout(A);
            }, 7000)
        });
    }
    $("#login").click(function() {
        $('#signin_menu').toggle();
        $("#text_username").focus();
        return false;
    });
    $(document).bind('click', function(e) {
        var $clicked=$(e.target); // get the element clicked
        if (!($clicked.is('#signin_menu') || $clicked.parents().is('#signin_menu'))) {
            $('#signin_menu').hide();
        }
        if ($clicked.is('#ch_loc')) {
            $('#ch_loc').hide();
		$('#loc_change').show();
        }
    });
});
