$(document).ready(function() {
  
	// make the selectlist submit on change
	$('form.jumpmenu select').change(function(){
		
		form = $('form.jumpmenu');
		form.submit();
				
	});
	// hide the refresh link
	$('form.jumpmenu input.fr').hide();
	
	
	// turn names on contact list into links
	// a bit of hoop jumping because I couldn't 
	// find anywhere to hook into the CMS framework...
	$('ul.contact-list li').each(function(){
		//alert($(this).html());
		if($(this).hasClass('contact-main')){
			name_node = $(this).find("span.contact-name");
			name = name_node.html();
			//alert(name);
			email_node = $(this).next();
			link_node = email_node.next();
			href_node = link_node.children('a');
			href = href_node.attr('href');
			if(href){
				name_node.html('<a href="' + href + '">' + name + '</a>');
				link_node.hide();
			}
		}
	});
	

	// for the timeline carousel
	$(".timeline").jCarouselLite({
		visible:1,
		start:0,
        btnNext: ".next",
        btnPrev: ".prev",
		btnGo:
	    [".btn-2002", ".btn-2003",
	    ".btn-2004", ".btn-2005",
	    ".btn-2006", ".btn-2007"]
    });


});
