// highlight and fade background on named anchors
// requires jquery.color.js http://plugins.jquery.com/project/color
function highlight(elemId){
    var elem = $(elemId);
    elem.css("backgroundColor", "#ffffff"); // hack for Safari
    elem.animate({ backgroundColor: '#FFF9C5' }, 1500);
    setTimeout(function(){
						elem.animate({ backgroundColor: "#ffffff" }, 1500);
						setTimeout(function(){elem.css("backgroundColor","transparent")},1520);
	},1500);
}


$(document).ready(function(){

if (window.location.hash) {

 $.scrollTo(window.location.hash, 800 );
	
}


$("a[href*='#']").click(function(){
	if ($(this).parents('ul').is('.tabNavigation')) return false;
	else
	{
	var elemId = this.hash;
	$.scrollTo(elemId, 800 );
	if ($(this).is('.highlight')) highlight(elemId);
	}
});

$(".button_black").mouseover(function(){
$(this).addClass('button_black_over');
}).mouseout(function(){
$(this).removeClass('button_black_over');
});

$(".button").mouseover(function(){
$(this).addClass('button_over');
}).mouseout(function(){
$(this).removeClass('button_over');
});


});


