$(function(){


	// Cufon font replacement
	Cufon.replace('#header .nav h4 a',{hover:true});
	Cufon.replace('#header .heading h2, #header .image .text, #search label, #right h2, #footer h1, #left h3, #mid h1');


	// Header image rotator
	$('#header .rotator').innerfade({
		animationtype: 'fade', // fade or slide
		speed: 900, // animation speed in milliseconds
		timeout: 5500, // time between animations in milliseconds
		type: 'sequence', // sequence, random, or random_start
		containerheight: '161px' // height of the containing element
	}).find('li').css('display', 'block');


	// Navigation submenu
	$('#header .nav li:has(h4)').hover(
		function(){
			$(this).addClass('hover');
		},
		function(){
			$(this).removeClass('hover');
			Cufon.refresh('#header .nav h4 a');
		}
	);


	// Middle column list
	$('#mid .list h4 a').click(function(){
		$(this).parent().parent().children('p').slideToggle(200);
		return false;
	});

	// Open external links in a new window
	$('a[rel=external]').click(function(e){
		open(this.href);
		e.preventDefault();
	});



});