function WindowFocus() {
	window.focus();
}
document.onkeydown = function(e){
	e = (typeof e == "undefined") ? event : e;
	b = (typeof e.which == "number") ? e.which : e.keyCode;
		
	if (b == 39) {location.href = document.getElementById("next").href}
	else if (b == 37) {location.href = document.getElementById("prev").href}
}

// JQuery Stuff Here  

$(function() {
	
	// Back to the Top link - <a href="#" class="top">Back to Top</a>
	$('a.top').click(function(){
		 $('html, body').animate({scrollTop: '0px'}, 500);
		 return false;
	});	

	$('#sjindex2').fadeTo('fast', 0.8);	
	$('#sjindex2').hover(function(event) {
		$(this).stop().fadeTo(300, 1.0);
    }, function(event) {
		$(this).stop().fadeTo(200, 0.8);
	});	

	$('.tmphl').hide();
	$('.journalindextitle').hover(function(event) {
		$(this).next().show();
    }, function(event) {
		$(this).next().hide();
	});	

	// Journal Post Switcher --------------------------------------------	
	$('#postswitcher49 li').hover(function(event) {
		$(this).addClass('postswitcherhover');
		return false;
    }, function(event) {
			$(this).removeClass('postswitcherhover');
		return false;
	});


	
});
