$(document).ready(function(){
		if(!window.XMLHttpRequest) return;
		$("#login-link").click(function(){
			$("#quick-login").toggle();
			return false;
		});	
		$("#quick-login input:not(:submit)").focus(function(){$(this).attr('value','')});
		$("#quick-login .1st").focus();
		// setup highlights on anchor links
		$("a[href*=#]").click(function(){
            var elemId = '#' + $(this).attr('href').split('#')[1];
            highlight(elemId);
        });
        $('h2[id]').css('border-bottom','2px solid transparent')
        if (document.location.hash) {
            highlight(document.location.hash);
        }
	});
	
function OpenPage(querystring){
	window.location.href=querystring;	
}

function pop_down(div){
	if(document.getElementById(div).style.display == 'none'){
		document.getElementById(div).style.display = 'block';
	}else{
		document.getElementById(div).style.display = 'none';
	}
}

function highlight(elemId){
    $('h2[id]').css('border-bottom','2px solid transparent')
    var elem = $(elemId)
    elem.animate({ borderBottomColor: '#2255AA'}, 1000);
    //setTimeout(function(){elem.animate({ backgroundColor: "#ffffff" }, 2000)},1000);
}

