$(document).ready(function() {

// accordion

	$('.accordion').children().hide();
	
	$('.accordion h2').show();
		
	$(".accordion h2").mouseover(function(){
		$(this).css({'text-decoration' : 'none', 'cursor' : 'pointer'});
    }).mouseout(function(){
		$(this).css({'text-decoration' : 'none', 'cursor' : 'default'});
    });
	
	$('.accordion h2').click(function() { 
		$(this).toggleClass('chosen');
		$(this).nextUntil('h2').toggle();
	});

// highlight current page

$.expr[":"].econtains = function(obj, index, meta, stack){
return (obj.textContent || obj.innerText || $(obj).text() || "").toLowerCase() == meta[3].toLowerCase();
} // exact match

var current = $("h1").text();
if (current != '') { $(".sub_navigation a:econtains('"+current+"')").addClass("current"); }


// link styles
      
    $("a[href$='.pdf']").addClass("pdf");
    $("a[href$='.doc']").addClass("doc");
    $("a[href$='.txt']").addClass("txt");

// slideshow

$('#illustration') 
.after('<div id="illustration_nav">') 
.cycle({ 
    fx:     'fade',
    pager:  '#illustration_nav'
});


});


