
$(document).ready(function() {

$('div.navLinks span.navSpan').each(function(){
$(this).click(function(ev){
top.location.href = $(this).prev().find('a').attr('href');
});
});
$('dl.nav > dd').each(function(){
$(this).click(function(ev){
top.location.href = $(this).prev().find('a').attr('href');
});
});

$('#searchLink').click(function(ev){
if ($('#searchLink').data('open'))
return false;
$('#searchLink').data('open', true).css('cursor', 'wait');
$('.dialog').remove();
var sf = $('<div class="dialog searchOverlay"></div>');
sf.load('/extra/search.txt', function(responseText, textStatus, XMLHttpRequest){
sf.find('.closeLink').click(function(ev){
sf.remove();
$('#searchLink').data('open', false).focus();
ev.preventDefault();
});
$('div.searchLink').after(sf);
sf.find('.forceShow').html('&nbsp;').end().find('[name=q]').attr('title', 'Search').focus();
$('#searchLink').css('cursor', 'pointer');
});
ev.preventDefault();
});

$('a#topLink').data('h1', $('div.hd > h1').first().attr('tabindex', '-1')).click(function(ev){
$(this).data('h1').focus();
ev.preventDefault();
});

var hitCounter = setInterval(function(){
$.getScript('/cl/hit_counter.js.php');
}, 30000);

});
